|
@@ -8098,7 +8098,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
|
|
|
buttons.push({name: 'edit', icon: 'fa fa-pencil', classname: 'btn btn-xs btn-success btn-editone'});
|
|
|
buttons.push({name: 'del', icon: 'fa fa-trash', classname: 'btn btn-xs btn-danger btn-delone'});
|
|
|
var html = [];
|
|
|
- var url, classname, icon, text, title;
|
|
|
+ var url, classname, icon, text, title, extend;
|
|
|
$.each(buttons, function (i, j) {
|
|
|
if (j.name === 'dragsort' && typeof row[Table.config.dragsortfield] === 'undefined') {
|
|
|
return true;
|
|
@@ -8115,7 +8115,8 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
|
|
|
icon = j.icon ? j.icon : '';
|
|
|
text = j.text ? j.text : '';
|
|
|
title = j.title ? j.title : text;
|
|
|
- html.push('<a href="' + url + '" class="' + classname + '" title="' + title + '"><i class="' + icon + '"></i>' + (text ? ' ' + text : '') + '</a>');
|
|
|
+ extend = j.extend ? j.extend : '';
|
|
|
+ html.push('<a href="' + url + '" class="' + classname + '" ' + extend + ' title="' + title + '"><i class="' + icon + '"></i>' + (text ? ' ' + text : '') + '</a>');
|
|
|
}
|
|
|
});
|
|
|
return html.join(' ');
|
|
@@ -8127,17 +8128,19 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
|
|
|
|
|
|
var buttons = $.extend([], this.buttons || []);
|
|
|
var html = [];
|
|
|
+ var url, classname, icon, text, title, extend;
|
|
|
$.each(buttons, function (i, j) {
|
|
|
var attr = table.data("buttons-" + j.name);
|
|
|
if (typeof attr === 'undefined' || attr) {
|
|
|
|
|
|
- j.url = j.url ? j.url + (j.url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + row[options.pk] : '';
|
|
|
- url = j.url ? Fast.api.fixurl(j.url) : 'javascript:;';
|
|
|
+ url = j.url ? j.url + (j.url.match(/(\?|&)+/) ? "&ids=" : "/ids/") + row[options.pk] : '';
|
|
|
+ url = url ? Fast.api.fixurl(url) : 'javascript:;';
|
|
|
classname = j.classname ? j.classname : 'btn-primary btn-' + name + 'one';
|
|
|
icon = j.icon ? j.icon : '';
|
|
|
text = j.text ? j.text : '';
|
|
|
title = j.title ? j.title : text;
|
|
|
- html.push('<a href="' + url + '" class="' + classname + '" title="' + title + '"><i class="' + icon + '"></i>' + (text ? ' ' + text : '') + '</a>');
|
|
|
+ extend = j.extend ? j.extend : '';
|
|
|
+ html.push('<a href="' + url + '" class="' + classname + '" ' + extend + ' title="' + title + '"><i class="' + icon + '"></i>' + (text ? ' ' + text : '') + '</a>');
|
|
|
}
|
|
|
});
|
|
|
return html.join(' ');
|