From c6d4d47dece6e890b8c6b2f4f42a91762a994833 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 28 Nov 2016 10:18:33 +0100 Subject: [PATCH] Guardar cliente --- @salix/core/src/combo/combo.js | 1 + @salix/core/src/combo/combo.mt.html | 2 +- .../core/src/date-picker/date-picker.mt.html | 2 +- @salix/core/src/left-menu/menu-item.html | 2 +- @salix/crud/src/client/basic-data/index.html | 25 ++-- @salix/crud/src/client/basic-data/index.js | 12 +- @salix/login/app/.gitignore | 1 - @salix/login/app/index.js | 1 - @salix/login/app/package.json | 10 -- @salix/login/app/src/app.js | 10 -- @salix/login/app/src/bootstrap.js | 17 --- @salix/login/app/src/configroutes.js | 34 ------ @salix/login/app/src/package.json | 10 -- @salix/login/app/src/spliting/deps.json | 4 - @salix/login/app/src/spliting/import.tpl.js | 1 - @salix/login/app/src/spliting/require.tpl.js | 11 -- @salix/login/app/src/styles/background.scss | 27 ----- @salix/login/app/src/styles/colors.scss | 7 -- @salix/login/app/src/styles/font-family.css | 24 ---- @salix/login/app/src/styles/layout.css | 110 ------------------ @salix/login/app/src/styles/margin.scss | 85 -------------- @salix/login/app/src/styles/padding.scss | 85 -------------- 22 files changed, 30 insertions(+), 451 deletions(-) delete mode 100644 @salix/login/app/.gitignore delete mode 100644 @salix/login/app/index.js delete mode 100644 @salix/login/app/package.json delete mode 100644 @salix/login/app/src/app.js delete mode 100644 @salix/login/app/src/bootstrap.js delete mode 100644 @salix/login/app/src/configroutes.js delete mode 100644 @salix/login/app/src/package.json delete mode 100644 @salix/login/app/src/spliting/deps.json delete mode 100644 @salix/login/app/src/spliting/import.tpl.js delete mode 100644 @salix/login/app/src/spliting/require.tpl.js delete mode 100644 @salix/login/app/src/styles/background.scss delete mode 100644 @salix/login/app/src/styles/colors.scss delete mode 100644 @salix/login/app/src/styles/font-family.css delete mode 100644 @salix/login/app/src/styles/layout.css delete mode 100644 @salix/login/app/src/styles/margin.scss delete mode 100644 @salix/login/app/src/styles/padding.scss diff --git a/@salix/core/src/combo/combo.js b/@salix/core/src/combo/combo.js index 4c40dd9ae..745582a33 100644 --- a/@salix/core/src/combo/combo.js +++ b/@salix/core/src/combo/combo.js @@ -9,6 +9,7 @@ directive.$inject =[resolveFactory.NAME]; export function directive (resolve){ return{ require:'E', + transclude: true, template: function(_,attr){ return resolve.getTemplate(_NAME, attr); } diff --git a/@salix/core/src/combo/combo.mt.html b/@salix/core/src/combo/combo.mt.html index a2624ac48..ad05d4a7a 100644 --- a/@salix/core/src/combo/combo.mt.html +++ b/@salix/core/src/combo/combo.mt.html @@ -1,5 +1,5 @@
-
diff --git a/@salix/core/src/date-picker/date-picker.mt.html b/@salix/core/src/date-picker/date-picker.mt.html index 69e5e6a34..c9a546eb4 100644 --- a/@salix/core/src/date-picker/date-picker.mt.html +++ b/@salix/core/src/date-picker/date-picker.mt.html @@ -1,4 +1,4 @@
- +
diff --git a/@salix/core/src/left-menu/menu-item.html b/@salix/core/src/left-menu/menu-item.html index 6575be0d2..26333f407 100644 --- a/@salix/core/src/left-menu/menu-item.html +++ b/@salix/core/src/left-menu/menu-item.html @@ -1,5 +1,5 @@
  • - + keyboard_arrow_right {{$ctrl.item.image}} {{$ctrl.item.text}} diff --git a/@salix/crud/src/client/basic-data/index.html b/@salix/crud/src/client/basic-data/index.html index 2784b3ede..5eafbea40 100644 --- a/@salix/crud/src/client/basic-data/index.html +++ b/@salix/crud/src/client/basic-data/index.html @@ -1,3 +1,4 @@ +
    @@ -6,31 +7,35 @@ - - + + - - + + - - + + - - + + + + + - + - \ No newline at end of file + +
    \ No newline at end of file diff --git a/@salix/crud/src/client/basic-data/index.js b/@salix/crud/src/client/basic-data/index.js index fe64be811..980684df4 100644 --- a/@salix/crud/src/client/basic-data/index.js +++ b/@salix/crud/src/client/basic-data/index.js @@ -6,6 +6,16 @@ export const _NAME = 'customerBasicData'; export const NAME = 'vnCustomerBasicData'; export const COMPONENT = { - template: template + template: template, + controller: function ($http) + { + this.submit = function () + { + $http.post('/client/api/Clients', this.model).then ( + () => console.log ('OK'), + () => console.log ('ER') + ); + }; + }, }; module.component(NAME, COMPONENT); diff --git a/@salix/login/app/.gitignore b/@salix/login/app/.gitignore deleted file mode 100644 index b512c09d4..000000000 --- a/@salix/login/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/@salix/login/app/index.js b/@salix/login/app/index.js deleted file mode 100644 index cb9a3f178..000000000 --- a/@salix/login/app/index.js +++ /dev/null @@ -1 +0,0 @@ -export * from './src/app' diff --git a/@salix/login/app/package.json b/@salix/login/app/package.json deleted file mode 100644 index 76f7c4784..000000000 --- a/@salix/login/app/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@salix/app", - "version": "0.0.0", - "description": "", - "main": "index.js", - "repository": { - "type": "git", - "url": "http://git.verdnatura.es:/salix" - } -} diff --git a/@salix/login/app/src/app.js b/@salix/login/app/src/app.js deleted file mode 100644 index 43dab4a88..000000000 --- a/@salix/login/app/src/app.js +++ /dev/null @@ -1,10 +0,0 @@ -import {bootstrap} from './bootstrap'; -import * as spliting from './spliting'; -import * as routes from './configroutes'; - -import padding from './styles/layout.css' -import margin from './styles/margin.scss' -import layout from './styles/padding.scss' -import background from './styles/background.scss' - -bootstrap(); diff --git a/@salix/login/app/src/bootstrap.js b/@salix/login/app/src/bootstrap.js deleted file mode 100644 index 5cc75fa96..000000000 --- a/@salix/login/app/src/bootstrap.js +++ /dev/null @@ -1,17 +0,0 @@ -import {ng} from 'vendor'; -import {NAME} from 'core'; - -export const bootstrap = () => { - const selector = 'selector' - - let _script = document.currentScript || (() => { - let scripts = document.getElementsByTagName('script'); - return scripts[scripts.length - 1]; - })(); - - let _element = _script && document.querySelector(_script.getAttribute(selector)); - if (!_element) { - throw new Error("element is not defined"); - } - ng.bootstrap(_element, [NAME]); -}; diff --git a/@salix/login/app/src/configroutes.js b/@salix/login/app/src/configroutes.js deleted file mode 100644 index ba5151542..000000000 --- a/@salix/login/app/src/configroutes.js +++ /dev/null @@ -1,34 +0,0 @@ -import * as core from 'core'; -import * as spliting from './spliting'; -import * as deps from './spliting/deps.json'; - -function loader(route) { - return function ($ocLazyLoad, $q) { - return $q((resolve) => { - core.splitingRegister.execute(route.module).then(function (dependencies) { - var array = dependencies.map((item) => { return { name: item } }); - resolve($ocLazyLoad.load(array)); - }); - }); - }; -} - -function config($stateProvider, $urlRouterProvider) { - - core.splitingRegister.registerGraph(deps); - - $urlRouterProvider.otherwise('/client/index'); - - for (var file in routes) - routes[file].forEach(function (route) { - $stateProvider.state(route.state, { - url: route.url, - template: route.template, - resolve: { - loader: loader(route) - } - }) - }); -} - -core.module.config(config); diff --git a/@salix/login/app/src/package.json b/@salix/login/app/src/package.json deleted file mode 100644 index 626726422..000000000 --- a/@salix/login/app/src/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@salix/core", - "version": "0.0.0", - "description": "", - "main": "index.js", - "repository": { - "type": "git", - "url": "http://git.verdnatura.es:/salix" - } -} diff --git a/@salix/login/app/src/spliting/deps.json b/@salix/login/app/src/spliting/deps.json deleted file mode 100644 index ea032e084..000000000 --- a/@salix/login/app/src/spliting/deps.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "app": ["crud"], - "crud": [] -} diff --git a/@salix/login/app/src/spliting/import.tpl.js b/@salix/login/app/src/spliting/import.tpl.js deleted file mode 100644 index 86ad3e68b..000000000 --- a/@salix/login/app/src/spliting/import.tpl.js +++ /dev/null @@ -1 +0,0 @@ -import * as core from 'core'; diff --git a/@salix/login/app/src/spliting/require.tpl.js b/@salix/login/app/src/spliting/require.tpl.js deleted file mode 100644 index 019cac3f0..000000000 --- a/@salix/login/app/src/spliting/require.tpl.js +++ /dev/null @@ -1,11 +0,0 @@ - -export const $module = () => { - return new Promise(resolve => { - require.ensure([], () => { - require('$module'); - resolve('$module'); - }, '$module'); - }); -}; - -core.splitingRegister.register('$module', $module); diff --git a/@salix/login/app/src/styles/background.scss b/@salix/login/app/src/styles/background.scss deleted file mode 100644 index bb0769388..000000000 --- a/@salix/login/app/src/styles/background.scss +++ /dev/null @@ -1,27 +0,0 @@ -@import "colors"; - -$bg-main: $color-green; -$bg-minor: $color-orange; -$bg-content: $color-light-grey; -$bg-panel: $color-white; -$bg-dark-bar: $color-black; -$bg-dark-menu: $color-dark-grey; - -html [bg-main], .bg-main { - background-color: $bg-main; -} -html [bg-minor], .bg-minor { - background-color: $bg-minor; -} -html [bg-content], .bg-content { - background-color: $bg-content; -} -html [bg-panel], .bg-panel { - background-color: $bg-panel; -} -html [bg-dark-bar], .bg-dark-bar { - background-color: $bg-dark-bar; -} -html [bg-dark-menu], .bg-dark-menu { - background-color: darken($bg-dark-menu, 35%); -} diff --git a/@salix/login/app/src/styles/colors.scss b/@salix/login/app/src/styles/colors.scss deleted file mode 100644 index dc752f510..000000000 --- a/@salix/login/app/src/styles/colors.scss +++ /dev/null @@ -1,7 +0,0 @@ - -$color-green: rgb(139,195,74); -$color-orange: rgb(255,171,64); -$color-dark-grey: #424242; -$color-light-grey: gray; -$color-white: white; -$color-black: black; diff --git a/@salix/login/app/src/styles/font-family.css b/@salix/login/app/src/styles/font-family.css deleted file mode 100644 index 2122baa09..000000000 --- a/@salix/login/app/src/styles/font-family.css +++ /dev/null @@ -1,24 +0,0 @@ -@font-face { - font-family: roboto-italic; - src: url(./fonts/Roboto-Italic.ttf); -} -@font-face { - font-family: roboto-thin; - src: url(./fonts/Roboto-Thin.ttf); -} -@font-face { - font-family: roboto-regular; - src: url(./fonts/Roboto-Regular.ttf); -} -@font-face { - font-family: roboto-condensed-italic; - src: url(./fonts/Roboto-CondensedItalic.ttf); -} -@font-face { - font-family: roboto-bold; - src: url(./fonts/Roboto-Bold.ttf); -} -@font-face { - font-family: roboto-bold-condensed; - src: url(./fonts/Roboto-BoldCondensed.ttf); -} diff --git a/@salix/login/app/src/styles/layout.css b/@salix/login/app/src/styles/layout.css deleted file mode 100644 index e93d58b8e..000000000 --- a/@salix/login/app/src/styles/layout.css +++ /dev/null @@ -1,110 +0,0 @@ - -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/login/app/src/styles/margin.scss b/@salix/login/app/src/styles/margin.scss deleted file mode 100644 index d1f77cc35..000000000 --- a/@salix/login/app/src/styles/margin.scss +++ /dev/null @@ -1,85 +0,0 @@ -$margin-none: 0; - -/* Small */ - -$margin-small: 8px; -$margin-small-top: 8px; -$margin-small-left: 8px; -$margin-small-right: 8px; -$margin-small-bottom: 8px; - -/* Medium */ - -$margin-medium: 16px; -$margin-medium-top: 16px; -$margin-medium-left: 16px; -$margin-medium-right: 16px; -$margin-medium-bottom: 16px; - -/* Large */ - -$margin-large: 32px; -$margin-large-top: 32px; -$margin-large-left: 32px; -$margin-large-right: 32px; -$margin-large-bottom: 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-top; -} -html [margin-small-left], .margin-small-left { - margin-left: $margin-small-left; -} -html [margin-small-right], .margin-small-right { - margin-right: $margin-small-right; -} -html [margin-small-bottom], .margin-small-bottom { - margin-bottom: $margin-small-bottom; -} - -/* Medium */ - -html [margin-medium], .margin-medium { - margin: $margin-medium; -} -html [margin-medium-top], .margin-medium-top { - margin-top: $margin-medium-top; -} -html [margin-medium-left], .margin-medium-left { - margin-left: $margin-medium-left; -} -html [margin-medium-right], .margin-medium-right { - margin-right: $margin-medium-right; -} -html [margin-medium-bottom], .margin-medium-bottom { - margin-bottom: $margin-medium-bottom; -} - -/* Large */ - -html [margin-large], .margin-large { - margin: $margin-large; -} -html [margin-large-top], .margin-large-top { - margin-top: $margin-large-top; -} -html [margin-large-left], .margin-large-left { - margin-left: $margin-large-left; -} -html [margin-large-right], .margin-large-right { - margin-right: $margin-large-right; -} -html [margin-large-bottom], .margin-large-bottom { - margin-bottom: $margin-large-bottom; -} diff --git a/@salix/login/app/src/styles/padding.scss b/@salix/login/app/src/styles/padding.scss deleted file mode 100644 index 7c925570f..000000000 --- a/@salix/login/app/src/styles/padding.scss +++ /dev/null @@ -1,85 +0,0 @@ -$pad-none: 0; - -/* Small */ - -$pad-small: 8px; -$pad-small-top: 8px; -$pad-small-left: 8px; -$pad-small-right: 8px; -$pad-small-bottom: 8px; - -/* Medium */ - -$pad-medium: 16px; -$pad-medium-top: 16px; -$pad-medium-left: 16px; -$pad-medium-right: 16px; -$pad-medium-bottom: 16px; - -/* Large */ - -$pad-large: 32px; -$pad-large-top: 32px; -$pad-large-left: 32px; -$pad-large-right: 32px; -$pad-large-bottom: 32px; - -/* None */ - -html [pad-none], .pad-none { - padding: $pad-none; -} - -/* Small */ - -html [pad-small], .pad-small { - padding: $pad-small; -} -html [pad-small-top], .pad-small-top { - padding-top: $pad-small-top; -} -html [pad-small-left], .pad-small-left { - padding-left: $pad-small-left; -} -html [pad-small-right], .pad-small-right { - padding-right: $pad-small-right; -} -html [pad-small-bottom], .pad-small-bottom { - padding-bottom: $pad-small-bottom; -} - -/* Medium */ - -html [pad-medium], .pad-medium { - padding: $pad-medium; -} -html [pad-medium-top], .pad-medium-top { - padding-top: $pad-medium-top; -} -html [pad-medium-left], .pad-medium-left { - padding-left: $pad-medium-left; -} -html [pad-medium-right], .pad-medium-right { - padding-right: $pad-medium-right; -} -html [pad-medium-bottom], .pad-medium-bottom { - padding-bottom: $pad-medium-bottom; -} - -/* Large */ - -html [pad-large], .pad-large { - padding: $pad-large; -} -html [pad-large-top], .pad-medium-large { - padding-top: $pad-large-top; -} -html [pad-large-left], .pad-large-left { - padding-left: $pad-large-left; -} -html [pad-large-right], .pad-large-right { - padding-right: $pad-large-right; -} -html [pad-large-bottom], .pad-large-bottom { - padding-bottom: $pad-large-bottom; -}