From e2f1ce775860b1bb1ce23b9229d85aed4c748aea Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 15 Dec 2016 14:49:14 +0100 Subject: note widget: whitespace and resize the textarea to reveal full content --- view/css/widgets.css | 2 +- view/tpl/notes.tpl | 47 ++++++++++++++++++++++++++--------------------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/view/css/widgets.css b/view/css/widgets.css index 402c3f473..abaf03038 100644 --- a/view/css/widgets.css +++ b/view/css/widgets.css @@ -65,7 +65,7 @@ li:hover .widget-nav-pills-icons { padding: 5px; width: 100%; resize: vertical; - height: 250px; + min-height: 250px; } /* saved searches */ diff --git a/view/tpl/notes.tpl b/view/tpl/notes.tpl index 0e8c8017c..f9fed1feb 100644 --- a/view/tpl/notes.tpl +++ b/view/tpl/notes.tpl @@ -1,27 +1,32 @@
- + $(document).on('focusin',"#note-text",function(e){ + noteSaveTimer = setTimeout(noteSaveChanges,10000); + }); -

{{$banner}}

- + function notePostFinal() { + $.post('notes/sync', { 'note_text' : $('#note-text').val() }); + } + + function noteSaveChanges() { + $.post('notes', { 'note_text' : $('#note-text').val() }); + noteSaveTimer = setTimeout(noteSaveChanges,10000); + } +
-- cgit v1.2.3