Optimize batch operation tips

This commit is contained in:
bt.cn
2021-11-23 11:04:47 +08:00
parent 50cd0506f1
commit e04c4e6c51
+13 -4
View File
@@ -126,7 +126,16 @@ var bt_tools = {
event_list = $.extend(event_list, template[1]);
template = template[0];
}
tbody += '<td><span ' + (item['class'] ? 'class="' + item['class']+ '"' : '') + ' ' + (item.tips ? 'title="' + item.tips + '"' : '') + '>' + template + '</span></td>';
var fixed = false;
if (typeof item.fixed != "undefined" && item.fixed) {
if (typeof item.class != "undefined") {
if (item.class.indexOf('fixed') === -1) item.class += ' fixed';
} else {
item.class = 'fixed';
}
fixed = true;
}
tbody += '<td><span ' + (fixed ? 'style="width:' + (item.width - 16) + 'px" title="'+ template +'"' : ' ') + (item['class'] ? 'class="' + item['class'] + '"' : '') + ' ' + (item.tips ? 'title="' + item.tips + '"' : '') + '>' + template + '</span></td>';
if (i === 0) {
if (!event_list[className] && item.event) event_list[className] = {
event: item.event,
@@ -539,8 +548,8 @@ var bt_tools = {
});
} else {
bt.confirm({
title: '批量' + active.title,
msg: '批量' + active.title + ',该操作可能会存在风险,是否继续?',
title: 'Batch ' + active.title,
msg: 'Please be cautious, The selected item will be [ '+active.title+' ] after confirmation',
}, function (index) {
layer.close(index)
if(!active.recursion){
@@ -697,7 +706,7 @@ var bt_tools = {
var _text = $(this).text(),
_index = $(this).index();
$(this).addClass('active').siblings().removeClass('active');
$(_that.config.el + ' .bt_select_tips').html('Batch execute' + _text + '<em>('+lan.site.have_been_selected + _that.checkbox_list.length + ')</em>');
$(_that.config.el + ' .bt_select_tips').html('Batch execute ' + _text + '<em>('+lan.site.have_been_selected + _that.checkbox_list.length + ')</em>');
_that.batch_active = batch_list[_index];
if (!_that.checked) $('.bt_table_select_group').removeClass('active');
});