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 */
|
case 27: /* Escape */
|
||||||
hide_add_dialog();
|
hide_add_dialog();
|
||||||
break;
|
break;
|
||||||
|
case 187: /* Plus */
|
||||||
|
show_add_dialog();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,14 +57,18 @@ function key_handler(e) {
|
||||||
|
|
||||||
// Shows the upload/add dialog.
|
// Shows the upload/add dialog.
|
||||||
function show_add_dialog() {
|
function show_add_dialog() {
|
||||||
$('text').clear();
|
if (!$('add_dialog').visible()) {
|
||||||
$('add_dialog').appear({duration: 0.25});
|
$('text').clear();
|
||||||
|
$('add_dialog').appear({duration: 0.25});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hides and clears the upload/add dialog.
|
// Hides and clears the upload/add dialog.
|
||||||
function hide_add_dialog() {
|
function hide_add_dialog() {
|
||||||
$('add_dialog').fade({duration: 0.25});
|
if ($('add_dialog').visible()) {
|
||||||
$('add_form').reset();
|
$('add_dialog').fade({duration: 0.25});
|
||||||
|
$('add_form').reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a Z-index higher with respect to the Z-index of all existing
|
// Returns a Z-index higher with respect to the Z-index of all existing
|
||||||
|
|
Reference in New Issue