From 1d3af68f298d89b94eb1faa61794cf4ee20cff15 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Thu, 15 Dec 2016 10:56:16 +0100 Subject: more wiki cleanup --- view/tpl/wiki.tpl | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'view') diff --git a/view/tpl/wiki.tpl b/view/tpl/wiki.tpl index 4638e4758..1b0b06132 100644 --- a/view/tpl/wiki.tpl +++ b/view/tpl/wiki.tpl @@ -84,28 +84,26 @@ {{$wikiModal}} - + $(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