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