Skip to content

Commit

Permalink
Merge pull request #564 from fatfreecrm/upgrade_select2
Browse files Browse the repository at this point in the history
Fix 'Uncaught Error: No select2/compat/inputData'
  • Loading branch information
CloCkWeRX committed Feb 17, 2017
2 parents 5bf13b1 + c5b1ccb commit 1b305e0
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//= require jquery-migrate
//= require jquery_ujs
//= require jquery-ui
//= require select2
//= require select2-full
//= require crm
//= require crm_classes
//= require crm_loginout
Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/crm_select2.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#$(".select2_tag").each ->
$(this).select2
'width':'resolve'
tags: $(this).data("tags")
placeholder: $(this).data("placeholder")
multiple: $(this).data("multiple")

Expand Down
6 changes: 1 addition & 5 deletions app/views/shared/_tags.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,4 @@
%td{ :valign => :top, :colspan => span }
.label= t(:tags) + ":"

= f.hidden_field :tag_list,
{:class => "select2_tag", :data => {:tags => Tag.all.map{|t| t.name},
:url => url_for(action: 'field_group'), :placeholder => t(:select_or_create_tags),
:multiple => true, :asset_id => f.object.try(:id),
}, value: f.object.tag_list.join(",")}
= f.select :tag_list, Tag.all.map{|t| t.name}, {}, {:class => "select2_tag", :data => {:tags => true, :url => url_for(action: 'field_group'), :placeholder => t(:select_or_create_tags), :multiple => true, :asset_id => f.object.try(:id)}, :multiple => true}

0 comments on commit 1b305e0

Please sign in to comment.