diff options
| author | Goffin Simon <simon.goffin@outlook.com> | 2015-01-08 22:42:49 +0100 |
|---|---|---|
| committer | Goffin Simon <simon.goffin@outlook.com> | 2015-01-16 23:13:58 +0100 |
| commit | 9850080eb0d9ee960ff92217b7b1849d039e80df (patch) | |
| tree | ee731225e6a81b6e918a91b1fd8b6f4a84670183 /addons/website/static/src/js/website.editor.js | |
| parent | 92c94f3ac122193586041170a69330a1070e0201 (diff) | |
[ADD] Versioning Module.
This module allow to make versioning and A/B testing of the website.
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
| -rw-r--r-- | addons/website/static/src/js/website.editor.js | 14 |
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 05f07b382a0..f3dd2b1f030 100644 --- a/addons/website/static/src/js/website.editor.js +++ b/addons/website/static/src/js/website.editor.js @@ -999,7 +999,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 @@ -1067,9 +1067,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', { @@ -1118,10 +1126,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 { |
