#1131 Refactor vn-icon a vn-icon-button en las templates.

This commit is contained in:
Carlos Jimenez Ruiz 2019-02-21 11:40:27 +01:00
parent 0f496b9500
commit 050c5c1126
13 changed files with 50 additions and 50 deletions

View File

@ -244,7 +244,7 @@ export default {
firstCodeInput: `vn-item-niche vn-horizontal:nth-child(1) > vn-textfield[label="Code"] input`,
secondWarehouseAutocomplete: `vn-item-niche vn-horizontal:nth-child(2) > vn-autocomplete[field="niche.warehouseFk"]`,
secondCodeInput: `vn-item-niche vn-horizontal:nth-child(2) > vn-textfield[label="Code"] input`,
secondNicheRemoveButton: `vn-item-niche vn-horizontal:nth-child(2) > vn-none > vn-icon[icon="delete"]`,
secondNicheRemoveButton: `vn-item-niche vn-horizontal:nth-child(2) > vn-none > vn-icon-button[icon="delete"]`,
thirdWarehouseAutocomplete: `vn-item-niche vn-horizontal:nth-child(3) > vn-autocomplete[field="niche.warehouseFk"]`,
thirdCodeInput: `vn-item-niche vn-horizontal:nth-child(3) > vn-textfield[label="Code"] input`,
submitNichesButton: `vn-item-niche ${components.vnSubmit}`
@ -423,7 +423,7 @@ export default {
firstQuantityInput: 'vn-ticket-service vn-textfield[label="Quantity"] input',
firstPriceInput: 'vn-ticket-service vn-textfield[label="Price"] input',
firstVatTypeAutocomplete: 'vn-ticket-service vn-autocomplete[label="Tax class"]',
fistDeleteServiceButton: 'vn-ticket-card > vn-main-block > div.content-block.ng-scope > vn-ticket-service > form > vn-card > div > vn-one:nth-child(1) > vn-horizontal:nth-child(1) > vn-auto > vn-icon[icon="delete"]',
fistDeleteServiceButton: 'vn-ticket-card > vn-main-block > div.content-block.ng-scope > vn-ticket-service > form > vn-card > div > vn-one:nth-child(1) > vn-horizontal:nth-child(1) > vn-auto > vn-icon-button[icon="delete"]',
serviceLine: 'vn-ticket-service > form > vn-card > div > vn-one:nth-child(2) > vn-horizontal',
saveServiceButton: `${components.vnSubmit}`
},

View File

@ -4,19 +4,22 @@ vn-icon-button {
outline: 0;
color: $color-main;
display: inline-block;
font-size: 18pt;
padding: .25em;
& > button {
background-color: transparent;
display: block;
color: inherit;
border: 0;
padding: .25em;
padding: 0;
&:hover {
background-color: initial;
}
& > vn-icon {
display: block;
font-size: inherit;
}
}
}

View File

@ -57,6 +57,8 @@ vn-app {
margin: $margin-medium;
form vn-horizontal {
align-items: center;
& > * {
padding: .2em;
}

View File

@ -5,31 +5,27 @@
class="unselectable">
{{currentUserName}}
</div>
<div>
<vn-icon
id="apps"
icon="apps"
vn-popover="apps-menu"
translate-attr="{title: 'Applications'}">
</vn-icon>
<vn-menu vn-id="apps-menu">
<ul pad-small>
<li ng-repeat="mod in ::$ctrl.modules" ui-sref="{{::mod.route.state}}">
<vn-icon icon="{{::mod.icon || 'photo'}}"></vn-icon>
<span translate>{{::mod.name}}</span>
</li>
</ul>
</vn-menu>
</div>
<div>
<vn-icon
id="logout"
icon="exit_to_app"
translate-attr="{title: 'Logout'}"
ng-click="$ctrl.onLogoutClick()">
</vn-icon>
</div>
<vn-icon-button
id="apps"
icon="apps"
vn-popover="apps-menu"
translate-attr="{title: 'Applications'}">
</vn-icon-button>
<vn-icon-button
id="logout"
icon="exit_to_app"
translate-attr="{title: 'Logout'}"
ng-click="$ctrl.onLogoutClick()">
</vn-icon-button>
</div>
<vn-menu vn-id="apps-menu">
<ul pad-small>
<li ng-repeat="mod in ::$ctrl.modules" ui-sref="{{::mod.route.state}}">
<vn-icon icon="{{::mod.icon || 'photo'}}"></vn-icon>
<span translate>{{::mod.name}}</span>
</li>
</ul>
</vn-menu>
<vn-user-configuration-popover
vn-id="popover">
</vn-user-configuration-popover>

View File

@ -11,22 +11,20 @@ vn-main-menu {
align-items: center;
box-sizing: border-box;
& > * {
cursor: pointer;
padding-left: .6em;
&:hover {
color: $color-main;
}
& > *:hover {
color: $color-main;
}
& > #user {
vertical-align: middle;
font-weight: bold;
margin-right: .2em;
cursor: pointer;
}
& > div > vn-icon {
display: block;
& > vn-icon-button {
font-size: 2.1em;
color: inherit;
padding: 0;
margin-left: .3em;
}
}
vn-menu.vn-popover > div > div.content > ul {

View File

@ -171,11 +171,12 @@ a.vn-list-item {
& > .buttons {
align-items: center;
vn-icon {
vn-icon-button {
opacity: .4;
color: $color-main;
margin-left: .5em;
transition: opacity 250ms ease-out;
padding: 0;
font-size: 2em;
&:hover {

View File

@ -27,13 +27,13 @@
rule="clientContact.phone" vn-focus>
</vn-textfield>
<vn-none>
<vn-icon
<vn-icon-button
pointer
margin-medium-v
vn-tooltip="Remove contact"
icon="delete"
ng-click="model.remove($index)">
</vn-icon>
</vn-icon-button>
</vn-none>
</vn-horizontal>
<vn-one>

View File

@ -19,11 +19,11 @@
</vn-label-value>
</vn-one>
<vn-horizontal class="buttons">
<vn-icon
<vn-icon-button
ng-click="$ctrl.preview($event)"
vn-tooltip="Preview"
icon="desktop_windows">
</vn-icon>
</vn-icon-button>
</vn-horizontal>
</vn-horizontal>
</a>

View File

@ -22,13 +22,13 @@
vn-focus>
</vn-textfield>
<vn-none>
<vn-icon
<vn-icon-button
vn-acl="buyer,replenisher"
pointer
vn-tooltip="Remove barcode"
icon="delete"
ng-click="model.remove($index)">
</vn-icon>
</vn-icon-button>
</vn-none>
</vn-horizontal>
<vn-one>

View File

@ -30,13 +30,13 @@
vn-acl="buyer,replenisher">
</vn-textfield>
<vn-none>
<vn-icon
<vn-icon-button
vn-acl="buyer,replenisher"
pointer
vn-tooltip="Remove niche"
icon="delete"
ng-click="model.remove($index)">
</vn-icon>
</vn-icon-button>
</vn-none>
</vn-horizontal>
<vn-one>

View File

@ -80,7 +80,7 @@
</vn-one>
<vn-auto>
<a href="" vn-tooltip="Add">
<vn-icon icon="add_circle" ng-click="$ctrl.preview($event, item)"></vn-icon>
<vn-icon-button icon="add_circle" ng-click="$ctrl.preview($event, item)"></vn-icon-button>
</a>
</vn-auto>
</vn-horizontal>

View File

@ -41,12 +41,12 @@
field="service.taxClassFk">
</vn-autocomplete>
<vn-auto pad-medium-top>
<vn-icon
<vn-icon-button
pointer
vn-tooltip="Remove service"
icon="delete"
ng-click="model.remove($index)">
</vn-icon>
</vn-icon-button>
</vn-one>
</vn-horizontal>
</vn-one>

View File

@ -40,11 +40,11 @@
</vn-label-value>
</vn-one>
<vn-horizontal class="buttons">
<vn-icon
<vn-icon-button
ng-click="$ctrl.preview($event, worker)"
vn-tooltip="Preview"
icon="desktop_windows">
</vn-icon>
</vn-icon-button>
</vn-horizontal>
</vn-horizontal>
</a>