|
|
@ -34,23 +34,34 @@
|
|
|
|
var config = $.isPlainObject(options) ? options : {},
|
|
|
|
var config = $.isPlainObject(options) ? options : {},
|
|
|
|
api = new $.fn.dataTable.Api(dtSettings),
|
|
|
|
api = new $.fn.dataTable.Api(dtSettings),
|
|
|
|
speed = 'slow',
|
|
|
|
speed = 'slow',
|
|
|
|
conditionalPaging = function() {
|
|
|
|
conditionalPaging = function(e) {
|
|
|
|
var $paging = $(api.table().container()).find('div.dataTables_paginate');
|
|
|
|
var $paging = $(api.table().container()).find('div.dataTables_paginate'),
|
|
|
|
|
|
|
|
pages = api.page.info().pages;
|
|
|
|
|
|
|
|
|
|
|
|
if (api.page.info().pages <= 1) {
|
|
|
|
if ($.isPlainObject(e)) {
|
|
|
|
if (config.style === 'fade') {
|
|
|
|
if (pages <= 1) {
|
|
|
|
$paging.stop().fadeTo(speed, 0);
|
|
|
|
if (config.style === 'fade') {
|
|
|
|
|
|
|
|
$paging.stop().fadeTo(speed, 0);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
$paging.css('visibility', 'hidden');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$paging.css('visibility', 'hidden');
|
|
|
|
if (config.style === 'fade') {
|
|
|
|
|
|
|
|
$paging.stop().fadeTo(speed, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
$paging.css('visibility', '');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else if (pages <= 1) {
|
|
|
|
if (config.style === 'fade') {
|
|
|
|
if (config.style === 'fade') {
|
|
|
|
$paging.stop().fadeTo(speed, 1);
|
|
|
|
$paging.css('opacity', 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
$paging.css('visibility', '');
|
|
|
|
$paging.css('visibility', 'hidden');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|