|
Lines 39-47
Link Here
|
| 39 |
<h1>Concerns</h1> |
39 |
<h1>Concerns</h1> |
| 40 |
|
40 |
|
| 41 |
<div class="page-section"> |
41 |
<div class="page-section"> |
| 42 |
<fieldset class="action" style="cursor:pointer;"> |
42 |
<fieldset class="action filters" style="cursor:pointer;"> |
| 43 |
<a id="hideResolved"><i class="fa fa-minus-square"></i> Hide resolved</a> |
43 |
<a id="resolved_filter" class="filtered"><i class="fa fa-bars"></i> Include resolved</a> |
| 44 |
| <a id="showAll"><i class="fa fa-bars"></i> Show all</a> |
|
|
| 45 |
</fieldset> |
44 |
</fieldset> |
| 46 |
|
45 |
|
| 47 |
<table id="table_concerns"> |
46 |
<table id="table_concerns"> |
|
Lines 81-90
Link Here
|
| 81 |
|
80 |
|
| 82 |
var table_settings = [% TablesSettings.GetTableSettings('cataloguing', 'concerns', 'table_concerns', 'json') | $raw %]; |
81 |
var table_settings = [% TablesSettings.GetTableSettings('cataloguing', 'concerns', 'table_concerns', 'json') | $raw %]; |
| 83 |
|
82 |
|
| 84 |
var filtered = false; |
83 |
var filter_resolved = true; |
| 85 |
let additional_filters = { |
84 |
let additional_filters = { |
| 86 |
resolved_date: function(){ |
85 |
resolved_date: function(){ |
| 87 |
if ( filtered ) { |
86 |
if ( filter_resolved ) { |
| 88 |
return { "=": null }; |
87 |
return { "=": null }; |
| 89 |
} else { |
88 |
} else { |
| 90 |
return; |
89 |
return; |
|
Lines 184-197
Link Here
|
| 184 |
] |
183 |
] |
| 185 |
}, table_settings, 1, additional_filters); |
184 |
}, table_settings, 1, additional_filters); |
| 186 |
|
185 |
|
| 187 |
$('#hideResolved').on("click", function() { |
186 |
var txtActivefilter = _("Filter resolved"); |
| 188 |
filtered = true; |
187 |
var txtInactivefilter = _("Include resolved"); |
| 189 |
tickets.DataTable().draw(); |
188 |
$('#resolved_filter').on("click", function() { |
| 190 |
}); |
189 |
if ($(this).hasClass('filtered')){ |
| 191 |
|
190 |
filter_resolved = false; |
| 192 |
$('#showAll').on("click", function() { |
191 |
$(this).html('<i class="fa fa-bars"></i> '+txtActivefilter); |
| 193 |
filtered = false; |
192 |
} else { |
|
|
193 |
filter_resolved = true; |
| 194 |
$(this).html('<i class="fa fa-filter"></i> '+txtInactivefilter); |
| 195 |
} |
| 194 |
tickets.DataTable().draw(); |
196 |
tickets.DataTable().draw(); |
|
|
197 |
$(this).toggleClass('filtered'); |
| 195 |
}); |
198 |
}); |
| 196 |
}); |
199 |
}); |
| 197 |
</script> |
200 |
</script> |
| 198 |
- |
|
|