|
|
@@ -335,6 +335,7 @@
|
|
|
searchTimeOut: 500,
|
|
|
searchText: '',
|
|
|
iconSize: undefined,
|
|
|
+ buttonsClass: 'default',
|
|
|
iconsPrefix: 'glyphicon', // glyphicon of fa (font awesome)
|
|
|
icons: {
|
|
|
paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
|
|
|
@@ -1009,14 +1010,17 @@
|
|
|
}
|
|
|
|
|
|
if (this.options.showPaginationSwitch) {
|
|
|
- html.push(sprintf('<button class="btn btn-default" type="button" name="paginationSwitch" title="%s">',
|
|
|
+ html.push(sprintf('<button class="btn' +
|
|
|
+ sprintf(' btn-%s', this.options.buttonsClass) +
|
|
|
+ '" type="button" name="paginationSwitch" title="%s">',
|
|
|
this.options.formatPaginationSwitch()),
|
|
|
sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.paginationSwitchDown),
|
|
|
'</button>');
|
|
|
}
|
|
|
|
|
|
if (this.options.showRefresh) {
|
|
|
- html.push(sprintf('<button class="btn btn-default' +
|
|
|
+ html.push(sprintf('<button class="btn' +
|
|
|
+ sprintf(' btn-%s', this.options.buttonsClass) +
|
|
|
sprintf(' btn-%s', this.options.iconSize) +
|
|
|
'" type="button" name="refresh" title="%s">',
|
|
|
this.options.formatRefresh()),
|
|
|
@@ -1025,7 +1029,8 @@
|
|
|
}
|
|
|
|
|
|
if (this.options.showToggle) {
|
|
|
- html.push(sprintf('<button class="btn btn-default' +
|
|
|
+ html.push(sprintf('<button class="btn' +
|
|
|
+ sprintf(' btn-%s', this.options.buttonsClass) +
|
|
|
sprintf(' btn-%s', this.options.iconSize) +
|
|
|
'" type="button" name="toggle" title="%s">',
|
|
|
this.options.formatToggle()),
|
|
|
@@ -1036,7 +1041,8 @@
|
|
|
if (this.options.showColumns) {
|
|
|
html.push(sprintf('<div class="keep-open btn-group" title="%s">',
|
|
|
this.options.formatColumns()),
|
|
|
- '<button type="button" class="btn btn-default' +
|
|
|
+ '<button type="button" class="btn' +
|
|
|
+ sprintf(' btn-%s', this.options.buttonsClass) +
|
|
|
sprintf(' btn-%s', this.options.iconSize) +
|
|
|
' dropdown-toggle" data-toggle="dropdown">',
|
|
|
sprintf('<i class="%s %s"></i>', this.options.iconsPrefix, this.options.icons.columns),
|
|
|
@@ -1286,7 +1292,8 @@
|
|
|
sprintf('<span class="btn-group %s">',
|
|
|
this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
|
|
|
'dropdown' : 'dropup'),
|
|
|
- '<button type="button" class="btn btn-default ' +
|
|
|
+ '<button type="button" class="btn' +
|
|
|
+ sprintf(' btn-%s', this.options.buttonsClass) +
|
|
|
sprintf(' btn-%s', this.options.iconSize) +
|
|
|
' dropdown-toggle" data-toggle="dropdown">',
|
|
|
'<span class="page-size">',
|
|
|
@@ -1615,9 +1622,6 @@
|
|
|
|
|
|
style = sprintf('style="%s"', csses.concat(that.header.styles[j]).join('; '));
|
|
|
|
|
|
- value = calculateObjectValue(column,
|
|
|
- that.header.formatters[j], [value, item, i], value);
|
|
|
-
|
|
|
// handle td's id and class
|
|
|
if (item['_' + field + '_id']) {
|
|
|
id_ = sprintf(' id="%s"', item['_' + field + '_id']);
|
|
|
@@ -1647,6 +1651,9 @@
|
|
|
style = sprintf('style="%s"', csses_.concat(that.header.styles[j]).join('; '));
|
|
|
}
|
|
|
|
|
|
+ value = calculateObjectValue(column,
|
|
|
+ that.header.formatters[j], [value, item, i], value);
|
|
|
+
|
|
|
if (item['_' + field + '_data'] && !$.isEmptyObject(item['_' + field + '_data'])) {
|
|
|
$.each(item['_' + field + '_data'], function (k, v) {
|
|
|
// ignore data-index
|