@@ -39,6 +39,7 | |||
|
39 | 39 | { :url => { :set_filter => 1 }, |
|
40 | 40 | :before => 'selectAllOptions("selected_columns");', |
|
41 | 41 | :update => "content", |
|
42 | :complete => "apply_filters_observer()", | |
|
42 | 43 | :with => "Form.serialize('query_form')" |
|
43 | 44 | }, :class => 'icon icon-checked' %> |
|
44 | 45 |
@@ -53,6 +53,18 function toggle_multi_select(field) { | |||
|
53 | 53 | select.multiple = true; |
|
54 | 54 | } |
|
55 | 55 | } |
|
56 | ||
|
57 | function apply_filters_observer() { | |
|
58 | $$("#query_form input[type=text]").invoke("observe", "keypress", function(e){ | |
|
59 | if(e.keyCode == Event.KEY_RETURN) { | |
|
60 | <%= remote_function(:url => { :set_filter => 1}, | |
|
61 | :update => "content", | |
|
62 | :with => "Form.serialize('query_form')", | |
|
63 | :complete => "e.stop(); apply_filters_observer()") %> | |
|
64 | } | |
|
65 | }); | |
|
66 | } | |
|
67 | Event.observe(document,"dom:loaded", apply_filters_observer); | |
|
56 | 68 |
|
|
57 | 69 | </script> |
|
58 | 70 |
General Comments 0
You need to be logged in to leave comments.
Login now