mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-09 03:22:51 +08:00
新增表格opeart的field回调功能;
This commit is contained in:
@@ -543,7 +543,7 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
return cols;
|
return cols;
|
||||||
},
|
},
|
||||||
tool: function (data, option) {
|
tool: function (data, option) {
|
||||||
option.operat = option.operat || ['edit', 'delete'];
|
option.operat = option.operat || ['edit', 'delete'];
|
||||||
var elem = option.init.table_elem || init.table_elem;
|
var elem = option.init.table_elem || init.table_elem;
|
||||||
var html = '';
|
var html = '';
|
||||||
$.each(option.operat, function (i, item) {
|
$.each(option.operat, function (i, item) {
|
||||||
@@ -603,7 +603,12 @@ define(["jquery", "tableSelect", "ckeditor"], function ($, tableSelect, undefine
|
|||||||
operat.title = data[operat.extra] + ' - ' + operat.title;
|
operat.title = data[operat.extra] + ' - ' + operat.title;
|
||||||
}
|
}
|
||||||
|
|
||||||
operat.url = admin.table.toolSpliceUrl(operat.url, operat.field, data);
|
if (typeof operat.field != 'function') {
|
||||||
|
operat.url = admin.table.toolSpliceUrl(operat.url, operat.field, data);
|
||||||
|
} else {
|
||||||
|
operat.url = operat.field(operat.url, data, operat)
|
||||||
|
}
|
||||||
|
|
||||||
if (admin.checkAuth(operat.auth, elem)) {
|
if (admin.checkAuth(operat.auth, elem)) {
|
||||||
html += admin.table.buildOperatHtml(operat);
|
html += admin.table.buildOperatHtml(operat);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user