Skip to content
This repository
Browse code

Make autosave JS call the appropriate controller action

  • Loading branch information...
commit 0b52a94bb4f60adc1b3a115956cbf1db2bd931dd 1 parent 1b3e2ca
Matijs van Zuijlen authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  public/javascripts/administration.js
3  public/javascripts/administration.js
... ...
@@ -1,10 +1,11 @@
1 1
 function autosave_request(e) {
  2
+
2 3
   new Form.Observer (e, 30, function(element, value) {
3 4
 			if ($('current_editor').value == 'visual') {
4 5
 				$('article__body_and_extended_editor').value = CKEDITOR.instances.article__body_and_extended_editor.getData();;
5 6
 			}
6 7
 
7  
-      new Ajax.Request(e.action.gsub(/\/new\/{0,1}/, '/autosave/') , {
  8
+      new Ajax.Request(e.action.gsub(/\/admin\/content\/{0,1}.*/, '/admin/content/autosave') , {
8 9
                                         asynchronous:true,
9 10
                                         evalScripts:true,
10 11
                                         parameters: Form.serialize(e)

0 notes on commit 0b52a94

Please sign in to comment.
Something went wrong with that request. Please try again.