From 2c1840116dbd50de931e2c975e8e933fb07452f5 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Wed, 7 Jun 2023 10:50:04 +0800 Subject: [PATCH] * Change unlink tips and table element get. --- module/release/js/view.ui.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/module/release/js/view.ui.js b/module/release/js/view.ui.js index aa91d00a67..1641654bfb 100644 --- a/module/release/js/view.ui.js +++ b/module/release/js/view.ui.js @@ -1,7 +1,8 @@ -$(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function() +$(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e) { - const dtable = zui.DTable.query($(this).target); + const dtable = zui.DTable.query(e.target); const checkedList = dtable.$.getChecks(); + console.log(dtable) if(!checkedList.length) return; const tabType = $(this).data('type'); @@ -103,8 +104,8 @@ window.unlinkObject = function(objectType, objectID) { objectType = objectType.toLowerCase(); - if(window.confirm(`confirmunlink${objectType}`)) + if(window.confirm(eval(`confirmunlink${objectType}`))) { - $.ajaxSubmit({url: `unlink${objectType}url`.replace('%s', objectID)}); + $.ajaxSubmit({url: eval(`unlink${objectType}url`).replace('%s', objectID)}); } }