diff --git a/@salix/app/src/components.js b/@salix/app/src/components.js index f726f89da..464af178e 100644 --- a/@salix/app/src/components.js +++ b/@salix/app/src/components.js @@ -5,3 +5,4 @@ export {NAME as LEFT_MENU, COMPONENT as LEFTMENU_COMPONENT} from './components/l export {NAME as MENU_ITEM, COMPONENT as MENU_ITEM_COMPONENT} from './components/left-menu/menu-item'; export {NAME as TOPBAR, COMPONENT as TOPBAR_COMPONENT} from './components/topbar/topbar'; export {NAME as SEARCHBAR, COMPONENT as SEARCHBAR_COMPONENT} from './components/searchbar/searchbar'; +export {NAME as CONFIRM, COMPONENT as CONFIRM_COMPONENT} from './components/confirm/confirm'; \ No newline at end of file diff --git a/@salix/app/src/components/app/app.html b/@salix/app/src/components/app/app.html index 5013ce9cf..ff63415dd 100644 --- a/@salix/app/src/components/app/app.html +++ b/@salix/app/src/components/app/app.html @@ -1,4 +1,5 @@ - - + + + \ No newline at end of file diff --git a/@salix/app/src/components/app/style.css b/@salix/app/src/components/app/style.css index b1b1925d6..f4d0a3ec5 100644 --- a/@salix/app/src/components/app/style.css +++ b/@salix/app/src/components/app/style.css @@ -1,4 +1,5 @@ vn-app { + display: block; height: 100%; } diff --git a/@salix/app/src/components/confirm/confirm.html b/@salix/app/src/components/confirm/confirm.html new file mode 100644 index 000000000..b24bb62df --- /dev/null +++ b/@salix/app/src/components/confirm/confirm.html @@ -0,0 +1,11 @@ + +
+

+ Allow this site to collect usage data to improve your experience? +

