split out library loader

This commit is contained in:
azivner
2018-03-27 22:42:46 -04:00
parent 9bb188b519
commit b10b0048f3
11 changed files with 109 additions and 97 deletions

View File

@@ -30,14 +30,18 @@ async function showDialog() {
$noteTitle.html(noteTitle);
}
$form.submit(() => {
async function savePrefix() {
const prefix = $treePrefixInput.val();
server.put('tree/' + branchId + '/set-prefix', {
prefix: prefix
}).then(() => treeService.setPrefix(branchId, prefix));
await server.put('tree/' + branchId + '/set-prefix', { prefix: prefix });
await treeService.setPrefix(branchId, prefix);
$dialog.dialog("close");
}
$form.submit(() => {
savePrefix();
return false;
});