summaryrefslogtreecommitdiff
path: root/addons/website/static/src/js/website.editor.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2016-06-28 17:35:05 +0200
committerqsm-odoo <qsm@odoo.com>2016-07-04 17:23:59 +0200
commit05d064f85531d04056ad02bd2d26ef2341839f3b (patch)
treee47a21f70c2bbb8b792e311f7a9962a9f6826751 /addons/website/static/src/js/website.editor.js
parent906875fc78cb80f6c3d5f1f14f997008cd406473 (diff)
[IMP] website,web_editor: review style / content
* Mobile preview dialog * Add page dialog (allow to click anywhere to close the modal) * Change label for "auto resize" and "resize" options to "auto size" and "fixed size" and add a checkmark to the currently active one * Overlay border / Options dialog content * Hide the odoo navbar after a delay when the editor starts
Diffstat (limited to 'addons/website/static/src/js/website.editor.js')
-rw-r--r--addons/website/static/src/js/website.editor.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index b79e04e2d69..0ed17be589b 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -27,8 +27,9 @@ website.TopBar.include({
.filter(".oe_no_empty")
.addClass("oe_empty");
- if (location.search.indexOf("enable_editor") >= 0 && $('html').attr('lang') === "en_US") {
+ if (location.search.indexOf("enable_editor") >= 0 && $('html').attr('lang').match(/en[-_]US/)) {
this.$el.addClass('editing_mode');
+ this.delayed_hide();
}
return this._super.apply(this, arguments);
@@ -39,6 +40,13 @@ website.TopBar.include({
editor.editor_bar = new editor.Class(this);
editor.editor_bar.prependTo(document.body);
$('.o_homepage_editor_welcome_message').remove();
+
+ this.delayed_hide();
+ },
+ delayed_hide: function () {
+ _.delay((function () {
+ this.do_hide();
+ }).bind(this), 800);
},
});