mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[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
This commit is contained in:
parent
665352d0d1
commit
1834ceb614
1 changed files with 3 additions and 3 deletions
|
@ -136,7 +136,7 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
||||||
});
|
});
|
||||||
|
|
||||||
var clickHandler = function(e) {
|
var clickHandler = function(e) {
|
||||||
var res = this.className === 'button1';
|
var res = this.name === 'confirm';
|
||||||
var fade = (typeof fadedark !== 'undefined' && !fadedark && res) ? div : dark;
|
var fade = (typeof fadedark !== 'undefined' && !fadedark && res) ? div : dark;
|
||||||
fade.fadeOut(phpbb.alertTime, function() {
|
fade.fadeOut(phpbb.alertTime, function() {
|
||||||
div.hide();
|
div.hide();
|
||||||
|
@ -164,11 +164,11 @@ phpbb.confirm = function(msg, callback, fadedark) {
|
||||||
|
|
||||||
$(document).bind('keydown', function(e) {
|
$(document).bind('keydown', function(e) {
|
||||||
if (e.keyCode === keymap.ENTER) {
|
if (e.keyCode === keymap.ENTER) {
|
||||||
$('input[type="button"].button1').trigger('click');
|
$('input[name="confirm"]').trigger('click');
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
} else if (e.keyCode === keymap.ESC) {
|
} else if (e.keyCode === keymap.ESC) {
|
||||||
$('input[type="button"].button2').trigger('click');
|
$('input[name="cancel"]').trigger('click');
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue