mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 23:44:54 +01:00
fix local storage manager
This commit is contained in:
parent
b5d1bbaa5b
commit
8263b1abeb
@ -36,11 +36,11 @@ mindplot.LocalStorageManager = new Class({
|
|||||||
var xml = localStorage.getItem(mapId + "-xml");
|
var xml = localStorage.getItem(mapId + "-xml");
|
||||||
if (xml == null || this.forceLoad) {
|
if (xml == null || this.forceLoad) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:this.documentUrl.replace("{id}", mapId),
|
url: this.documentUrl.replace("{id}", mapId),
|
||||||
headers:{"Content-Type":"text/plain","Accept":"application/xml"},
|
type:'get',
|
||||||
method:'get',
|
dataType: "xml",
|
||||||
async:false,
|
async:false,
|
||||||
success:function (responseText) {
|
success: function (responseText) {
|
||||||
xml = responseText;
|
xml = responseText;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -49,7 +49,9 @@ mindplot.LocalStorageManager = new Class({
|
|||||||
throw new Error("Map could not be loaded");
|
throw new Error("Map could not be loaded");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return xml;
|
|
||||||
|
var parser = new DOMParser();
|
||||||
|
return parser.parseFromString(xml, 'text/xml');
|
||||||
},
|
},
|
||||||
|
|
||||||
unlockMap:function (mindmap) {
|
unlockMap:function (mindmap) {
|
||||||
|
Loading…
Reference in New Issue
Block a user