Skip to content

Commit

Permalink
[FIX] website_slides: add various design and UX fixes
Browse files Browse the repository at this point in the history
- slidesChannelDropdownSort : dropdown items back to visible (was white on white)
- Featured lesson : change icon to bullhorn instead of + icon
- Pass certification fullscreen button : btn primary
- set max height to fullscreen content to 100% minus header
- Fix 'infographic' slide type image view
- change image for 'Furniture Technical Specifications' course
- fix fullscreen presentation mode: The condition to add the iframe that
  contains the presentation of the document was wrong and, so, never met.
  Those conditions are evaluated in javascript and not in python as it's part
  of t-name template linked to a javascript widget.

Commit linked to task ID 1941250 and PR #31279.
  • Loading branch information
dbeguin authored and tde-banana-odoo committed Feb 20, 2019
1 parent 60fdd6f commit e8a609e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion addons/website_slides/data/slide_channel_demo.xml
Expand Up @@ -102,7 +102,7 @@ will learn the basics of wood characteristics.</field>
<field name="promote_strategy">most_voted</field> <field name="promote_strategy">most_voted</field>
<field name="website_published" eval="True"/> <field name="website_published" eval="True"/>
<field name="enroll">invite</field> <field name="enroll">invite</field>
<field name="image" type="base64" file="website_slides/static/src/img/channel_demo_furniture.jpg"/> <field name="image" type="base64" file="website_slides/static/src/img/channel_demo_furniture_2.jpg"/>
<field name="description">We're also Santa Claus! Belligerent and numerous. I am the man with no name, Zapp Brannigan!</field> <field name="description">We're also Santa Claus! Belligerent and numerous. I am the man with no name, Zapp Brannigan!</field>
</record> </record>
<record id="slide_category_demo_4_0" model="slide.category"> <record id="slide_category_demo_4_0" model="slide.category">
Expand Down
Expand Up @@ -66,7 +66,7 @@
.o_wslides_fullscreen_container { .o_wslides_fullscreen_container {
display: flex; display: flex;
align-items: stretch; align-items: stretch;
height: 100%; height: calc(100% - 50px);
position: relative; position: relative;
background-color: #313A44; background-color: #313A44;
} }
Expand Down
4 changes: 4 additions & 0 deletions addons/website_slides/static/src/scss/website_slides.scss
Expand Up @@ -166,6 +166,10 @@ div .o_wslides_home_main {
color: #FFFFFF; color: #FFFFFF;
} }


small a {
color: #000000;
}

