|
@@ -860,7 +860,8 @@ define('fast',['jquery', 'bootstrap', 'toastr', 'layer', 'lang'], function ($, u
|
|
|
if ($(this).hasClass("disabled") || $(this).parent().hasClass("disabled")) {
|
|
|
return;
|
|
|
}
|
|
|
- $(".btn:eq(" + $(this).index() + ")", layerfooter).trigger("click");
|
|
|
+ var index = footer.find('.btn').index(this);
|
|
|
+ $(".btn:eq(" + index + ")", layerfooter).trigger("click");
|
|
|
});
|
|
|
|
|
|
var titHeight = layero.find('.layui-layer-title').outerHeight() || 0;
|
|
@@ -9928,7 +9929,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
|
|
|
type = typeof type === 'undefined' ? 'buttons' : type;
|
|
|
var options = table ? table.bootstrapTable('getOptions') : {};
|
|
|
var html = [];
|
|
|
- var hidden, visible, url, classname, icon, text, title, refresh, confirm, extend, click;
|
|
|
+ var hidden, visible, disable, url, classname, icon, text, title, refresh, confirm, extend, click;
|
|
|
var fieldIndex = column.fieldIndex;
|
|
|
|
|
|
$.each(buttons, function (i, j) {
|
|
@@ -9959,6 +9960,10 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
|
|
|
refresh = j.refresh ? 'data-refresh="' + j.refresh + '"' : '';
|
|
|
confirm = j.confirm ? 'data-confirm="' + j.confirm + '"' : '';
|
|
|
extend = j.extend ? j.extend : '';
|
|
|
+ disable = typeof j.disable === 'function' ? j.disable.call(table, row, j) : (j.disable ? j.disable : false);
|
|
|
+ if (disable) {
|
|
|
+ classname = classname + ' disabled';
|
|
|
+ }
|
|
|
html.push('<a href="' + url + '" class="' + classname + '" ' + (confirm ? confirm + ' ' : '') + (refresh ? refresh + ' ' : '') + extend + ' title="' + title + '" data-table-id="' + (table ? table.attr("id") : '') + '" data-field-index="' + fieldIndex + '" data-row-index="' + index + '" data-button-index="' + i + '"><i class="' + icon + '"></i>' + (text ? ' ' + text : '') + '</a>');
|
|
|
}
|
|
|
});
|