summaryrefslogtreecommitdiff
path: root/addons/website/controllers/web_editor.py
diff options
context:
space:
mode:
authorRobot Odoo <xmo+roboto@odoo.com>2019-02-08 20:16:33 +0100
committerGitHub <noreply@github.com>2019-02-08 20:16:33 +0100
commitf4dc2af71a662a3089ee12e52e2ccdaea6bd6587 (patch)
tree81b9a7ec93ff9ee3c6f456b39b26c7682eac7719 /addons/website/controllers/web_editor.py
parente6e206b14e3c3f0274b9d8e723ab1f40c53efe68 (diff)
parent52b27c4c6b38fec21872c7a5d6aa155da0827d11 (diff)
[MERGE] website, *: improve customize dialog + add logo sizing
* portal, web, web_editor See sub-commits for details. - Many improvements to the customize dialog 'framework' (toggle switches, new widgets, ...) - Optimization of RPCs (including ace editor which shares the same code) - Move navbar options of the customize menu to the customize dialog - Add the possibility to control the header logo size - Add the possibility to control the header font size task-1904244 closes odoo/odoo#29624
Diffstat (limited to 'addons/website/controllers/web_editor.py')
-rw-r--r--addons/website/controllers/web_editor.py38
1 files changed, 0 insertions, 38 deletions
diff --git a/addons/website/controllers/web_editor.py b/addons/website/controllers/web_editor.py
deleted file mode 100644
index 92aa9bb1d8a..00000000000
--- a/addons/website/controllers/web_editor.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- coding: utf-8 -*-
-# Part of Odoo. See LICENSE file for full copyright and licensing details.
-from odoo.addons.web_editor.controllers.main import Web_Editor
-from odoo.http import request
-
-
-class Web_Editor(Web_Editor):
-
- def _get_view_fields_to_read(self):
- res = super(Web_Editor, self)._get_view_fields_to_read()
- res.append('website_id')
- return res
-
- def save_scss_or_js_view_hook(self):
- res = super(Web_Editor, self).save_scss_or_js_view_hook()
-
- website = request.env['website'].get_current_website()
- if website:
- res['website_id'] = website.id
- return res
-
- def save_scss_or_js_attachment_hook(self):
- res = super(Web_Editor, self).save_scss_or_js_attachment_hook()
-
- website = request.env['website'].get_current_website()
- if website:
- res['website_id'] = website.id
- return res
-
- def get_custom_attachment(self, custom_url, op='='):
- website = request.env['website'].get_current_website()
- res = super(Web_Editor, self).get_custom_attachment(custom_url, op=op)
- return res.with_context(website_id=website.id).filtered(lambda x: not x.website_id or x.website_id == website)
-
- def get_custom_view(self, custom_url, op='='):
- website = request.env['website'].get_current_website()
- res = super(Web_Editor, self).get_custom_view(custom_url, op=op)
- return res.with_context(website_id=website.id).filter_duplicate()