+
+
+ + +
+
\ No newline at end of file diff --git a/@salix/app/src/components/confirm/confirm.js b/@salix/app/src/components/confirm/confirm.js new file mode 100644 index 000000000..95a41f42a --- /dev/null +++ b/@salix/app/src/components/confirm/confirm.js @@ -0,0 +1,18 @@ +import template from './confirm.html'; +import {module} from '../../module'; + +export const NAME = 'vnConfirm'; +export const COMPONENT = { + template: template, + controllerAs: 'dialogController', + controller: function(){ + this.accept = function(){ + return true; + } + + this.cancel = function(){ + return false; + } + } +}; +module.component(NAME, COMPONENT); diff --git a/@salix/app/src/components/searchbar/searchbar.html b/@salix/app/src/components/searchbar/searchbar.html index 2f11a5998..102ff6cce 100644 --- a/@salix/app/src/components/searchbar/searchbar.html +++ b/@salix/app/src/components/searchbar/searchbar.html @@ -1,8 +1,12 @@ +
- - - - - - - \ No newline at end of file + + + + + +
\ No newline at end of file diff --git a/@salix/app/src/components/searchbar/searchbar.js b/@salix/app/src/components/searchbar/searchbar.js index 574924c34..e2a4a3afd 100644 --- a/@salix/app/src/components/searchbar/searchbar.js +++ b/@salix/app/src/components/searchbar/searchbar.js @@ -1,18 +1,25 @@ -import template from './searchbar.html'; import {module} from '../../module'; require('./style.css'); export const NAME = 'vnSearchbar' export const COMPONENT = { - template: template, - transclude: true, - controllerAs: 'searchbar', - controller: function($element) { - this.onClick = function(event) { - var popover = $element.find('vn-popover'); - popover.controller('vnPopover').show($element); - }; - } + template: require('./searchbar.html'), + bindings: { + model: '<', + search: '&', + advanced: '=', + popover: '@' + }, + controller: controller }; -COMPONENT.controller.$inject = ['$element']; module.component(NAME, COMPONENT); + +controller.$inject = ['$element', '$scope', '$document', '$compile', 'vnPopover']; +function controller($element, $scope, $document, $compile, popover) { + this.onClick = function(event) { + var child = $document[0].createElement(this.popover); + $compile(child)($scope); + popover.show($element, child); + event.preventDefault(); + }; +} diff --git a/@salix/app/src/components/topbar/topbar.html b/@salix/app/src/components/topbar/topbar.html index fd4ce57ec..2cba6aaa8 100644 --- a/@salix/app/src/components/topbar/topbar.html +++ b/@salix/app/src/components/topbar/topbar.html @@ -1,2 +1,2 @@ -
+
\ No newline at end of file diff --git a/@salix/app/src/components/topbar/topbar.js b/@salix/app/src/components/topbar/topbar.js index 8ace2de96..022ad8114 100644 --- a/@salix/app/src/components/topbar/topbar.js +++ b/@salix/app/src/components/topbar/topbar.js @@ -1,8 +1,7 @@ -import template from './topbar.html'; import {module} from '../../module'; -export const NAME = "vnTopbar"; +export const NAME = 'vnTopbar'; export const COMPONENT = { - template: template + template: require('./topbar.html') }; module.component(NAME, COMPONENT); diff --git a/@salix/app/src/run.js b/@salix/app/src/run.js index 8a230d8e9..4641c9785 100644 --- a/@salix/app/src/run.js +++ b/@salix/app/src/run.js @@ -1,9 +1,7 @@ import {module} from './module'; export const run = function($rootScope) { - $rootScope.$on('$viewContentLoaded',()=>{ - componentHandler.upgradeAllRegistered(); - }) + $rootScope.$on('$viewContentLoaded', () => {}) } run.$inject = ['$rootScope']; module.run(run); diff --git a/@salix/app/src/styles/background.scss b/@salix/app/src/styles/background.scss index 3b5a996c7..28203f0b7 100644 --- a/@salix/app/src/styles/background.scss +++ b/@salix/app/src/styles/background.scss @@ -25,9 +25,12 @@ html [bg-dark-bar], .bg-dark-bar { html [bg-dark-menu], .bg-dark-menu { background-color: darken($bg-dark-menu, 35%); } +<<<<<<< HEAD /* utilizado para mostrar el color default en el consignatario */ .bg-dark-item{ background-color: $bg-dark-bar; color: $color-white; } +======= +>>>>>>> 30e5bd9c0b8428cb5e77b03c22bbd81cf247f231 diff --git a/@salix/app/src/styles/border.scss b/@salix/app/src/styles/border.scss index 2afa4fd8a..3eb08176d 100644 --- a/@salix/app/src/styles/border.scss +++ b/@salix/app/src/styles/border.scss @@ -1,45 +1,45 @@ -@import "colors"; - -$border-color: #AAA; -$border-thin: 1px; -$border-thick: 2px; - -html [border-none], .border-none { - border: 0; -} - -/* Solid border */ - -html [border-solid], .border-solid { - border: $border-thin solid $border-color; -} -html [border-solid-top], .border-solid-top { - border-top: $border-thin solid $border-color; -} -html [border-solid-left], .border-solid-left { - border-left: $border-thin solid $border-color; -} -html [border-solid-right], .border-solid-right { - border-right: $border-thin solid $border-color; -} -html [border-solid-bottom], .border-solid-bottom { - border-bottom: $border-thin solid $border-color; -} - -/* Dashed border */ - -html [border-dashed], .border-dashed { - border: $border-thin dashed $border-color; -} -html [border-dashed-top], .border-dashed-top { - border-top: $border-thin dashed $border-color; -} -html [border-dashed-left], .border-dashed-left { - border-left: $border-thin dashed $border-color; -} -html [border-dashed-right], .border-dashed-right { - border-right: $border-thin dashed $border-color; -} -html [border-dashed-bottom], .border-dashed-bottom { - border-bottom: $border-thin dashed $border-color; -} +@import "colors"; + +$border-color: #AAA; +$border-thin: 1px; +$border-thick: 2px; + +html [border-none], .border-none { + border: 0; +} + +/* Solid border */ + +html [border-solid], .border-solid { + border: $border-thin solid $border-color; +} +html [border-solid-top], .border-solid-top { + border-top: $border-thin solid $border-color; +} +html [border-solid-left], .border-solid-left { + border-left: $border-thin solid $border-color; +} +html [border-solid-right], .border-solid-right { + border-right: $border-thin solid $border-color; +} +html [border-solid-bottom], .border-solid-bottom { + border-bottom: $border-thin solid $border-color; +} + +/* Dashed border */ + +html [border-dashed], .border-dashed { + border: $border-thin dashed $border-color; +} +html [border-dashed-top], .border-dashed-top { + border-top: $border-thin dashed $border-color; +} +html [border-dashed-left], .border-dashed-left { + border-left: $border-thin dashed $border-color; +} +html [border-dashed-right], .border-dashed-right { + border-right: $border-thin dashed $border-color; +} +html [border-dashed-bottom], .border-dashed-bottom { + border-bottom: $border-thin dashed $border-color; +} diff --git a/@salix/app/src/styles/colors.scss b/@salix/app/src/styles/colors.scss index 87226d736..9638ac0c8 100644 --- a/@salix/app/src/styles/colors.scss +++ b/@salix/app/src/styles/colors.scss @@ -1,7 +1,7 @@ - -$color-green: rgb(139,195,74); -$color-orange: rgb(255,171,64); -$color-white: white; -$color-dark: #3c393b; -$color-dark-grey: #424242; + +$color-green: rgb(139,195,74); +$color-orange: rgb(255,171,64); +$color-white: white; +$color-dark: #3c393b; +$color-dark-grey: #424242; $color-light-grey: #e6e6e6; \ No newline at end of file diff --git a/@salix/app/src/styles/font-family.css b/@salix/app/src/styles/font-family.css index 818c286f0..3fc6b8fcd 100644 --- a/@salix/app/src/styles/font-family.css +++ b/@salix/app/src/styles/font-family.css @@ -1,21 +1,21 @@ -@font-face { - font-family: raleway-italic; - src: url(./fonts/Raleway-Italic.ttf); -} -@font-face { - font-family: raleway-thin; - src: url(./fonts/Raleway-Thin.ttf); -} -@font-face { - font-family: raleway-regular; - src: url(./fonts/Raleway-Regular.ttf); -} -@font-face { - font-family: raleway-bold; - src: url(./fonts/Raleway-Bold.ttf); -} -@font-face { - font-family: raleway-semi-bold; - src: url(./fonts/Raleway-SemiBold.ttf); -} - +@font-face { + font-family: raleway-italic; + src: url(./fonts/Raleway-Italic.ttf); +} +@font-face { + font-family: raleway-thin; + src: url(./fonts/Raleway-Thin.ttf); +} +@font-face { + font-family: raleway-regular; + src: url(./fonts/Raleway-Regular.ttf); +} +@font-face { + font-family: raleway-bold; + src: url(./fonts/Raleway-Bold.ttf); +} +@font-face { + font-family: raleway-semi-bold; + src: url(./fonts/Raleway-SemiBold.ttf); +} + diff --git a/@salix/app/src/styles/font-style.scss b/@salix/app/src/styles/font-style.scss index 11f797d61..fb4b055d3 100644 --- a/@salix/app/src/styles/font-style.scss +++ b/@salix/app/src/styles/font-style.scss @@ -1,12 +1,12 @@ -@import "colors"; -@import "font-family"; - -$font-color: $color-dark-grey; - -body { - color: $font-color; - font-family: raleway-regular; -} -html [uppercase], .uppercase { - text-transform: uppercase; +@import "colors"; +@import "font-family"; + +$font-color: $color-dark-grey; + +body { + color: $font-color; + font-family: raleway-regular; +} +html [uppercase], .uppercase { + text-transform: uppercase; } \ No newline at end of file diff --git a/@salix/app/src/styles/layout.css b/@salix/app/src/styles/layout.css index e93d58b8e..1d35fd5c8 100644 --- a/@salix/app/src/styles/layout.css +++ b/@salix/app/src/styles/layout.css @@ -1,110 +1,110 @@ - -html, body { - height: 100%; - margin: 0px; - padding: 0px; -} - -html [full-height], .full-height { - height: 100%; -} -html [self-scroll], .self-scroll { - overflow: auto; -} - -/* Horizontal & vertical */ - -html [vn-horizontal], vn-horizontal, .vn-horizontal, -html [vn-vertical], vn-vertical, .vn-vertical { - display: flex; -} -html [vn-horizontal], vn-horizontal, .vn-horizontal { - flex-direction: row; -} -vn-horizontal [reverse] { - flex-direction: row-reverse; -} -html [vn-vertical], vn-vertical, .vn-vertical { - flex-direction: column; -} -vn-vertical [reverse] { - flex-direction: column-reverse; -} -html [wrap] { - flex-wrap: wrap; -} -html [wrap-reverse] { - flex-wrap: wrap-reverse; -} -html [scrollable] { - min-height: 1px; - flex: 1; - flex-basis: 0.000000001px; -} - -/* Horizontal & vertical childs */ - -html [vn-auto], -html [vn-none], -html [vn-one], -html [vn-two], -html [vn-three], -html [vn-four], -html [vn-five], -html [vn-six], -html [vn-seven], -html [vn-eight], -html [vn-nine], -html [vn-ten], -html [vn-eleven], -html [vn-twelve]{ - flex-basis: 0.000000001px; -} -html [vn-auto], vn-auto, .vn-auto { - flex: 1; - flex-basis: auto; -} -html [vn-empty], vn-empty, .vn-empty { - display: block; -} -html [vn-none], vn-none, .vn-none { - flex: 1; - flex: none; -} -html [vn-one], vn-one, .vn-one { - flex: 1; -} -html [vn-two], vn-two, .vn-two { - flex: 2; -} -html [vn-three], vn-three, .vn-three { - flex: 3; -} -html [vn-four], vn-four, .vn-four { - flex: 4; -} -html [vn-five], vn-five, .vn-five { - flex: 5; -} -html [vn-six], vn-six, .vn-six { - flex: 6; -} -html [vn-seven], vn-seven, .vn-seven { - flex: 7; -} -html [vn-eight], vn-eight, .vn-eight { - flex: 8; -} -html [vn-nine], vn-nine, .vn-nine { - flex: 9; -} -html [vn-ten], vn-ten, .vn-ten { - flex: 10; -} -html [vn-eleven], vn-eleven, .vn-eleven { - flex: 11; -} -html [vn-twelve], vn-twelve, .vn-twelve { - flex: 12; -} - + +html, body { + height: 100%; + margin: 0px; + padding: 0px; +} + +html [full-height], .full-height { + height: 100%; +} +html [self-scroll], .self-scroll { + overflow: auto; +} + +/* Horizontal & vertical */ + +html [vn-horizontal], vn-horizontal, .vn-horizontal, +html [vn-vertical], vn-vertical, .vn-vertical { + display: flex; +} +html [vn-horizontal], vn-horizontal, .vn-horizontal { + flex-direction: row; +} +vn-horizontal[reverse] { + flex-direction: row-reverse; +} +html [vn-vertical], vn-vertical, .vn-vertical { + flex-direction: column; +} +vn-vertical[reverse] { + flex-direction: column-reverse; +} +html [wrap] { + flex-wrap: wrap; +} +html [wrap-reverse] { + flex-wrap: wrap-reverse; +} +html [scrollable] { + min-height: 1px; + flex: 1; + flex-basis: 0.000000001px; +} + +/* Horizontal & vertical childs */ + +html [vn-auto], +html [vn-none], +html [vn-one], +html [vn-two], +html [vn-three], +html [vn-four], +html [vn-five], +html [vn-six], +html [vn-seven], +html [vn-eight], +html [vn-nine], +html [vn-ten], +html [vn-eleven], +html [vn-twelve]{ + flex-basis: 0.000000001px; +} +html [vn-auto], vn-auto, .vn-auto { + flex: 1; + flex-basis: auto; +} +html [vn-empty], vn-empty, .vn-empty { + display: block; +} +html [vn-none], vn-none, .vn-none { + flex: 1; + flex: none; +} +html [vn-one], vn-one, .vn-one { + flex: 1; +} +html [vn-two], vn-two, .vn-two { + flex: 2; +} +html [vn-three], vn-three, .vn-three { + flex: 3; +} +html [vn-four], vn-four, .vn-four { + flex: 4; +} +html [vn-five], vn-five, .vn-five { + flex: 5; +} +html [vn-six], vn-six, .vn-six { + flex: 6; +} +html [vn-seven], vn-seven, .vn-seven { + flex: 7; +} +html [vn-eight], vn-eight, .vn-eight { + flex: 8; +} +html [vn-nine], vn-nine, .vn-nine { + flex: 9; +} +html [vn-ten], vn-ten, .vn-ten { + flex: 10; +} +html [vn-eleven], vn-eleven, .vn-eleven { + flex: 11; +} +html [vn-twelve], vn-twelve, .vn-twelve { + flex: 12; +} + diff --git a/@salix/app/src/styles/margin.scss b/@salix/app/src/styles/margin.scss index 961998e56..ea0baf291 100644 --- a/@salix/app/src/styles/margin.scss +++ b/@salix/app/src/styles/margin.scss @@ -1,89 +1,89 @@ - -$margin-none: 0; -$margin-small: 8px; -$margin-medium: 16px; -$margin-large: 32px; - -/* None */ - -html [margin-none], .margin-none { - margin: $margin-none; -} - -/* Small */ - -html [margin-small], .margin-small { - margin: $margin-small; -} -html [margin-small-top], .margin-small-top { - margin-top: $margin-small; -} -html [margin-small-left], .margin-small-left { - margin-left: $margin-small; -} -html [margin-small-right], .margin-small-right { - margin-right: $margin-small; -} -html [margin-small-bottom], .margin-small-bottom { - margin-bottom: $margin-small; -} -html [margin-small-v], .margin-small-v { - margin-top: $margin-small; - margin-bottom: $margin-small; -} -html [margin-small-h], .margin-small-h { - margin-left: $margin-small; - margin-right: $margin-small; -} - -/* Medium */ - -html [margin-medium], .margin-medium { - margin: $margin-medium; -} -html [margin-medium-top], .margin-medium-top { - margin-top: $margin-medium; -} -html [margin-medium-left], .margin-medium-left { - margin-left: $margin-medium; -} -html [margin-medium-right], .margin-medium-right { - margin-right: $margin-medium; -} -html [margin-medium-bottom], .margin-medium-bottom { - margin-bottom: $margin-medium; -} -html [margin-medium-v], .margin-medium-v { - margin-top: $margin-medium; - margin-bottom: $margin-medium; -} -html [margin-medium-h], .margin-medium-h { - margin-left: $margin-medium; - margin-right: $margin-medium; -} - -/* Large */ - -html [margin-large], .margin-large { - margin: $margin-large; -} -html [margin-large-top], .margin-large-top { - margin-top: $margin-large; -} -html [margin-large-left], .margin-large-left { - margin-left: $margin-large; -} -html [margin-large-right], .margin-large-right { - margin-right: $margin-large; -} -html [margin-large-bottom], .margin-large-bottom { - margin-bottom: $margin-large; -} -html [margin-large-v], .margin-large-v { - margin-top: $margin-large; - margin-bottom: $margin-large; -} -html [margin-large-h], .margin-large-h { - margin-left: $margin-large; - margin-right: $margin-large; -} + +$margin-none: 0; +$margin-small: 8px; +$margin-medium: 16px; +$margin-large: 32px; + +/* None */ + +html [margin-none], .margin-none { + margin: $margin-none; +} + +/* Small */ + +html [margin-small], .margin-small { + margin: $margin-small; +} +html [margin-small-top], .margin-small-top { + margin-top: $margin-small; +} +html [margin-small-left], .margin-small-left { + margin-left: $margin-small; +} +html [margin-small-right], .margin-small-right { + margin-right: $margin-small; +} +html [margin-small-bottom], .margin-small-bottom { + margin-bottom: $margin-small; +} +html [margin-small-v], .margin-small-v { + margin-top: $margin-small; + margin-bottom: $margin-small; +} +html [margin-small-h], .margin-small-h { + margin-left: $margin-small; + margin-right: $margin-small; +} + +/* Medium */ + +html [margin-medium], .margin-medium { + margin: $margin-medium; +} +html [margin-medium-top], .margin-medium-top { + margin-top: $margin-medium; +} +html [margin-medium-left], .margin-medium-left { + margin-left: $margin-medium; +} +html [margin-medium-right], .margin-medium-right { + margin-right: $margin-medium; +} +html [margin-medium-bottom], .margin-medium-bottom { + margin-bottom: $margin-medium; +} +html [margin-medium-v], .margin-medium-v { + margin-top: $margin-medium; + margin-bottom: $margin-medium; +} +html [margin-medium-h], .margin-medium-h { + margin-left: $margin-medium; + margin-right: $margin-medium; +} + +/* Large */ + +html [margin-large], .margin-large { + margin: $margin-large; +} +html [margin-large-top], .margin-large-top { + margin-top: $margin-large; +} +html [margin-large-left], .margin-large-left { + margin-left: $margin-large; +} +html [margin-large-right], .margin-large-right { + margin-right: $margin-large; +} +html [margin-large-bottom], .margin-large-bottom { + margin-bottom: $margin-large; +} +html [margin-large-v], .margin-large-v { + margin-top: $margin-large; + margin-bottom: $margin-large; +} +html [margin-large-h], .margin-large-h { + margin-left: $margin-large; + margin-right: $margin-large; +} diff --git a/@salix/app/src/styles/padding.scss b/@salix/app/src/styles/padding.scss index 6014d0038..cfa9bc170 100644 --- a/@salix/app/src/styles/padding.scss +++ b/@salix/app/src/styles/padding.scss @@ -1,89 +1,89 @@ - -$pad-none: 0; -$pad-small: 8px; -$pad-medium: 16px; -$pad-large: 32px; - -/* None */ - -html [pad-none], .pad-none { - padding: $pad-none; -} - -/* Small */ - -html [pad-small], .pad-small { - padding: $pad-small; -} -html [pad-small-left], .pad-small-left { - padding-left: $pad-small; -} -html [pad-small-right], .pad-small-right { - padding-right: $pad-small; -} -html [pad-small-top], .pad-small-top { - padding-top: $pad-small; -} -html [pad-small-bottom], .pad-small-bottom { - padding-bottom: $pad-small; -} -html [pad-small-v], .pad-small-v { - padding-top: $pad-small; - padding-bottom: $pad-small; -} -html [pad-small-h], .pad-small-h { - padding-left: $pad-small; - padding-right: $pad-small; -} - -/* Medium */ - -html [pad-medium], .pad-medium { - padding: $pad-medium; -} -html [pad-medium-left], .pad-medium-left { - padding-left: $pad-medium; -} -html [pad-medium-right], .pad-medium-right { - padding-right: $pad-medium; -} -html [pad-medium-top], .pad-medium-top { - padding-top: $pad-medium; -} -html [pad-medium-bottom], .pad-medium-bottom { - padding-bottom: $pad-medium; -} -html [pad-medium-v], .pad-medium-v { - padding-top: $pad-medium; - padding-bottom: $pad-medium; -} -html [pad-medium-h], .pad-medium-h { - padding-left: $pad-medium; - padding-right: $pad-medium; -} - -/* Large */ - -html [pad-large], .pad-large { - padding: $pad-large; -} -html [pad-large-left], .pad-large-left { - padding-left: $pad-large; -} -html [pad-large-right], .pad-large-right { - padding-right: $pad-large; -} -html [pad-large-top], .pad-large-top { - padding-top: $pad-large; -} -html [pad-large-bottom], .pad-large-bottom { - padding-bottom: $pad-large; -} -html [pad-large-v], .pad-large-v { - padding-top: $pad-large; - padding-bottom: $pad-large; -} -html [pad-large-h], .pad-large-h { - padding-left: $pad-large; - padding-right: $pad-large; -} + +$pad-none: 0; +$pad-small: 8px; +$pad-medium: 16px; +$pad-large: 32px; + +/* None */ + +html [pad-none], .pad-none { + padding: $pad-none; +} + +/* Small */ + +html [pad-small], .pad-small { + padding: $pad-small; +} +html [pad-small-left], .pad-small-left { + padding-left: $pad-small; +} +html [pad-small-right], .pad-small-right { + padding-right: $pad-small; +} +html [pad-small-top], .pad-small-top { + padding-top: $pad-small; +} +html [pad-small-bottom], .pad-small-bottom { + padding-bottom: $pad-small; +} +html [pad-small-v], .pad-small-v { + padding-top: $pad-small; + padding-bottom: $pad-small; +} +html [pad-small-h], .pad-small-h { + padding-left: $pad-small; + padding-right: $pad-small; +} + +/* Medium */ + +html [pad-medium], .pad-medium { + padding: $pad-medium; +} +html [pad-medium-left], .pad-medium-left { + padding-left: $pad-medium; +} +html [pad-medium-right], .pad-medium-right { + padding-right: $pad-medium; +} +html [pad-medium-top], .pad-medium-top { + padding-top: $pad-medium; +} +html [pad-medium-bottom], .pad-medium-bottom { + padding-bottom: $pad-medium; +} +html [pad-medium-v], .pad-medium-v { + padding-top: $pad-medium; + padding-bottom: $pad-medium; +} +html [pad-medium-h], .pad-medium-h { + padding-left: $pad-medium; + padding-right: $pad-medium; +} + +/* Large */ + +html [pad-large], .pad-large { + padding: $pad-large; +} +html [pad-large-left], .pad-large-left { + padding-left: $pad-large; +} +html [pad-large-right], .pad-large-right { + padding-right: $pad-large; +} +html [pad-large-top], .pad-large-top { + padding-top: $pad-large; +} +html [pad-large-bottom], .pad-large-bottom { + padding-bottom: $pad-large; +} +html [pad-large-v], .pad-large-v { + padding-top: $pad-large; + padding-bottom: $pad-large; +} +html [pad-large-h], .pad-large-h { + padding-left: $pad-large; + padding-right: $pad-large; +} diff --git a/@salix/app/src/styles/title.css b/@salix/app/src/styles/title.css index 33fe0e6a0..2297903b0 100644 --- a/@salix/app/src/styles/title.css +++ b/@salix/app/src/styles/title.css @@ -1,30 +1,30 @@ - -h1 { - font-size: 32pt; - font-family: raleway-semi-bold; -} -h2 { - font-size: 28pt; - font-family: raleway-semi-bold; -} -h3 { - font-size: 24pt; - font-family: raleway-semi-bold; -} -h4 { - font-size: 20pt; - font-family: raleway-semi-bold; -} -h5 { - font-size: 16pt; - font-family: raleway-semi-bold; -} -h6 { - font-size: 12pt; - font-family: raleway-semi-bold; -} - -h1, h2, h3, h4, h5, h6 { - padding: 0; - margin: .4em 0; + +h1 { + font-size: 32pt; + font-family: raleway-semi-bold; +} +h2 { + font-size: 28pt; + font-family: raleway-semi-bold; +} +h3 { + font-size: 24pt; + font-family: raleway-semi-bold; +} +h4 { + font-size: 20pt; + font-family: raleway-semi-bold; +} +h5 { + font-size: 16pt; + font-family: raleway-semi-bold; +} +h6 { + font-size: 12pt; + font-family: raleway-semi-bold; +} + +h1, h2, h3, h4, h5, h6 { + padding: 0; + margin: .4em 0; } \ No newline at end of file diff --git a/@salix/core/src/button/button.bt.html b/@salix/core/src/button/button.bt.html index 4505aeb41..b72ceeba6 100644 --- a/@salix/core/src/button/button.bt.html +++ b/@salix/core/src/button/button.bt.html @@ -1,2 +1,2 @@ - - + + diff --git a/@salix/core/src/button/button.bt.js b/@salix/core/src/button/button.bt.js index 7312e96b3..4994640e6 100644 --- a/@salix/core/src/button/button.bt.js +++ b/@salix/core/src/button/button.bt.js @@ -1,24 +1,24 @@ -import {module as _module} from '../module'; -import * as util from '../util'; -import * as constant from '../constants'; -import template from './button.bt.html'; - -const _NAME = 'button'; -const DEFAULT_CLASS = ''; -const DEFAULT_TEXT = 'Button'; - -export const NAME = util.getFactoryName(_NAME + constant.BOOTSTRAP_FRAMEWORK); - -export function factory() { - return { - template: template, - default: { - text: DEFAULT_TEXT, - className: DEFAULT_CLASS, - enabled: 'true', - typeName: 'button' - } - } -} - -_module.factory(NAME, factory); +import {module as _module} from '../module'; +import * as util from '../util'; +import * as constant from '../constants'; +import template from './button.bt.html'; + +const _NAME = 'button'; +const DEFAULT_CLASS = ''; +const DEFAULT_TEXT = 'Button'; + +export const NAME = util.getFactoryName(_NAME + constant.BOOTSTRAP_FRAMEWORK); + +export function factory() { + return { + template: template, + default: { + text: DEFAULT_TEXT, + className: DEFAULT_CLASS, + enabled: 'true', + typeName: 'button' + } + } +} + +_module.factory(NAME, factory); diff --git a/@salix/core/src/button/button.js b/@salix/core/src/button/button.js index f260ba1d3..4e53f45b9 100644 --- a/@salix/core/src/button/button.js +++ b/@salix/core/src/button/button.js @@ -1,18 +1,18 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as util from '../util'; - -const _NAME = 'button'; -export const NAME = util.getName(_NAME); - -directive.$inject = [resolveFactory.NAME]; -export function directive(resolve) { - return { - restrict: 'E', - template: function(_, attr) { - return resolve.getTemplate(_NAME, attr); - } - }; -} - -_module.directive(NAME, directive); +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as util from '../util'; + +const _NAME = 'button'; +export const NAME = util.getName(_NAME); + +directive.$inject = [resolveFactory.NAME]; +export function directive(resolve) { + return { + restrict: 'E', + template: function(_, attr) { + return resolve.getTemplate(_NAME, attr); + } + }; +} + +_module.directive(NAME, directive); diff --git a/@salix/core/src/button/button.mdl.html b/@salix/core/src/button/button.mdl.html index 6b031460a..dd0f7acc6 100644 --- a/@salix/core/src/button/button.mdl.html +++ b/@salix/core/src/button/button.mdl.html @@ -1,3 +1,3 @@ - \ No newline at end of file diff --git a/@salix/core/src/button/button.mdl.js b/@salix/core/src/button/button.mdl.js index ef46569d9..1f348cdb5 100644 --- a/@salix/core/src/button/button.mdl.js +++ b/@salix/core/src/button/button.mdl.js @@ -1,21 +1,21 @@ -import {module as _module} from '../module'; -import * as util from '../util'; -import * as constant from '../constants'; -import template from './button.mdl.html'; - -const _NAME = 'button'; -export const NAME = util.getFactoryName(_NAME + constant.MATERIAL_DESIGN_FRAMEWORK); - -export function factory() { - return { - template: template, - default: { - label: 'Submit', - className: 'mdl-button mdl-js-button mdl-button--raised', - enabled: 'true', - typeName: 'button' - } - } -} - -_module.factory(NAME, factory); +import {module as _module} from '../module'; +import * as util from '../util'; +import * as constant from '../constants'; +import template from './button.mdl.html'; + +const _NAME = 'button'; +export const NAME = util.getFactoryName(_NAME + constant.MATERIAL_DESIGN_FRAMEWORK); + +export function factory() { + return { + template: template, + default: { + label: 'Submit', + className: 'mdl-button mdl-js-button mdl-button--raised', + enabled: 'true', + typeName: 'button' + } + } +} + +_module.factory(NAME, factory); diff --git a/@salix/core/src/card/card.js b/@salix/core/src/card/card.js index 1f9038987..1dfe2ccc6 100644 --- a/@salix/core/src/card/card.js +++ b/@salix/core/src/card/card.js @@ -1,21 +1,21 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as util from '../util'; -require ('./style.css'); - -const _NAME = 'card'; -export const NAME = util.getName(_NAME); - -directive.$inject = [resolveFactory.NAME]; -export function directive(resolve) { - return { - require: 'E', - transclude: true, - template: function(_, attr) { - return resolve.getTemplate(_NAME, attr); - } - }; -} - -_module.directive(NAME, directive); - +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as util from '../util'; +require ('./style.css'); + +const _NAME = 'card'; +export const NAME = util.getName(_NAME); + +directive.$inject = [resolveFactory.NAME]; +export function directive(resolve) { + return { + require: 'E', + transclude: true, + template: function(_, attr) { + return resolve.getTemplate(_NAME, attr); + } + }; +} + +_module.directive(NAME, directive); + diff --git a/@salix/core/src/card/card.mdl.html b/@salix/core/src/card/card.mdl.html index 1e85f6d96..f9edc7feb 100644 --- a/@salix/core/src/card/card.mdl.html +++ b/@salix/core/src/card/card.mdl.html @@ -1 +1 @@ -
+
diff --git a/@salix/core/src/check/check.bt.html b/@salix/core/src/check/check.bt.html index 4505aeb41..b72ceeba6 100644 --- a/@salix/core/src/check/check.bt.html +++ b/@salix/core/src/check/check.bt.html @@ -1,2 +1,2 @@ - - + + diff --git a/@salix/core/src/check/check.bt.js b/@salix/core/src/check/check.bt.js index a5cf0bd45..af05058f2 100644 --- a/@salix/core/src/check/check.bt.js +++ b/@salix/core/src/check/check.bt.js @@ -1 +1 @@ -// por definir +// por definir diff --git a/@salix/core/src/check/check.js b/@salix/core/src/check/check.js index a9f8a2c6a..adbe8280e 100644 --- a/@salix/core/src/check/check.js +++ b/@salix/core/src/check/check.js @@ -20,6 +20,7 @@ export function directive(resolve, normalizer) { if (mdlField) mdlField.updateClasses_(); }); + componentHandler.upgradeElement(element[0].firstChild); } }; } diff --git a/@salix/core/src/check/check.mdl.html b/@salix/core/src/check/check.mdl.html index f28c6eb01..bbb292699 100644 --- a/@salix/core/src/check/check.mdl.html +++ b/@salix/core/src/check/check.mdl.html @@ -1,4 +1,4 @@ - + diff --git a/@salix/core/src/combo/combo.js b/@salix/core/src/combo/combo.js index 356c51723..c4aadebbe 100644 --- a/@salix/core/src/combo/combo.js +++ b/@salix/core/src/combo/combo.js @@ -1,27 +1,28 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as normalizerFactory from '../inputAttrsNormalizer'; -import * as util from '../util'; - -const _NAME = 'combo'; -export const NAME = util.getName(_NAME); - -directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME]; -export function directive(resolve, normalizer) { - return { - restrict: 'E', - transclude: true, - template: function(_, attrs) { - normalizer.normalize(attrs); - return resolve.getTemplate(_NAME, attrs); - }, - link: function(scope, element, attrs) { - scope.$watch(attrs.model, () => { - let mdlField = element[0].firstChild.MaterialTextfield; - if (mdlField) - mdlField.updateClasses_(); - }); - } - }; -} -_module.directive(NAME, directive); +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as normalizerFactory from '../inputAttrsNormalizer'; +import * as util from '../util'; + +const _NAME = 'combo'; +export const NAME = util.getName(_NAME); + +directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME]; +export function directive(resolve, normalizer) { + return { + restrict: 'E', + transclude: true, + template: function(_, attrs) { + normalizer.normalize(attrs); + return resolve.getTemplate(_NAME, attrs); + }, + link: function(scope, element, attrs) { + scope.$watch(attrs.model, () => { + let mdlField = element[0].firstChild.MaterialTextfield; + if (mdlField) + mdlField.updateClasses_(); + }); + componentHandler.upgradeElement(element[0].firstChild); + } + }; +} +_module.directive(NAME, directive); diff --git a/@salix/core/src/combo/combo.mdl.js b/@salix/core/src/combo/combo.mdl.js index 66831ad72..86f7121d9 100644 --- a/@salix/core/src/combo/combo.mdl.js +++ b/@salix/core/src/combo/combo.mdl.js @@ -1,14 +1,14 @@ -import {module} from '../module'; -import template from './combo.mdl.html'; - -export const NAME = 'vnComboMdlFactory'; -export function factory() { - return { - template: template, - default: { - label: 'Label', - enabled: 'enabled' - } - } -} -module.factory(NAME, factory); +import {module} from '../module'; +import template from './combo.mdl.html'; + +export const NAME = 'vnComboMdlFactory'; +export function factory() { + return { + template: template, + default: { + label: 'Label', + enabled: 'enabled' + } + } +} +module.factory(NAME, factory); diff --git a/@salix/core/src/constants.js b/@salix/core/src/constants.js index 490ea609f..5cd04dedc 100644 --- a/@salix/core/src/constants.js +++ b/@salix/core/src/constants.js @@ -1,10 +1,10 @@ - -// Proyect prefix name -export const PREFIX ='vn'; - -// CSS frameworks -export const MATERIAL_DESIGN_FRAMEWORK = 'Mdl'; -export const BOOTSTRAP_FRAMEWORK = 'Bt'; - -// Module dependencies -export const EMPTY_DEPENDECIES = []; + +// Proyect prefix name +export const PREFIX ='vn'; + +// CSS frameworks +export const MATERIAL_DESIGN_FRAMEWORK = 'Mdl'; +export const BOOTSTRAP_FRAMEWORK = 'Bt'; + +// Module dependencies +export const EMPTY_DEPENDECIES = []; diff --git a/@salix/core/src/copy.js b/@salix/core/src/copy.js new file mode 100644 index 000000000..7e8b4e1f4 --- /dev/null +++ b/@salix/core/src/copy.js @@ -0,0 +1,5 @@ +import {module} from './module'; + +export const NAME = 'copyObject'; + +module.value(NAME, angular.copy); diff --git a/@salix/core/src/core.js b/@salix/core/src/core.js index f70bb48e4..5c2e9a2da 100644 --- a/@salix/core/src/core.js +++ b/@salix/core/src/core.js @@ -7,6 +7,8 @@ export {SplitingRegister as splitingRegister} from './splitingregister'; export {NAME as RESOLVEDEFAULTCOMPONENT, ResolveDefaultComponent} from './resolveDefaultComponents'; export {NAME as INTERPOLATE, Interpolate} from './interpolate'; export {NAME as ROUTES_LOADER, RoutesLoader} from './routesLoader'; +export {NAME as COPY_OBJECT} from './copy'; +export {NAME as EQUALS_OBJECT} from './equals'; export {NAME as FOCUS, directive as Focus} from './focus'; export {NAME as RULE, directive as Rule} from './rule'; @@ -44,11 +46,9 @@ export {NAME as CARD, directive as CardDirective} from './card/card'; export {NAME as CARD_MDL, factory as cardMdl} from './card/card.mdl'; export {NAME as SWITCH, directive as SwitchDirective} from './switch/switch'; export {NAME as SWITCH_MDL, factory as switchdMdl} from './switch/switch.mdl'; - -export {directive as Popover} from './popover/popover'; -export {factory as PopoverMdl} from './popover/popover.mdl'; export {directive as Icon} from './icon/icon'; export {factory as IconMdl} from './icon/icon.mdl'; -export {NAME as TITLE, COMPONENT as TITLE_COMPONENT} from './title/title'; -export {NAME as SUBTITLE, COMPONENT as SUBTITLE_COMPONENT} from './subtitle/subtitle'; +export {directive as Popover} from './popover/popover'; +export {COMPONENT as Title} from './title/title'; +export {COMPONENT as Subtitle} from './subtitle/subtitle'; diff --git a/@salix/core/src/date-picker/date-picker.js b/@salix/core/src/date-picker/date-picker.js index c8470e257..1e5c5a227 100644 --- a/@salix/core/src/date-picker/date-picker.js +++ b/@salix/core/src/date-picker/date-picker.js @@ -1,26 +1,27 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as normalizerFactory from '../inputAttrsNormalizer'; -import * as util from '../util'; - -const _NAME = 'datePicker'; -export const NAME = util.getName(_NAME); - -directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME]; -export function directive(resolve, normalizer) { - return { - restrict: 'E', - template: function(_, attrs) { - normalizer.normalize(attrs); - return resolve.getTemplate(_NAME, attrs); - }, - link: function(scope, element, attrs) { - scope.$watch(attrs.model, () => { - let mdlField = element[0].firstChild.MaterialTextfield; - if (mdlField) - mdlField.updateClasses_(); - }); - } - }; -} -_module.directive(NAME, directive); +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as normalizerFactory from '../inputAttrsNormalizer'; +import * as util from '../util'; + +const _NAME = 'datePicker'; +export const NAME = util.getName(_NAME); + +directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME]; +export function directive(resolve, normalizer) { + return { + restrict: 'E', + template: function(_, attrs) { + normalizer.normalize(attrs); + return resolve.getTemplate(_NAME, attrs); + }, + link: function(scope, element, attrs) { + scope.$watch(attrs.model, () => { + let mdlField = element[0].firstChild.MaterialTextfield; + if (mdlField) + mdlField.updateClasses_(); + }); + componentHandler.upgradeElement(element[0].firstChild); + } + }; +} +_module.directive(NAME, directive); diff --git a/@salix/core/src/date-picker/date-picker.mdl.js b/@salix/core/src/date-picker/date-picker.mdl.js index d8fedc2db..6939367fa 100644 --- a/@salix/core/src/date-picker/date-picker.mdl.js +++ b/@salix/core/src/date-picker/date-picker.mdl.js @@ -1,14 +1,14 @@ -import {module} from '../module'; -import template from './date-picker.mdl.html'; - -export const NAME = 'vnDatePickerMdlFactory'; -export function factory() { - return { - template: template, - default: { - label: 'Label', - enabled: 'enabled' - } - } -} -module.factory(NAME, factory); +import {module} from '../module'; +import template from './date-picker.mdl.html'; + +export const NAME = 'vnDatePickerMdlFactory'; +export function factory() { + return { + template: template, + default: { + label: 'Label', + enabled: 'enabled' + } + } +} +module.factory(NAME, factory); diff --git a/@salix/core/src/equals.js b/@salix/core/src/equals.js new file mode 100644 index 000000000..ee8f76cb4 --- /dev/null +++ b/@salix/core/src/equals.js @@ -0,0 +1,5 @@ +import {module} from './module'; + +export const NAME = 'equalsObject'; + +module.value(NAME, angular.equals); diff --git a/@salix/core/src/icon-button/icon-button.mdl.html b/@salix/core/src/icon-button/icon-button.mdl.html index c8c9bcaa3..52b459664 100644 --- a/@salix/core/src/icon-button/icon-button.mdl.html +++ b/@salix/core/src/icon-button/icon-button.mdl.html @@ -1,3 +1,3 @@ - \ No newline at end of file diff --git a/@salix/core/src/icon-button/icon-button.mdl.js b/@salix/core/src/icon-button/icon-button.mdl.js index ca468f8d0..7b95a15ee 100644 --- a/@salix/core/src/icon-button/icon-button.mdl.js +++ b/@salix/core/src/icon-button/icon-button.mdl.js @@ -1,15 +1,15 @@ -import {module} from '../module'; -import template from './icon-button.mdl.html'; - -export const NAME = 'vnIconButtonMdlFactory'; -export function factory() { - return { - template: template, - default: { - enabled: 'enabled', - icon: '', - label: '', - } - } -} -module.factory(NAME, factory); +import {module} from '../module'; +import template from './icon-button.mdl.html'; + +export const NAME = 'vnIconButtonMdlFactory'; +export function factory() { + return { + template: template, + default: { + enabled: 'enabled', + icon: '', + label: '', + } + } +} +module.factory(NAME, factory); diff --git a/@salix/core/src/icon/icon.js b/@salix/core/src/icon/icon.js index 9034b2212..28c12f7f5 100644 --- a/@salix/core/src/icon/icon.js +++ b/@salix/core/src/icon/icon.js @@ -1,18 +1,18 @@ -import {module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -require('./style.css'); - -const _NAME = 'icon'; -export const NAME = 'vnIcon'; - -export function directive(resolver) { - return { - restrict: 'E', - template: function(_, attrs) { - return resolver.getTemplate(_NAME, attrs); - } - } -} -directive.$inject = [resolveFactory.NAME]; - -module.directive(NAME, directive); +import {module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +require('./style.css'); + +const _NAME = 'icon'; +export const NAME = 'vnIcon'; + +export function directive(resolver) { + return { + restrict: 'E', + template: function(_, attrs) { + return resolver.getTemplate(_NAME, attrs); + } + } +} +directive.$inject = [resolveFactory.NAME]; + +module.directive(NAME, directive); diff --git a/@salix/core/src/icon/icon.mdl.html b/@salix/core/src/icon/icon.mdl.html index 671916513..865296d9b 100644 --- a/@salix/core/src/icon/icon.mdl.html +++ b/@salix/core/src/icon/icon.mdl.html @@ -1 +1 @@ -*[icon]* +*[icon]* diff --git a/@salix/core/src/icon/icon.mdl.js b/@salix/core/src/icon/icon.mdl.js index f5eba7800..ce3f82856 100644 --- a/@salix/core/src/icon/icon.mdl.js +++ b/@salix/core/src/icon/icon.mdl.js @@ -1,12 +1,12 @@ -import {module} from '../module'; -import template from './icon.mdl.html'; - -export const NAME = 'vnIconMdlFactory'; -export function factory() { - return { - template: template, - default: {} - } -} - -module.factory(NAME, factory); +import {module} from '../module'; +import template from './icon.mdl.html'; + +export const NAME = 'vnIconMdlFactory'; +export function factory() { + return { + template: template, + default: {} + } +} + +module.factory(NAME, factory); diff --git a/@salix/core/src/label/label.bt.html b/@salix/core/src/label/label.bt.html index 4505aeb41..b72ceeba6 100644 --- a/@salix/core/src/label/label.bt.html +++ b/@salix/core/src/label/label.bt.html @@ -1,2 +1,2 @@ - - + + diff --git a/@salix/core/src/label/label.bt.js b/@salix/core/src/label/label.bt.js index a5cf0bd45..af05058f2 100644 --- a/@salix/core/src/label/label.bt.js +++ b/@salix/core/src/label/label.bt.js @@ -1 +1 @@ -// por definir +// por definir diff --git a/@salix/core/src/label/label.js b/@salix/core/src/label/label.js index 7165de658..e82b9bcd3 100644 --- a/@salix/core/src/label/label.js +++ b/@salix/core/src/label/label.js @@ -1,18 +1,18 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as util from '../util'; - -const _NAME = 'label'; -export const NAME = util.getName(_NAME); - -directive.$inject =[resolveFactory.NAME]; -export function directive (resolve){ - return{ - restrict:'E', - template: function(_,attr){ - return resolve.getTemplate(_NAME, attr); - } - } -} - -_module.directive(NAME,directive); +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as util from '../util'; + +const _NAME = 'label'; +export const NAME = util.getName(_NAME); + +directive.$inject =[resolveFactory.NAME]; +export function directive (resolve){ + return{ + restrict:'E', + template: function(_,attr){ + return resolve.getTemplate(_NAME, attr); + } + } +} + +_module.directive(NAME,directive); diff --git a/@salix/core/src/label/label.mdl.js b/@salix/core/src/label/label.mdl.js index b5db118ec..64216fe46 100644 --- a/@salix/core/src/label/label.mdl.js +++ b/@salix/core/src/label/label.mdl.js @@ -1,20 +1,20 @@ -import {module as _module} from '../module'; -import * as util from '../util'; -import * as constant from '../constants'; -import template from './label.mdl.html'; - -const _NAME = 'label'; -const DEFAULT_TEXT = 'label'; - -export const NAME = util.getFactoryName(_NAME + constant.MATERIAL_DESIGN_FRAMEWORK); - -export function factory() { - return { - template: template, - default: { - text: DEFAULT_TEXT - } - } -} - -_module.factory(NAME, factory); +import {module as _module} from '../module'; +import * as util from '../util'; +import * as constant from '../constants'; +import template from './label.mdl.html'; + +const _NAME = 'label'; +const DEFAULT_TEXT = 'label'; + +export const NAME = util.getFactoryName(_NAME + constant.MATERIAL_DESIGN_FRAMEWORK); + +export function factory() { + return { + template: template, + default: { + text: DEFAULT_TEXT + } + } +} + +_module.factory(NAME, factory); diff --git a/@salix/core/src/password/password.js b/@salix/core/src/password/password.js index 8b46973f3..f056706b9 100644 --- a/@salix/core/src/password/password.js +++ b/@salix/core/src/password/password.js @@ -1,26 +1,27 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as normalizerFactory from '../inputAttrsNormalizer'; -import * as util from '../util'; - -const _NAME = 'password'; -export const NAME = util.getName(_NAME); - -directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME]; -export function directive(resolve, normalizer) { - return { - restrict: 'E', - template: function(_, attrs) { - normalizer.normalize(attrs); - return resolve.getTemplate(_NAME, attrs); - }, - link: function(scope, element, attrs) { - scope.$watch(attrs.model, () => { - let mdlField = element[0].firstChild.MaterialTextfield; - if (mdlField) - mdlField.updateClasses_(); - }); - } - } -} -_module.directive(NAME,directive); +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as normalizerFactory from '../inputAttrsNormalizer'; +import * as util from '../util'; + +const _NAME = 'password'; +export const NAME = util.getName(_NAME); + +directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME]; +export function directive(resolve, normalizer) { + return { + restrict: 'E', + template: function(_, attrs) { + normalizer.normalize(attrs); + return resolve.getTemplate(_NAME, attrs); + }, + link: function(scope, element, attrs) { + scope.$watch(attrs.model, () => { + let mdlField = element[0].firstChild.MaterialTextfield; + if (mdlField) + mdlField.updateClasses_(); + }); + componentHandler.upgradeElement(element[0].firstChild); + } + } +} +_module.directive(NAME,directive); diff --git a/@salix/core/src/password/password.mdl.js b/@salix/core/src/password/password.mdl.js index e5b77a385..60cdc91bc 100644 --- a/@salix/core/src/password/password.mdl.js +++ b/@salix/core/src/password/password.mdl.js @@ -1,17 +1,17 @@ -import {module} from '../module'; -import template from './password.mdl.html'; - -export const NAME = 'vnPasswordMdlFactory'; - -export function factory() { - return { - template: template, - default: { - label: 'Password', - enabled: 'enabled', - className: 'mdl-textfield__input' - } - } -} - -module.factory(NAME, factory); +import {module} from '../module'; +import template from './password.mdl.html'; + +export const NAME = 'vnPasswordMdlFactory'; + +export function factory() { + return { + template: template, + default: { + label: 'Password', + enabled: 'enabled', + className: 'mdl-textfield__input' + } + } +} + +module.factory(NAME, factory); diff --git a/@salix/core/src/popover/popover.js b/@salix/core/src/popover/popover.js index 5b27cbe5a..0a6b37942 100644 --- a/@salix/core/src/popover/popover.js +++ b/@salix/core/src/popover/popover.js @@ -2,87 +2,91 @@ import {module} from '../module'; import * as resolveFactory from '../resolveDefaultComponents'; require('./style.css'); -const _NAME = 'popover'; export const NAME = 'vnPopover'; -export function directive(resolver) { +directive.$inject = ['$compile', '$document', 'vnPopover']; +export function directive($compile, $document, popover) { return { - restrict: 'E', - transclude: true, - controllerAs: 'popover', - template: function(_, attrs) { - return resolver.getTemplate(_NAME, attrs); - }, -/* link: function(scope, element, attrs, ctrl) { - var nativeElement = element[0]; - nativeElement.addEventListener('click', function(ev) { - ev.preventDefault(); - ctrl.show(); + restrict: 'A', + link: function($scope, $element, $attrs, $ctrl) { + $element.on('click', function(event) { + var child = $document[0].createElement($attrs.vnPopover); + $compile(child)($scope); + popover.show($element, child); + event.preventDefault(); }); - }, -*/ controller: function($element) { - var self = this; - var doc = angular.element(document); - function docMouseDownHandler(event) { - if (event != self.lastEvent) - self.hide(); - } - this.onMouseDown = function(event) { - this.lastEvent = event; - }; - this.hide = function () - { - $element[0].style.display = 'none'; - doc.off('mousedown', docMouseDownHandler); - } - this.show = function(parent) { - var node = $element[0]; - var style = node.style; - - var spacing = 0; - var margin = 20; - var dblMargin = margin * 2; - - var width = node.offsetWidth; - var height = node.offsetHeight; - var innerWidth = window.innerWidth; - var innerHeight = window.innerHeight; - - if(width + dblMargin > innerWidth) { - width = innerWidth - dblMargin; - style.width = width +'px'; - } - if(height + dblMargin > innerHeight) { - height = innerHeight - dblMargin; - style.height = height +'px'; - } - - if(parent) { - var parentNode = parent[0]; - var rect = parentNode.getBoundingClientRect(); - var left = rect.left; - var top = rect.top + spacing + parentNode.offsetHeight; - - if(left + width > innerWidth) - left -= (left + width) - innerWidth + margin; - if(top + height > innerHeight) - top -= height + parentNode.offsetHeight + spacing * 2; - - if(left < 0) - left = margin; - if(top < 0) - top = margin; - - style.top = (top) +'px'; - style.left = (left) +'px'; - } - - style.display = 'block'; - doc.on('mousedown', docMouseDownHandler); - }; } } } -directive.$inject = [resolveFactory.NAME]; - module.directive(NAME, directive); + +$get.$inject = ['$document']; +function $get($document) { + var lastEvent; + var popover; + var self = { + onDocMouseDown: function(event) { + if (event != lastEvent) + self.hide(); + }, + onPopoverMouseDown: function(event) { + lastEvent = event; + }, + hide: function() { + $document.off('mousedown', this.onDocMouseDown); + $document[0].body.removeChild (popover); + popover = null; + }, + show: function(parent, child) { + popover = $document[0].createElement('div'); + popover.className = 'vn-popover'; + popover.addEventListener('mousedown', this.onPopoverMouseDown); + popover.appendChild (child); + + var style = popover.style; + + var spacing = 0; + var margin = 20; + var dblMargin = margin * 2; + + var width = popover.offsetWidth; + var height = popover.offsetHeight; + var innerWidth = window.innerWidth; + var innerHeight = window.innerHeight; + + if(width + dblMargin > innerWidth) { + width = innerWidth - dblMargin; + style.width = width +'px'; + } + if(height + dblMargin > innerHeight) { + height = innerHeight - dblMargin; + style.height = height +'px'; + } + + if(parent) { + var parentNode = parent[0]; + var rect = parentNode.getBoundingClientRect(); + var left = rect.left; + var top = rect.top + spacing + parentNode.offsetHeight; + + if(left + width > innerWidth) + left -= (left + width) - innerWidth + margin; + if(top + height > innerHeight) + top -= height + parentNode.offsetHeight + spacing * 2; + + if(left < 0) + left = margin; + if(top < 0) + top = margin; + + style.top = (top) +'px'; + style.left = (left) +'px'; + } + + $document[0].body.appendChild (popover); + $document.on('mousedown', this.onDocMouseDown); + } + }; + return self; +} +module.provider('vnPopover', function() {this.$get = $get;}); diff --git a/@salix/core/src/popover/popover.mdl.html b/@salix/core/src/popover/popover.mdl.html deleted file mode 100644 index 2aec07e0f..000000000 --- a/@salix/core/src/popover/popover.mdl.html +++ /dev/null @@ -1,5 +0,0 @@ -
-
\ No newline at end of file diff --git a/@salix/core/src/popover/popover.mdl.js b/@salix/core/src/popover/popover.mdl.js deleted file mode 100644 index dda61bf20..000000000 --- a/@salix/core/src/popover/popover.mdl.js +++ /dev/null @@ -1,12 +0,0 @@ -import {module} from '../module'; -import template from './popover.mdl.html'; - -export const NAME = 'vnPopoverMdlFactory'; -export function factory() { - return { - template: template, - default: {} - } -} - -module.factory(NAME, factory); diff --git a/@salix/core/src/popover/style.css b/@salix/core/src/popover/style.css index 82fa1c8fa..536359a2f 100644 --- a/@salix/core/src/popover/style.css +++ b/@salix/core/src/popover/style.css @@ -1,5 +1,4 @@ -vn-popover { - display: none; +.vn-popover { position: fixed; box-shadow: 0 0 .4em rgba(1,1,1,.4); background-color: white; diff --git a/@salix/core/src/radio/radio.bt.html b/@salix/core/src/radio/radio.bt.html index 4505aeb41..b72ceeba6 100644 --- a/@salix/core/src/radio/radio.bt.html +++ b/@salix/core/src/radio/radio.bt.html @@ -1,2 +1,2 @@ - - + + diff --git a/@salix/core/src/radio/radio.bt.js b/@salix/core/src/radio/radio.bt.js index a5cf0bd45..af05058f2 100644 --- a/@salix/core/src/radio/radio.bt.js +++ b/@salix/core/src/radio/radio.bt.js @@ -1 +1 @@ -// por definir +// por definir diff --git a/@salix/core/src/radio/radio.js b/@salix/core/src/radio/radio.js index a87fae678..43cd6bf27 100644 --- a/@salix/core/src/radio/radio.js +++ b/@salix/core/src/radio/radio.js @@ -1,18 +1,18 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as util from '../util'; - -const _NAME = 'radio'; -export const NAME = util.getName(_NAME); - -directive.$inject = [resolveFactory.NAME]; -export function directive(resolve) { - return{ - restrict: 'E', - template: function(_, attrs) { - return resolve.getTemplate(_NAME, attrs); - } - } -} - -_module.directive(NAME, directive); +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as util from '../util'; + +const _NAME = 'radio'; +export const NAME = util.getName(_NAME); + +directive.$inject = [resolveFactory.NAME]; +export function directive(resolve) { + return{ + restrict: 'E', + template: function(_, attrs) { + return resolve.getTemplate(_NAME, attrs); + } + } +} + +_module.directive(NAME, directive); diff --git a/@salix/core/src/radio/radio.mdl.html b/@salix/core/src/radio/radio.mdl.html index 36d9baac8..ea61c7a90 100644 --- a/@salix/core/src/radio/radio.mdl.html +++ b/@salix/core/src/radio/radio.mdl.html @@ -1,2 +1,2 @@ - -*[text]* + +*[text]* diff --git a/@salix/core/src/radio/radio.mdl.js b/@salix/core/src/radio/radio.mdl.js index ad8ad80d8..4e97eab65 100644 --- a/@salix/core/src/radio/radio.mdl.js +++ b/@salix/core/src/radio/radio.mdl.js @@ -1,21 +1,21 @@ -import {module as _module} from '../module'; -import * as util from '../util'; -import * as constant from '../constants'; -import template from './radio.mdl.html'; - -const _NAME = 'radio'; -const DEFAULT_CLASS = 'mdl-radio mdl-js-radio mdl-js-ripple-effect'; - -export const NAME = util.getFactoryName(_NAME + constant.MATERIAL_DESIGN_FRAMEWORK); - -export function factory() { - return { - template: template, - default: { - enabled: 'true', - className: DEFAULT_CLASS - } - } -} - -_module.factory(NAME, factory); +import {module as _module} from '../module'; +import * as util from '../util'; +import * as constant from '../constants'; +import template from './radio.mdl.html'; + +const _NAME = 'radio'; +const DEFAULT_CLASS = 'mdl-radio mdl-js-radio mdl-js-ripple-effect'; + +export const NAME = util.getFactoryName(_NAME + constant.MATERIAL_DESIGN_FRAMEWORK); + +export function factory() { + return { + template: template, + default: { + enabled: 'true', + className: DEFAULT_CLASS + } + } +} + +_module.factory(NAME, factory); diff --git a/@salix/core/src/snackbar/snackbar.js b/@salix/core/src/snackbar/snackbar.js index 5fe867234..770047911 100644 --- a/@salix/core/src/snackbar/snackbar.js +++ b/@salix/core/src/snackbar/snackbar.js @@ -7,7 +7,7 @@ export const NAME = util.getName(_NAME); directive.$inject = [resolveFactory.NAME]; export function directive(resolve) { - return{ + return { restrict: 'E', template: function(_, attrs) { return resolve.getTemplate(_NAME, attrs); diff --git a/@salix/core/src/snackbar/snackbar.mdl.html b/@salix/core/src/snackbar/snackbar.mdl.html index 256f591b1..ea02e45c8 100644 --- a/@salix/core/src/snackbar/snackbar.mdl.html +++ b/@salix/core/src/snackbar/snackbar.mdl.html @@ -1,4 +1,4 @@ -
+
diff --git a/@salix/core/src/snackbar/snackbar.mdl.js b/@salix/core/src/snackbar/snackbar.mdl.js index 75a0f5170..2811797b5 100644 --- a/@salix/core/src/snackbar/snackbar.mdl.js +++ b/@salix/core/src/snackbar/snackbar.mdl.js @@ -7,8 +7,7 @@ export function factory() { return { template: template, default: { - message: 'Default message', - className: 'mdl-js-snackbar mdl-snackbar' + message: 'Default message' } } } diff --git a/@salix/core/src/spinner/spinner.js b/@salix/core/src/spinner/spinner.js index 08a3154dc..1611c8ec8 100644 --- a/@salix/core/src/spinner/spinner.js +++ b/@salix/core/src/spinner/spinner.js @@ -1,18 +1,18 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as util from '../util'; - -const _NAME = 'spinner'; -export const NAME = util.getName(_NAME); - -directive.$inject = [resolveFactory.NAME]; -export function directive(resolve) { - return{ - restrict: 'E', - template: function(_, attrs) { - return resolve.getTemplate(_NAME, attrs); - } - } -} - -_module.directive(NAME, directive); +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as util from '../util'; + +const _NAME = 'spinner'; +export const NAME = util.getName(_NAME); + +directive.$inject = [resolveFactory.NAME]; +export function directive(resolve) { + return{ + restrict: 'E', + template: function(_, attrs) { + return resolve.getTemplate(_NAME, attrs); + } + } +} + +_module.directive(NAME, directive); diff --git a/@salix/core/src/spinner/spinner.mdl.js b/@salix/core/src/spinner/spinner.mdl.js index 581404463..6b54d75d4 100644 --- a/@salix/core/src/spinner/spinner.mdl.js +++ b/@salix/core/src/spinner/spinner.mdl.js @@ -1,15 +1,15 @@ -import {module} from '../module'; -import template from './spinner.mdl.html'; - -export const NAME = 'vnSpinnerMdlFactory'; - -export function factory() { - return { - template: template, - default: { - className: 'mdl-spinner mdl-spinner--single-color mdl-js-spinner' - } - } -} - -module.factory(NAME, factory); +import {module} from '../module'; +import template from './spinner.mdl.html'; + +export const NAME = 'vnSpinnerMdlFactory'; + +export function factory() { + return { + template: template, + default: { + className: 'mdl-spinner mdl-spinner--single-color mdl-js-spinner' + } + } +} + +module.factory(NAME, factory); diff --git a/@salix/core/src/submit/submit.js b/@salix/core/src/submit/submit.js index 115c9fb1c..067f0fa83 100644 --- a/@salix/core/src/submit/submit.js +++ b/@salix/core/src/submit/submit.js @@ -1,18 +1,18 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as util from '../util'; - -const _NAME = 'submit'; -export const NAME = util.getName(_NAME); - -directive.$inject =[resolveFactory.NAME]; -export function directive (resolve){ - return{ - restrict:'E', - template: function(_,attr){ - return resolve.getTemplate(_NAME, attr); - } - } -} - -_module.directive(NAME,directive); +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as util from '../util'; + +const _NAME = 'submit'; +export const NAME = util.getName(_NAME); + +directive.$inject =[resolveFactory.NAME]; +export function directive (resolve){ + return{ + restrict:'E', + template: function(_,attr){ + return resolve.getTemplate(_NAME, attr); + } + } +} + +_module.directive(NAME,directive); diff --git a/@salix/core/src/submit/submit.mdl.js b/@salix/core/src/submit/submit.mdl.js index f22646e80..f0aea49df 100644 --- a/@salix/core/src/submit/submit.mdl.js +++ b/@salix/core/src/submit/submit.mdl.js @@ -1,17 +1,17 @@ -import {module} from '../module'; -import template from './submit.mdl.html'; - -export const NAME = 'vnSubmitMdlFactory'; - -export function factory() { - return { - template: template, - default: { - label: 'Submit', - className: 'mdl-button mdl-js-button mdl-button--raised', - enabled: 'true' - } - } -} - -module.factory(NAME, factory); +import {module} from '../module'; +import template from './submit.mdl.html'; + +export const NAME = 'vnSubmitMdlFactory'; + +export function factory() { + return { + template: template, + default: { + label: 'Submit', + className: 'mdl-button mdl-js-button mdl-button--raised', + enabled: 'true' + } + } +} + +module.factory(NAME, factory); diff --git a/@salix/core/src/subtitle/subtitle.html b/@salix/core/src/subtitle/subtitle.html deleted file mode 100644 index c3acdabf7..000000000 --- a/@salix/core/src/subtitle/subtitle.html +++ /dev/null @@ -1,2 +0,0 @@ -
-
\ No newline at end of file diff --git a/@salix/core/src/subtitle/subtitle.js b/@salix/core/src/subtitle/subtitle.js index 658ac5acb..7c0cb7c15 100644 --- a/@salix/core/src/subtitle/subtitle.js +++ b/@salix/core/src/subtitle/subtitle.js @@ -1,9 +1,8 @@ -import template from './subtitle.html'; -import {module} from '../module'; - -export const NAME = "vnSubtitle"; -export const COMPONENT = { - template: template, - transclude: true -}; -module.component(NAME, COMPONENT); +import {module} from '../module'; + +export const NAME = 'vnSubtitle'; +export const COMPONENT = { + template: require('./template.html'), + transclude: true +}; +module.component(NAME, COMPONENT); diff --git a/@salix/core/src/subtitle/template.html b/@salix/core/src/subtitle/template.html new file mode 100644 index 000000000..ac00ac0c2 --- /dev/null +++ b/@salix/core/src/subtitle/template.html @@ -0,0 +1,2 @@ +
+
\ No newline at end of file diff --git a/@salix/core/src/switch/switch.js b/@salix/core/src/switch/switch.js index 506d7c5ca..5f52f2d09 100644 --- a/@salix/core/src/switch/switch.js +++ b/@salix/core/src/switch/switch.js @@ -1,28 +1,29 @@ -import {module as _module} from '../module'; -import * as resolveFactory from '../resolveDefaultComponents'; -import * as normalizerFactory from '../inputAttrsNormalizer'; -import * as util from '../util'; - -const _NAME = 'switch'; -export const NAME = util.getName(_NAME); - -directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME]; -export function directive(resolve, normalizer) { - return { - restrict: 'E', - template: function(_, attrs) { - normalizer.normalize(attrs); - return resolve.getTemplate(_NAME, attrs); - }, - link: function(scope, element, attrs) { - scope.$watch(attrs.model, () => { - let mdlField = element[0].firstChild.MaterialSwitch; - if (mdlField) - mdlField.updateClasses_(); - }); - } - }; -} - -_module.directive(NAME, directive); - +import {module as _module} from '../module'; +import * as resolveFactory from '../resolveDefaultComponents'; +import * as normalizerFactory from '../inputAttrsNormalizer'; +import * as util from '../util'; + +const _NAME = 'switch'; +export const NAME = util.getName(_NAME); + +directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME]; +export function directive(resolve, normalizer) { + return { + restrict: 'E', + template: function(_, attrs) { + normalizer.normalize(attrs); + return resolve.getTemplate(_NAME, attrs); + }, + link: function(scope, element, attrs) { + scope.$watch(attrs.model, () => { + let mdlField = element[0].firstChild.MaterialSwitch; + if (mdlField) + mdlField.updateClasses_(); + }); + componentHandler.upgradeElement(element[0].firstChild); + } + }; +} + +_module.directive(NAME, directive); + diff --git a/@salix/core/src/switch/switch.mdl.html b/@salix/core/src/switch/switch.mdl.html index 845e1b951..815bff86a 100644 --- a/@salix/core/src/switch/switch.mdl.html +++ b/@salix/core/src/switch/switch.mdl.html @@ -1,4 +1,4 @@ -