[MIG] web_widget_image_download: Migration to 12.0

This commit is contained in:
ernesto
2018-11-21 09:30:22 -05:00
committed by manu
parent 0f64c459bb
commit f3adde3fdc
7 changed files with 51 additions and 20 deletions

View File

@@ -1,8 +0,0 @@
/* Copyright 2016 Flavio Corpa <flavio.corpa@tecnativa.com>
* Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
* License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). */
.o_field_image .o_form_image_controls
.o_form_binary_file_download {
color: #fff;
}

View File

@@ -0,0 +1,38 @@
.o_field_widget {
&.o_field_image {
.o_form_image_controls {
> .fa, .o_form_binary_file_download {
margin: 5px 0;
padding: 1px 0;
width: 33.333333%;
}
.o_form_binary_file_download {
border: none;
background-color: transparent;
line-height: 0px;
> button.fa {
width: 100%;
height: 100%;
margin: 0px;
border: none;
background-color: transparent;
cursor: pointer;
}
}
}
@include media-breakpoint-down(xs, $o-extra-grid-breakpoints) {
.o_form_image_controls{
.o_form_binary_file_download {
display: none;
}
> .fa{
width: 50%;
padding: 6px;
margin: 0px;
}
}
}
}
}

View File

@@ -6,8 +6,9 @@
<t t-extend="FieldBinaryImage">
<t t-jquery=".o_select_file_button" t-operation="after">
<t t-if="widget.value">
<a class="fa fa-download o_form_binary_file_download"
title="Download"/>
<a class="o_form_binary_file_download float-left" title="Download" aria-label="Download">
<button class="fa fa-download fa-lg"/>
</a>
</t>
</t>
</t>