add settings load shortcut

This commit is contained in:
Stewart Allen 2020-06-13 18:27:31 -04:00
commit 27ca0e47ae
2 changed files with 11 additions and 2 deletions

View file

@ -477,7 +477,11 @@
$('sexport').click(); $('sexport').click();
} }
function settingsSave() { function settingsSave(ev) {
if (ev) {
ev.stopPropagation();
ev.preventDefault();
}
API.dialog.hide(); API.dialog.hide();
let mode = API.mode.get(), let mode = API.mode.get(),
s = settings(), s = settings(),
@ -500,6 +504,7 @@
} }
function settingsLoad() { function settingsLoad() {
UC.hidePoppers();
API.conf.show(); API.conf.show();
} }
@ -1589,10 +1594,14 @@
API.space.reload(); API.space.reload();
}; };
// when profile hover/pop, hide other poppers
$('set-top').onmouseover = () => { $('set-top').onmouseover = () => {
UC.hidePoppers(); UC.hidePoppers();
}; };
// shortcut to load settings
UI.settingsGroup.onclick = settingsLoad;
SPACE.addEventHandlers(self, [ SPACE.addEventHandlers(self, [
'keyup', keyUpHandler, 'keyup', keyUpHandler,
'keydown', keyDownHandler, 'keydown', keyDownHandler,

View file

@ -542,7 +542,7 @@
b.onclick = function() { b.onclick = function() {
hidePoppers(); hidePoppers();
if (action) action(); if (action) action(...arguments);
}; };
if (opt.class) { if (opt.class) {