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