From db514e8f41a4fe630aea1c2c971114c51929a459 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 13 Mar 2018 19:47:34 -0400 Subject: [PATCH] display note type only for non-search notes --- src/public/javascripts/note_type.js | 13 +++---------- src/views/index.ejs | 4 +--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/public/javascripts/note_type.js b/src/public/javascripts/note_type.js index d29afbf02..54393b130 100644 --- a/src/public/javascripts/note_type.js +++ b/src/public/javascripts/note_type.js @@ -63,15 +63,15 @@ const noteType = (function() { return found ? found.title : mime; } } - else if (type === 'search') { - return 'Saved search'; - } else if (type === 'render') { return 'Render HTML note'; } else if (type === 'file') { return 'Attachment'; } + else if (type === 'search') { + // ignore and do nothing, "type" will be hidden since it's not possible to switch to and from search + } else { throwError('Unrecognized type: ' + type); } @@ -103,13 +103,6 @@ const noteType = (function() { save(); }; - this.selectSavedSearch = function() { - self.type('search'); - self.mime(''); - - save(); - }; - this.selectRender = function() { self.type('render'); self.mime(''); diff --git a/src/views/index.ejs b/src/views/index.ejs index be19acc14..226f4b059 100644 --- a/src/views/index.ejs +++ b/src/views/index.ejs @@ -98,7 +98,7 @@ id="execute-script-button" onclick="noteEditor.executeCurrentNote()">Execute Ctrl+Enter -