mirror of https://gitee.com/karson/fastadmin.git
url字符串换成连接按钮
parent
1a7ec7f1de
commit
c3c9f022a4
|
|
@ -25,7 +25,9 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin
|
|||
{field: 'state', checkbox: true, },
|
||||
{field: 'id', title: __('Id')},
|
||||
{field: 'url', title: __('Preview'), formatter: Controller.api.formatter.thumb},
|
||||
{field: 'url', title: __('Url'), formatter: Controller.api.formatter.url},
|
||||
{field: 'url', title: __('Url'), formatter: function(value,row,index){
|
||||
return '<a href="' + value + '" title="'+value+'" target="_blank" class="btn btn-default btn-sm"><i class="fa fa-link"></i></a>';
|
||||
}},
|
||||
{field: 'imagewidth', title: __('Imagewidth')},
|
||||
{field: 'imageheight', title: __('Imageheight')},
|
||||
{field: 'imagetype', title: __('Imagetype')},
|
||||
|
|
@ -72,7 +74,7 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin
|
|||
'click .btn-chooseone': function (e, value, row, index) {
|
||||
var multiple = Backend.api.query('multiple');
|
||||
multiple = multiple == 'true' ? true : false;
|
||||
Fast.api.close({url: row.url, multiple: false});
|
||||
Fast.api.close({ids:row.id, url: row.url, multiple: false});
|
||||
},
|
||||
}, formatter: function () {
|
||||
return '<a href="javascript:;" class="btn btn-danger btn-chooseone btn-xs"><i class="fa fa-check"></i> ' + __('Choose') + '</a>';
|
||||
|
|
@ -83,13 +85,14 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin
|
|||
|
||||
// 选中多个
|
||||
$(document).on("click", ".btn-choose-multi", function () {
|
||||
var urlArr = new Array();
|
||||
var urlArr = idsArr = new Array();
|
||||
$.each(table.bootstrapTable("getAllSelections"), function (i, j) {
|
||||
urlArr.push(j.url);
|
||||
idsArr.push(j.id);
|
||||
});
|
||||
var multiple = Backend.api.query('multiple');
|
||||
multiple = multiple == 'true' ? true : false;
|
||||
Fast.api.close({url: urlArr.join(","), multiple: true});
|
||||
Fast.api.close({ids:idsArr.join(","), url: urlArr.join(","), multiple: true});
|
||||
});
|
||||
|
||||
// 为表格绑定事件
|
||||
|
|
|
|||
Loading…
Reference in New Issue