|
@@ -1055,10 +1055,11 @@
|
|
|
this.options.pageSize = this.options.totalRows;
|
|
this.options.pageSize = this.options.totalRows;
|
|
|
$allSelected = true;
|
|
$allSelected = true;
|
|
|
} else if (this.options.pageSize === this.options.totalRows) {
|
|
} else if (this.options.pageSize === this.options.totalRows) {
|
|
|
- // Fix #667 Table with pagination, multiple pages and a search that matches to one page throws exception
|
|
|
|
|
|
|
+ // Fix #667 Table with pagination,
|
|
|
|
|
+ // multiple pages and a search that matches to one page throws exception
|
|
|
var pageLst = typeof this.options.pageList === 'string' ?
|
|
var pageLst = typeof this.options.pageList === 'string' ?
|
|
|
- this.options.pageList.replace('[', '').replace(']', '').replace(/ /g, '').toLowerCase().split(',') :
|
|
|
|
|
- this.options.pageList;
|
|
|
|
|
|
|
+ this.options.pageList.replace('[', '').replace(']', '')
|
|
|
|
|
+ .replace(/ /g, '').toLowerCase().split(',') : this.options.pageList;
|
|
|
if (pageLst.indexOf(this.options.formatAllRows().toLowerCase()) > -1) {
|
|
if (pageLst.indexOf(this.options.formatAllRows().toLowerCase()) > -1) {
|
|
|
$allSelected = true;
|
|
$allSelected = true;
|
|
|
}
|
|
}
|
|
@@ -1087,9 +1088,12 @@
|
|
|
html.push('<span class="page-list">');
|
|
html.push('<span class="page-list">');
|
|
|
|
|
|
|
|
var pageNumber = [
|
|
var pageNumber = [
|
|
|
- sprintf('<span class="btn-group %s">', this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
|
|
|
|
|
|
|
+ sprintf('<span class="btn-group %s">',
|
|
|
|
|
+ this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
|
|
|
'dropdown' : 'dropup'),
|
|
'dropdown' : 'dropup'),
|
|
|
- '<button type="button" class="btn btn-default ' + (this.options.iconSize === undefined ? '' : ' btn-' + this.options.iconSize) + ' dropdown-toggle" data-toggle="dropdown">',
|
|
|
|
|
|
|
+ '<button type="button" class="btn btn-default ' +
|
|
|
|
|
+ (this.options.iconSize === undefined ? '' : ' btn-' + this.options.iconSize) +
|
|
|
|
|
+ ' dropdown-toggle" data-toggle="dropdown">',
|
|
|
'<span class="page-size">',
|
|
'<span class="page-size">',
|
|
|
$allSelected ? this.options.formatAllRows() : this.options.pageSize,
|
|
$allSelected ? this.options.formatAllRows() : this.options.pageSize,
|
|
|
'</span>',
|
|
'</span>',
|
|
@@ -1100,7 +1104,8 @@
|
|
|
pageList = this.options.pageList;
|
|
pageList = this.options.pageList;
|
|
|
|
|
|
|
|
if (typeof this.options.pageList === 'string') {
|
|
if (typeof this.options.pageList === 'string') {
|
|
|
- var list = this.options.pageList.replace('[', '').replace(']', '').replace(/ /g, '').split(',');
|
|
|
|
|
|
|
+ var list = this.options.pageList.replace('[', '').replace(']', '')
|
|
|
|
|
+ .replace(/ /g, '').split(',');
|
|
|
|
|
|
|
|
pageList = [];
|
|
pageList = [];
|
|
|
$.each(list, function (i, value) {
|
|
$.each(list, function (i, value) {
|