OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/views/cost_reports/_restore_query.rhtml

30 lines
843 B

<script type="text/javascript">
//<![CDATA[
set_filters = function() {
// Activate recent filters on loading
<% query.filters.select {|f| f.class.display? }.each do |f| %>
restore_filter("<%= f.class.underscore_name %>",
"<%= f.operator.to_s %>"<%= "," if f.values %>
<%= f.values.to_json if f.values %>);
<% end %>
}
set_group_bys = function() {
// Activate recent group_bys on loading
<% query.group_bys.each do |group_by| %>
<%= "show_group_by_column('#{group_by.class.underscore_name}');" if group_by.column? %>
<%= "show_group_by_row('#{group_by.class.underscore_name}');" if group_by.row? %>
<% end %>
}
restore_query_inputs = function() {
disable_all_filters();
disable_all_group_bys();
set_filters();
set_group_bys();
}
restore_query_inputs();
//]]>
</script>