Editor fix - fix jumping to a different document version
[redakcja.git] / apps / wiki / templates / wiki / bootstrap.html
index 73e47ca..cbf0232 100644 (file)
                 documentAttachmentUrl: function(attachmentName) {
                     return '{{MEDIA_URL}}{{IMAGE_DIR}}{{slug}}/' + attachmentName;
                 },
+                documentUrl: function(id, version) {
+                    var url = '{% url 'wiki_editor' slug %}'
+                    if(version) {
+                        url = url + '?version=' + version;
+                    }
+                    return url;
+                },
 
                 documentSaveForm: {
                     fields: [