Skip to content

Commit 24c6ad6

Browse files
waleedjaffargabrielbaez
authored andcommitted
fixes #70, Authorization problem
1 parent 4b581a4 commit 24c6ad6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

app/views/charts/_filters.rhtml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ function toggle_filter(field) {
2525
} else {
2626
Element.hide('tr_' + field)
2727
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+
}
2834
}
2935
}
3036
//]]>
@@ -33,7 +39,7 @@ function toggle_filter(field) {
3339
<table width="100%"><tr><td><table>
3440
<% unless @grouping_options.empty? %>
3541
<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>
3743
<% end %>
3844
<% @textconditions_options.each do |condition| %>
3945
<tr id="<%= "tr_#{condition[0]}" %>" class="filter"><td style="width:200px;">
@@ -49,7 +55,7 @@ function toggle_filter(field) {
4955
<label for="<%= "cb_#{condition[0]}" %>"><%= l("charts_condition_#{condition[0]}".gsub(".","_").to_sym) %></label>
5056
</td>
5157
<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]}" } %>
5359
<% end %></td></tr>
5460
<script type="text/javascript">toggle_filter('<%= condition[0] %>');</script>
5561
<% end %>
@@ -59,7 +65,7 @@ function toggle_filter(field) {
5965
<label for="<%= "cb_#{condition[0]}" %>"><%= l("charts_condition_#{condition[0]}".gsub(".","_").to_sym) %></label>
6066
</td>
6167
<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]}"} %>
6369
<% end %></td></tr>
6470
<script type="text/javascript">toggle_filter('<%= condition[0] %>');</script>
6571
<% end %>

0 commit comments

Comments
 (0)