diff --git a/addons/web_editor/static/src/js/snippets.options.js b/addons/web_editor/static/src/js/snippets.options.js
index 34e51b4509d..b607c1058bd 100644
--- a/addons/web_editor/static/src/js/snippets.options.js
+++ b/addons/web_editor/static/src/js/snippets.options.js
@@ -311,73 +311,56 @@ odoo.define('web_editor.snippets.options', function (require) {
* The background option is designed to change the background image of a snippet.
*/
registry.background = SnippetOption.extend({
- start: function ($change_target) {
- this.$target = $change_target || this.$target;
- this._super.apply(this, arguments);
- var src = this.$target.css("background-image").replace(/url\(['"]*|['"]*\)|^none$/g, "");
- if (this.$target.hasClass('oe_custom_bg')) {
- this.$el.find('li[data-choose_image]').data("background", src).attr("data-background", src);
- }
- },
background: function (type, value, $li) {
if (value && value.length) {
- this.$target.attr("style", 'background-image: url(' + value + '); ' + (this.$target.attr("style") || '').replace(/background-image:[^;]+/, '') );
+ this.$target.css("background-image", "url(" + value + ")");
this.$target.addClass("oe_img_bg");
} else {
this.$target.css("background-image", "");
this.$target.removeClass("oe_img_bg oe_custom_bg");
}
},
- select_class : function (type, value, $li) {
+ select_class: function (type, value, $li) {
this.background(type, '', $li);
this._super.apply(this, arguments);
},
choose_image: function (type, value, $li) {
- if(type !== "click") return;
+ if(type !== "click") {
+ return;
+ }
- var self = this;
- var $image = $('
');
- $image.attr("src", value);
- $image.appendTo(self.$target);
+ // Put fake image in the DOM, edit it and use it as background-image
+ var $image = $("
", {"class": "hidden", "src": value}).appendTo(this.$target);
var _editor = new widget.MediaDialog(null, {}, null, $image[0]).open();
_editor.$('[href="#editor-media-video"], [href="#editor-media-icon"]').addClass('hidden');
- _editor.on('saved', self, function () {
+ _editor.on('saved', this, function () {
var value = $image.attr("src");
- $image.remove();
- self.$el.find('li[data-choose_image]').data("background", value).attr("data-background", value);
- self.background(type, value,$li);
- self.$target.addClass('oe_custom_bg');
- self.$target.trigger("snippet-option-change", [self]);
- self.set_active();
+ this.background(type, value, $li);
+ this.$target.addClass("oe_custom_bg");
+ this.set_active();
+ this.$target.trigger("snippet-option-change", [this]);
});
- _editor.on('cancel', self, function () {
+ _editor.on('closed', this, function () {
$image.remove();
});
},
set_active: function () {
- var src = this.$target.css("background-image").replace(/url\(['"]*|['"]*\)|^none$/g, "");
this._super.apply(this, arguments);
+ var src = this.$target.css("background-image").replace(/url\(['"]*|['"]*\)|^none$/g, "");
if (this.$target.hasClass('oe_custom_bg')) {
this.$el.find('li[data-choose_image]').data("background", src).attr("data-background", src);
}
- this.$el.find('li[data-background]:not([data-background=""])')
+ this.$el.find('li[data-background]')
.removeClass("active")
- .each(function () {
- var background = $(this).data("background") || $(this).attr("data-background");
- if ((src.length && background.length && src.indexOf(background) !== -1) || (!src.length && !background.length)) {
- $(this).addClass("active");
- }
- });
-
- if (!this.$el.find('li[data-background].active').size()) {
- this.$el.find('li[data-background=""]:not([data-choose_image])').addClass("active");
- } else {
- this.$el.find('li[data-background=""]:not([data-choose_image])').removeClass("active");
- }
+ .filter(function () {
+ var bgOption = $(this).data("background");
+ return (bgOption === "" && src === "" || bgOption !== "" && src.indexOf(bgOption) >= 0);
+ })
+ .addClass("active");
}
});
@@ -387,13 +370,16 @@ odoo.define('web_editor.snippets.options', function (require) {
registry.background_position = SnippetOption.extend({
start: function () {
this._super.apply(this, arguments);
-
+ this.on_focus();
var self = this;
- var $btn = this.$overlay.find('.oe_options');
- $btn.on('show.bs.dropdown', function () {
- $btn.find('.background_position_li').toggleClass('hidden', self.$target.css('background-image') === 'none');
+ this.$target.on("snippet-option-change", function () {
+ self.on_focus();
});
},
+ on_focus: function () {
+ this._super.apply(this, arguments);
+ this.$el.toggleClass('hidden', this.$target.css('background-image') === 'none');
+ },
background_position: function (type, value, $li) {
if (type != 'click') { return; }
var self = this;
diff --git a/addons/website/data/data.xml b/addons/website/data/data.xml
index dd9f3b5fc84..8f6fc1855cf 100644
--- a/addons/website/data/data.xml
+++ b/addons/website/data/data.xml
@@ -103,6 +103,7 @@
+
business_conference
business_conference.jpg
ir.ui.view
@@ -111,6 +112,7 @@
+
business_stats
business_stats.jpg
ir.ui.view
@@ -119,6 +121,7 @@
+
gears
gears.png
ir.ui.view
@@ -127,6 +130,7 @@
+
helpdesk
helpdesk.jpg
ir.ui.view
@@ -135,6 +139,7 @@
+
imac
imac.png
ir.ui.view
@@ -143,6 +148,7 @@
+
lazagne
lazagne.jpg
ir.ui.view
@@ -151,6 +157,7 @@
+
manufacturing
manufacturing.jpg
ir.ui.view
@@ -159,6 +166,7 @@
+
ipad
ipad.png
ir.ui.view
@@ -167,6 +175,7 @@
+
world
world.jpg
ir.ui.view
@@ -175,6 +184,7 @@
+
vegetables
vegetables.png
ir.ui.view
@@ -183,6 +193,7 @@
+
ship_sea
ship_sea.jpg
ir.ui.view
@@ -191,6 +202,7 @@
+
flight
flight.jpg
ir.ui.view
@@ -199,6 +211,7 @@
+
engineer
engineer.jpg
ir.ui.view
@@ -207,6 +220,7 @@
+
school_kids
school_kids.jpg
ir.ui.view
@@ -215,6 +229,7 @@
+
business_hands
business_hands.jpg
ir.ui.view
@@ -222,5 +237,140 @@
/website/static/src/img/library/business_hands.jpg
+
+
+
+ Website Background Image 01
+ s_background_image_01.jpg
+ url
+ /website/static/src/img/backgrounds/aqua.jpg
+
+
+
+ Website Background Image 02
+ s_background_image_02.jpg
+ url
+ /website/static/src/img/backgrounds/baby_blue.jpg
+
+
+
+ Website Background Image 03
+ s_background_image_03.jpg
+ url
+ /website/static/src/img/backgrounds/black.jpg
+
+
+
+ Website Background Image 04
+ s_background_image_04.jpg
+ url
+ /website/static/src/img/backgrounds/business_guy.jpg
+
+
+
+ Website Background Image 05
+ s_background_image_05.jpg
+ url
+ /website/static/src/img/backgrounds/color_splash.jpg
+
+
+
+ Website Background Image 06
+ s_background_image_06.jpg
+ url
+ /website/static/src/img/backgrounds/flower_field.jpg
+
+
+
+ Website Background Image 07
+ s_background_image_07.jpg
+ url
+ /website/static/src/img/backgrounds/flower.jpg
+
+
+
+ Website Background Image 08
+ s_background_image_08.jpg
+ url
+ /website/static/src/img/backgrounds/greenfields.jpg
+
+
+
+ Website Background Image 09
+ s_background_image_09.jpg
+ url
+ /website/static/src/img/backgrounds/landscape.jpg
+
+
+
+ Website Background Image 10
+ s_background_image_10.jpg
+ url
+ /website/static/src/img/backgrounds/mango.jpg
+
+
+
+ Website Background Image 11
+ s_background_image_11.jpg
+ url
+ /website/static/src/img/backgrounds/mountains.jpg
+
+
+
+ Website Background Image 12
+ s_background_image_12.jpg
+ url
+ /website/static/src/img/backgrounds/orange_red.jpg
+
+
+
+ Website Background Image 13
+ s_background_image_13.jpg
+ url
+ /website/static/src/img/backgrounds/parallax_flowers.jpg
+
+
+
+ Website Background Image 14
+ s_background_image_14.jpg
+ url
+ /website/static/src/img/backgrounds/parallax_girl.jpg
+
+
+
+ Website Background Image 15
+ s_background_image_15.jpg
+ url
+ /website/static/src/img/backgrounds/parallax_quote.png
+
+
+
+ Website Background Image 16
+ s_background_image_16.jpg
+ url
+ /website/static/src/img/backgrounds/velour.jpg
+
+
+
+ Website Background Image 17
+ s_background_image_17.jpg
+ url
+ /website/static/src/img/backgrounds/wood.jpg
+
+
+
+ Website Background Image 18
+ s_background_image_18.jpg
+ url
+ /website/static/src/img/backgrounds/yellow_green.jpg
+
+
+
+
+ Cover Snippet - Default Image
+ s_cover_default_image.jpg
+ url
+ /web/image/website.s_background_image_01
+
diff --git a/addons/website/data/demo.xml b/addons/website/data/demo.xml
index adf1735dcd9..fb536cb818c 100644
--- a/addons/website/data/demo.xml
+++ b/addons/website/data/demo.xml
@@ -157,7 +157,7 @@ response = request.render("website.template_partner_comment", values)
-
+
diff --git a/addons/website/static/src/img/aqua.jpg b/addons/website/static/src/img/aqua.jpg
deleted file mode 100644
index 47ce77005d4..00000000000
Binary files a/addons/website/static/src/img/aqua.jpg and /dev/null differ
diff --git a/addons/website/static/src/img/banner/aqua.jpg b/addons/website/static/src/img/backgrounds/aqua.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/aqua.jpg
rename to addons/website/static/src/img/backgrounds/aqua.jpg
diff --git a/addons/website/static/src/img/banner/baby_blue.jpg b/addons/website/static/src/img/backgrounds/baby_blue.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/baby_blue.jpg
rename to addons/website/static/src/img/backgrounds/baby_blue.jpg
diff --git a/addons/website/static/src/img/banner/black.jpg b/addons/website/static/src/img/backgrounds/black.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/black.jpg
rename to addons/website/static/src/img/backgrounds/black.jpg
diff --git a/addons/website/static/src/img/banner/business_guy.jpg b/addons/website/static/src/img/backgrounds/business_guy.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/business_guy.jpg
rename to addons/website/static/src/img/backgrounds/business_guy.jpg
diff --git a/addons/website/static/src/img/banner/color_splash.jpg b/addons/website/static/src/img/backgrounds/color_splash.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/color_splash.jpg
rename to addons/website/static/src/img/backgrounds/color_splash.jpg
diff --git a/addons/website/static/src/img/banner/flower.jpg b/addons/website/static/src/img/backgrounds/flower.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/flower.jpg
rename to addons/website/static/src/img/backgrounds/flower.jpg
diff --git a/addons/website/static/src/img/banner/flower_field.jpg b/addons/website/static/src/img/backgrounds/flower_field.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/flower_field.jpg
rename to addons/website/static/src/img/backgrounds/flower_field.jpg
diff --git a/addons/website/static/src/img/banner/greenfields.jpg b/addons/website/static/src/img/backgrounds/greenfields.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/greenfields.jpg
rename to addons/website/static/src/img/backgrounds/greenfields.jpg
diff --git a/addons/website/static/src/img/banner/landscape.jpg b/addons/website/static/src/img/backgrounds/landscape.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/landscape.jpg
rename to addons/website/static/src/img/backgrounds/landscape.jpg
diff --git a/addons/website/static/src/img/banner/mango.jpg b/addons/website/static/src/img/backgrounds/mango.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/mango.jpg
rename to addons/website/static/src/img/backgrounds/mango.jpg
diff --git a/addons/website/static/src/img/banner/mountains.jpg b/addons/website/static/src/img/backgrounds/mountains.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/mountains.jpg
rename to addons/website/static/src/img/backgrounds/mountains.jpg
diff --git a/addons/website/static/src/img/banner/orange_red.jpg b/addons/website/static/src/img/backgrounds/orange_red.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/orange_red.jpg
rename to addons/website/static/src/img/backgrounds/orange_red.jpg
diff --git a/addons/website/static/src/img/parallax/parallax_bg.jpg b/addons/website/static/src/img/backgrounds/parallax_flowers.jpg
similarity index 100%
rename from addons/website/static/src/img/parallax/parallax_bg.jpg
rename to addons/website/static/src/img/backgrounds/parallax_flowers.jpg
diff --git a/addons/website/static/src/img/parallax/parallax_photo1.jpg b/addons/website/static/src/img/backgrounds/parallax_girl.jpg
similarity index 100%
rename from addons/website/static/src/img/parallax/parallax_photo1.jpg
rename to addons/website/static/src/img/backgrounds/parallax_girl.jpg
diff --git a/addons/website/static/src/img/parallax/quote.png b/addons/website/static/src/img/backgrounds/parallax_quote.png
similarity index 100%
rename from addons/website/static/src/img/parallax/quote.png
rename to addons/website/static/src/img/backgrounds/parallax_quote.png
diff --git a/addons/website/static/src/img/banner/velour.jpg b/addons/website/static/src/img/backgrounds/velour.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/velour.jpg
rename to addons/website/static/src/img/backgrounds/velour.jpg
diff --git a/addons/website/static/src/img/banner/wood.jpg b/addons/website/static/src/img/backgrounds/wood.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/wood.jpg
rename to addons/website/static/src/img/backgrounds/wood.jpg
diff --git a/addons/website/static/src/img/banner/yellow_green.jpg b/addons/website/static/src/img/backgrounds/yellow_green.jpg
similarity index 100%
rename from addons/website/static/src/img/banner/yellow_green.jpg
rename to addons/website/static/src/img/backgrounds/yellow_green.jpg
diff --git a/addons/website/static/src/img/content_here.png b/addons/website/static/src/img/content_here.png
deleted file mode 100644
index 3f35d88d5ce..00000000000
Binary files a/addons/website/static/src/img/content_here.png and /dev/null differ
diff --git a/addons/website/static/src/img/banner/banner_picture.png b/addons/website/static/src/img/library/banner_picture.png
similarity index 100%
rename from addons/website/static/src/img/banner/banner_picture.png
rename to addons/website/static/src/img/library/banner_picture.png
diff --git a/addons/website/static/src/js/website.snippets.editor.js b/addons/website/static/src/js/website.snippets.editor.js
index 8afcab6b506..6bf0e805fec 100644
--- a/addons/website/static/src/js/website.snippets.editor.js
+++ b/addons/website/static/src/js/website.snippets.editor.js
@@ -147,7 +147,10 @@ options.registry.carousel = options.registry.slider.extend({
this.$target.on('slid.bs.carousel', function () {
if(self.editor && self.editor.styles.background) {
self.editor.styles.background.$target = self.$target.find(".item.active");
+ self.editor.styles.background_position.$target = self.editor.styles.background.$target;
self.editor.styles.background.set_active();
+ self.editor.styles.background_position.set_active();
+ self.editor.styles.background.$target.trigger("snippet-option-change", [self.editor.styles.background]);
}
self.$target.carousel("pause");
});
diff --git a/addons/website/static/src/less/website.snippets.less b/addons/website/static/src/less/website.snippets.less
index f9fa1b6cbf2..173bd9335fd 100644
--- a/addons/website/static/src/less/website.snippets.less
+++ b/addons/website/static/src/less/website.snippets.less
@@ -9,6 +9,17 @@
}
}
+// "Cover" snippet
+@s_text_block_image_fw-padding: 0 30px;
+.s_text_block_image_fw {
+ .container {
+ padding: @s_text_block_image_fw-padding;
+ > .row > div {
+ padding: 30px;
+ }
+ }
+}
+
// Table Snippet
.table_desc {
margin: 0 0 20px 0;
diff --git a/addons/website/views/snippets.xml b/addons/website/views/snippets.xml
index cc854129b18..5f37e9c0406 100644
--- a/addons/website/views/snippets.xml
+++ b/addons/website/views/snippets.xml
@@ -1,24 +1,36 @@
+
+
+
+
+
+
Headline
+
With a great subtitle
+
Write one or two paragraphs describing your product, services or a specific feature. To be successful your content needs to be useful to your readers.
+
+
+
+
+
+
-
+
-
+
-
Your Banner Title
-
Click to customize this text
-
- Contact us
-
+
Your Banner Title
+
Click to customize this text
+
Contact us
-

+
@@ -94,13 +106,9 @@
+
A Great Headline
+
A good subtitle
-
-
- A Great Headline
-
- A good subtitle
-
A great way to catch your reader's attention is to tell a story.
@@ -127,12 +135,8 @@
-
-
-
Your Website Title
- And a great subtitle too
-
-
+
Your Website Title
+
And a great subtitle too
@@ -164,10 +168,8 @@
+
A Punchy Headline
-
-
A Punchy Headline
-
@@ -294,101 +296,79 @@
-
-
-
-
-
-
-
Beginner
-
- Starter package
-
-
-
-
$35.00
-
user / month (billed annually)
-
-
-
-
- - Basic sales & marketing for up to 2 users
- - Account & Sales management
- - No customization
- - No support
-
-
+
Our Offers
+
+
+
+
+
Beginner
+
+ Starter package
+
+
+
+
$35.00
+
user / month (billed annually)
+
+
+ - Basic sales & marketing for up to 2 users
+ - Account & Sales management
+ - No customization
+ - No support
+
+
+
+
+
+
+
+
Professional
+
Enterprise package
+
+
+
$65.00
+
user / month (billed annually)
+
+
+ - Complete CRM for any size team
+ - Get access to all modules
+ - Limited customization
+ - Email support
+
+
+
+
+
+
+
+
Expert
+
Ultimate package
+
+
+
$125.00
+
user / month (billed annually)
+
+
+ - Unlimited CRM power and support
+ - Get access to all modules and features
+ - Unlimited customization
+ - 24x7 toll-free support
+
+
+
-
-
-
-
-
Professional
-
- Enterprise package
-
-
-
-
$65.00
-
user / month (billed annually)
-
-
-
-
- - Complete CRM for any size team
- - Get access to all modules
- - Limited customization
- - Email support
-
-
-
-
-
-
-
-
-
Expert
-
- Ultimate package
-
-
-
-
$125.00
-
user / month (billed annually)
-
-
-
-
- - Unlimited CRM power and support
- - Get access to all modules and features
- - Unlimited customization
- - 24x7 toll-free support
-
-
-
-
-
-
@@ -415,7 +395,7 @@
-
+
@@ -480,16 +460,9 @@
-
-
-
- Our References
-
-
- More than 500 happy customers.
-
-
-
+
Our References
+
More than 500 happy customers.
+
@@ -534,55 +507,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Write a quote here from one of your customers. Quotes are a
- great way to build confidence in your products or services.
-
- Author of this quote
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Odoo provides essential platform for our project management.
- Things are better organized and more visible with it.
-
- John Doe, CEO
-
-
-
-
-
-
-
-
-
-
-
@@ -636,7 +560,7 @@
@@ -644,7 +568,7 @@
@@ -732,7 +656,7 @@
-
+
@@ -740,6 +664,7 @@
+
@@ -766,7 +691,6 @@
-
@@ -809,23 +733,24 @@
diff --git a/addons/website_event/data/website_event_demo.xml b/addons/website_event/data/website_event_demo.xml
index a435bdfeca4..fcb013f84d2 100644
--- a/addons/website_event/data/website_event_demo.xml
+++ b/addons/website_event/data/website_event_demo.xml
@@ -11,11 +11,11 @@
-
+
-

+
3 Intensive Days
@@ -177,11 +177,11 @@
-
+
-

+
5 Intensive Days
@@ -355,11 +355,11 @@
-
+
-

+
5 Intensive Days
diff --git a/addons/website_hr_recruitment/views/templates.xml b/addons/website_hr_recruitment/views/templates.xml
index 03ff3713bd2..5adf0751c79 100644
--- a/addons/website_hr_recruitment/views/templates.xml
+++ b/addons/website_hr_recruitment/views/templates.xml
@@ -49,9 +49,8 @@
No job offer found
There isn't job offer published now, click here to contact us
-
+
Click on "Content" to define a new job offer or "Help" for more informations.
-
@@ -140,7 +139,7 @@
Apply Job
-
+
Job Application Form