diff options
| author | Romain Derie <rde@odoo.com> | 2020-01-07 11:33:40 +0000 |
|---|---|---|
| committer | Jeremy Kersten <jke@odoo.com> | 2020-02-03 15:25:20 +0000 |
| commit | d64eb2981f53760a2ead170de8269cffbd2d02c0 (patch) | |
| tree | 5ddb954071502c28af448bb6b9a015c92beee4ce /addons | |
| parent | 860c7d79ddb02569d1bfb8a7fb49d8a6dc78985c (diff) | |
[REM] website, website_blog, website_event: remove text size on cover
task-2144335
Diffstat (limited to 'addons')
9 files changed, 8 insertions, 92 deletions
diff --git a/addons/website/static/src/js/editor/snippets.options.js b/addons/website/static/src/js/editor/snippets.options.js index 0ef07ccc12e..5c1057108b6 100644 --- a/addons/website/static/src/js/editor/snippets.options.js +++ b/addons/website/static/src/js/editor/snippets.options.js @@ -1051,7 +1051,6 @@ options.registry.CoverProperties = options.Class.extend({ // Update saving dataset this.$target[0].dataset.coverClass = this.$el.find('[data-cover-opt-name="size"] we-button.active').data('selectClass') || ''; - this.$target[0].dataset.textSizeClass = this.$el.find('[data-cover-opt-name="text_size"] we-button.active').data('selectClass') || ''; this.$target[0].dataset.textAlignClass = this.$el.find('[data-cover-opt-name="text_align"] we-button.active').data('selectClass') || ''; this.$target[0].dataset.filterValue = this.$filterValueOpts.filter('.active').data('filterValue') || 0.0; this.$target[0].dataset.filterColor = this.$filterColorOpts.filter('.active').data('filterColor') || ''; diff --git a/addons/website/static/src/js/editor/wysiwyg_multizone.js b/addons/website/static/src/js/editor/wysiwyg_multizone.js index b4d7e07f9fc..392ab6046d0 100644 --- a/addons/website/static/src/js/editor/wysiwyg_multizone.js +++ b/addons/website/static/src/js/editor/wysiwyg_multizone.js @@ -151,7 +151,6 @@ var WysiwygMultizone = Wysiwyg.extend({ 'background-color': el.dataset.filterColor, 'opacity': el.dataset.filterValue, 'resize_class': el.dataset.coverClass, - 'text_size_class': el.dataset.textSizeClass, 'text_align_class': el.dataset.textAlignClass, }; diff --git a/addons/website/views/snippets/snippets.xml b/addons/website/views/snippets/snippets.xml index f22e8edda8d..14e07038be6 100644 --- a/addons/website/views/snippets/snippets.xml +++ b/addons/website/views/snippets/snippets.xml @@ -416,14 +416,6 @@ <we-button data-filter-color="oe_purple">Purple</we-button> <we-button data-filter-color="oe_green">Green</we-button> </we-select> - <we-select string="Text Size" data-cover-opt-name="text_size"> - <we-button data-select-class="o_record_cover_font_hero">Hero</we-button> - <we-button data-select-class="o_record_cover_font_huge">Huge</we-button> - <we-button data-select-class="o_record_cover_font_big">Big</we-button> - <we-button data-select-class="">Regular</we-button> - <we-button data-select-class="o_record_cover_font_small">Small</we-button> - <we-button data-select-class="o_record_cover_font_tiny">Tiny</we-button> - </we-select> <we-select string="Text Alignment" data-cover-opt-name="text_align"> <we-button data-select-class="">Left</we-button> <we-button data-select-class="text-center">Centered</we-button> diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml index dd6092435dc..5008fb9634e 100644 --- a/addons/website/views/website_templates.xml +++ b/addons/website/views/website_templates.xml @@ -329,11 +329,10 @@ <t t-set="_cp" t-value="_cp or json.loads(_record.cover_properties)"/> <div t-att-data-use_size="use_size" t-att-data-use_filters="use_filters" - t-att-data-use_text_size="use_text_size" t-att-data-use_text_align="use_text_align" t-att-data-res-model="request.env.user.has_group('website.group_website_publisher') and _record._name" t-att-data-res-id="request.env.user.has_group('website.group_website_publisher') and _record.id" - t-attf-class="o_record_cover_container d-flex flex-column h-100 bg-secondary #{use_size and _cp.get('resize_class')} #{use_text_size and _cp.get('text_size_class')} #{use_text_align and _cp.get('text_align_class')} #{additionnal_classes}"> + t-attf-class="o_record_cover_container d-flex flex-column h-100 bg-secondary #{use_size and _cp.get('resize_class')} #{use_text_align and _cp.get('text_align_class')} #{additionnal_classes}"> <div class="o_record_cover_component o_record_cover_image" t-attf-style="background-image: #{_cp.get('background-image')};"/> <div t-if="use_filters" t-attf-class="o_record_cover_component o_record_cover_filter #{_cp.get('background-color')}" t-attf-style="opacity: #{_cp.get('opacity', 0.0)};"/> <t t-raw="0"/> diff --git a/addons/website_blog/data/website_blog_demo.xml b/addons/website_blog/data/website_blog_demo.xml index 1806d7fca67..8ec46c5f97a 100644 --- a/addons/website_blog/data/website_blog_demo.xml +++ b/addons/website_blog/data/website_blog_demo.xml @@ -4,12 +4,12 @@ <record id="blog_blog_1" model="blog.blog"> <field name="name">Travel</field> <field name="subtitle">Holiday tips</field> - <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/blog_1.jpeg')", "text_size_class": "o_record_cover_font_big", "resize_class": "o_record_has_cover o_half_screen_height", "background-color": "oe_black", "opacity": "0.4"}</field> + <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/blog_1.jpeg')", "resize_class": "o_record_has_cover o_half_screen_height", "background-color": "oe_black", "opacity": "0.4"}</field> </record> <record id="blog_blog_2" model="blog.blog"> <field name="name">Astronomy</field> <field name="subtitle">Astronomy is “stargazing"</field> - <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/blog_2.jpeg')", "text_size_class": "o_record_cover_font_big", "resize_class": "o_record_has_cover o_half_screen_height", "background-color": "oe_black", "opacity": "0.4"}</field> + <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/blog_2.jpeg')", "resize_class": "o_record_has_cover o_half_screen_height", "background-color": "oe_black", "opacity": "0.4"}</field> </record> <!-- TAGS --> @@ -37,7 +37,7 @@ <field name="is_published" eval="True"/> <field name="published_date" eval="time.strftime('%Y-%m-%d %H:%M:%S')"/> <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_1'), ref('blog_tag_2')])]"/> - <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_1.jpg')", "resize_class": "o_record_has_cover o_full_screen_height", "text_size_class": "o_record_cover_font_big", "background-color": "oe_black", "opacity": "0"}</field> + <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_1.jpg')", "resize_class": "o_record_has_cover o_half_screen_height", "background-color": "oe_black", "opacity": "0"}</field> <field name="content"><![CDATA[ <p class="lead">Sierra Tarahumara, popularly known as Copper Canyon is situated in Mexico. The area is a favorite destination among those seeking an adventurous vacation.</p> <p>Copper Canyon is one of the six gorges in the area. Although the name suggests that the gorge might have some relevance to copper mining, this is not the case. The name is derived from the copper and green lichen covering the canyon. Copper Canyon has two climatic zones. The region features an alpine climate at the top and a subtropical climate at the lower levels. Winters are cold with frequent snowstorms at the higher altitudes. Summers are dry and hot. The capital city, Chihuahua, is a high altitude desert where weather ranges from cold winters to hot summers. The region is unique because of the various ecosystems that exist within it.</p> @@ -72,7 +72,7 @@ <field name="is_published" eval="True"/> <field name="published_date" eval="(datetime.now()-relativedelta(days=2)).strftime('%Y-%m-%d %H:%M:%S')"/> <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_2')])]"/> - <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_2.jpg')", "resize_class": "o_record_has_cover o_half_screen_height", "text_size_class": "o_record_cover_font_big", "background-color": "oe_blue", "opacity": "0.4"}</field> + <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_2.jpg')", "resize_class": "o_record_has_cover o_half_screen_height", "background-color": "oe_blue", "opacity": "0.4"}</field> <field name="content"><![CDATA[ <section class="container"> <div class="row"> @@ -170,7 +170,7 @@ People who live on the island have never even seen this remarkable scenery unles <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_5')])]"/> <field name="website_published" eval="True"/> <field name="published_date" eval="(datetime.now()-relativedelta(days=6)).strftime('%Y-%m-%d %H:%M:%S')"/> - <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_4.jpg')", "resize_class": "o_record_has_cover o_half_screen_height", "text_size_class": "o_record_cover_font_big", "text_align_class": "text-center", "background-color": "oe_black", "opacity": "0.2"}</field> + <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_4.jpg')", "resize_class": "o_record_has_cover o_half_screen_height", "text_align_class": "text-center", "background-color": "oe_black", "opacity": "0.2"}</field> <field name="content"><![CDATA[ <p class="lead">It is safe to say that at some point on our lives, each and every one of us has that moment when we are suddenly stunned when we come face to face with the enormity of the universe that we see in the night sky.</p> @@ -253,7 +253,7 @@ People who live on the island have never even seen this remarkable scenery unles <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_3'), ref('blog_tag_4')])]"/> <field name="website_published" eval="True"/> <field name="published_date" eval="(datetime.now()-relativedelta(days=3)).strftime('%Y-%m-%d %H:%M:%S')"/> - <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_6.jpg')", "resize_class": "o_record_has_cover o_full_screen_height", "text_size_class": "o_record_cover_font_huge", "text_align_class": "text-center", "background-color": "oe_black", "opacity": "0.2"}</field> + <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_6.jpg')", "resize_class": "o_record_has_cover o_half_screen_height", "text_align_class": "text-center", "background-color": "oe_black", "opacity": "0.2"}</field> <field name="content"><![CDATA[ <p class="lead">Buying the right telescope to take your love of astronomy to the next level is a big next step in the development of your passion for the stars.</p> <p>In many ways, it is a big step from someone who is just fooling around with astronomy to a serious student of the science. But you and I both know that there is still another big step after buying a telescope before you really know how to use it.</p> @@ -294,7 +294,7 @@ People who live on the island have never even seen this remarkable scenery unles <field name="tag_ids" eval="[(6, 0, [ref('blog_tag_5')])]"/> <field name="website_published" eval="True"/> <field name="published_date" eval="(datetime.now()-relativedelta(days=7)).strftime('%Y-%m-%d %H:%M:%S')"/> - <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_7.jpg')", "resize_class": "o_record_has_cover o_half_screen_height", "text_size_class": "o_record_cover_font_big", "background-color": "oe_black", "opacity": "0.4"}</field> + <field name="cover_properties">{"background-image": "url('/website_blog/static/src/img/cover_7.jpg')", "resize_class": "o_record_has_cover o_half_screen_height", "background-color": "oe_black", "opacity": "0.4"}</field> <field name="content"><