mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-01 12:05:37 +02:00
Merge pull request #1391 from nickvergessen/ticket/11442
[ticket/11442] Use button name as indicator instead of css classes
This commit is contained in:
commit
d84617bb79
@ -4,7 +4,7 @@
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button1" />
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
<p>{MESSAGE_TEXT}</p>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button1" />
|
||||
<input type="button" name="confirm" value="{L_YES}" class="button2" />
|
||||
<input type="button" name="cancel" value="{L_NO}" class="button2" />
|
||||
</fieldset>
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
<th>{MESSAGE_TITLE}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1" align="center"><br /><p class="gen">{MESSAGE_TEXT}</p><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="btnmain" /> <input type="submit" name="cancel" value="{L_NO}" class="btnlite" /></td>
|
||||
<td class="row1" align="center"><br /><p class="gen">{MESSAGE_TEXT}</p><br />{S_HIDDEN_FIELDS}<input type="submit" name="confirm" value="{YES_VALUE}" class="btnlite" /> <input type="submit" name="cancel" value="{L_NO}" class="btnlite" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user