Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

削除モーダルのダブルクリックをpointer-event:none で回避 #5971

Merged
merged 3 commits into from
Feb 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading