redmine_extensions 0.0.34 → 0.0.36

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/redmine_extensions/redmine_extensions.js +46 -20
  3. data/{spec/redmine/public/javascripts/redmine_extensions/redmine_extensions.js → app/assets/javascripts/redmine_extensions/redmine_extensions.js.orig} +48 -15
  4. data/app/helpers/redmine_extensions/application_helper.rb +2 -2
  5. data/app/helpers/redmine_extensions/application_helper.rb.orig +66 -109
  6. data/lib/redmine_extensions/version.rb +1 -1
  7. data/spec/redmine/{db/test.sqlite3 → tmp/pdf/empty} +0 -0
  8. data/spec/redmine/tmp/test/empty +0 -0
  9. data/spec/redmine/tmp/thumbnails/empty +0 -0
  10. metadata +9 -52
  11. data/app/views/easy_entity_assignments/_assignments_container.html.erb.orig +0 -45
  12. data/app/views/easy_queries/_entities.html.erb.orig +0 -67
  13. data/lib/redmine_extensions/easy_query_adapter.rb.orig +0 -185
  14. data/lib/redmine_extensions/version.rb.orig +0 -7
  15. data/spec/redmine/Gemfile.lock +0 -191
  16. data/spec/redmine/config/secrets.yml +0 -3
  17. data/spec/redmine/db/development.sqlite3 +0 -0
  18. data/spec/redmine/db/schema.rb +0 -678
  19. data/spec/redmine/log/development.log +0 -22900
  20. data/spec/redmine/log/test.scm.stderr.log +0 -11
  21. data/spec/redmine/plugins/easy_test_plugin/Gemfile +0 -1
  22. data/spec/redmine/plugins/easy_test_plugin/app/controllers/easy_issue_tests_controller.rb +0 -9
  23. data/spec/redmine/plugins/easy_test_plugin/app/models/easy_testing_query.rb +0 -90
  24. data/spec/redmine/plugins/easy_test_plugin/app/views/easy_issue_tests/index.html.erb +0 -2
  25. data/spec/redmine/plugins/easy_test_plugin/config/locales/en.yml +0 -2
  26. data/spec/redmine/plugins/easy_test_plugin/config/routes.rb +0 -2
  27. data/spec/redmine/plugins/easy_test_plugin/init.rb +0 -34
  28. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/hooks.rb +0 -5
  29. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/internals.rb +0 -4
  30. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/controllers/issues_controller_patch.example +0 -30
  31. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/helpers/issues_helper_patch.example +0 -30
  32. data/spec/redmine/plugins/easy_test_plugin/lib/easy_test_plugin/redmine_patch/models/issue_patch.example +0 -30
  33. data/spec/redmine/public/javascripts/redmine_extensions/application.js +0 -13
  34. data/spec/redmine/public/javascripts/redmine_extensions/jquery.easy_query.js +0 -235
  35. data/spec/redmine/public/javascripts/redmine_extensions/jquery.entityarray.js +0 -130
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b6e0eb376235ff62e381986d30f3a7d8bb6515c1
4
- data.tar.gz: a8a898910bd36a58c4f9f66c3a361a57fa74f14e
3
+ metadata.gz: d3f9a38656f8dd1905443c62f28a474d343a85d1
4
+ data.tar.gz: 2d754bfeff6d1660ab67d7fced4de34c77d5bc60
5
5
  SHA512:
6
- metadata.gz: 30a690472d54d8efc1cb8be0963ae8b2796029fc591dcaf85741ac190043d02bf753b55de12a1f333d6d30b0c931b4abd39901336ea038aeaf71354b0ce9ffaa
7
- data.tar.gz: 06078d634394143370e1f563d48c8d8e99899df930beee7b0c4eb0f0e589da857cf9b7ddf56c3fc80802c4079f504bd435292e8470fd0c3ac08079afd5ef3310
6
+ metadata.gz: 9f8a3463a6edc8cfefaf63e9093abe5e354cc2ad32177d74a9a0d340ed1f30be5ffc75964a4331c84d814601b039a77f7f656c2fea18c55c74584431cc2367d3
7
+ data.tar.gz: ef3ee2923abc88eb42fd8427b8d8ad42ddff8457e954b8adffb817ce942a3d2163c48398004328dff9ad75c0eb8b0ab99b98cd64035dc1af9750c983c873fdbb
@@ -340,6 +340,8 @@ window.closeFlashMessage = (function($element){
340
340
  this._initData(this.options.source);
341
341
  } else if ( this.options.preload && this.options.load_immediately) {
342
342
  this.load();
343
+ } else if ( this.selectedValues ) {
344
+ this.setValue( this.selectedValues );
343
345
  }
344
346
  },
