Merge pull request #1539 from NARKOZ/front-end

auto-complete for mentions in notes
This commit is contained in:
Dmitriy Zaporozhets 2012-09-24 06:02:34 -07:00
commit 8ec956421c
5 changed files with 10 additions and 0 deletions

View file

@ -96,6 +96,7 @@ group :assets do
gem "therubyracer" gem "therubyracer"
gem 'chosen-rails' gem 'chosen-rails'
gem 'jquery-atwho-rails', '0.1.6'
gem "jquery-rails", "2.0.2" gem "jquery-rails", "2.0.2"
gem "jquery-ui-rails", "0.5.0" gem "jquery-ui-rails", "0.5.0"
gem "modernizr", "2.5.3" gem "modernizr", "2.5.3"

View file

@ -199,6 +199,7 @@ GEM
httpauth (0.1) httpauth (0.1)
i18n (0.6.1) i18n (0.6.1)
journey (1.0.4) journey (1.0.4)
jquery-atwho-rails (0.1.6)
jquery-rails (2.0.2) jquery-rails (2.0.2)
railties (>= 3.2.0, < 5.0) railties (>= 3.2.0, < 5.0)
thor (~> 0.14) thor (~> 0.14)
@ -440,6 +441,7 @@ DEPENDENCIES
haml-rails haml-rails
headless headless
httparty httparty
jquery-atwho-rails (= 0.1.6)
jquery-rails (= 2.0.2) jquery-rails (= 2.0.2)
jquery-ui-rails (= 0.5.0) jquery-ui-rails (= 0.5.0)
kaminari kaminari

View file

@ -11,6 +11,7 @@
//= require jquery.endless-scroll //= require jquery.endless-scroll
//= require jquery.highlight //= require jquery.highlight
//= require jquery.waitforimages //= require jquery.waitforimages
//= require jquery.atwho
//= require bootstrap //= require bootstrap
//= require modernizr //= require modernizr
//= require chosen-jquery //= require chosen-jquery

View file

@ -4,6 +4,7 @@
* the top of the compiled file, but it's generally better to create a new file per style scope. * 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.all
*= require jquery.ui.aristo *= require jquery.ui.aristo
*= require jquery.atwho
*= require chosen *= require chosen
*= require_self *= require_self
*= require main *= require main

View file

@ -37,3 +37,8 @@
= f.file_field :attachment, class: "input-file" = f.file_field :attachment, class: "input-file"
%span.hint Any file less than 10 MB %span.hint Any file less than 10 MB
:javascript
$(function(){
var names = #{@project.users.pluck(:name)};
$('.note-text').atWho('@', { data: names });
});