Assign mainaction/delete classes to dialog buttons
This commit is contained in:
parent
df65bb8818
commit
c9622696a1
4 changed files with 17 additions and 4 deletions
|
@ -230,6 +230,7 @@ function kolab_directory_selector_dialog(id)
|
|||
kolab_dialog_show(dialog, {
|
||||
title: rcmail.gettext('kolab_files.' + label),
|
||||
buttons: buttons,
|
||||
button_classes: ['mainaction'],
|
||||
minWidth: 250,
|
||||
minHeight: 300,
|
||||
height: 350,
|
||||
|
@ -283,6 +284,7 @@ function kolab_files_selector_dialog()
|
|||
kolab_dialog_show(dialog, {
|
||||
title: rcmail.gettext('kolab_files.selectfiles'),
|
||||
buttons: buttons,
|
||||
button_classes: ['mainaction'],
|
||||
minWidth: 500,
|
||||
minHeight: 300,
|
||||
width: 700,
|
||||
|
@ -340,7 +342,8 @@ function kolab_files_folder_create_dialog()
|
|||
// show dialog window
|
||||
kolab_dialog_show(dialog, {
|
||||
title: rcmail.gettext('kolab_files.foldercreate'),
|
||||
buttons: buttons
|
||||
buttons: buttons,
|
||||
button_classes: ['mainaction']
|
||||
});
|
||||
|
||||
// Fix submitting form with Enter
|
||||
|
@ -395,7 +398,8 @@ function kolab_files_folder_edit_dialog()
|
|||
// show dialog window
|
||||
kolab_dialog_show(dialog, {
|
||||
title: rcmail.gettext('kolab_files.folderedit'),
|
||||
buttons: buttons
|
||||
buttons: buttons,
|
||||
button_classes: ['mainaction']
|
||||
});
|
||||
|
||||
// Fix submitting form with Enter
|
||||
|
@ -467,6 +471,8 @@ function kolab_files_folder_mount_dialog()
|
|||
});
|
||||
}
|
||||
|
||||
args.button_classes = ['mainaction'];
|
||||
|
||||
// show dialog window
|
||||
kolab_dialog_show(dialog, args, function() {
|
||||
$('td.source:first', dialog).click();
|
||||
|
@ -504,7 +510,8 @@ function kolab_files_file_edit_dialog(file)
|
|||
// show dialog window
|
||||
kolab_dialog_show(dialog, {
|
||||
title: rcmail.gettext('kolab_files.fileedit'),
|
||||
buttons: buttons
|
||||
buttons: buttons,
|
||||
button_classes: ['mainaction']
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -1271,6 +1271,7 @@ function rcube_kolab_notes_ui(settings)
|
|||
|
||||
buttons.push({
|
||||
text: rcmail.gettext('save'),
|
||||
'class': 'mainaction',
|
||||
click: function() {
|
||||
save_note(beforesave);
|
||||
dialog.dialog('close');
|
||||
|
@ -1295,7 +1296,7 @@ function rcube_kolab_notes_ui(settings)
|
|||
open: function(event, ui) {
|
||||
$(this).parent().find('.ui-dialog-titlebar-close').hide();
|
||||
setTimeout(function(){
|
||||
dialog.parent().find('.ui-button:visible').first().addClass('mainaction').focus();
|
||||
dialog.parent().find('.ui-button:visible').first().focus();
|
||||
}, 10);
|
||||
},
|
||||
close: function(event, ui) {
|
||||
|
|
|
@ -159,6 +159,7 @@ function manage_tags()
|
|||
rcmail.gettext('kolab_tags.tags'),
|
||||
[{
|
||||
text: rcmail.gettext('save'),
|
||||
'class': 'mainaction',
|
||||
click: function() { if (tag_form_save()) $(this).dialog('close'); }
|
||||
},
|
||||
{
|
||||
|
|
|
@ -1937,6 +1937,7 @@ function rcube_tasklist_ui(settings)
|
|||
|
||||
buttons.push({
|
||||
text: rcmail.gettext('delete','tasklist'),
|
||||
'class':'delete',
|
||||
click: function() {
|
||||
if (delete_task(me.selected_task.id))
|
||||
$dialog.dialog('close');
|
||||
|
@ -2240,6 +2241,9 @@ function rcube_tasklist_ui(settings)
|
|||
resizable: (!bw.ie6 && !bw.ie7), // disable for performance reasons
|
||||
closeOnEscape: false,
|
||||
title: rcmail.gettext((action == 'edit' ? 'edittask' : 'newtask'), 'tasklist'),
|
||||
open: function() {
|
||||
$dialog.parent().find('.ui-button:not(.ui-dialog-titlebar-close)').first().addClass('mainaction');
|
||||
},
|
||||
close: function() {
|
||||
rcmail.ksearch_blur();
|
||||
editform.hide().appendTo(document.body);
|
||||
|
|
Loading…
Add table
Reference in a new issue