From c0f34bdd377213e4e0ff690614bd1e920d3dbad8 Mon Sep 17 00:00:00 2001 From: Juan Date: Thu, 1 Mar 2018 16:52:35 +0100 Subject: [PATCH] #142 & #143 - New descriptors header --- client/client/src/descriptor/descriptor.html | 24 ++++++---- client/client/src/descriptor/descriptor.js | 1 - client/client/src/descriptor/style.scss | 6 --- client/core/src/components/icon/icon.js | 2 +- client/core/src/components/icon/style.css | 8 ---- client/core/src/components/icon/style.scss | 10 ++++ client/core/src/components/index.js | 1 - client/core/src/components/label/label.html | 1 - client/core/src/components/label/label.js | 12 ----- client/core/src/components/tooltip/style.css | 3 -- .../item/src/descriptor/item-descriptor.html | 32 ++++++++----- client/salix/src/locale/es.yml | 4 +- client/salix/src/styles/misc.scss | 47 ++++++++++++------- e2e/helpers/selectors.js | 4 +- 14 files changed, 79 insertions(+), 76 deletions(-) delete mode 100644 client/client/src/descriptor/style.scss delete mode 100644 client/core/src/components/icon/style.css create mode 100644 client/core/src/components/icon/style.scss delete mode 100644 client/core/src/components/label/label.html delete mode 100644 client/core/src/components/label/label.js diff --git a/client/client/src/descriptor/descriptor.html b/client/client/src/descriptor/descriptor.html index 3d2d5b504..345fa965c 100644 --- a/client/client/src/descriptor/descriptor.html +++ b/client/client/src/descriptor/descriptor.html @@ -1,20 +1,26 @@ - -
- person -
-
+ + + + + + + + + + +
{{$ctrl.client.name}}
- Id {{$ctrl.client.id}} + Id {{$ctrl.client.id}}
- Phone {{$ctrl.client.phone | phone}} + Phone {{$ctrl.client.phone | phone}}
- Credit {{$ctrl.client.credit | currency:'€':2}} + Credit {{$ctrl.client.credit | currency:'€':2}}
- Secured credit + Secured credit {{$ctrl.client.creditInsurance | currency:'€':2}} -
diff --git a/client/client/src/descriptor/descriptor.js b/client/client/src/descriptor/descriptor.js index ab29245ae..d3467e82d 100644 --- a/client/client/src/descriptor/descriptor.js +++ b/client/client/src/descriptor/descriptor.js @@ -1,5 +1,4 @@ import ngModule from '../module'; -import './style.scss'; ngModule.component('vnClientDescriptor', { template: require('./descriptor.html'), diff --git a/client/client/src/descriptor/style.scss b/client/client/src/descriptor/style.scss deleted file mode 100644 index ec646d950..000000000 --- a/client/client/src/descriptor/style.scss +++ /dev/null @@ -1,6 +0,0 @@ -vn-client-descriptor { - .data .label { - font-size: .9em; - color: #666; - } -} \ No newline at end of file diff --git a/client/core/src/components/icon/icon.js b/client/core/src/components/icon/icon.js index 5e78a3a1b..01087b0c7 100644 --- a/client/core/src/components/icon/icon.js +++ b/client/core/src/components/icon/icon.js @@ -1,5 +1,5 @@ import ngModule from '../../module'; -import './style.css'; +import './style.scss'; class Icon { constructor($attrs) { diff --git a/client/core/src/components/icon/style.css b/client/core/src/components/icon/style.css deleted file mode 100644 index f0cb1d34c..000000000 --- a/client/core/src/components/icon/style.css +++ /dev/null @@ -1,8 +0,0 @@ -vn-icon { - display: inline-block; - font-size: 18pt; -} -vn-icon > i { - display: block; - font-size: inherit; -} diff --git a/client/core/src/components/icon/style.scss b/client/core/src/components/icon/style.scss new file mode 100644 index 000000000..e9764adec --- /dev/null +++ b/client/core/src/components/icon/style.scss @@ -0,0 +1,10 @@ +vn-icon { + display: inline-block; + font-size: 18pt; + + & > i, + & > i.material-icons { + display: block; + font-size: inherit; + } +} diff --git a/client/core/src/components/index.js b/client/core/src/components/index.js index 3639b82c8..9077ada71 100644 --- a/client/core/src/components/index.js +++ b/client/core/src/components/index.js @@ -21,7 +21,6 @@ import './button/button'; import './check/check'; import './radio/radio'; import './textarea/textarea'; -import './label/label'; import './icon-button/icon-button'; import './submit/submit'; import './combo/combo'; diff --git a/client/core/src/components/label/label.html b/client/core/src/components/label/label.html deleted file mode 100644 index 2f33b3a1a..000000000 --- a/client/core/src/components/label/label.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/core/src/components/label/label.js b/client/core/src/components/label/label.js deleted file mode 100644 index a556cd7b0..000000000 --- a/client/core/src/components/label/label.js +++ /dev/null @@ -1,12 +0,0 @@ -import ngModule from '../../module'; -import template from './label.html'; - -directive.$inject = ['vnTemplate']; -export default function directive(vnTemplate) { - return { - restrict: 'E', - template: (_, $attrs) => - vnTemplate.get(template, $attrs) - }; -} -ngModule.directive('vnLabel', directive); diff --git a/client/core/src/components/tooltip/style.css b/client/core/src/components/tooltip/style.css index 82c1bd43f..0a5ca7e23 100644 --- a/client/core/src/components/tooltip/style.css +++ b/client/core/src/components/tooltip/style.css @@ -1,6 +1,3 @@ -[vn-tooltip]{ - cursor: help; -} .tooltip { display: none; position: fixed; diff --git a/client/item/src/descriptor/item-descriptor.html b/client/item/src/descriptor/item-descriptor.html index b7a8c9a1f..29e15e5ca 100644 --- a/client/item/src/descriptor/item-descriptor.html +++ b/client/item/src/descriptor/item-descriptor.html @@ -1,23 +1,29 @@ - + + + + + + + + + + - - - - - + + -
Id: {{$ctrl.item.id}}
-
Name: {{$ctrl.item.name}}
-
-
{{itemTag.tag.name}}: {{itemTag.value}}
-
+
{{$ctrl.item.name}}
+
Id {{$ctrl.item.id}}
+
+
{{itemTag.tag.name}} {{itemTag.value}}
+
diff --git a/client/salix/src/locale/es.yml b/client/salix/src/locale/es.yml index b02124c21..fe3cdf228 100644 --- a/client/salix/src/locale/es.yml +++ b/client/salix/src/locale/es.yml @@ -16,4 +16,6 @@ Items: Artículos name: Nombre credit: Crédito phone: Teléfono -creditInsurance: Crédito Asegurado \ No newline at end of file +creditInsurance: Crédito Asegurado +Return to module index: Volver a la página principal del módulo +Preview: Vista previa \ No newline at end of file diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss index 0b466d539..0a26d8949 100644 --- a/client/salix/src/styles/misc.scss +++ b/client/salix/src/styles/misc.scss @@ -24,6 +24,10 @@ html [fixed-bottom-right] { right: 2em; } +vn-label { + font-size: .9em; + color: #666; +} vn-button-bar { display: block; margin-top: $margin-small; @@ -113,23 +117,30 @@ vn-main-block { padding-bottom: 1em; } } -.descriptor-header{ - background: rgb(255,171,64); - color: white; - text-align: center; - i { - font-size: 51px; - } - img { - width: 51px; - height: 51px; +.vn-descriptor { + & .header { + background: #ffa410; + color: white; + justify-content: space-between; + align-items: stretch; + + & > vn-icon { + padding: .1em; + font-size: 2.5em; + } + & > a { + display: flex; + align-items: center; + padding: .5em; + color: white; + text-decoration: none; + + &:hover { + background-color: rgba(1, 1, 1, 0.1); + } + & > vn-icon { + font-size: 1.8em; + } + } } } -fieldset[disabled] .mdl-textfield .mdl-textfield__input, .mdl-textfield.is-disabled .mdl-textfield__input, -fieldset[disabled] .mdl-checkbox .mdl-checkbox__label, .mdl-checkbox.is-disabled .mdl-checkbox__label{ - border: none !important; - color: inherit !important; -} -fieldset[disabled] .mdl-textfield .mdl-textfield__label, .mdl-textfield.is-disabled.is-disabled .mdl-textfield__label { - color: rgb(255,171,64) !important; -} \ No newline at end of file diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index c9efbaf30..16116b759 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -167,7 +167,7 @@ export default { }, itemBasicData: { - goToItemIndexButton: 'body > vn-app > vn-vertical > vn-vertical > ui-view > vn-item-card > vn-main-block > vn-horizontal > vn-auto > vn-item-descriptor > vn-card > div > vn-vertical > vn-auto.descriptor-header.pointer > img', + goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]', basicDataButton: `${components.vnMenuItem}[ui-sref="item.card.data"]`, typeSelect: `${components.vnAutocomplete}[field="$ctrl.item.typeFk"] > vn-vertical > ${components.vnTextfield}`, typeSelectOptionTwo: `${components.vnAutocomplete}[field="$ctrl.item.typeFk"] > vn-vertical > vn-drop-down > vn-vertical:not(.ng-hide) > vn-auto:nth-child(2) > ul > li:nth-child(2)`, @@ -182,7 +182,7 @@ export default { submitBasicDataButton: `${components.vnSubmit}` }, itemTags: { - goToItemIndexButton: 'body > vn-app > vn-vertical > vn-vertical > ui-view > vn-item-card > vn-main-block > vn-horizontal > vn-auto > vn-item-descriptor > vn-card > div > vn-vertical > vn-auto.descriptor-header.pointer > img', + goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]', tagsButton: `${components.vnMenuItem}[ui-sref="item.card.tags"]`, firstTagSelect: `vn-horizontal:nth-child(3) > ${components.vnAutocomplete}[field="itemTag.tagFk"] > vn-vertical > ${components.vnTextfield}`, firstTagSelectOptionOne: `vn-horizontal:nth-child(3) > ${components.vnAutocomplete}[field="itemTag.tagFk"] > vn-vertical > vn-drop-down > vn-vertical:not(.ng-hide) > vn-auto:nth-child(2) > ul > li:nth-child(1)`,