Permalink
Browse files

Make autosave JS call the appropriate controller action

  • Loading branch information...
1 parent 1b3e2ca commit 0b52a94bb4f60adc1b3a115956cbf1db2bd931dd @mvz mvz committed Feb 23, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 public/javascripts/administration.js
@@ -1,10 +1,11 @@
function autosave_request(e) {
+
new Form.Observer (e, 30, function(element, value) {
if ($('current_editor').value == 'visual') {
$('article__body_and_extended_editor').value = CKEDITOR.instances.article__body_and_extended_editor.getData();;
}
- new Ajax.Request(e.action.gsub(/\/new\/{0,1}/, '/autosave/') , {
+ new Ajax.Request(e.action.gsub(/\/admin\/content\/{0,1}.*/, '/admin/content/autosave') , {
asynchronous:true,
evalScripts:true,
parameters: Form.serialize(e)

0 comments on commit 0b52a94

Please sign in to comment.