query the chainable instances for display?, delegates to class

git-svn-id: https://dev.finn.de/svn/cockpit/branches/reporting_merge@1775 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
t.felgentreff 14 years ago
parent 35c8e3f0c3
commit a7008f0762
  1. 4
      app/models/cost_query/chainable.rb
  2. 2
      app/views/cost_reports/_restore_query.rhtml

@ -251,6 +251,10 @@ class CostQuery < ActiveRecord::Base
@table_name || last_table
end
def display?
self.class.display?
end
def table_name
self.class.table_name
end

@ -3,7 +3,7 @@
set_filters = function() {
// Activate recent filters on loading
<% query.filters.select {|f| f.class.display? }.each do |f| %>
<% query.filters.select {|f| f.display? }.each do |f| %>
restore_filter("<%= f.class.underscore_name %>",
"<%= f.operator.to_s %>"<%= "," if f.values %>
<%= f.values.to_json if f.values %>);

Loading…
Cancel
Save