Skip to content

Commit

Permalink
fixed autosave on simple cards
Browse files Browse the repository at this point in the history
  • Loading branch information
ethn committed Feb 3, 2012
1 parent 7c0e305 commit 471508c
Show file tree
Hide file tree
Showing 18 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions app/assets/javascripts/wagn.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ jQuery.fn.extend {
autosave: ->
slot = @slot()
return if @attr 'no-autosave'
#might be better to put this href in the html
if multi = @closest '.field-in-multi'
multi = @closest '.field-in-multi'
if multi[0]
return unless id = multi.attr 'card-id'
reportee = ': ' + multi.attr 'card-name'
else
id = slot.attr 'card-id'
reportee = ''

#might be better to put this href base in the html

$.ajax wagn.rootPath + '/card/save_draft/~' + id, {
data : { 'card[content]' : @val() },
Expand All @@ -79,8 +81,7 @@ jQuery.fn.extend {

#~~~~~ ( EVENTS )

setInterval (-> $('.card-form').setContentFieldsFromMap()), 20000

setInterval (-> $('.card-form').setContentFieldsFromMap()), 5000

$(window).load ->
wagn.initializeEditors $('body')
Expand Down

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file modified public/assets/application-all.css.gz
Binary file not shown.
Binary file not shown.
Binary file modified public/assets/application-print.css.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion public/assets/application.js

Large diffs are not rendered by default.

Binary file modified public/assets/application.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion public/assets/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ smoothness/ui-icons_888888_256x240.png: smoothness/ui-icons_888888_256x240-83461
smoothness/ui-icons_cd0a0a_256x240.png: smoothness/ui-icons_cd0a0a_256x240-5e404740e7b81db33ff68615256381c7.png
wait.gif: wait-518ef9dbbf39d973cedb817982126c75.gif
wait_lg.gif: wait_lg-953dd3b0ef31f00ee6256e47c289b9d8.gif
application.js: application-10e88203b1a05c302915de41b9968db6.js
application.js: application-2493d6b5d489c551622eebfd8390bfde.js
application-all.css: application-all-7cef1f5a124972a4c130c81b899a05d0.css
application-print.css: application-print-ba4b3800af83e6fdd04c7cef9638fd92.css
tinymce/jquery-tinymce.js: tinymce/jquery-tinymce-eb8c5b5261ce68887ce9bf9769ae61f2.js
Expand Down
Binary file not shown.
Binary file modified public/assets/tinymce/jquery-tinymce.js.gz
Binary file not shown.
Binary file not shown.
Binary file modified public/assets/tinymce/preinit.js.gz
Binary file not shown.
Binary file not shown.
Binary file modified public/assets/tinymce/tiny_mce.js.gz
Binary file not shown.
Binary file not shown.
Binary file modified public/assets/tinymce/tiny_mce_jquery.js.gz
Binary file not shown.

0 comments on commit 471508c

Please sign in to comment.