Added support for the Plus key (shows the add/upload dialog).
This commit is contained in:
parent
65fea73f85
commit
31feb93d96
|
@ -47,6 +47,9 @@ function key_handler(e) {
|
|||
case 27: /* Escape */
|
||||
hide_add_dialog();
|
||||
break;
|
||||
case 187: /* Plus */
|
||||
show_add_dialog();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -54,14 +57,18 @@ function key_handler(e) {
|
|||
|
||||
// Shows the upload/add dialog.
|
||||
function show_add_dialog() {
|
||||
$('text').clear();
|
||||
$('add_dialog').appear({duration: 0.25});
|
||||
if (!$('add_dialog').visible()) {
|
||||
$('text').clear();
|
||||
$('add_dialog').appear({duration: 0.25});
|
||||
}
|
||||
}
|
||||
|
||||
// Hides and clears the upload/add dialog.
|
||||
function hide_add_dialog() {
|
||||
$('add_dialog').fade({duration: 0.25});
|
||||
$('add_form').reset();
|
||||
if ($('add_dialog').visible()) {
|
||||
$('add_dialog').fade({duration: 0.25});
|
||||
$('add_form').reset();
|
||||
}
|
||||
}
|
||||
|
||||
// Returns a Z-index higher with respect to the Z-index of all existing
|
||||
|
|
Reference in New Issue