Fixed: pressing enter in filters should result to an 'apply', not a 'save'. #2285

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4093 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Baptiste Barth committed 2010-09-16 21:33:49 +00:00
1 parent 0d967c0572
commit 35dba0f412
2 files changed
+13

No files matched your search

+12
View File
@@ -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);
//]]>
</script>