From 2e8787ff91be541cf33a73fa095a80ed086dc58b Mon Sep 17 00:00:00 2001 From: azivner Date: Sun, 1 Oct 2017 08:47:26 -0400 Subject: [PATCH] moved search behind tree action button --- TODO | 27 +++++++++++++++++++---- src/templates/app.html | 46 +++++++++++++++++++++++----------------- static/icons/search.png | Bin 0 -> 419 bytes static/js/init.js | 4 ---- static/js/tree.js | 10 +++++++++ static/style.css | 4 ++-- 6 files changed, 61 insertions(+), 30 deletions(-) create mode 100644 static/icons/search.png diff --git a/TODO b/TODO index 7bfd60e5a..ef2f9e593 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,27 @@ -- deleting cloned nodes ends with 500 (probably only on folders) +- pick new name for the project + +New features: - what links here + - link between encrypted notes could be done by encrypting note_ids of both sides of relations. Encryption must be + deterministic to allow lookup by cipher text - recent changes - link to note should lead to the revision - db upgrade / migration -- dates should be stored in UTC to work correctly with time zones - - we should also record timezone info so that we display the date correctly with respect to the local date at the time of recording it + +Refactorings: - modularize frontend - - unify handling of global variables \ No newline at end of file + - unify handling of global variables +- unify handling of dialogs and their forms - they all follow the same pattern - e.g. have one main dialog window/el + +UI: +- need to represent global actions somehow - e.g. recent changes, settings +- better way how to represent per-note actions - what links here, encryption + +Encryption: +- we don't have IV or encryption specific counter + +Bugs: +- deleting cloned nodes ends with 500 (probably only on folders) + +Others: +- dates should be stored in UTC to work correctly with time zones + - we should also record timezone info so that we display the date correctly with respect to the local date at the time of recording it \ No newline at end of file diff --git a/src/templates/app.html b/src/templates/app.html index b89b93716..568d13905 100644 --- a/src/templates/app.html +++ b/src/templates/app.html @@ -6,30 +6,36 @@
-
-

- - - - -

-
+
+
+ + Create new top level note + - + + Search in notes + -
+ +
+ +
+
diff --git a/static/icons/search.png b/static/icons/search.png new file mode 100644 index 0000000000000000000000000000000000000000..d890955eca625b944ee9674ee11a85bc9aabef6f GIT binary patch literal 419 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjY)RhkE)4%caKYZ?lYt_f1s;*b zKpodXn9)gNb_Gz7y~NYkmHi{ws+>6a?)CDsJ)i$*&NUZ$^88J`YQ;o510fkN`}VNF^Bx8IyLa(Rto$2n8rTsN z`HNw}o06il&3j9pU7GpyRBpQ1*U;y#q1WvS9<`)yo7Zr|Dd^Hxao@{=1zbE|{&BsD z^iWb=w^&WeyZlRS^p3ls9!{ycDjSO?GV#}co!#4bT(#<@{AqLUh3OZTCOOFigOkD2 L)z4*}Q$iB}HASgt literal 0 HcmV?d00001 diff --git a/static/js/init.js b/static/js/init.js index 9fd0d4b58..9222adb1d 100644 --- a/static/js/init.js +++ b/static/js/init.js @@ -11,10 +11,6 @@ $(document).bind('keydown', 'alt+m', function() { $("#noteDetailWrapper").css("width", hidden ? "750px" : "100%"); }); -$(document).bind('keydown', 'alt+s', function() { - $("input[name=search]").focus(); -}); - // hide (toggle) everything except for the note content for distraction free writing $(document).bind('keydown', 'alt+t', function() { const date = new Date(); diff --git a/static/js/tree.js b/static/js/tree.js index f4e85401d..ea59a6f86 100644 --- a/static/js/tree.js +++ b/static/js/tree.js @@ -215,4 +215,14 @@ function scrollToCurrentNote() { } } +$(document).bind('keydown', 'alt+s', function() { + $("#search-box").show(); + + $("input[name=search]").focus(); +}); + +function toggleSearch() { + $("#search-box").toggle(); +} + $(document).bind('keydown', 'alt+c', collapseTree); \ No newline at end of file diff --git a/static/style.css b/static/style.css index 218800733..b7edd5481 100644 --- a/static/style.css +++ b/static/style.css @@ -4,8 +4,8 @@ height: 100vh; display: grid; - grid-template-areas: "search title" - "tree-buttons note-content" + grid-template-areas: "tree title" + "tree note-content" "tree note-content"; grid-template-columns: 2fr 5fr; grid-template-rows: auto