Update: Minor styling for Job Lists

Especially for 'No Jobs' or 'All Jobs Closed' situations.
This commit is contained in:
Gary Sharp
2014-02-06 12:22:15 +11:00
parent 7748f15d76
commit 9ea0273936
22 changed files with 364 additions and 259 deletions
@@ -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')
}
}
}