diff --git a/app/views/queries/_filters.html.erb b/app/views/queries/_filters.html.erb
index 5207c51e3..ae9bdd070 100644
--- a/app/views/queries/_filters.html.erb
+++ b/app/views/queries/_filters.html.erb
@@ -1,106 +1,3 @@
-
-
@@ -153,3 +50,4 @@ Event.observe(document,"dom:loaded", apply_filters_observer);
|
<%= hidden_field_tag 'f[]', '' %>
+<%= javascript_tag 'Event.observe(window,"load",apply_filters_observer);' %>
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 9d27c0463..9aa996e3e 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -83,6 +83,104 @@ function hideFieldset(el) {
fieldset.down('div').hide();
}
+function add_filter() {
+ select = $('add_filter_select');
+ field = select.value
+ Element.show('tr_' + field);
+ check_box = $('cb_' + field);
+ check_box.checked = true;
+ toggle_filter(field);
+ select.selectedIndex = 0;
+
+ for (i=0; i 0) {
+ Element.show("div_values_" + field);
+ } else {
+ Element.hide("div_values_" + field);
+ }
+}
+
+function toggle_operator(field) {
+ operator = $("operators_" + field);
+ switch (operator.value) {
+ case "!*":
+ case "*":
+ case "t":
+ case "w":
+ case "o":
+ case "c":
+ enableValues(field, []);
+ break;
+ case "><":
+ enableValues(field, [0,1]);
+ break;
+ case "t+":
+ case "t+":
+ case ">t-":
+ case "