Update: Minor styling for Job Lists
Especially for 'No Jobs' or 'All Jobs Closed' situations.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
///#source 1 1 /ClientSource/Scripts/Modules/Disco-DataTableHelpers/disco.datatablehelpers.js
|
||||
///#source 1 1 /ClientSource/Scripts/Modules/Disco-DataTableHelpers/disco.datatablehelpers.js
|
||||
(function (window, document, $) {
|
||||
var dataTables = [];
|
||||
|
||||
@@ -58,8 +58,11 @@
|
||||
|
||||
var showClosedAnchor = $('<a class="dataTables_showStatusClosed" href="#">').text('Show Closed (' + $closedJobs.length + ')');
|
||||
wrapper.prepend(showClosedAnchor);
|
||||
showClosedAnchor.click(function () {
|
||||
wrapperContext.on('click', 'a.dataTables_showStatusClosed', function () {
|
||||
$table.show();
|
||||
wrapper.find('.dataTables_filter').show();
|
||||
$table.removeClass('hideStatusClosed');
|
||||
allClosedContainer.remove();
|
||||
showClosedAnchor.remove();
|
||||
if (wrapperPrev)
|
||||
wrapperPrev.html(wrapperPrev.data('dataTable_originalContent'));
|
||||
@@ -68,6 +71,13 @@
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
var allClosedContainer = wrapperContext.find('div.allClosed_container');
|
||||
if (allClosedContainer.length > 0) {
|
||||
$table.hide();
|
||||
wrapper.find('.dataTables_filter').hide();
|
||||
showClosedAnchor.css('right', '4px')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user