Lines 1-6
Link Here
|
1 |
[% USE raw %] |
1 |
[% USE raw %] |
2 |
[% USE Asset %] |
2 |
[% USE Asset %] |
|
|
3 |
[% USE AuthorisedValues %] |
3 |
[% PROCESS 'i18n.inc' %] |
4 |
[% PROCESS 'i18n.inc' %] |
|
|
5 |
[% SET status = AuthorisedValues.GetAuthValueDropbox('TICKET_STATUS') %] |
4 |
[% SET footerjs = 1 %] |
6 |
[% SET footerjs = 1 %] |
5 |
[% USE TablesSettings %] |
7 |
[% USE TablesSettings %] |
6 |
[% INCLUDE 'doc-head-open.inc' %] |
8 |
[% INCLUDE 'doc-head-open.inc' %] |
Lines 41-46
Link Here
|
41 |
<div class="page-section"> |
43 |
<div class="page-section"> |
42 |
<fieldset class="action filters" style="cursor:pointer;"> |
44 |
<fieldset class="action filters" style="cursor:pointer;"> |
43 |
<a id="resolved_filter" class="filtered"><i class="fa fa-bars"></i> Include resolved</a> |
45 |
<a id="resolved_filter" class="filtered"><i class="fa fa-bars"></i> Include resolved</a> |
|
|
46 |
[% FOR st IN status %] |
47 |
| <a id="[% st.authorised_value | html %]_filter"><i class="fa fa-filter"></i> Filter [% st.lib | html %]</a> |
48 |
[% END %] |
44 |
</fieldset> |
49 |
</fieldset> |
45 |
|
50 |
|
46 |
<table id="table_concerns"> |
51 |
<table id="table_concerns"> |
Lines 88-94
Link Here
|
88 |
} else { |
93 |
} else { |
89 |
return; |
94 |
return; |
90 |
} |
95 |
} |
91 |
} |
96 |
}, |
|
|
97 |
source: 'catalog' |
92 |
}; |
98 |
}; |
93 |
|
99 |
|
94 |
var tickets_url = '/api/v1/tickets'; |
100 |
var tickets_url = '/api/v1/tickets'; |
Lines 193-211
Link Here
|
193 |
}, |
199 |
}, |
194 |
}, table_settings, 1, additional_filters); |
200 |
}, table_settings, 1, additional_filters); |
195 |
|
201 |
|
196 |
var txtActivefilter = _("Filter resolved"); |
202 |
var txtActivefilter = _("Include resolved"); |
197 |
var txtInactivefilter = _("Include resolved"); |
203 |
var txtInactivefilter = _("Filter resolved"); |
198 |
$('#resolved_filter').on("click", function() { |
204 |
$('#resolved_filter').on("click", function() { |
199 |
if ($(this).hasClass('filtered')){ |
205 |
if ($(this).hasClass('filtered')){ |
200 |
filter_resolved = false; |
206 |
filter_resolved = false; |
201 |
$(this).html('<i class="fa fa-bars"></i> '+txtActivefilter); |
207 |
$(this).html('<i class="fa fa-filter"></i> '+txtActivefilter); |
202 |
} else { |
208 |
} else { |
203 |
filter_resolved = true; |
209 |
filter_resolved = true; |
204 |
$(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter); |
210 |
$(this).html('<i class="fa fa-bars"></i> '+txtInactivefilter); |
|
|
211 |
} |
212 |
tickets.DataTable().draw(); |
213 |
$(this).toggleClass('filtered'); |
214 |
}); |
215 |
|
216 |
[% FOR st IN status %] |
217 |
$('#[% st.authorised_value | html %]_filter').on("click", function() { |
218 |
if ($(this).hasClass('filtered')){ |
219 |
additional_filters.status.find((o, i) => { |
220 |
if (o["!="] === '[% st.authorised_value | html %]') { |
221 |
additional_filters.status.splice(i, 1); |
222 |
return true; // stop searching |
223 |
} |
224 |
}); |
225 |
if ( additional_filters.status.length === 1 ){ |
226 |
delete additional_filters.status; |
227 |
} |
228 |
$(this).html('<i class="fa fa-filter"></i> '+_("Filter ")+"[% st.lib | html %]"); |
229 |
} else { |
230 |
if (!additional_filters.hasOwnProperty("status")) { |
231 |
additional_filters.status = [ '-and' ]; |
232 |
} |
233 |
additional_filters.status.push({ '!=': "[% st.authorised_value | html %]" }); |
234 |
$(this).html('<i class="fa fa-bars"></i> '+_("Include ")+"[% st.lib | html %]"); |
205 |
} |
235 |
} |
206 |
tickets.DataTable().draw(); |
236 |
tickets.DataTable().draw(); |
207 |
$(this).toggleClass('filtered'); |
237 |
$(this).toggleClass('filtered'); |
208 |
}); |
238 |
}); |
|
|
239 |
[% END %] |
209 |
}); |
240 |
}); |
210 |
</script> |
241 |
</script> |
211 |
[% Asset.js("js/modals/display_ticket.js") | $raw %] |
242 |
[% Asset.js("js/modals/display_ticket.js") | $raw %] |
212 |
- |
|
|