cannot edit note title when not in protected session

This commit is contained in:
azivner
2018-12-27 20:22:33 +01:00
parent d4db265fd9
commit 35bc1421f1
6 changed files with 29 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ const $protectButton = $("#protect-button");
const $unprotectButton = $("#unprotect-button");
const $enterProtectedSessionButton = $("#enter-protected-session-button");
const $leaveProtectedSessionButton = $("#leave-protected-session-button");
const $noteTitle = $("#note-title");
let protectedSessionDeferred = null;
@@ -38,6 +39,9 @@ function ensureProtectedSession(requireProtectedSession, modal) {
// using deferred instead of promise because it allows resolving from outside
protectedSessionDeferred = dfd;
// user shouldn't be able to edit note title
$noteTitle.prop("readonly", true);
if (modal) {
if (treeService.getCurrentNode().data.isProtected) {
$noteDetailWrapper.hide();