All the resources of the editor asume that the resources css,js and images are relative to /. The base parameter could be used to change the default location.

This commit is contained in:
Paulo Gustavo Veiga
2012-02-20 11:32:37 -03:00
parent 95aa9f18eb
commit ae43a27dd2
17 changed files with 102 additions and 187 deletions

View File

@@ -53,7 +53,7 @@ mindplot.ImageIcon = new Class({
},
_getImageUrl : function(iconId) {
return "../icons/" + iconId + ".png";
return "icons/" + iconId + ".png";
},
getModel : function() {

View File

@@ -52,6 +52,6 @@ mindplot.LinkIcon = new Class({
actionDispatcher.removeLinkFromTopic(this._topic.getId());
}
});
mindplot.LinkIcon.IMAGE_URL = "../images/links.png";
mindplot.LinkIcon.IMAGE_URL = "images/links.png";

View File

@@ -32,7 +32,7 @@ mindplot.LocalStorageManager = new Class({
if (xml == null) {
// Let's try to open one from the local directory ...
var xmlRequest = new Request({
url: '../samples/' + mapId + '.xml',
url: 'samples/' + mapId + '.xml',
method: 'get',
async: false,
onSuccess: function(responseText) {

View File

@@ -83,5 +83,5 @@ mindplot.NoteIcon = new Class({
}
});
mindplot.NoteIcon.IMAGE_URL = "../images/notes.png";
mindplot.NoteIcon.IMAGE_URL = "images/notes.png";

View File

@@ -22,7 +22,7 @@ mindplot.widget.ColorPalettePanel = new Class({
initialize : function(buttonId, model, baseUrl) {
this._baseUrl = baseUrl;
this.parent(buttonId, model);
$assert(baseUrl, "baseUrl can not be null");
$assert($defined(baseUrl), "baseUrl can not be null");
},
_load : function() {

View File

@@ -22,7 +22,7 @@ mindplot.widget.Menu = new Class({
initialize : function(designer, containerId, mapId, readOnly, baseUrl) {
this.parent(designer, containerId, mapId);
baseUrl = !$defined(baseUrl) ? "../" : baseUrl;
baseUrl = !$defined(baseUrl) ? "" : baseUrl;
var widgetsBaseUrl = baseUrl + "css/widget";
// Stop event propagation ...
@@ -178,7 +178,7 @@ mindplot.widget.Menu = new Class({
this._toolbarElems.push(new mindplot.widget.ColorPalettePanel('fontColor', fontColorModel, baseUrl));
this._addButton('export', false, false, function() {
var reqDialog = new MooDialog.Request('../c/export.htm?mapId=' + mapId, null,
var reqDialog = new MooDialog.Request('c/export.htm?mapId=' + mapId, null,
{'class': 'exportModalDialog',
closeButton:true,
destroyOnClose:true,
@@ -280,7 +280,7 @@ mindplot.widget.Menu = new Class({
var tagElem = $('tagIt');
if (tagElem) {
this._addButton('tagIt', false, false, function() {
var reqDialog = new MooDialog.Request('../c/tags.htm?mapId=' + mapId, null,
var reqDialog = new MooDialog.Request('c/tags.htm?mapId=' + mapId, null,
{'class': 'tagItModalDialog',
closeButton:true,
destroyOnClose:true,
@@ -297,7 +297,7 @@ mindplot.widget.Menu = new Class({
var shareElem = $('shareIt');
if (shareElem) {
this._addButton('shareIt', false, false, function() {
var reqDialog = new MooDialog.Request('../c/mymaps.htm?action=collaborator&userEmail=paulo%40pveiga.com.ar&mapId=' + mapId, null,
var reqDialog = new MooDialog.Request('c/mymaps.htm?action=collaborator&mapId=' + mapId, null,
{'class': 'shareItModalDialog',
closeButton:true,
destroyOnClose:true,
@@ -315,7 +315,7 @@ mindplot.widget.Menu = new Class({
var publishElem = $('publishIt');
if (publishElem) {
this._addButton('publishIt', false, false, function() {
var reqDialog = new MooDialog.Request('../c/publish.htm?mapId=' + mapId, null,
var reqDialog = new MooDialog.Request('c/publish.htm?mapId=' + mapId, null,
{'class': 'publishModalDialog',
closeButton:true,
destroyOnClose:true,
@@ -334,7 +334,7 @@ mindplot.widget.Menu = new Class({
if (historyElem) {
this._addButton('history', false, false, function() {
var reqDialog = new MooDialog.Request('../c/history.htm?action=list&goToMindmapList&mapId=' + mapId, null,
var reqDialog = new MooDialog.Request('c/history.htm?action=list&goToMindmapList&mapId=' + mapId, null,
{'class': 'historyModalDialog',
closeButton:true,
destroyOnClose:true,

View File

@@ -26,10 +26,10 @@ mindplot.widget.TopicShapePanel = new Class({
var content = new Element("div", {'class':'toolbarPanel','id':'topicShapePanel'});
content.innerHTML = '' +
'<div id="rectagle" model="rectagle"><img src="../images/shape-rectangle.png" alt="Rectangle"></div>' +
'<div id="rounded_rectagle" model="rounded rectagle" ><img src="../images/shape-rectangle-round.png" alt="Rounded Rectangle"></div>' +
'<div id="line" model="line"><img src="../images/shape-line.png" alt="Line"></div>' +
'<div id="elipse" model="elipse"><img src="../images/shape-circle.png"></div>';
'<div id="rectagle" model="rectagle"><img src="images/shape-rectangle.png" alt="Rectangle"></div>' +
'<div id="rounded_rectagle" model="rounded rectagle" ><img src="images/shape-rectangle-round.png" alt="Rounded Rectangle"></div>' +
'<div id="line" model="line"><img src="images/shape-line.png" alt="Line"></div>' +
'<div id="elipse" model="elipse"><img src="images/shape-circle.png"></div>';
return content;