345
347
 
@@ -542,6 +544,7 @@ window.closeFlashMessage = (function($element){
542
544
  name: value.value
543
545
  });
544
546
  this.element.trigger('change');
547
+ this.element.val('');
545
548
  } else {
546
549
  this.element.val(value.value);
547
550
  this.valueElement.val(value.id);
@@ -554,42 +557,65 @@ window.closeFlashMessage = (function($element){
554
557
  if( typeof values == 'undefined' || !values )
555
558
  return false;
556
559
 
560
+ if( that.options.multiple ) {
561
+ that.valueElement.entityArray('clear');
562
+ }
557
563
  if( this.options.preload ) {
558
564
  this.load(function(){
559
- if( that.options.multiple ) {
560
- that.valueElement.entityArray('clear');
561
- }
562
565
  that._setValues(values)
563
566
  });
564
567
  } else {
565
- // TODO - where to get real text value?
566
- this.element.val(values[0]);
567
- this.valueElement.val(values[0]);
568
+ that._setValues(values);
568
569
  }
569
570
  },
570
571
 
571
572
  _setValues: function(values) {
572
- var that = this;
573
- $.each(that.possibleValues, function(i, val) {
574
- if ( values.indexOf(val.id) > -1 || (values.indexOf(val.id.toString()) > -1)) {
575
- if(that.options.multiple) {
576
- that.valueElement.entityArray('add', { id: val.id, name: val.value });
577
- } else {
578
- that.element.val(val.value);
579
- that.valueElement.val(val.id);
573
+ var selected = [];
574
+
575
+ if( values.length == 0 )
576
+ return false;
577
+
578
+ // allows the combination of only id values and values with label
579
+ for (var i = values.length - 1; i >= 0; i--) {
580
+ var identifier, label;
581
+ if( values[i] instanceof Object && !Array.isArray(values[i]) && values[i] !== null ) {
582
+ selected.push( values[i] );
583
+ } else if( this.options.preload && Array.isArray(this.possibleValues) ) {
584
+ for(var j = this.possibleValues.length - 1; j >= 0; j-- ) {
585
+ if ( values[i] == this.possibleValues[j].id || values[i] == this.possibleValues[j].id.toString() ) {
586
+ selected.push(this.possibleValues[j]);
587
+ break;
588
+ }
580
589
  }
590
+ } else {
591
+ selected.push( {id: values[i], value: values[i]} );
581
592
  }
582
- });
593
+ }
594
+ for (var i = selected.length - 1; i >= 0; i--) {
595
+ if(this.options.multiple) {
596
+ this.valueElement.entityArray('add', { id: selected[i].id, name: selected[i].value });
597
+ } else {
598
+ this.element.val(selected[i].value);
599
+ this.valueElement.val(selected[i].id);
600
+ }
601
+ }
583
602
  },
584
603
 
585
- getValue: function() {
586
- if( this.options.multiple && !this.expanded ) {
587
- return this.valueElement.entityArray('getValue'); // entityArray
604
+ getValue: function(with_label) {
605
+ var result;
606
+ if ( this.options.multiple && !this.expanded ) {
607
+ result = this.valueElement.entityArray('getValue'); // entityArray
588
608
  } else if ( this.options.multiple ) {
589
- return this.valueElement.val(); //select multiple=true
609
+ result = this.valueElement.val(); // select multiple=true
590
610
  } else {
591
- return [this.valueElement.val()]; // hidden field
611
+ result = [this.valueElement.val()]; // hidden field
612
+ }
613
+ if( with_label ) {
614
+ result = this.possibleValues.filter(function(el) {
615
+ return result.indexOf( el.id ) >= 0;
616
+ });
592
617
  }
618
+ return result;
593
619
  }
594
620
 
595
621
  });
@@ -542,6 +542,7 @@ window.closeFlashMessage = (function($element){
542
542
  name: value.value
543
543
  });
544
544
  this.element.trigger('change');
545
+ this.element.val('');
545
546
  } else {
546
547
  this.element.val(value.value);
547
548
  this.valueElement.val(value.id);
@@ -554,34 +555,51 @@ window.closeFlashMessage = (function($element){
554
555
  if( typeof values == 'undefined' || !values )
555
556
  return false;
556
557
 
558
+ if( that.options.multiple ) {
559
+ that.valueElement.entityArray('clear');
560
+ }
557
561
  if( this.options.preload ) {
558
562
  this.load(function(){
559
- if( that.options.multiple ) {
560
- that.valueElement.entityArray('clear');
561
- }
562
563
  that._setValues(values)
563
564
  });
564
565
  } else {
565
- // TODO - where to get real text value?
566
- this.element.val(values[0]);
567
- this.valueElement.val(values[0]);
566
+ that._setValues(values);
568
567
  }
569
568
  },
570
569
 
571
570
  _setValues: function(values) {
572
- var that = this;
573
- $.each(that.possibleValues, function(i, val) {
574
- if ( values.indexOf(val.id) > -1 || (values.indexOf(val.id.toString()) > -1)) {
575
- if(that.options.multiple) {
576
- that.valueElement.entityArray('add', { id: val.id, name: val.value });
577
- } else {
578
- that.element.val(val.value);
579
- that.valueElement.val(val.id);
571
+ var selected = [];
572
+
573
+ if( values.length == 0 )
574
+ return false;
575
+
576
+ // allows the combination of only id values and values with label
577
+ for (var i = values.length - 1; i >= 0; i--) {
578
+ var identifier, label;
579
+ if( values[i] instanceof Object && !Array.isArray(values[i]) && values[i] !== null ) {
580
+ selected.push( values[i] );
581
+ } else if( this.options.preload && Array.isArray(this.possibleValues) ) {
582
+ for(var j = this.possibleValues.length - 1; j >= 0; j-- ) {
583
+ if ( values[i] == this.possibleValues[j].id || values[i] == this.possibleValues[j].id.toString() ) {
584
+ selected.push(this.possibleValues[j]);
585
+ break;
586
+ }
580
587
  }
588
+ } else {
589
+ selected.push( {id: values[i], value: values[i]} );
581
590
  }
582
- });
591
+ }
592
+ for (var i = selected.length - 1; i >= 0; i--) {
593
+ if(this.options.multiple) {
594
+ this.valueElement.entityArray('add', { id: selected[i].id, name: selected[i].value });
595
+ } else {
596
+ this.element.val(selected[i].value);
597
+ this.valueElement.val(selected[i].id);
598
+ }
599
+ }
583
600
  },
584
601
 
602
+ <<<<<<< HEAD
585
603
  getValue: function() {
586
604
  if( this.options.multiple && !this.expanded ) {
587
605
  return this.valueElement.entityArray('getValue'); // entityArray
@@ -589,6 +607,21 @@ window.closeFlashMessage = (function($element){
589
607
  return this.valueElement.val(); //select multiple=true
590
608
  } else {
591
609
  return [this.valueElement.val()]; // hidden field
610
+ =======
611
+ getValue: function(with_label) {
612
+ var result;
613
+ if ( this.options.multiple && !this.expanded ) {
614
+ result = this.valueElement.entityArray('getValue'); // entityArray
615
+ } else if ( this.options.multiple ) {
616
+ return this.valueElement.val(); // select multiple=true
617
+ } else {
618
+ result = [this.valueElement.val()]; // hidden field
619
+ }
620
+ if( with_label ) {
621
+ result = this.possibleValues.filter(function(el) {
622
+ return result.indexOf( el.id ) >= 0;
623
+ });
624
+ >>>>>>> 4a3284c... labels
592
625
  }
593
626
  }
594
627
 
@@ -164,7 +164,7 @@ module RedmineExtensions
164
164
  end
165
165
 
166
166
  def autocomplete_field_tag(name, jsonpath_or_array, selected_values, options = {})
167
- options.reverse_merge!({select_first_value: false, show_toggle_button: false, load_immediately: false})
167
+ options.reverse_merge!({select_first_value: false, show_toggle_button: false, load_immediately: false, preload: true})
168
168
  options[:id] ||= sanitize_to_id(name)
169
169
 
170
170
  selected_values ||= []
@@ -177,7 +177,7 @@ module RedmineExtensions
177
177
 
178
178
  content_tag(:span, :class => 'easy-multiselect-tag-container') do
179
179
  text_field_tag('', '', (options[:html_options] || {}).merge(id: options[:id])) +
180
- javascript_tag("$('##{options[:id]}').easymultiselect({multiple: true, rootElement: #{options[:rootElement].to_json}, inputName: '#{name}', preload: true, source: #{source}, selected: #{selected_values.to_json}, show_toggle_button: #{options[:show_toggle_button]}, select_first_value: #{options[:select_first_value]}, load_immediately: #{options[:load_immediately]}, autocomplete_options: #{(options[:jquery_auto_complete_options]||{}).to_json} });")
180
+ javascript_tag("$('##{options[:id]}').easymultiselect({multiple: true, rootElement: #{options[:rootElement].to_json}, inputName: '#{name}', preload: #{options[:preload]}, source: #{source}, selected: #{selected_values.to_json}, show_toggle_button: #{options[:show_toggle_button]}, select_first_value: #{options[:select_first_value]}, load_immediately: #{options[:load_immediately]}, autocomplete_options: #{(options[:jquery_auto_complete_options]||{}).to_json} });")
181
181
  end
182
182
  end
183
183
 
@@ -6,7 +6,7 @@ module RedmineExtensions
6
6
 
7
7
  def plugin_settings_path(plugin, *attrs)
8
8
  if plugin.is_a?(Redmine::Plugin) && (plugin.settings[:only_easy] || plugin.settings[:easy_settings])
9
- redmine_extensions_engine.edit_easy_setting_path(plugin, *attrs)
9
+ edit_easy_setting_path(plugin, *attrs)
10
10
  else
11
11
  super
12
12
  end
@@ -44,21 +44,20 @@ module RedmineExtensions
44
44
  end
45
45
  end
46
46
 
47
- def query_for_entity(entity_class)
48
- entity_class_name = entity_class.name
49
- query_class = "Easy#{entity_class_name}Query".constantize rescue nil
50
- return query_class if query_class && query_class < EasyQuery
51
- query_class ||= "#{entity_class_name}Query".constantize rescue nil
52
- end
53
-
54
- def render_entity_assignments(entity, target_entity, options = {}, &block)
47
+ def render_entity_assignments(entity, target_class, options = {}, &block)
55
48
  options ||= {}
56
- collection_name = options.delete(:collection_name) || target_entity.name.pluralize.underscore
57
- query_class = query_for_entity(target_entity)
58
-
59
- return '' if !query_class || !entity.respond_to?(collection_name)
49
+ collection_name = options.delete(:collection_name) || target_class.name.pluralize.underscore
60
50
 
61
51
  project = options.delete(:project)
52
+ query_class = options.delete(:query_class)
53
+
54
+ if query_class.nil?
55
+ query_class_name = target_class.name + 'Query'
56
+
57
+ query_class = query_class_name.constantize #if Object.const_defined?(query_class_name)
58
+ end
59
+
60
+ return '' if !query_class || !(query_class < EasyQuery) || !entity.respond_to?(collection_name)
62
61
 
63
62
  query = query_class.new(:name => 'c_query')
64
63
  query.project = project
@@ -69,8 +68,9 @@ module RedmineExtensions
69
68
 
70
69
  entities_count = entities.size
71
70
  options[:entities_count] = entities_count
71
+
72
72
  options[:module_name] ||= "entity_#{entity.class.name.underscore}_#{entity.id}_#{collection_name}"
73
- options[:heading] ||= l("label_#{query.entity}_plural", :default => 'Heading')
73
+ options[:heading] ||= l("label_#{target_class.name.underscore}_plural", :default => 'Heading')
74
74
 
75
75
  if options[:context_menus_path].nil?
76
76
  options[:context_menus_path] = [
@@ -82,11 +82,9 @@ module RedmineExtensions
82
82
  end
83
83
  end
84
84
 
85
- query.output = options[:display_style] || (entities_count > 3 ? 'list' : 'tile')
86
-
87
85
  render(:partial => 'easy_entity_assignments/assignments_container', :locals => {
88
86
  :entity => entity,
89
- :query => query, :project => project,
87
+ :query => query, :target_class => target_class, :project => project,
90
88
  :entities => entities, :entities_count => entities_count, :options => options})
91
89
  end
92
90
 
@@ -108,104 +106,63 @@ module RedmineExtensions
108
106
  end
109
107
  end
110
108
 
111
-
112
- # ==== Options
113
- # * <tt>class: Hash or String</tt> - This option can be used to add custom CSS classes. It can be *String* or *Hash*.
114
- # class: {heading: 'heading-additional-css', container: 'container-additional-css'}
115
- # * <tt>heading_tag: name of HTML element of module heading</tt> - By default its its *h3*
116
- # ** Aliases for this options are: wrapping_heading_element, header_tag
117
- # * <tt>toggle: false</tt> - This disable toggle function (collapsible and remember)
118
- # ** Aliases for this options are: collapsible, no_expander
119
- # * <tt>remember: false</tt> - This disable remember function of toggle container
120
- # ** Aliases for this options are: ajax_call
121
- #
122
- def render_module_easy_box(id, heading, options = {}, &block) # with fallback to old
123
- options[:toggle] = true unless options.key?(:toggle)
124
- options[:remember] = options.delete(:ajax_call) if options.key?(:ajax_call)
125
- options[:collapsible] = !options.delete(:no_expander) if options.key?(:no_expander)
126
-
127
- renderer = EasyBoxRenderer.new(self, id, heading, options)
128
- renderer.content = capture {yield renderer}
129
-
130
- renderer.render
131
- end
132
-
133
- EasyBoxRenderer = Struct.new(:view, :id, :heading, :options) do
134
-
135
- attr_writer :container_class, :heading_class, :content_class
136
- attr_writer :heading_links, :footer, :icon
137
- attr_accessor :content
138
-
139
- def container_class
140
- s = (@container_class.presence || css_classes[:container]).to_s
141
- s << ' collapsible' if collapsible?
142
- s << ' collapsed' if collapsed?
143
-
144
- s
145
- end
146
-
147
- def saving_state_enabled?
148
- collapsible? && (options[:remember].nil? || !!options[:remember])
149
- end
150
-
151
- def heading_tag
152
- (options[:wrapping_heading_element] || (options[:header_tag] || options[:heading_tag])).presence || 'h3'
153
- end
154
-
155
- def heading_class
156
- (@heading_class || css_classes[:heading]).to_s
157
- end
158
-
159
- def icon
160
- @icon ||= options[:icon] && " icon #{options[:icon]}"
161
- end
162
-
163
- def heading_links
164
- if block_given?
165
- @heading_links = view.capture { yield }
166
- else
167
- @heading_links.to_s.html_safe
168
- end
169
- end
170
-
171
- def collapsible?
172
- return @collapsible unless @collapsible.nil?
173
- @collapsible ||= !!options[:toggle] && (options[:collapsible].nil? || !!options[:collapsible])
109
+ # options:
110
+ # => options[:heading] = text beside of plus button
111
+ # => options[:container_html] = a hash of html attributes
112
+ # => options[:default_button_state] = (true => expanded -), (false => collapsed +)
113
+ # => options[:ajax_call] = make ajax call for saving state (true => ajax call, false => no call, no save)
114
+ # => options[:wrapping_heading_element] = html element outside heading => h3, h4
115
+ def render_toggler(container_uniq_id, user = nil, options={}, &block)
116
+ user ||= User.current
117
+ options[:heading] ||= ''
118
+ options[:heading_links] ||= []
119
+ options[:heading_links] = [options[:heading_links]] if options[:heading_links] && !options[:heading_links].is_a?(Array)
120
+ options[:container_html] ||= {}
121
+ options[:default_button_state] = false #if is_mobile_device?
122
+ options[:default_button_state] = true if options[:default_button_state].nil?
123
+ options[:ajax_call] = true if options[:ajax_call].nil?
124
+
125
+ s = ''
126
+ if !options.key?(:no_heading_button)
127
+ options[:heading] << content_tag(:div, options[:heading_links].join(' ').html_safe, :class => 'module-heading-links') unless options[:heading_links].blank?
128
+ s << render_toggler_header(user, options[:heading].html_safe, container_uniq_id, options)
129
+ end
130
+
131
+ if options[:ajax_call] == false
132
+ expanded = options[:default_button_state]
133
+ else
134
+ expanded = true
174
135
  end
175
136
 
176
- def collapsed?
177
- !!options[:default] || !!options[:collapsed] || !!options[:default_button_state]
178
- end
137
+ s << (content_tag(:div, {
138
+ :id => container_uniq_id,
139
+ :style => (expanded ? '' : 'display:none')
140
+ }.merge(options[:container_html]) { |k, o, n| "#{o}; #{n}" }, &block))
141
+ s.html_safe
142
+ end
179
143
 
180
- def footer
181
- if block_given?
182
- @footer = view.capture { yield }
183
- else
184
- @footer.to_s.html_safe
185
- end
186
- end
144
+ def render_toggler_header(user, content, modul_uniq_id, options={})
145
+ expander_options = options[:expander_options] || {}
146
+ wrapping_heading_element = options[:wrapping_heading_element] || 'h3'
147
+ wrapping_heading_element_classes = (options[:wrapping_heading_element_classes] || '') + ' module-heading'
148
+ wrapping_heading_element_styles = options[:wrapping_heading_element_styles]
149
+ ajax_call = options.delete(:ajax_call) ? 'true' : 'false'
187
150
 
188
- def render
189
- view.render({partial: 'common/collapsible_module_layout', locals: {renderer: self, content: content}} )
190
- end
191
- private
151
+ html = ''
192
152
 
193
- def css_classes
194
- return @css_classes if @css_classes
195
- if (css_class = options.delete(:class)).is_a?(Hash)
196
- @css_classes = css_class
197
- else
198
- @css_classes = {
199
- container: css_class,
200
- heading: css_class,
201
- content: css_class
202
- }
203
- end
153
+ if options[:no_expander]
154
+ html << content_tag(wrapping_heading_element, content, :class => wrapping_heading_element_classes, :style => wrapping_heading_element_styles)
155
+ else
156
+ html << '<div class="module-toggle-button">'
157
+ html << "<div class='group open' >"
158
+ html << content_tag(wrapping_heading_element, content, :class => wrapping_heading_element_classes, :style => wrapping_heading_element_styles, :onclick => "var event = arguments[0] || window.event; if( !$(event.target).hasClass('do_not_toggle') && !$(event.target).parent().hasClass('module-heading-links') ) toggleMyPageModule(this,'#{modul_uniq_id}','#{user.id}', #{ajax_call})")
159
+ html << "<span class='expander #{expander_options[:class]}' onclick=\"toggleMyPageModule($(this),'#{modul_uniq_id}','#{user.id}', #{ajax_call}); return false;\" id=\"expander_#{modul_uniq_id}\">&nbsp;</span>"
160
+ html << '</div></div>'
204
161
  end
205
162
 
163
+ html.html_safe
206
164
  end
207
165
 
208
-
209
166
  def autocomplete_field_tag(name, jsonpath_or_array, selected_values, options = {})
210
167
  options.reverse_merge!({select_first_value: false, show_toggle_button: false, load_immediately: false, preload: true})
211
168
  options[:id] ||= sanitize_to_id(name)
@@ -221,10 +178,10 @@ module RedmineExtensions
221
178
  content_tag(:span, :class => 'easy-multiselect-tag-container') do
222
179
  text_field_tag('', '', (options[:html_options] || {}).merge(id: options[:id])) +
223
180
  <<<<<<< HEAD
224
- javascript_tag("$('##{options[:id]}').easymultiselect({multiple: true, rootElement: #{options[:rootElement]}, inputName: '#{name}', preload: #{options[:preload]}, source: #{source}, selected: #{selected_values.to_json}, show_toggle_button: #{options[:show_toggle_button]}, select_first_value: #{options[:select_first_value]}, load_immediately: #{options[:load_immediately]}, autocomplete_options: #{(options[:jquery_auto_complete_options]||{}).to_json} });")
225
- =======
226
181
  javascript_tag("$('##{options[:id]}').easymultiselect({multiple: true, rootElement: #{options[:rootElement].to_json}, inputName: '#{name}', preload: true, source: #{source}, selected: #{selected_values.to_json}, show_toggle_button: #{options[:show_toggle_button]}, select_first_value: #{options[:select_first_value]}, load_immediately: #{options[:load_immediately]}, autocomplete_options: #{(options[:jquery_auto_complete_options]||{}).to_json} });")
227
- >>>>>>> devel
182
+ =======
183
+ javascript_tag("$('##{options[:id]}').easymultiselect({multiple: true, rootElement: #{options[:rootElement]}, inputName: '#{name}', preload: #{options[:preload]}, source: #{source}, selected: #{selected_values.to_json}, show_toggle_button: #{options[:show_toggle_button]}, select_first_value: #{options[:select_first_value]}, load_immediately: #{options[:load_immediately]}, autocomplete_options: #{(options[:jquery_auto_complete_options]||{}).to_json} });")
184
+ >>>>>>> 4a3284c... labels
228
185
  end
229
186
  end
230
187