From b194c913989f20b4912cc0406bc363e74a4b7578 Mon Sep 17 00:00:00 2001 From: Karson Date: Wed, 9 Sep 2020 14:48:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=99=84=E4=BB=B6=E9=80=89?= =?UTF-8?q?=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/view/general/attachment/select.html | 2 +- public/assets/js/backend/general/attachment.js | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/application/admin/view/general/attachment/select.html b/application/admin/view/general/attachment/select.html index edd30fe5..f4aaf1fc 100644 --- a/application/admin/view/general/attachment/select.html +++ b/application/admin/view/general/attachment/select.html @@ -11,7 +11,7 @@ {/if} -
+
diff --git a/public/assets/js/backend/general/attachment.js b/public/assets/js/backend/general/attachment.js index e536f2d5..9ab2d55a 100644 --- a/public/assets/js/backend/general/attachment.js +++ b/public/assets/js/backend/general/attachment.js @@ -28,7 +28,7 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin {field: 'user_id', title: __('User_id'), visible: false, addClass: "selectpage", extend: "data-source='user/user/index' data-field='nickname'"}, {field: 'preview', title: __('Preview'), formatter: Controller.api.formatter.thumb, operate: false}, {field: 'url', title: __('Url'), formatter: Controller.api.formatter.url, visible: false}, - {field: 'filename', title: __('Filename'), formatter: Table.api.formatter.search, operate: 'like'}, + {field: 'filename', title: __('Filename'), formatter: Controller.api.formatter.filename, operate: 'like'}, { field: 'filesize', title: __('Filesize'), operate: 'BETWEEN', sortable: true, formatter: function (value, row, index) { var size = parseFloat(value); @@ -103,12 +103,12 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin showExport: false, columns: [ [ - {field: 'state', checkbox: multiple, visible: multiple, operate:false}, + {field: 'state', checkbox: multiple, visible: multiple, operate: false}, {field: 'id', title: __('Id')}, {field: 'admin_id', title: __('Admin_id'), formatter: Table.api.formatter.search, visible: false}, {field: 'user_id', title: __('User_id'), formatter: Table.api.formatter.search, visible: false}, {field: 'url', title: __('Preview'), formatter: Controller.api.formatter.thumb, operate: false}, - {field: 'filename', title: __('Filename'), formatter: Table.api.formatter.search, operate: 'like'}, + {field: 'filename', title: __('Filename'), formatter: Controller.api.formatter.filename, operate: 'like'}, {field: 'imagewidth', title: __('Imagewidth'), operate: false}, {field: 'imageheight', title: __('Imageheight'), operate: false}, { @@ -170,6 +170,9 @@ define(['jquery', 'bootstrap', 'backend', 'form', 'table'], function ($, undefin url: function (value, row, index) { return '' + row.url + ''; }, + filename: function (value, row, index) { + return '
' + Table.api.formatter.search.call(this, value, row, index) + '
'; + }, } }