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

View file

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