From e4775deb1b7b9b65fe92b0659d09af524ffd54a6 Mon Sep 17 00:00:00 2001 From: CJY Mac Date: Sat, 1 Apr 2023 20:32:12 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=E5=89=8A=E9=99=A4=E3=83=A2=E3=83=BC?= =?UTF-8?q?=E3=83=80=E3=83=AB=E3=81=AE=E3=83=80=E3=83=96=E3=83=AB=E3=82=AF?= =?UTF-8?q?=E3=83=AA=E3=83=83=E3=82=AF=E3=82=92pointer-event:none=20?= =?UTF-8?q?=E3=81=A7=E5=9B=9E=E9=81=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/template/admin/assets/js/function.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/template/admin/assets/js/function.js b/html/template/admin/assets/js/function.js index f6e9a290db7..d2330cce109 100644 --- a/html/template/admin/assets/js/function.js +++ b/html/template/admin/assets/js/function.js @@ -118,7 +118,7 @@ var toggleBtnBulk = function(checkboxSelector, btnSelector) { /////////// 2重submit制御. if (typeof Ladda !== 'undefined') { - Ladda.bind('button[type=submit]', {timeout: 2000}); + Ladda.bind('button[type=submit],a[token-for-anchor]', {timeout: 2000}); $('button[type=submit].btn-ec-regular').attr('data-spinner-color', '#595959'); } @@ -144,6 +144,7 @@ $(function() { $('a[token-for-anchor]').click(function(e) { e.preventDefault(); var $this = $(this); + $this.css('pointer-events','none'); var data = $this.data(); if (data.confirm != false) { if (!confirm(data.message ? data.message : '削除してもよろしいですか?')) { From 30fb27c247de8fb8da4a599e8a729a6f83417720 Mon Sep 17 00:00:00 2001 From: daichi_otani Date: Wed, 14 Feb 2024 16:44:50 +0900 Subject: [PATCH 2/2] add:comment --- html/template/admin/assets/js/function.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/html/template/admin/assets/js/function.js b/html/template/admin/assets/js/function.js index d2330cce109..a4d74e467aa 100644 --- a/html/template/admin/assets/js/function.js +++ b/html/template/admin/assets/js/function.js @@ -118,6 +118,9 @@ var toggleBtnBulk = function(checkboxSelector, btnSelector) { /////////// 2重submit制御. if (typeof Ladda !== 'undefined') { + // a[token-for-anchor] を押下されるとJavaScriptで formを作成してPOSTする仕様になっていて、 + // aタグにdisable属性を付与しても駄目(form生成&postしてしまう)だったので、cssでpointer-event:none;しています。 + // https://github.com/EC-CUBE/ec-cube/pull/5971 Ladda.bind('button[type=submit],a[token-for-anchor]', {timeout: 2000}); $('button[type=submit].btn-ec-regular').attr('data-spinner-color', '#595959'); }