responsive fetched-tags component #323 CR: Juan

This commit is contained in:
Joan Sanchez 2018-05-29 13:51:39 +02:00
parent a1a0f2e0b7
commit 34ff655617
7 changed files with 56 additions and 10 deletions

View File

@ -1,8 +1,11 @@
<vn-vertical style="text-align:center"> <vn-horizontal style="vertical-align:middle;">
<vn-one>{{::$ctrl.sale.concept}}</vn-one> <vn-one>{{::$ctrl.sale.concept}}</vn-one>
<vn-one> <vn-two>
<vn-one ng-repeat="fetchedTag in $ctrl.sale.item.tags track by $index"> <section
<vn-label>{{::fetchedTag.tag.name}}</vn-label> {{::fetchedTag.value}} class="inline-tag ellipsize" ng-class="{'empty': !fetchedTag.value}"
</vn-one> ng-repeat="fetchedTag in $ctrl.sale.item.tags track by $index"
title="{{::fetchedTag.tag.name}}: {{::fetchedTag.value}}">
{{::fetchedTag.value}}
</section>
</vn-one> </vn-one>
</vn-vertical> </vn-horizontal>

View File

@ -1,4 +1,5 @@
import ngModule from '../module'; import ngModule from '../module';
import './style.scss';
ngModule.component('vnFetchedTags', { ngModule.component('vnFetchedTags', {
template: require('./index.html'), template: require('./index.html'),

View File

@ -0,0 +1,42 @@
@import "colors";
vn-fetched-tags {
@media screen and (max-width: 1700px){
& vn-horizontal {
flex-direction: column;
text-align: center;
& .inline-tag {
display: inline-block;
float: none
}
}
}
& vn-one:first-child {
padding-top: 0.36em
}
& .inline-tag {
background-color: $secondary-font-color;
margin: 0.4em 0.4em 0 0;
color: $color-white;
text-align: center;
font-size: 0.8em;
height: 1.25em;
padding: 0.4em;
float: left;
width: 5em
}
& .inline-tag.empty {
background-color: $main-bg
}
& .inline-tag.empty:after {
overflow: hidden;
display: block;
content: ' ';
clear: both
}
}

View File

@ -8,7 +8,7 @@
<tr> <tr>
<th style="text-align:center" translate>Is checked</th> <th style="text-align:center" translate>Is checked</th>
<th number translate>Item</th> <th number translate>Item</th>
<th translate style="text-align:center">Description</th> <th translate>Description</th>
<th number translate>Quantity</th> <th number translate>Quantity</th>
</tr> </tr>
</thead> </thead>

View File

@ -29,7 +29,7 @@
<vn-multi-check data="index.model.instances"></vn-multi-check> <vn-multi-check data="index.model.instances"></vn-multi-check>
</th> </th>
<th number translate>Item</th> <th number translate>Item</th>
<th translate style="text-align:center">Description</th> <th translate>Description</th>
<th number translate>Quantity</th> <th number translate>Quantity</th>
<th number translate>Price</th> <th number translate>Price</th>
<th number translate>Discount</th> <th number translate>Discount</th>

View File

@ -58,7 +58,7 @@
<tr> <tr>
<th></th> <th></th>
<th number translate>Item</th> <th number translate>Item</th>
<th translate style="text-align:center">Description</th> <th translate>Description</th>
<th number translate>Quantity</th> <th number translate>Quantity</th>
<th number translate>Price</th> <th number translate>Price</th>
<th number translate>Discount</th> <th number translate>Discount</th>

View File

@ -16,7 +16,7 @@
<thead> <thead>
<tr> <tr>
<th number translate>Item</th> <th number translate>Item</th>
<th translate style="text-align:center">Description</th> <th translate>Description</th>
<th number translate>Quantity</th> <th number translate>Quantity</th>
<th number translate>m³ per quantity</th> <th number translate>m³ per quantity</th>
</tr> </tr>