summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/backend.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-12-10 13:05:58 +0100
committerChristophe Simonis <chs@odoo.com>2015-12-10 13:05:58 +0100
commit82a495eed52a9f42e5b88caa52c20a85f8d81ce3 (patch)
tree6c5e8cc0247d5fe08d24e9abae38fe353fbebc56 /addons/web_editor/static/src/js/backend.js
parent0bc2ddae784bf80c4c809d8b7f6d642d576f92a1 (diff)
parent4022493c0b85f966e499b6c03ac7cce5556f15e6 (diff)
[MERGE] forward port of branch saas-7 up to 4022493
Diffstat (limited to 'addons/web_editor/static/src/js/backend.js')
-rw-r--r--addons/web_editor/static/src/js/backend.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js
index 2c7c86466c1..0cd7541c7e2 100644
--- a/addons/web_editor/static/src/js/backend.js
+++ b/addons/web_editor/static/src/js/backend.js
@@ -25,7 +25,7 @@ var FieldTextHtmlSimple = widget.extend({
template: 'web_editor.FieldTextHtmlSimple',
_config: function () {
var self = this;
- return {
+ var config = {
'focus': false,
'height': 180,
'toolbar': [
@@ -46,6 +46,10 @@ var FieldTextHtmlSimple = widget.extend({
self.trigger('changed_value');
}
};
+ if (session.debug) {
+ config.toolbar.splice(7, 0, ['view', ['codeview']]);
+ }
+ return config;
},
start: function() {
var def = this._super.apply(this, arguments);