mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +01:00
Fix print issue loading cached maps.
This commit is contained in:
parent
79f5e51513
commit
d2b7b640d9
@ -18,9 +18,10 @@
|
|||||||
|
|
||||||
mindplot.LocalStorageManager = new Class({
|
mindplot.LocalStorageManager = new Class({
|
||||||
Extends:mindplot.PersistenceManager,
|
Extends:mindplot.PersistenceManager,
|
||||||
initialize:function (documentUrl) {
|
initialize:function (documentUrl,forceLoad) {
|
||||||
this.parent();
|
this.parent();
|
||||||
this.documentUrl = documentUrl;
|
this.documentUrl = documentUrl;
|
||||||
|
this.forceLoad = forceLoad;
|
||||||
},
|
},
|
||||||
|
|
||||||
saveMapXml:function (mapId, mapXml, pref, saveHistory, events) {
|
saveMapXml:function (mapId, mapXml, pref, saveHistory, events) {
|
||||||
@ -33,7 +34,7 @@ mindplot.LocalStorageManager = new Class({
|
|||||||
|
|
||||||
loadMapDom:function (mapId) {
|
loadMapDom:function (mapId) {
|
||||||
var xml = localStorage.getItem(mapId + "-xml");
|
var xml = localStorage.getItem(mapId + "-xml");
|
||||||
if (xml == null) {
|
if (xml == null || forceLoad) {
|
||||||
var xmlRequest = new Request({
|
var xmlRequest = new Request({
|
||||||
url:this.documentUrl.replace("{id}", mapId),
|
url:this.documentUrl.replace("{id}", mapId),
|
||||||
headers:{"Content-Type":"text/plain","Accept":"application/xml"},
|
headers:{"Content-Type":"text/plain","Accept":"application/xml"},
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
);
|
);
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${memoryPersistence || readOnlyMode}">
|
<c:if test="${memoryPersistence || readOnlyMode}">
|
||||||
options.persistenceManager = new mindplot.LocalStorageManager("c/restful/maps/{id}${hid!=null?'/':''}${hid!=null?hid:''}/document/xml${principal!=null?'':'-pub'}");
|
options.persistenceManager = new mindplot.LocalStorageManager("c/restful/maps/{id}${hid!=null?'/':''}${hid!=null?hid:''}/document/xml${principal!=null?'':'-pub'}",true);
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
var userOptions = ${mindmap.properties};
|
var userOptions = ${mindmap.properties};
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
options.readOnly = true;
|
options.readOnly = true;
|
||||||
|
|
||||||
// Configure persistence ...
|
// Configure persistence ...
|
||||||
options.persistenceManager = new mindplot.LocalStorageManager("c/restful/maps/{id}/document/xml${principal!=null?'':'-pub'}");
|
options.persistenceManager = new mindplot.LocalStorageManager("c/restful/maps/{id}/document/xml${principal!=null?'':'-pub'}",true);
|
||||||
|
|
||||||
// Build designer ...
|
// Build designer ...
|
||||||
var designer = buildDesigner(options);
|
var designer = buildDesigner(options);
|
||||||
|
@ -77,7 +77,7 @@
|
|||||||
options.readOnly = true;
|
options.readOnly = true;
|
||||||
|
|
||||||
// Configure loader ...
|
// Configure loader ...
|
||||||
options.persistenceManager = new mindplot.LocalStorageManager("c/restful/maps/{id}/document/xml${principal!=null?'':'-pub'}");
|
options.persistenceManager = new mindplot.LocalStorageManager("c/restful/maps/{id}/document/xml${principal!=null?'':'-pub'}",true);
|
||||||
|
|
||||||
// Build designer ...
|
// Build designer ...
|
||||||
var designer = buildDesigner(options);
|
var designer = buildDesigner(options);
|
||||||
|
Loading…
Reference in New Issue
Block a user