diff options
-rw-r--r-- | Gemfile | 1 | ||||
-rw-r--r-- | Gemfile.lock | 2 | ||||
-rw-r--r-- | app/assets/javascripts/application.js | 1 | ||||
-rw-r--r-- | app/assets/stylesheets/application.css | 1 | ||||
-rw-r--r-- | app/views/notes/_common_form.html.haml | 5 |
5 files changed, 10 insertions, 0 deletions
@@ -96,6 +96,7 @@ group :assets do gem "therubyracer" gem 'chosen-rails' + gem 'jquery-atwho-rails', '0.1.6' gem "jquery-rails", "2.0.2" gem "jquery-ui-rails", "0.5.0" gem "modernizr", "2.5.3" diff --git a/Gemfile.lock b/Gemfile.lock index 3d27d3fbe81..e517bb36f2c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -199,6 +199,7 @@ GEM httpauth (0.1) i18n (0.6.1) journey (1.0.4) + jquery-atwho-rails (0.1.6) jquery-rails (2.0.2) railties (>= 3.2.0, < 5.0) thor (~> 0.14) @@ -440,6 +441,7 @@ DEPENDENCIES haml-rails headless httparty + jquery-atwho-rails (= 0.1.6) jquery-rails (= 2.0.2) jquery-ui-rails (= 0.5.0) kaminari diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index f9fdb0f7dc2..02ef6caba38 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -11,6 +11,7 @@ //= require jquery.endless-scroll //= require jquery.highlight //= require jquery.waitforimages +//= require jquery.atwho //= require bootstrap //= require modernizr //= require chosen-jquery diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 92d542a9866..424ba71f7cb 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -4,6 +4,7 @@ * the top of the compiled file, but it's generally better to create a new file per style scope. *= require jquery.ui.all *= require jquery.ui.aristo + *= require jquery.atwho *= require chosen *= require_self *= require main diff --git a/app/views/notes/_common_form.html.haml b/app/views/notes/_common_form.html.haml index fc6e3c7ee6e..f91e921bbc7 100644 --- a/app/views/notes/_common_form.html.haml +++ b/app/views/notes/_common_form.html.haml @@ -37,3 +37,8 @@ = f.file_field :attachment, class: "input-file" %span.hint Any file less than 10 MB +:javascript + $(function(){ + var names = #{@project.users.pluck(:name)}; + $('.note-text').atWho('@', { data: names }); + }); |