diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2013-05-08 00:08:35 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2013-05-08 00:08:35 +0200 |
commit | 1834ceb614a1bf82aa0369a2b731475a82abfade (patch) | |
tree | e5c77996b2d2171bb8a20c284b338823e1ab99d7 /phpBB/assets | |
parent | 665352d0d191cdf31a07ad50d00ffaf47da77a97 (diff) | |
download | forums-1834ceb614a1bf82aa0369a2b731475a82abfade.tar forums-1834ceb614a1bf82aa0369a2b731475a82abfade.tar.gz forums-1834ceb614a1bf82aa0369a2b731475a82abfade.tar.bz2 forums-1834ceb614a1bf82aa0369a2b731475a82abfade.tar.xz forums-1834ceb614a1bf82aa0369a2b731475a82abfade.zip |
[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
Diffstat (limited to 'phpBB/assets')
-rw-r--r-- | phpBB/assets/javascript/core.js | 6 |
1 files 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(); } |