splendeo-dependent_select 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -31,11 +31,11 @@ function update_dependent_select( dependent_id, observed_id, values_array, // ma
31
31
 
32
32
  // this fills the dependent select
33
33
  values_array.each (function (e) {
34
- if (e[2]==filter) { // only include options with the right filter field
35
- var opt = new Element('option', {value: e[1]}); // create one <option> element...
36
- opt.text= e[0]; // add text,
37
- if(collapse_spaces) { replace(/ /g, '\240'); } // replacing spaces with &nbsp; if requested
38
- if(opt.value == previous_value) { opt.selected=true; } // mark it as selected if appropiate
34
+ if (e[2]==filter) { // only include options with the right filter field
35
+ var opt = new Element('option', {value: e[1]}); // create one <option> element...
36
+ if(collapse_spaces) { opt.text= e[0];} // assign the text (spaces are automatically collapsed)
37
+ else { opt.text = e[0].replace(/ /g, '\240'); } // replacing spaces with &nbsp; if requested
38
+ if(opt.value == previous_value) { opt.selected=true; } // mark it as selected if appropiate
39
39
  dependent_field.options[dependent_field.options.length]=opt; // attach to depentent_select.. could not use "add"
40
40
  }
41
41
  });
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splendeo-dependent_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Enrique Garcia Cota (egarcia)