nav { nav {
.breadcrumb-item::before { .breadcrumb-item::before {
font-weight: bold; font-weight: bold;
Expand Down
Expand Up @@ -3,11 +3,11 @@
<div t-if="slide.slide_type == 'video' &amp;&amp; !showMiniQuiz" class="player embed-responsive embed-responsive-16by9 embed-responsive-item"> <div t-if="slide.slide_type == 'video' &amp;&amp; !showMiniQuiz" class="player embed-responsive embed-responsive-16by9 embed-responsive-item">
<iframe id="youtube-player" t-att-src="embed_url" allowFullScreen="true" frameborder="0" enablejsapi="1" autoplay="1" allow="autoplay"></iframe> <iframe id="youtube-player" t-att-src="embed_url" allowFullScreen="true" frameborder="0" enablejsapi="1" autoplay="1" allow="autoplay"></iframe>
</div> </div>
<div t-if="slide.slide_type in ['presentation', 'document'] &amp;&amp; !showMiniQuiz" class="embed-responsive embed-responsive-4by3 embed-responsive-item "> <div t-if="['presentation', 'document'].indexOf(slide.slide_type) !== -1 &amp;&amp; !showMiniQuiz" class="embed-responsive embed-responsive-4by3 embed-responsive-item ">
<iframe t-att-src="embed_url" class="o_wslides_iframe_viewer" allowFullScreen="true" height="315" width="420" frameborder="0"></iframe> <iframe t-att-src="embed_url" class="o_wslides_iframe_viewer" allowFullScreen="true" height="315" width="420" frameborder="0"></iframe>
</div> </div>
<div style="width:100%;height:100%;" t-if="slide.slide_type == 'infographic' &amp;&amp; !showMiniQuiz"> <div style="width:100%;height:100%;text-align:center;" t-if="slide.slide_type == 'infographic' &amp;&amp; !showMiniQuiz">
<img t-attf-src="/web/image/slide.slide/#{slide.id}/datas" class="img-fluid" style="width: 100%" alt="Slide image"/> <img t-attf-src="/web/image/slide.slide/#{slide.id}/image" class="img-fluid" style="height: 100%" alt="Slide image"/>
</div> </div>
<div t-if="(slide.slide_type == 'quiz' || showMiniQuiz) &amp;&amp; questions " class="o_wslides_fullscreen_quiz"> <div t-if="(slide.slide_type == 'quiz' || showMiniQuiz) &amp;&amp; questions " class="o_wslides_fullscreen_quiz">
<div> <div>
Expand Down
Expand Up @@ -95,8 +95,8 @@
<div class="row"> <div class="row">
<div style="width:100%;"> <div style="width:100%;">
<div class="o_w_slides_slide_detail_container" style="width: 100%;"> <div class="o_w_slides_slide_detail_container" style="width: 100%;">
<t t-if="slide.datas and slide.slide_type == 'infographic'"> <t t-if="slide.slide_type == 'infographic'">
<img t-attf-src="/web/image/slide.slide/#{slide.id}/datas" class="img-fluid" style="width:100%" alt="Slide image"/> <img t-attf-src="/web/image/slide.slide/#{slide.id}/image" class="img-fluid" style="width:100%" alt="Slide image"/>
</t> </t>
<div style="height: 600px;" t-if="slide.slide_type in ('presentation', 'document')" class="embed-responsive embed-responsive-4by3 embed-responsive-item mb8"> <div style="height: 600px;" t-if="slide.slide_type in ('presentation', 'document')" class="embed-responsive embed-responsive-4by3 embed-responsive-item mb8">
<t t-raw="slide.embed_code"/> <t t-raw="slide.embed_code"/>
Expand Down
Expand Up @@ -80,8 +80,8 @@
</div> </div>
<canvas id="PDFViewerCanvas" class="img-fluid" style="margin: auto; height: 100%; display: none;"></canvas> <canvas id="PDFViewerCanvas" class="img-fluid" style="margin: auto; height: 100%; display: none;"></canvas>
</t> </t>
<t t-if="slide.slide_type in ('infographic')"> <t t-if="slide.slide_type == 'infographic'">
<img t-attf-src="/web/image/slide.slide/#{slide.id}/datas" class="img-fluid" style="width: 100%" alt="Slide image"/> <img t-attf-src="/web/image/slide.slide/#{slide.id}/image" class="img-fluid" style="width: 100%" alt="Slide image"/>
</t> </t>
</div> </div>
<!-- Fixed bottom navbar --> <!-- Fixed bottom navbar -->
Expand Down
@@ -1,10 +1,7 @@
.o_wslides_fullscreen_certification { .o_wslides_fullscreen_certification {
background-color: #f6f6f6;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 400px;
height: 300px;
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
Expand Down
Expand Up @@ -3,7 +3,7 @@
<t t-extend="website.slides.fullscreen"> <t t-extend="website.slides.fullscreen">
<t t-jquery=".o_wslides_fullscreen_content" t-operation="append"> <t t-jquery=".o_wslides_fullscreen_content" t-operation="append">
<div class="o_wslides_fullscreen_certification" t-if="slide.slide_type == 'certification'"> <div class="o_wslides_fullscreen_certification" t-if="slide.slide_type == 'certification'">
<a t-att-href="'/slides/slide/' + slide.slug" target="new">Pass Certification</a> <a class="btn btn-primary" t-att-href="'/slides/slide/' + slide.slug" target="new"><i class="fa fa-trophy"/> Pass Certification</a>
</div> </div>
</t> </t>
</t> </t>
Expand Down

0 comments on commit e8a609e

Please sign in to comment.