From 4593d97472c741293eca9604cd571ce18d7199b2 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 20 Sep 2010 04:06:26 +0000 Subject: [PATCH] Merged r4093 from trunk. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4152 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/issues/index.rhtml | 1 + app/views/queries/_filters.rhtml | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/app/views/issues/index.rhtml b/app/views/issues/index.rhtml index ee6514d0b..ddd5d9080 100644 --- a/app/views/issues/index.rhtml +++ b/app/views/issues/index.rhtml @@ -39,6 +39,7 @@ { :url => { :set_filter => 1 }, :before => 'selectAllOptions("selected_columns");', :update => "content", + :complete => "apply_filters_observer()", :with => "Form.serialize('query_form')" }, :class => 'icon icon-checked' %> diff --git a/app/views/queries/_filters.rhtml b/app/views/queries/_filters.rhtml index 58ea1524c..20640eb8d 100644 --- a/app/views/queries/_filters.rhtml +++ b/app/views/queries/_filters.rhtml @@ -53,6 +53,18 @@ function toggle_multi_select(field) { select.multiple = true; } } + +function apply_filters_observer() { + $$("#query_form input[type=text]").invoke("observe", "keypress", function(e){ + if(e.keyCode == Event.KEY_RETURN) { + <%= remote_function(:url => { :set_filter => 1}, + :update => "content", + :with => "Form.serialize('query_form')", + :complete => "e.stop(); apply_filters_observer()") %> + } + }); +} +Event.observe(document,"dom:loaded", apply_filters_observer); //]]>