From 39d74a7136b1d9defc3daff580e1698084bed196 Mon Sep 17 00:00:00 2001 From: stefanorigano Date: Wed, 12 Oct 2016 14:46:16 +0200 Subject: [FIX] web_editor: improve web_editor UI style preservation * add and use preservation mixins to prevent undesired customizations made by themes * remove some style preservation code (and use the mixins instead) * add UI states' colour variables --- addons/web_editor/static/src/js/widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web_editor/static/src/js') diff --git a/addons/web_editor/static/src/js/widgets.js b/addons/web_editor/static/src/js/widgets.js index 7a3ab09dd76..61ec1564ac5 100644 --- a/addons/web_editor/static/src/js/widgets.js +++ b/addons/web_editor/static/src/js/widgets.js @@ -1145,7 +1145,7 @@ var LinkDialog = Dialog.extend({ $preview.attr("target", new_window ? '_blank' : "") .attr("href", url && url.length ? url : "#") .html((label && label.length ? label : url)) - .attr("class", classes.replace(/pull-\w+/, '')); + .attr("class", classes.replace(/pull-\w+/, '') + " o_btn_preview"); }); } }); -- cgit v1.2.3 From a2ae219d4ee283b7e7af84a3e7fa3bb8e0a95f23 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Wed, 12 Oct 2016 11:05:28 +0200 Subject: [FIX] web_editor, website: fix customize_template_get Commit e11f23b701cd061ee2090e506e7ff71cc2ed8c33 split the website customize_template_get into web_editor and website ones. This split was not perfect and commit 20861b482a0f84c2946cc14a05648b87b95bdac4 tried to make it work... but did not made it totally and added an indirect dependency to website module in web_editor... As the final result is wrong and inconsistent and that the previous 9.0 implementation was already ugly, this was not possible to make a consistent full-stable fix. This commit tries to make a fix as stable as possible (the main method name did not change, the arguments did not change, their purpose is the same, ...) which makes the code work and be less ugly. However, the function returns are now slightly different (and JS depends on it). It returns only valid view information (not header stuff which is not related to anything and the inherit_id value is now a combination of the inherit view id and name). Also, a new private method has been created. Also, the method contained code which was deprecated since saas-6 but was never removed (and never broke anything "by chance"). In master these methods will be refactored to make more sense. --- addons/web_editor/static/src/js/ace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web_editor/static/src/js') diff --git a/addons/web_editor/static/src/js/ace.js b/addons/web_editor/static/src/js/ace.js index 5fbe7589265..56500383851 100644 --- a/addons/web_editor/static/src/js/ace.js +++ b/addons/web_editor/static/src/js/ace.js @@ -149,7 +149,7 @@ var ViewEditor = Widget.extend({ view.children = []; }); _.each(index, function (view) { - var parentId = view.inherit_id; + var parentId = view.inherit_id[0]; if (parentId && index[parentId]) { index[parentId].children.push(view); } else { -- cgit v1.2.3