Project

General

Profile

Patch #2285 » 2285_git.diff

Jean-Baptiste Barth, 2010-09-05 20:30

View differences:

app/views/issues/index.rhtml
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
                       
app/views/queries/_filters.rhtml
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

  
(2-2/2)