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/tpl/notes.tpl | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) (limited to 'view/tpl/notes.tpl') 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