优化页面代码
This commit is contained in:
parent
01120d063d
commit
4e7965d060
|
@ -137,6 +137,11 @@ class IssueQuery < Query
|
|||
:type => :list_optional, :values => role_values
|
||||
) unless role_values.empty?
|
||||
|
||||
#done_values = [10,20,30,40,50,60,70,80,90,100]
|
||||
#add_available_filter("done_ratio_111",
|
||||
# :type => :list_optional, :values => done_values
|
||||
#)
|
||||
|
||||
if versions.any?
|
||||
add_available_filter "fixed_version_id",
|
||||
:type => :list_optional,
|
||||
|
|
|
@ -1,28 +1,28 @@
|
|||
<%= javascript_tag do %>
|
||||
var operatorLabels = <%= raw_json Query.operators_labels %>;
|
||||
var operatorByType = <%= raw_json Query.operators_by_filter_type %>;
|
||||
var availableFilters = <%= raw_json query.available_filters_as_json %>;
|
||||
var labelDayPlural = <%= raw_json l(:label_day_plural) %>;
|
||||
var allProjects = <%= raw query.all_projects_values.to_json %>;
|
||||
$(document).ready(function(){
|
||||
var operatorLabels = <%= raw_json Query.operators_labels %>;
|
||||
var operatorByType = <%= raw_json Query.operators_by_filter_type %>;
|
||||
var availableFilters = <%= raw_json query.available_filters_as_json %>;
|
||||
var labelDayPlural = <%= raw_json l(:label_day_plural) %>;
|
||||
var allProjects = <%= raw query.all_projects_values.to_json %>;
|
||||
$(document).ready(function(){
|
||||
initFilters();
|
||||
<% query.filters.each do |field, options| %>
|
||||
addFilter("<%= field %>", <%= raw_json query.operator_for(field) %>, <%= raw_json query.values_for(field) %>);
|
||||
<% end %>
|
||||
});
|
||||
});
|
||||
<% end %>
|
||||
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table id="filters-table">
|
||||
</table>
|
||||
</td>
|
||||
<td class="add-filter">
|
||||
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
|
||||
<%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table id="filters-table">
|
||||
</table>
|
||||
</td>
|
||||
<td class="add-filter">
|
||||
<%= label_tag('add_filter_select', l(:label_filter_add)) %>
|
||||
<%= select_tag 'add_filter_select', filters_options_for_select(query), :name => nil %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<%= hidden_field_tag 'f[]', '' %>
|
||||
<% include_calendar_headers_tags %>
|
||||
|
|
Loading…
Reference in New Issue