summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.editor.js
diff options
context:
space:
mode:
authorGoffin Simon <simon.goffin@outlook.com>2014-12-16 13:40:23 +0100
committerGoffin Simon <simon.goffin@outlook.com>2015-01-07 18:17:13 +0100
commit421a76dabb2e39116fbd93c0a3b7751f723ac8d6 (patch)
tree32c419b21806cb182e948e01fc1281f5f4d60a59 /addons/website/static/src/js/website.editor.js
parente5ac65de59f45f2d15ae6f6b840b02cac78afd03 (diff)
[ADD] Versioning Module.
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
-rw-r--r--addons/website/static/src/js/website.editor.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 28e2829e029..12d1b157736 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -901,7 +901,7 @@ define(['summernote/summernote'], function () {
rte_changed: function () {
this.$buttons.save.prop('disabled', false);
},
- save: function () {
+ _save: function () {
var self = this;
var saved = {}; // list of allready saved views and data
@@ -969,9 +969,17 @@ define(['summernote/summernote'], function () {
});
});
},
+ save: function () {
+ return this._save().then(function () {
+ website.reload();
+ });
+ },
/**
* Saves an RTE content, which always corresponds to a view section (?).
*/
+ save_without_reload: function () {
+ return this._save();
+ },
saveElement: function ($el) {
var markup = $el.prop('outerHTML');
return openerp.jsonRpc('/web/dataset/call', 'call', {
@@ -1020,10 +1028,10 @@ define(['summernote/summernote'], function () {
if(this.loaded) {
return;
}
- openerp.jsonRpc('/website/customize_template_get', 'call', { 'xml_id': this.view_name }).then(
+ openerp.jsonRpc('/website/customize_template_get', 'call', { 'key': this.view_name }).then(
function(result) {
_.each(result, function (item) {
- if (item.xml_id === "website.debugger" && !window.location.search.match(/[&?]debug(&|$)/)) return;
+ if (item.key === "website.debugger" && !window.location.search.match(/[&?]debug(&|$)/)) return;
if (item.header) {
self.$menu.append('<li class="dropdown-header">' + item.name + '</li>');
} else {