Livepreview JavaScript fix for base_url

This commit is contained in:
Sunny Ripert
2012-07-02 15:03:01 +02:00
parent c31ead493a
commit 4a63899722
2 changed files with 6 additions and 2 deletions
@@ -107,7 +107,7 @@ $.save = function( commitMessage ) {
if ( create ) {
jQuery.ajax( {
type: POST,
url: '/create',
url: baseUrl + '/create',
data: { path: pathName, page: pageName, format: markdown, content: txt, message: commitMessage || msg },
success: function() {
win.location = newLocation;
@@ -116,7 +116,7 @@ $.save = function( commitMessage ) {
} else {
jQuery.ajax( {
type: POST,
url: '/edit/' + pageName,
url: baseUrl + '/edit/' + pageName,
data: { path: pathName, page: pageName, format: markdown, content: txt, message: commitMessage || msg },
success: function() {
win.location = newLocation;
+4
View File
@@ -19,6 +19,10 @@ module Precious
def has_path
!@path.nil?
end
def base_url
@base_url
end
end
end
end