Commit 328fb1ba authored by Fabian-Andree Heidemann's avatar Fabian-Andree Heidemann
Browse files

[bookmarks] update to JSON conversion

parent b26280fa
......@@ -114,9 +114,17 @@ define(["jquery", "jclass", "text!../../html/bookmarkSymbolDialog.html"], functi
data.content.Bookmarks.names &&
data.content.Bookmarks.paths &&
data.content.Bookmarks.symbols) {
names = data.content.Bookmarks.names.split(":");
paths = data.content.Bookmarks.paths.split(":");
symbols = data.content.Bookmarks.symbols.split(":");
try {
names = JSON.parse(data.content.Bookmarks.names);
paths = JSON.parse(data.content.Bookmarks.paths);
symbols = JSON.parse(data.content.Bookmarks.symbols);
} catch (error) {
self.FileBase.instance.logger.info("The bookmarks format is deprecated. They are \
converted to JSON within the next save opeartion.");
names = data.content.Bookmarks.names.split(":");
paths = data.content.Bookmarks.paths.split(":");
symbols = data.content.Bookmarks.symbols.split(":");
}
}
if (names.length !== paths.length ||
names.length !== symbols.length) {
......@@ -221,9 +229,9 @@ define(["jquery", "jclass", "text!../../html/bookmarkSymbolDialog.html"], functi
this.instance.POST("/ajax/fs/setworkspaceini", {
request: JSON.stringify({
Bookmarks: {
names: names.join(":"),
paths: paths.join(":"),
symbols: symbols.join(":")
names: JSON.stringify(names),
paths: JSON.stringify(paths),
symbols: JSON.stringify(symbols)
}
})
}, (callback || Function)());
......@@ -418,10 +426,10 @@ define(["jquery", "jclass", "text!../../html/bookmarkSymbolDialog.html"], functi
onRender: function () {
dialog = this;
}
});
});
}
});
return BookmarkContainer;
});
});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment