more cleanup

This commit is contained in:
azivner
2017-11-14 23:01:23 -05:00
parent 98a2322b37
commit c2ad14ba18
6 changed files with 15 additions and 17 deletions

View File

@@ -13,7 +13,7 @@ const protected_session = (function() {
$.ajax({
url: baseApiUrl + 'settings/all',
type: 'GET',
error: () => showError("Error getting encryption settings.")
error: () => showError("Error getting protected session settings.")
}).then(settings => {
protectedSessionTimeout = settings.protected_session_timeout;
});
@@ -69,6 +69,14 @@ const protected_session = (function() {
noteTree.reload();
if (protectedSessionDeferred !== null) {
// this may fal if the dialog has not been previously opened
try {
dialogEl.dialog('close');
}
catch(e) {}
passwordEl.val('');
protectedSessionDeferred.resolve();
protectedSessionDeferred = null;