new code icons, protected note icon in note tree is now styled using CSS filter drop shadow

This commit is contained in:
azivner 2018-01-26 22:32:44 -05:00
parent b2ff97ccf2
commit 5981b9bc7b
9 changed files with 20 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 342 B

View file

@ -150,6 +150,10 @@ const noteTree = (function() {
extraClasses.push("multiple-parents");
}
if (note.type === 'code') {
extraClasses.push("code");
}
return extraClasses.join(" ");
}

View file

@ -4,6 +4,7 @@ const protected_session = (function() {
const dialogEl = $("#protected-session-password-dialog");
const passwordFormEl = $("#protected-session-password-form");
const passwordEl = $("#protected-session-password");
const noteDetailWrapperEl = $("#note-detail-wrapper");
let protectedSessionDeferred = null;
let lastProtectedSessionOperationDate = null;
@ -24,6 +25,8 @@ const protected_session = (function() {
if (requireProtectedSession && !isProtectedSessionAvailable()) {
protectedSessionDeferred = dfd;
noteDetailWrapperEl.hide();
dialogEl.dialog({
modal: modal,
width: 400,
@ -63,6 +66,8 @@ const protected_session = (function() {
if (protectedSessionDeferred !== null) {
ensureDialogIsClosed(dialogEl, passwordEl);
noteDetailWrapperEl.show();
protectedSessionDeferred.resolve();
protectedSessionDeferred = null;

View file

@ -30,7 +30,7 @@
overflow: auto;
}
#note-detail-wrapper.protected {
#note-detail-wrapper.protected, #note-detail-wrapper.protected .CodeMirror {
background-color: #eee;
}
@ -56,14 +56,18 @@ span.fancytree-node.fancytree-folder > span.fancytree-icon {
background-image: url("../images/icons/folder.png");
}
span.fancytree-node.protected > span.fancytree-icon {
span.fancytree-node.code > span.fancytree-icon {
background-position: 0 0;
background-image: url("../images/icons/file-shaded.png");
background-image: url("../images/icons/code.png");
}
span.fancytree-node.protected.fancytree-folder > span.fancytree-icon {
span.fancytree-node.fancytree-folder.code > span.fancytree-icon {
background-position: 0 0;
background-image: url("../images/icons/folder-shaded.png");
background-image: url("../images/icons/code-folder.png");
}
span.fancytree-node.protected > span.fancytree-icon {
filter: drop-shadow(2px 2px 2px black);
}
span.fancytree-node.multiple-parents .fancytree-title {

View file

@ -15,7 +15,8 @@ router.get('/', auth.checkApiAuth, wrap(async (req, res, next) => {
SELECT
notes_tree.*,
notes.note_title,
notes.is_protected
notes.is_protected,
notes.type
FROM
notes_tree
JOIN

View file

@ -2,7 +2,6 @@
const sql = require('./sql');
const sync_table = require('./sync_table');
const data_encryption = require('./data_encryption');
async function validateParentChild(res, parentNoteId, childNoteId, noteTreeId = null) {
const existing = await getExistingNoteTree(parentNoteId, childNoteId);