@@ -25,6 +25,12 @@ function toggle_filter(field) {
25
25
} else {
26
26
Element . hide ( 'tr_' + field )
27
27
values . disable ( ) ;
28
+ select = $ ( 'add_filter_select' ) ; //gets the drop down list element
29
+ for ( i = 0 ; i < select . options . length ; i ++ ) { //iterating through the options in drop down list
30
+ if ( select . options [ i ] . value == field ) { //If de-seclected element found
31
+ select . options [ i ] . disabled = false ; //set disabled = false
32
+ }
33
+ }
28
34
}
29
35
}
30
36
//]]>
@@ -33,7 +39,7 @@ function toggle_filter(field) {
33
39
< table width ="100% "> < tr > < td > < table >
34
40
<% unless @grouping_options . empty? %>
35
41
< tr > < td style ="width:200px; "> < label for ="grouping "> <%= l ( :charts_group_by ) %> </ label > </ td >
36
- < td > <%= select_tag :grouping , options_for_select ( @grouping_options , @grouping ) , { :class => "select-small" , :style => "width:200px" } %> </ td > </ tr >
42
+ < td > <%= select_tag :grouping , options_for_select ( @grouping_options , @grouping ) , { :class => "select-small" } %> </ td > </ tr >
37
43
<% end %>
38
44
<% @textconditions_options . each do |condition | %>
39
45
< tr id ="<%= "tr_#{ condition [ 0 ] } " %> " class ="filter "> < td style ="width:200px; ">
@@ -49,7 +55,7 @@ function toggle_filter(field) {
49
55
< label for ="<%= "cb_#{ condition [ 0 ] } " %> "> <%= l ( "charts_condition_#{ condition [ 0 ] } " . gsub ( "." , "_" ) . to_sym ) %> </ label >
50
56
</ td >
51
57
< td > <% unless condition [ 1 ] . nil? %>
52
- <%= select_tag condition [ 0 ] . to_sym , options_for_select ( condition [ 1 ] , @conditions [ condition [ 0 ] . to_sym ] ) , { :class => "select-small" , :style => "width:200px" , : id => "values_#{ condition [ 0 ] } " } %>
58
+ <%= select_tag condition [ 0 ] . to_sym , options_for_select ( condition [ 1 ] , @conditions [ condition [ 0 ] . to_sym ] ) , { :class => "select-small" , :id => "values_#{ condition [ 0 ] } " } %>
53
59
<% end %> </ td > </ tr >
54
60
< script type ="text/javascript "> toggle_filter ( '<%= condition [ 0 ] %> ' ) ; </ script >
55
61
<% end %>
@@ -59,7 +65,7 @@ function toggle_filter(field) {
59
65
< label for ="<%= "cb_#{ condition [ 0 ] } " %> "> <%= l ( "charts_condition_#{ condition [ 0 ] } " . gsub ( "." , "_" ) . to_sym ) %> </ label >
60
66
</ td >
61
67
< td > <% unless condition [ 1 ] . nil? %>
62
- <%= select_tag condition [ 0 ] . to_sym , options_for_select ( condition [ 1 ] , @conditions [ condition [ 0 ] . to_sym ] ) , { :multiple => true , :class => "select-small" , :style => "width:200px" , : id => "values_#{ condition [ 0 ] } " } %>
68
+ <%= select_tag condition [ 0 ] . to_sym , options_for_select ( condition [ 1 ] , @conditions [ condition [ 0 ] . to_sym ] ) , { :multiple => true , :class => "select-small" , :id => "values_#{ condition [ 0 ] } " } %>
63
69
<% end %> </ td > </ tr >
64
70
< script type ="text/javascript "> toggle_filter ( '<%= condition [ 0 ] %> ' ) ; </ script >
65
71
<% end %>
0 commit comments