Commit 6bd580b7 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

EditorGadget: Reload Editor if current url being edited changes

parent 5aae7d82
......@@ -24,6 +24,13 @@
return gadget.crib_sw_put(url, {content: content, type: mimetype});
})
.push(function () {
if (url !== gadget.props.options.url) {
return gadget.redirect({
page: "editor",
url: url,
message: "Saved " + url + " files at " + Date()
});
}
gadget.props.element.querySelector(".crib-editor-save-status")
.textContent = "Saved " + url + " files at " + Date();
});
......@@ -83,6 +90,10 @@
if (options === undefined)
options = {};
gadget.props.options = options;
if (gadget.props.options.message !== undefined) {
gadget.props.element.querySelector(".crib-editor-save-status")
.textContent = gadget.props.options.message;
}
return new RSVP.Queue()
.push(function () {
if (gadget.props.options.crib_enable_url !== undefined) {
......
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