fix save not working for mindmap (bad request)

This commit is contained in:
Ezequiel Bergamaschi 2014-08-17 19:15:00 -03:00
parent f6464b6e37
commit 4aa0d22ebe
2 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@ mindplot.PersistenceManager = new Class({
var domMap = serializer.toXML(mindmap);
var mapXml = core.Utils.innerXML(domMap);
var pref = (editorProperties);
var pref = JSON.stringify(editorProperties);
try {
this.saveMapXml(mapId, mapXml, pref, saveHistory, events, sync);
} catch (e) {

View File

@ -57,11 +57,11 @@ mindplot.RESTPersistenceManager = new Class({
$.ajax({
url: this.documentUrl.replace("{id}", mapId) + "?" + query,
headers:{"Content-Type":"application/json; charset=utf-8", "Accept":"application/json"},
method:'put',
async:!sync,
type:'put',
dataType:"json",
data: data,
data: JSON.stringify(data),
contentType:"application/json; charset=utf-8",
async:!sync,
success: function (data, textStatus, jqXHRresponseText) {
persistence.timestamp = jqXHRresponseText;