Skip to content

Commit

Permalink
Merge pull request #20 from tony-o/patch-1
Browse files Browse the repository at this point in the history
adding auto saver for 5s
  • Loading branch information
charlesthomas committed Jun 27, 2014
2 parents fb1dce3 + 3c6df21 commit 6a2deb0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions magpie/template/note.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,19 @@
<br>
<br>
<textarea cols=100 rows=25 name=note tabindex=1>{{ note_contents }}</textarea>
<script>
var autosave = function(){
$.ajax({
url: "{{ note_name }}?a=edit"
,type: "POST"
,data: {
save: "Save"
,note: $("textarea").val()
}
});
};
setInterval(autosave, 5000);
</script>
{% else %}
<br>
{% if dot %}
Expand Down

0 comments on commit 6a2deb0

Please sign in to comment.