summaryrefslogtreecommitdiff
path: root/addons/website/static
diff options
context:
space:
mode:
Diffstat (limited to 'addons/website/static')
-rw-r--r--addons/website/static/src/js/website.editor.js17
-rw-r--r--addons/website/static/src/js/website.snippets.animation.js2
-rw-r--r--addons/website/static/src/js/website.snippets.editor.js11
-rw-r--r--addons/website/static/src/less/website.ui.components.less49
4 files changed, 33 insertions, 46 deletions
diff --git a/addons/website/static/src/js/website.editor.js b/addons/website/static/src/js/website.editor.js
index 5d2d7706560..a110e6eca3e 100644
--- a/addons/website/static/src/js/website.editor.js
+++ b/addons/website/static/src/js/website.editor.js
@@ -74,16 +74,17 @@ website.TopBarCustomize = Widget.extend({
key: this.view_name,
full: false
}).then(function (result) {
+ var current_group = "";
_.each(result, function (item) {
- if (item.header) {
- $menu.append('<li class="dropdown-header">' + item.name + '</li>');
- } else {
- var $li = $('<li/>', {role: 'presentation'})
- .append($('<a/>', {href: '#', 'data-view-id': item.id, role: 'menuitem'})
- .append(qweb.render('web_editor.components.switch', {id: 'switch-' + item.id, label: item.name})));
- $li.find('input').prop('checked', !!item.active);
- $menu.append($li);
+ if (current_group !== item.inherit_id[1]) {
+ current_group = item.inherit_id[1];
+ $menu.append("<li class=\"dropdown-header\">" + current_group + "</li>");
}
+ var $li = $('<li/>', {role: 'presentation'})
+ .append($('<a/>', {href: '#', 'data-view-id': item.id, role: 'menuitem'})
+ .append(qweb.render('web_editor.components.switch', {id: 'switch-' + item.id, label: item.name})));
+ $li.find('input').prop('checked', !!item.active);
+ $menu.append($li);
});
});
},
diff --git a/addons/website/static/src/js/website.snippets.animation.js b/addons/website/static/src/js/website.snippets.animation.js
index 5d55a25bdb0..572e3a0f0ef 100644
--- a/addons/website/static/src/js/website.snippets.animation.js
+++ b/addons/website/static/src/js/website.snippets.animation.js
@@ -122,7 +122,7 @@ animation.registry.share = animation.Class.extend({
animation.registry.media_video = animation.Class.extend({
selector: ".media_iframe_video",
start: function () {
- if (!this.$target.has('.media_iframe_video_size').length) {
+ if (!this.$target.has('> iframe').length) {
var editor = '<div class="css_editable_mode_display">&nbsp;</div>';
var size = '<div class="media_iframe_video_size">&nbsp;</div>';
this.$target.html(editor+size+'<iframe src="'+_.escape(this.$target.data("src"))+'" frameborder="0" allowfullscreen="allowfullscreen"></iframe>');
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js
index cfd0b561778..4fbb79dd89e 100644
--- a/addons/website/static/src/js/website.snippets.editor.js
+++ b/addons/website/static/src/js/website.snippets.editor.js
@@ -311,8 +311,10 @@ options.registry.parallax = options.Class.extend({
this.$target.data("snippet-view", new animation.registry.parallax(this.$target));
}
this.scroll();
- this.buildingBlock.$el.on("snippet-dropped snippet-activated", this._refresh.bind(this));
- this.$target.on('snippet-option-change snippet-option-preview', this._refresh.bind(this));
+
+ this._refresh_callback = this._refresh.bind(this);
+ this.buildingBlock.$el.on("snippet-dropped snippet-activated", this._refresh_callback);
+ this.$target.on('snippet-option-change snippet-option-preview', this._refresh_callback);
},
scroll: function (type, value) {
this.$target.attr("data-scroll-background-ratio", value);
@@ -330,6 +332,11 @@ options.registry.parallax = options.Class.extend({
this._super.apply(this, arguments);
this._refresh();
},
+ on_remove: function () {
+ this._super.apply(this, arguments);
+ this.$target.off("snippet-option-change snippet-option-preview", this._refresh_callback);
+ this.buildingBlock.$el.off("snippet-dropped snippet-activated", this._refresh_callback);
+ },
});
options.registry.ul = options.Class.extend({
diff --git a/addons/website/static/src/less/website.ui.components.less b/addons/website/static/src/less/website.ui.components.less
index e1230d2b358..5c2aa821e13 100644
--- a/addons/website/static/src/less/website.ui.components.less
+++ b/addons/website/static/src/less/website.ui.components.less
@@ -1,52 +1,25 @@
// MODALS
body .modal {
- a {
- &:focus, &:active, &:focus:active {
- outline: none!important;
- }
- }
&.o_website_modal {
- font-family: @o-we-font-family;
-
- h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
- font-family: @o-we-font-family;
- }
+ .o-w-preserve-base();
+ .o-w-preserve-headings();
+ .o-w-preserve-forms();
+ .o-w-preserve-links();
+ .o-w-preserve-btn();
+ .o-w-preserve-wells();
+ .o-w-preserve-modals();
.modal-content {
- border-radius: 0;
- color: initial!important;
- background-color: @o-we-color-paper!important;
.modal-header .o_subtitle {
margin-left: 10px;
}
.modal-body {
- color: inherit!important;
- background-color: transparent!important;
.o_modal_header {
.o-webclient-padding(@top: 10px, @bottom: 10px);
.clearfix();
}
}
- .modal-footer {
- text-align: left;
-
- .btn {
- border-radius: 0;
-
- &.btn-primary {
- .button-variant(white, @odoo-brand-optional, @odoo-brand-optional);
- text-transform: uppercase;
- }
- &.btn-default {
- .button-variant(@odoo-brand-optional, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
- text-transform: uppercase;
- }
- &.btn-link {
- .button-variant(@odoo-brand-optional, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0));
- }
- }
- }
}
@media (min-width: @screen-sm-min) {
@@ -89,7 +62,6 @@ body .modal {
.modal-content {
background-color: black!important;
- color: lightgray!important;
border: 3px outset gray;
border-radius: 20px;
@@ -99,6 +71,7 @@ body .modal {
font-family: @o-we-font-family;
h4 {
+ color: lightgray;
font-family:inherit;
font-weight: normal;
@@ -109,6 +82,8 @@ body .modal {
}
.modal-body {
+ background-color: inherit!important;
+ border-radius: 20px;
padding: 15px;
@mobile-preview-width: 320px;
@@ -324,6 +299,10 @@ body .modal {
// ACE EDITOR
.o_ace_view_editor {
+ .o-w-preserve-base();
+ .o-w-preserve-btn();
+ .o-w-preserve-forms();
+
.o-position-absolute(@odoo-navbar-height, 0, 0);
position: fixed;
z-index: 1001;