diff options
| author | Goffin Simon <simon.goffin@outlook.com> | 2014-12-16 13:40:23 +0100 |
|---|---|---|
| committer | Goffin Simon <simon.goffin@outlook.com> | 2015-01-07 18:17:13 +0100 |
| commit | 421a76dabb2e39116fbd93c0a3b7751f723ac8d6 (patch) | |
| tree | 32c419b21806cb182e948e01fc1281f5f4d60a59 /addons/website/static/src | |
| parent | e5ac65de59f45f2d15ae6f6b840b02cac78afd03 (diff) | |
[ADD] Versioning Module.
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/js/website.ace.js | 2 | ||||
| -rw-r--r-- | addons/website/static/src/js/website.editor.js | 14 | ||||
| -rw-r--r-- | addons/website/static/src/js/website.snippets.editor.js | 2 |
3 files changed, 13 insertions, 5 deletions
diff --git a/addons/website/static/src/js/website.ace.js b/addons/website/static/src/js/website.ace.js index ce9fe1b4662..ad39ac92025 100644 --- a/addons/website/static/src/js/website.ace.js +++ b/addons/website/static/src/js/website.ace.js @@ -135,7 +135,7 @@ loadTemplates: function () { var self = this; var args = { - xml_id: $(document.documentElement).data('view-xmlid'), + key: $(document.documentElement).data('view-xmlid'), full: true, bundles: !!$('script[src*=".assets_common"]').length }; 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 { diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js index 644065f5f83..5a689155392 100644 --- a/addons/website/static/src/js/website.snippets.editor.js +++ b/addons/website/static/src/js/website.snippets.editor.js @@ -102,7 +102,7 @@ var self = this; this.$button = $(openerp.qweb.render('website.snippets_button')) - .prependTo(this.parent.$("#website-top-edit ul")) + .prependTo(this.parent.$(".js_editor_placeholder")) .find("button"); this.$button.click(_.bind(this.show_blocks, this)); |
