add callback

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1333 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
t.felgentreff 15 years ago
parent 361776cbbd
commit 03b2e9469c
  1. 6
      app/views/cost_reports/_filters.rhtml
  2. 2
      app/views/cost_reports/index.rhtml

@ -8,7 +8,7 @@
<% active_filters = query.filters.select {|f| f.class.display?} %>
<script type="text/javascript">
//<![CDATA[
document.observe("dom:loaded", function() {
function set_filters() {
// Activate recent filters on loading
<% active_filters.each do |f| %>
show_filter("<%= f.class.underscore_name %>");
@ -17,7 +17,9 @@ document.observe("dom:loaded", function() {
toggle_multi_select("<%= f.class.underscore_name %>");
<% end %>
<% end %>
});
}
document.observe("dom:loaded", set_filters());
//]]>
</script>

@ -20,12 +20,14 @@
<p class="buttons">
<%= link_to_remote l(:button_apply),
{ :url => { :set_filter => 1 },
:complete => "set_filters()"
:update => "content",
:with => "Form.serialize('query_form')"
}, :class => 'icon icon-checked' %>
<%= link_to_remote l(:button_clear),
{ :url => { :set_filter => 1 },
:complete => "set_filters()"
:update => "content",
}, :class => 'icon icon-reload' %>
<% if User.current.allowed_to?(:save_queries, @project, :global => true) %>

Loading…
Cancel
Save