Skip to content

Commit

Permalink
Merge pull request #5971 from cajiya-nakamura/issue-#5922
Browse files Browse the repository at this point in the history
削除モーダルのダブルクリックをpointer-event:none で回避
  • Loading branch information
dotani1111 authored Feb 21, 2024
2 parents cc2ee13 + 0fb8abe commit e26bbbf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion html/template/admin/assets/js/function.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ var toggleBtnBulk = function(checkboxSelector, btnSelector) {
/////////// 2重submit制御.

if (typeof Ladda !== 'undefined') {
Ladda.bind('button[type=submit]', {timeout: 2000});
// 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');
}

Expand All @@ -144,6 +147,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 : '削除してもよろしいですか?')) {
Expand Down

0 comments on commit e26bbbf

Please sign in to comment.