From 665352d0d191cdf31a07ad50d00ffaf47da77a97 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 7 May 2013 23:49:24 +0200 Subject: [PATCH 1/2] [ticket/11442] Do not suggest an option on ajax confirm box Reverting commit cb13add269b78e1a9ac84a80c78557bb7695df09 Also fixing in prosilver and subsilver2 PHPBB3-11442 --- phpBB/adm/style/confirm_body.html | 2 +- phpBB/styles/prosilver/template/confirm_body.html | 2 +- phpBB/styles/subsilver2/template/confirm_body.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/adm/style/confirm_body.html b/phpBB/adm/style/confirm_body.html index fa3f1e6c64..d0360d1b3a 100644 --- a/phpBB/adm/style/confirm_body.html +++ b/phpBB/adm/style/confirm_body.html @@ -4,7 +4,7 @@

{MESSAGE_TEXT}

-   +  
diff --git a/phpBB/styles/prosilver/template/confirm_body.html b/phpBB/styles/prosilver/template/confirm_body.html index eb0cad2597..bf575c20fa 100644 --- a/phpBB/styles/prosilver/template/confirm_body.html +++ b/phpBB/styles/prosilver/template/confirm_body.html @@ -4,7 +4,7 @@

{MESSAGE_TEXT}

-   +  
diff --git a/phpBB/styles/subsilver2/template/confirm_body.html b/phpBB/styles/subsilver2/template/confirm_body.html index 7516196b3c..1712017c38 100644 --- a/phpBB/styles/subsilver2/template/confirm_body.html +++ b/phpBB/styles/subsilver2/template/confirm_body.html @@ -9,7 +9,7 @@ {MESSAGE_TITLE} -

{MESSAGE_TEXT}


{S_HIDDEN_FIELDS}   +

{MESSAGE_TEXT}


{S_HIDDEN_FIELDS}   From 1834ceb614a1bf82aa0369a2b731475a82abfade Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 8 May 2013 00:08:35 +0200 Subject: [PATCH 2/2] [ticket/11442] Use button name as indicator instead of css classes This leaves it up to the style authors how to style any buttons, without messing up any functionality. PHPBB3-11442 --- phpBB/assets/javascript/core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index 8bbea8b8c9..642d513cb6 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -136,7 +136,7 @@ phpbb.confirm = function(msg, callback, fadedark) { }); var clickHandler = function(e) { - var res = this.className === 'button1'; + var res = this.name === 'confirm'; var fade = (typeof fadedark !== 'undefined' && !fadedark && res) ? div : dark; fade.fadeOut(phpbb.alertTime, function() { div.hide(); @@ -164,11 +164,11 @@ phpbb.confirm = function(msg, callback, fadedark) { $(document).bind('keydown', function(e) { if (e.keyCode === keymap.ENTER) { - $('input[type="button"].button1').trigger('click'); + $('input[name="confirm"]').trigger('click'); e.preventDefault(); e.stopPropagation(); } else if (e.keyCode === keymap.ESC) { - $('input[type="button"].button2').trigger('click'); + $('input[name="cancel"]').trigger('click'); e.preventDefault(); e.stopPropagation(); }