summaryrefslogtreecommitdiff
path: root/addons/website/static
diff options
context:
space:
mode:
authorNirali Sapra <nsa@odoo.com>2017-12-06 17:18:52 +0530
committerqsm-odoo <qsm@odoo.com>2018-05-29 11:13:28 +0200
commitb2fefbd3c56b4ac1ef4cfe0387db45d24aa5a037 (patch)
tree567c0301b584d723c053729a4747fb280519f581 /addons/website/static
parenta01f7b0e0bff93304ef6f22bfa58aab5cff05393 (diff)
[IMP] portal, website, website_*: make footer content easy to customize
Previously, customizing the website footer was not very easy. This commit will allow users to customize the footer like any other snippet area. There are several behavior changes, as mentioned below: - Removed toggles 'Automatic Footer' and 'Payment Icons' from the Customize menu - Language Selector was moved near the 'Copyright' section of the footer and features a dropdown (dropup technically) to select the language - Moved some footer links from various modules to top menu List of the added menus / changed menus: (a) Resellers (new menu for previous footer link 'Resellers') (b) References (new menu for previous footer link 'Our References') (c) Forums (renamed from 'Forum', as a replacement of 'Forums' footer link, showing all the forums instead of 'Help', as there is no link available to all forums after this commit) (d) Live Support (new menu for previous footer link 'Livechat Support') (e) Mailing Lists (new menu for previous footer link 'Mailing List') (f) Members (new menu for previous footer link 'Members') - Links which were already available as a website menus (Presentations, Jobs, Events, News, Documentation, etc) are simply removed Technical Notes: - Introduced a new template called 'brand_promotion' in website. This will help to avoid adding redundant footer content (like copyright, language selector etc) from several modules (website_sale, website_event, website_quote, etc) while the only intention is to replace module page links. - Removed summernote related fix in portal.less (caused by xpath) because footer is now customizable and added padding to structure instead of footer itself so that bg-color/img can be applied on whole footer. - Few of the tours are improved to drag and drop snippets at proper places and not inside the footer. - Used Flex in copyright portion of footer, so that text will always be horizontally centered (Some themes have different padding for buttons, etc, so if we don't align text dynamically, it has to be managed in particular theme and in particular layouts like full-screen / boxed. And if someone changes height of this portion, we have to re-design this portion again, etc). task-38069 Closes https://github.com/odoo/odoo/pull/22298 Co-authored-by: Dharmraj <dja@odoo.com>
Diffstat (limited to 'addons/website/static')
-rw-r--r--addons/website/static/src/js/tours/banner.js4
-rw-r--r--addons/website/static/src/js/tours/rte.js21
-rw-r--r--addons/website/static/src/scss/website.scss16
3 files changed, 37 insertions, 4 deletions
diff --git a/addons/website/static/src/js/tours/banner.js b/addons/website/static/src/js/tours/banner.js
index c7251da418c..a0926a721f3 100644
--- a/addons/website/static/src/js/tours/banner.js
+++ b/addons/website/static/src/js/tours/banner.js
@@ -19,7 +19,7 @@ tour.register("banner", {
trigger: "#snippet_structure .oe_snippet:eq(1) .oe_snippet_thumbnail",
content: _t("Drag the <i>Cover</i> block and drop it in your page."),
position: "bottom",
- run: "drag_and_drop",
+ run: "drag_and_drop #wrap",
}, {
trigger: "#wrapwrap .s_text_block_image_fw h2",
content: _t("<b>Click on a text</b> to start editing it. <i>It's that easy to edit your content!</i>"),
@@ -35,7 +35,7 @@ tour.register("banner", {
trigger: "#snippet_structure .oe_snippet:eq(3) .oe_snippet_thumbnail",
content: _t("Drag another block in your page, below the cover."),
position: "bottom",
- run: "drag_and_drop",
+ run: "drag_and_drop #wrap",
}, {
trigger: "button[data-action=save]",
extra_trigger: ".oe_overlay_options .oe_options",
diff --git a/addons/website/static/src/js/tours/rte.js b/addons/website/static/src/js/tours/rte.js
index 47402c016c8..fb2a0cacea1 100644
--- a/addons/website/static/src/js/tours/rte.js
+++ b/addons/website/static/src/js/tours/rte.js
@@ -19,10 +19,13 @@ tour.register('rte_translator', {
trigger: '.modal-footer button:first',
extra_trigger: '.modal select[name="lang"]:propValueContains(fr_BE)',
}, {
+ content : "click language dropdown",
+ trigger : '.js_language_selector .dropdown-toggle',
+ timeout: 60000,
+}, {
content: "go to english version",
trigger: '.js_language_selector a[data-lang="en_US"]',
extra_trigger: 'html[lang*="fr"]',
- timeout: 60000,
}, {
content: "Open new page menu",
trigger: '#new-content-menu > a',
@@ -41,7 +44,7 @@ tour.register('rte_translator', {
}, {
content: "drop a snippet",
trigger: "#snippet_structure .oe_snippet:eq(1) .oe_snippet_thumbnail",
- run: 'drag_and_drop',
+ run: 'drag_and_drop #wrap',
}, {
content: "change content",
trigger: '.oe_overlay_options .oe_options:visible',
@@ -56,6 +59,10 @@ tour.register('rte_translator', {
content: "save",
trigger: 'button[data-action=save]',
extra_trigger: '#wrap p:first b',
+
+}, {
+ content : "click language dropdown",
+ trigger : '.js_language_selector .dropdown-toggle',
}, {
content: "click on french version",
trigger: '.js_language_selector a[data-lang="fr_BE"]',
@@ -112,6 +119,11 @@ tour.register('rte_translator', {
content: "check: placeholder translation",
trigger: 'input[placeholder="test french placeholder"]',
run: function () {}, // it's a check
+
+}, {
+ content : "click language dropdown",
+ trigger : '.js_language_selector .dropdown-toggle',
+
}, {
content: "return to english version",
trigger: '.js_language_selector a[data-lang="en_US"]',
@@ -139,6 +151,11 @@ tour.register('rte_translator', {
content: "save new change",
trigger: 'button[data-action=save]',
extra_trigger: '#wrap p u',
+
+ }, {
+ content : "click language dropdown",
+ trigger : '.js_language_selector .dropdown-toggle',
+
}, {
content: "return in french",
trigger: 'html[lang="en-US"] .js_language_selector a[data-lang="fr_BE"]',
diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss
index aa267460bc2..37f979f7e34 100644
--- a/addons/website/static/src/scss/website.scss
+++ b/addons/website/static/src/scss/website.scss
@@ -540,3 +540,19 @@ div.carousel {
}
}
}
+
+// COPYRIGHT
+.o_footer_copyright {
+ padding: 8px;
+ .js_language_selector {
+ display: inline-block;
+ }
+ @media (min-width: $screen-sm-min) {
+ .row {
+ @include o-flex-display;
+ > div {
+ margin: auto 0;
+ }
+ }
+ }
+}