Fix button selectors (.ui-button -> button)
Buttons in Elastic dialogs do not have this class assigned. We also will get rid of jQuery-UI button use in the future.
This commit is contained in:
parent
a0454e8080
commit
f31c329ca7
6 changed files with 11 additions and 13 deletions
|
@ -100,7 +100,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
||||||
open: function(event, ui) {
|
open: function(event, ui) {
|
||||||
$(event.target).find('input[name="_verify_code"]').keypress(function(e) {
|
$(event.target).find('input[name="_verify_code"]').keypress(function(e) {
|
||||||
if (e.which == 13) {
|
if (e.which == 13) {
|
||||||
$(e.target).closest('.ui-dialog').find('.ui-button.mainaction').click();
|
$(e.target).closest('.ui-dialog').find('button.mainaction').click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -242,7 +242,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
||||||
// submit code on <Enter>
|
// submit code on <Enter>
|
||||||
$(event.target).find('input[name="_code"]').keypress(function(e) {
|
$(event.target).find('input[name="_code"]').keypress(function(e) {
|
||||||
if (e.which == 13) {
|
if (e.which == 13) {
|
||||||
$(e.target).closest('.ui-dialog').find('.ui-button.mainaction').click();
|
$(e.target).closest('.ui-dialog').find('button.mainaction').click();
|
||||||
}
|
}
|
||||||
}).select();
|
}).select();
|
||||||
},
|
},
|
||||||
|
|
|
@ -951,7 +951,7 @@ function kolab_dialog_show(content, params, onopen)
|
||||||
// Handle form submit with Enter key, click first dialog button instead
|
// Handle form submit with Enter key, click first dialog button instead
|
||||||
function kolab_dialog_submit_handler()
|
function kolab_dialog_submit_handler()
|
||||||
{
|
{
|
||||||
$(this).parents('.ui-dialog').find('.ui-button').first().click();
|
$(this).parents('.ui-dialog').find('.ui-dialog-buttonpane button').first().click();
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1316,8 +1316,8 @@ function rcube_kolab_notes_ui(settings)
|
||||||
dialogClass: 'warning',
|
dialogClass: 'warning',
|
||||||
open: function(event, ui) {
|
open: function(event, ui) {
|
||||||
$(this).parent().find('.ui-dialog-titlebar-close').hide();
|
$(this).parent().find('.ui-dialog-titlebar-close').hide();
|
||||||
setTimeout(function(){
|
setTimeout(function() {
|
||||||
dialog.parent().find('.ui-button:visible').first().focus();
|
dialog.parent().find('button:visible').first().focus();
|
||||||
}, 10);
|
}, 10);
|
||||||
},
|
},
|
||||||
close: function(event, ui) {
|
close: function(event, ui) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ window.rcmail && rcmail.addEventListener('init', function(evt) {
|
||||||
edit = url._id,
|
edit = url._id,
|
||||||
title = edit ? rcmail.gettext('kolab_notes.editnote') : rcmail.gettext('kolab_notes.appendnote'),
|
title = edit ? rcmail.gettext('kolab_notes.editnote') : rcmail.gettext('kolab_notes.appendnote'),
|
||||||
dialog_render = function(p) {
|
dialog_render = function(p) {
|
||||||
$dialog.parent().find('.ui-dialog-buttonset .ui-button')
|
$dialog.parent().find('.ui-dialog-buttonset button')
|
||||||
.prop('disabled', p.readonly)
|
.prop('disabled', p.readonly)
|
||||||
.last().prop('disabled', false);
|
.last().prop('disabled', false);
|
||||||
};
|
};
|
||||||
|
|
|
@ -759,7 +759,7 @@ function rcube_libcalendaring(settings)
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
open: function() {
|
open: function() {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
me.alarm_dialog.parent().find('.ui-button:not(.ui-dialog-titlebar-close)').first().focus();
|
me.alarm_dialog.parent().find('button:not(.ui-dialog-titlebar-close)').first().focus();
|
||||||
}, 5);
|
}, 5);
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
|
@ -1289,7 +1289,7 @@ rcube_libcalendaring.itip_delegate_dialog = function(callback, selector)
|
||||||
dialog = rcmail.show_popup_dialog(form, rcmail.gettext('delegateinvitation', 'itip'), buttons, {
|
dialog = rcmail.show_popup_dialog(form, rcmail.gettext('delegateinvitation', 'itip'), buttons, {
|
||||||
width: 460,
|
width: 460,
|
||||||
open: function(event, ui) {
|
open: function(event, ui) {
|
||||||
$(this).parent().find('.ui-button:not(.ui-dialog-titlebar-close)').first().addClass('mainaction');
|
$(this).parent().find('button:not(.ui-dialog-titlebar-close)').first().addClass('mainaction');
|
||||||
$(this).find('#itip-saveto').val('');
|
$(this).find('#itip-saveto').val('');
|
||||||
|
|
||||||
// initialize autocompletion
|
// initialize autocompletion
|
||||||
|
@ -1380,7 +1380,7 @@ rcube_libcalendaring.decline_attendee_reply = function(mime_id, task)
|
||||||
dialog = rcmail.show_popup_dialog(html, rcmail.gettext('declineattendee', 'itip'), buttons, {
|
dialog = rcmail.show_popup_dialog(html, rcmail.gettext('declineattendee', 'itip'), buttons, {
|
||||||
width: 460,
|
width: 460,
|
||||||
open: function() {
|
open: function() {
|
||||||
$(this).parent().find('.ui-button:not(.ui-dialog-titlebar-close)').first().addClass('mainaction');
|
$(this).parent().find('button:not(.ui-dialog-titlebar-close)').first().addClass('mainaction');
|
||||||
$('#itip-decline-comment').focus();
|
$('#itip-decline-comment').focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1300,7 +1300,6 @@ function rcube_tasklist_ui(settings)
|
||||||
if (!rcmail.busy) {
|
if (!rcmail.busy) {
|
||||||
saving_lock = rcmail.set_busy(true, 'tasklist.savingdata');
|
saving_lock = rcmail.set_busy(true, 'tasklist.savingdata');
|
||||||
rcmail.http_post('tasks/task', { action:action, t:rec, filter:filtermask });
|
rcmail.http_post('tasks/task', { action:action, t:rec, filter:filtermask });
|
||||||
$('button.ui-button:ui-button').button('option', 'disabled', rcmail.busy);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1382,7 +1381,7 @@ function rcube_tasklist_ui(settings)
|
||||||
buttons: buttons,
|
buttons: buttons,
|
||||||
open: function() {
|
open: function() {
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
$dialog.parent().find('.ui-button:not(.ui-dialog-titlebar-close)').first().focus();
|
$dialog.parent().find('button:not(.ui-dialog-titlebar-close)').first().focus();
|
||||||
}, 5);
|
}, 5);
|
||||||
},
|
},
|
||||||
close: function(){
|
close: function(){
|
||||||
|
@ -1404,7 +1403,6 @@ function rcube_tasklist_ui(settings)
|
||||||
{
|
{
|
||||||
if (saving_lock) {
|
if (saving_lock) {
|
||||||
rcmail.set_busy(false, null, saving_lock);
|
rcmail.set_busy(false, null, saving_lock);
|
||||||
$('button.ui-button:ui-button').button('option', 'disabled', false);
|
|
||||||
saving_lock = null;
|
saving_lock = null;
|
||||||
|
|
||||||
// Elastic
|
// Elastic
|
||||||
|
@ -2183,7 +2181,7 @@ function rcube_tasklist_ui(settings)
|
||||||
closeOnEscape: true,
|
closeOnEscape: true,
|
||||||
title: rcmail.gettext('taskdetails', 'tasklist'),
|
title: rcmail.gettext('taskdetails', 'tasklist'),
|
||||||
open: function() {
|
open: function() {
|
||||||
$dialog.parent().find('.ui-button:not(.ui-dialog-titlebar-close)').first().focus();
|
$dialog.parent().find('button:not(.ui-dialog-titlebar-close)').first().focus();
|
||||||
},
|
},
|
||||||
close: function() {
|
close: function() {
|
||||||
$dialog.dialog('destroy').appendTo(document.body);
|
$dialog.dialog('destroy').appendTo(document.body);
|
||||||
|
|
Loading…
Add table
Reference in a new issue