aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
authormarijus <mario@localhost.localdomain>2013-12-11 19:05:50 +0100
committermarijus <mario@localhost.localdomain>2013-12-11 19:05:50 +0100
commit1add7d381d67708fe4b85fee3a7022e361f704ce (patch)
treedd39120192d0f853ba374077c4bc511afa9ce051 /view
parentaea1e1af82ab2f76f0d8a421ff101316421cbd84 (diff)
downloadvolse-hubzilla-1add7d381d67708fe4b85fee3a7022e361f704ce.tar.gz
volse-hubzilla-1add7d381d67708fe4b85fee3a7022e361f704ce.tar.bz2
volse-hubzilla-1add7d381d67708fe4b85fee3a7022e361f704ce.zip
this saves notes on the fly. i think this is appropriate behavior for a notes widget. btw... one would get mad at oneself if noting something important and forget to save it. with this behavior one can at least get mad at the developer if something goes wrong :)
Diffstat (limited to 'view')
-rw-r--r--view/tpl/notes.tpl9
1 files changed, 3 insertions, 6 deletions
diff --git a/view/tpl/notes.tpl b/view/tpl/notes.tpl
index 7300779f4..09932e545 100644
--- a/view/tpl/notes.tpl
+++ b/view/tpl/notes.tpl
@@ -1,13 +1,10 @@
<div class="widget">
<script>
-function notePost() {
- $('#note-rotator').spin('tiny');
- $.post('notes', { 'note_text' : $('#note-text').val() },function(data) { $('#note-rotator').spin(false); });
-}
+$("#note-text").live('input paste',function(e){
+ $.post('notes', { 'note_text' : $('#note-text').val() });
+});
</script>
<h3>{{$banner}}</h3>
<textarea name="note_text" id="note-text">{{$text}}</textarea>
-<input type="submit" name="submit" id="note-save" value="{{$save}}" onclick="notePost(); return true;">
-<div id="note-rotator"></div>
</div>