Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
kolab
roundcube-plugins
Commits
c9622696
Commit
c9622696
authored
Dec 10, 2014
by
Aleksander Machniak
Browse files
Assign mainaction/delete classes to dialog buttons
parent
df65bb88
Changes
4
Hide whitespace changes
Inline
Side-by-side
plugins/kolab_files/kolab_files.js
View file @
c9622696
...
...
@@ -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
'
]
});
};
...
...
plugins/kolab_notes/notes.js
View file @
c9622696
...
...
@@ -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
)
{
...
...
plugins/kolab_tags/kolab_tags.js
View file @
c9622696
...
...
@@ -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
'
);
}
},
{
...
...
plugins/tasklist/tasklist.js
View file @
c9622696
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment