Livepreview JavaScript fix for base_url
This commit is contained in:
@@ -107,7 +107,7 @@ $.save = function( commitMessage ) {
|
|||||||
if ( create ) {
|
if ( create ) {
|
||||||
jQuery.ajax( {
|
jQuery.ajax( {
|
||||||
type: POST,
|
type: POST,
|
||||||
url: '/create',
|
url: baseUrl + '/create',
|
||||||
data: { path: pathName, page: pageName, format: markdown, content: txt, message: commitMessage || msg },
|
data: { path: pathName, page: pageName, format: markdown, content: txt, message: commitMessage || msg },
|
||||||
success: function() {
|
success: function() {
|
||||||
win.location = newLocation;
|
win.location = newLocation;
|
||||||
@@ -116,7 +116,7 @@ $.save = function( commitMessage ) {
|
|||||||
} else {
|
} else {
|
||||||
jQuery.ajax( {
|
jQuery.ajax( {
|
||||||
type: POST,
|
type: POST,
|
||||||
url: '/edit/' + pageName,
|
url: baseUrl + '/edit/' + pageName,
|
||||||
data: { path: pathName, page: pageName, format: markdown, content: txt, message: commitMessage || msg },
|
data: { path: pathName, page: pageName, format: markdown, content: txt, message: commitMessage || msg },
|
||||||
success: function() {
|
success: function() {
|
||||||
win.location = newLocation;
|
win.location = newLocation;
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ module Precious
|
|||||||
def has_path
|
def has_path
|
||||||
!@path.nil?
|
!@path.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def base_url
|
||||||
|
@base_url
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user