From 6ed1a92773b5c91da5d8f42559f5355c8464ca76 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Fri, 25 Nov 2016 15:35:26 +0100 Subject: [PATCH] Items left menu --- @salix/app/src/configroutes.js | 2 +- @salix/app/src/styles/margin.scss | 70 ++++++++-------- @salix/app/src/styles/padding.scss | 82 ++++++++++--------- @salix/core/src/core.js | 18 ++-- @salix/core/src/left-menu/actions.html | 5 ++ .../src/{leftmenu => left-menu}/actions.js | 0 @salix/core/src/left-menu/descriptor.html | 5 ++ .../src/{leftmenu => left-menu}/descriptor.js | 0 .../left-menu.html} | 0 .../leftmenu.js => left-menu/left-menu.js} | 5 +- @salix/core/src/left-menu/menu-item.html | 8 ++ .../itemmenu.js => left-menu/menu-item.js} | 4 +- @salix/core/src/left-menu/style.css | 4 + @salix/core/src/leftmenu/actions.html | 5 -- @salix/core/src/leftmenu/descriptor.html | 3 - @salix/core/src/leftmenu/itemmenu.html | 7 -- .../main-menu.html} | 0 .../mainmenu.js => main-menu/main-menu.js} | 2 +- .../{databasic => basic-data}/index.html | 4 +- .../client/{databasic => basic-data}/index.js | 4 +- @salix/crud/src/client/client.js | 4 +- @salix/crud/src/client/index/index.html | 4 +- @salix/crud/src/client/index/index.js | 10 +-- @salix/crud/src/client/routes.js | 5 +- @salix/gulpfile.js | 1 + services/salix/client/index.ejs | 5 +- 26 files changed, 133 insertions(+), 124 deletions(-) create mode 100644 @salix/core/src/left-menu/actions.html rename @salix/core/src/{leftmenu => left-menu}/actions.js (100%) create mode 100644 @salix/core/src/left-menu/descriptor.html rename @salix/core/src/{leftmenu => left-menu}/descriptor.js (100%) rename @salix/core/src/{leftmenu/leftmenu.html => left-menu/left-menu.html} (100%) rename @salix/core/src/{leftmenu/leftmenu.js => left-menu/left-menu.js} (70%) create mode 100644 @salix/core/src/left-menu/menu-item.html rename @salix/core/src/{leftmenu/itemmenu.js => left-menu/menu-item.js} (78%) create mode 100644 @salix/core/src/left-menu/style.css delete mode 100644 @salix/core/src/leftmenu/actions.html delete mode 100644 @salix/core/src/leftmenu/descriptor.html delete mode 100644 @salix/core/src/leftmenu/itemmenu.html rename @salix/core/src/{mainmenu/mainmenu.html => main-menu/main-menu.html} (100%) rename @salix/core/src/{mainmenu/mainmenu.js => main-menu/main-menu.js} (84%) rename @salix/crud/src/client/{databasic => basic-data}/index.html (90%) rename @salix/crud/src/client/{databasic => basic-data}/index.js (71%) diff --git a/@salix/app/src/configroutes.js b/@salix/app/src/configroutes.js index 3ccdc078c9..ba51515429 100644 --- a/@salix/app/src/configroutes.js +++ b/@salix/app/src/configroutes.js @@ -17,7 +17,7 @@ function config($stateProvider, $urlRouterProvider) { core.splitingRegister.registerGraph(deps); - $urlRouterProvider.otherwise('/client/client-index'); + $urlRouterProvider.otherwise('/client/index'); for (var file in routes) routes[file].forEach(function (route) { diff --git a/@salix/app/src/styles/margin.scss b/@salix/app/src/styles/margin.scss index d1f77cc350..1a3d500d43 100644 --- a/@salix/app/src/styles/margin.scss +++ b/@salix/app/src/styles/margin.scss @@ -1,28 +1,8 @@ + $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 */ @@ -36,16 +16,24 @@ html [margin-small], .margin-small { margin: $margin-small; } html [margin-small-top], .margin-small-top { - margin-top: $margin-small-top; + margin-top: $margin-small; } html [margin-small-left], .margin-small-left { - margin-left: $margin-small-left; + margin-left: $margin-small; } html [margin-small-right], .margin-small-right { - margin-right: $margin-small-right; + margin-right: $margin-small; } html [margin-small-bottom], .margin-small-bottom { - margin-bottom: $margin-small-bottom; + margin-bottom: $margin-small; +} +html [margin-small-v], .margin-small-v { + margin-left: $margin-small; + margin-right: $margin-small; +} +html [margin-small-h], .margin-small-h { + margin-top: $margin-small; + margin-bottom: $margin-small; } /* Medium */ @@ -54,16 +42,24 @@ html [margin-medium], .margin-medium { margin: $margin-medium; } html [margin-medium-top], .margin-medium-top { - margin-top: $margin-medium-top; + margin-top: $margin-medium; } html [margin-medium-left], .margin-medium-left { - margin-left: $margin-medium-left; + margin-left: $margin-medium; } html [margin-medium-right], .margin-medium-right { - margin-right: $margin-medium-right; + margin-right: $margin-medium; } html [margin-medium-bottom], .margin-medium-bottom { - margin-bottom: $margin-medium-bottom; + margin-bottom: $margin-medium; +} +html [margin-medium-v], .margin-medium-v { + margin-left: $margin-medium; + margin-right: $margin-medium; +} +html [margin-medium-h], .margin-medium-h { + margin-top: $margin-medium; + margin-bottom: $margin-medium; } /* Large */ @@ -72,14 +68,22 @@ html [margin-large], .margin-large { margin: $margin-large; } html [margin-large-top], .margin-large-top { - margin-top: $margin-large-top; + margin-top: $margin-large; } html [margin-large-left], .margin-large-left { - margin-left: $margin-large-left; + margin-left: $margin-large; } html [margin-large-right], .margin-large-right { - margin-right: $margin-large-right; + margin-right: $margin-large; } html [margin-large-bottom], .margin-large-bottom { - margin-bottom: $margin-large-bottom; + margin-bottom: $margin-large; +} +html [margin-large-v], .margin-large-v { + margin-left: $margin-large; + margin-right: $margin-large; +} +html [margin-large-h], .margin-large-h { + margin-top: $margin-large; + margin-bottom: $margin-large; } diff --git a/@salix/app/src/styles/padding.scss b/@salix/app/src/styles/padding.scss index 7c925570f1..3543c2c296 100644 --- a/@salix/app/src/styles/padding.scss +++ b/@salix/app/src/styles/padding.scss @@ -1,28 +1,8 @@ + $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 */ @@ -35,17 +15,25 @@ html [pad-none], .pad-none { 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; + padding-left: $pad-small; } html [pad-small-right], .pad-small-right { - padding-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-bottom; + padding-bottom: $pad-small; +} +html [pad-small-v], .pad-small-v { + padding-left: $pad-small; + padding-right: $pad-small; +} +html [pad-small-h], .pad-small-h { + padding-top: $pad-small; + padding-bottom: $pad-small; } /* Medium */ @@ -53,17 +41,25 @@ html [pad-small-bottom], .pad-small-bottom { 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; + padding-left: $pad-medium; } html [pad-medium-right], .pad-medium-right { - padding-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-bottom; + padding-bottom: $pad-medium; +} +html [pad-medium-v], .pad-medium-v { + padding-left: $pad-medium; + padding-right: $pad-medium; +} +html [pad-medium-h], .pad-medium-h { + padding-top: $pad-medium; + padding-bottom: $pad-medium; } /* Large */ @@ -71,15 +67,23 @@ html [pad-medium-bottom], .pad-medium-bottom { 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; + padding-left: $pad-large; } html [pad-large-right], .pad-large-right { - padding-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-bottom; + padding-bottom: $pad-large; +} +html [pad-large-v], .pad-large-v { + padding-left: $pad-large; + padding-right: $pad-large; +} +html [pad-large-h], .pad-large-h { + padding-top: $pad-large; + padding-bottom: $pad-large; } diff --git a/@salix/core/src/core.js b/@salix/core/src/core.js index 28e3a52f9d..8ea3aa417d 100644 --- a/@salix/core/src/core.js +++ b/@salix/core/src/core.js @@ -44,17 +44,11 @@ export {NAME as COMBO_MT,factory as comboMt} from './combo/combo.mt' export {NAME as DATE_PICKER,directive as DatePickerDirective} from './date-picker/date-picker' export {NAME as DATE_PICKER_MT,factory as datePickerMt} from './date-picker/date-picker.mt' -export {NAME as VN_MAINMENU, - COMPONENT as VN_MAINMENU_COMPONENT} from './mainmenu/mainmenu'; +export {NAME as VN_MAINMENU, COMPONENT as VN_MAINMENU_COMPONENT} from './main-menu/main-menu'; -export {NAME as ACTIONS, - COMPONENT as ACTIONS_COMPONENT} from './leftmenu/actions'; -export {NAME as DESCRIPTOR, - COMPONENT as DESCRIPTOR_COMPONENT} from './leftmenu/descriptor'; -export {NAME as LEFTMENU, - COMPONENT as LEFTMENU_COMPONENT} from './leftmenu/leftmenu'; -export {NAME as ITEMMENU, - COMPONENT as ITEMMENU_COMPONENT} from './leftmenu/itemmenu'; -export {NAME as CLIENT_TOP_BAR, - COMPONENT as CLIENT_TOP_BAR_COMPONENT} from './topbar/topbar'; +export {NAME as ACTIONS, COMPONENT as ACTIONS_COMPONENT} from './left-menu/actions'; +export {NAME as DESCRIPTOR, COMPONENT as DESCRIPTOR_COMPONENT} from './left-menu/descriptor'; +export {NAME as LEFT_MENU, COMPONENT as LEFTMENU_COMPONENT} from './left-menu/left-menu'; +export {NAME as MENU_ITEM, COMPONENT as MENU_ITEM_COMPONENT} from './left-menu/menu-item'; +export {NAME as CLIENT_TOP_BAR, COMPONENT as CLIENT_TOP_BAR_COMPONENT} from './topbar/topbar'; diff --git a/@salix/core/src/left-menu/actions.html b/@salix/core/src/left-menu/actions.html new file mode 100644 index 0000000000..de19f738e4 --- /dev/null +++ b/@salix/core/src/left-menu/actions.html @@ -0,0 +1,5 @@ + + + diff --git a/@salix/core/src/leftmenu/actions.js b/@salix/core/src/left-menu/actions.js similarity index 100% rename from @salix/core/src/leftmenu/actions.js rename to @salix/core/src/left-menu/actions.js diff --git a/@salix/core/src/left-menu/descriptor.html b/@salix/core/src/left-menu/descriptor.html new file mode 100644 index 0000000000..d61b2221fb --- /dev/null +++ b/@salix/core/src/left-menu/descriptor.html @@ -0,0 +1,5 @@ + + +

Descriptor

+
+
\ No newline at end of file diff --git a/@salix/core/src/leftmenu/descriptor.js b/@salix/core/src/left-menu/descriptor.js similarity index 100% rename from @salix/core/src/leftmenu/descriptor.js rename to @salix/core/src/left-menu/descriptor.js diff --git a/@salix/core/src/leftmenu/leftmenu.html b/@salix/core/src/left-menu/left-menu.html similarity index 100% rename from @salix/core/src/leftmenu/leftmenu.html rename to @salix/core/src/left-menu/left-menu.html diff --git a/@salix/core/src/leftmenu/leftmenu.js b/@salix/core/src/left-menu/left-menu.js similarity index 70% rename from @salix/core/src/leftmenu/leftmenu.js rename to @salix/core/src/left-menu/left-menu.js index 0b58ea7613..3d7f1f83e6 100644 --- a/@salix/core/src/leftmenu/leftmenu.js +++ b/@salix/core/src/left-menu/left-menu.js @@ -1,8 +1,9 @@ -import template from './leftmenu.html'; +import template from './left-menu.html'; +import style from './style.css'; import {module} from '../module'; import * as util from '../util'; -const _NAME = 'leftmenu'; +const _NAME = 'leftMenu'; export const NAME = util.getName(_NAME); export const COMPONENT = { template: template, diff --git a/@salix/core/src/left-menu/menu-item.html b/@salix/core/src/left-menu/menu-item.html new file mode 100644 index 0000000000..5452c70319 --- /dev/null +++ b/@salix/core/src/left-menu/menu-item.html @@ -0,0 +1,8 @@ + +
  • + + keyboard_arrow_right + {{$ctrl.item.image}} + {{$ctrl.item.text}} + +
  • \ No newline at end of file diff --git a/@salix/core/src/leftmenu/itemmenu.js b/@salix/core/src/left-menu/menu-item.js similarity index 78% rename from @salix/core/src/leftmenu/itemmenu.js rename to @salix/core/src/left-menu/menu-item.js index dec0ba0ab6..af279b7ee2 100644 --- a/@salix/core/src/leftmenu/itemmenu.js +++ b/@salix/core/src/left-menu/menu-item.js @@ -1,8 +1,8 @@ -import template from './itemmenu.html'; +import template from './menu-item.html'; import {module} from '../module'; import * as util from '../util'; -const _NAME = 'itemmenu'; +const _NAME = 'menuItem'; export const NAME = util.getName(_NAME); export const COMPONENT = { template: template, diff --git a/@salix/core/src/left-menu/style.css b/@salix/core/src/left-menu/style.css new file mode 100644 index 0000000000..9be0073a90 --- /dev/null +++ b/@salix/core/src/left-menu/style.css @@ -0,0 +1,4 @@ +vn-menu-item a:hover { + color: white !important; + background-color: #424242; +} \ No newline at end of file diff --git a/@salix/core/src/leftmenu/actions.html b/@salix/core/src/leftmenu/actions.html deleted file mode 100644 index 36ca2b424c..0000000000 --- a/@salix/core/src/leftmenu/actions.html +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/@salix/core/src/leftmenu/descriptor.html b/@salix/core/src/leftmenu/descriptor.html deleted file mode 100644 index 34d2702cfd..0000000000 --- a/@salix/core/src/leftmenu/descriptor.html +++ /dev/null @@ -1,3 +0,0 @@ - - descriptor - \ No newline at end of file diff --git a/@salix/core/src/leftmenu/itemmenu.html b/@salix/core/src/leftmenu/itemmenu.html deleted file mode 100644 index 42a643f3b0..0000000000 --- a/@salix/core/src/leftmenu/itemmenu.html +++ /dev/null @@ -1,7 +0,0 @@ - -
  • - keyboard_arrow_right - {{$ctrl.item.image}} - {{$ctrl.item.text}} -
  • - \ No newline at end of file diff --git a/@salix/core/src/mainmenu/mainmenu.html b/@salix/core/src/main-menu/main-menu.html similarity index 100% rename from @salix/core/src/mainmenu/mainmenu.html rename to @salix/core/src/main-menu/main-menu.html diff --git a/@salix/core/src/mainmenu/mainmenu.js b/@salix/core/src/main-menu/main-menu.js similarity index 84% rename from @salix/core/src/mainmenu/mainmenu.js rename to @salix/core/src/main-menu/main-menu.js index 50d6c07559..3dda71fe39 100644 --- a/@salix/core/src/mainmenu/mainmenu.js +++ b/@salix/core/src/main-menu/main-menu.js @@ -1,4 +1,4 @@ -import template from './mainmenu.html'; +import template from './main-menu.html'; import {module} from '../module'; import * as util from '../util'; diff --git a/@salix/crud/src/client/databasic/index.html b/@salix/crud/src/client/basic-data/index.html similarity index 90% rename from @salix/crud/src/client/databasic/index.html rename to @salix/crud/src/client/basic-data/index.html index bf453058b8..2784b3ede2 100644 --- a/@salix/crud/src/client/databasic/index.html +++ b/@salix/crud/src/client/basic-data/index.html @@ -1,7 +1,7 @@ - + -

    Datos básicos

    +

    Datos básicos

    diff --git a/@salix/crud/src/client/databasic/index.js b/@salix/crud/src/client/basic-data/index.js similarity index 71% rename from @salix/crud/src/client/databasic/index.js rename to @salix/crud/src/client/basic-data/index.js index 4f23a56f6b..fe64be8113 100644 --- a/@salix/crud/src/client/databasic/index.js +++ b/@salix/crud/src/client/basic-data/index.js @@ -1,9 +1,9 @@ import template from './index.html'; import {module} from '../../module'; -export const _NAME = 'customerDataBasic'; +export const _NAME = 'customerBasicData'; //export const NAME = module.getName(_NAME); -export const NAME = "vnCustomerDataBasic"; +export const NAME = 'vnCustomerBasicData'; export const COMPONENT = { template: template diff --git a/@salix/crud/src/client/client.js b/@salix/crud/src/client/client.js index fea0999f2e..3e0e7aa311 100644 --- a/@salix/crud/src/client/client.js +++ b/@salix/crud/src/client/client.js @@ -1,4 +1,4 @@ -export {NAME as CLIENT_DATA_BASIC_INDEX, - COMPONENT as CLIENT_DATA_BASIC_INDEX_COMPONENT} from './databasic/index'; +export {NAME as CLIENT_BASIC_DATA_INDEX, + COMPONENT as CLIENT_BASIC_DATA_INDEX_COMPONENT} from './basic-data/index'; export {NAME as CLIENT_INDEX, COMPONENT as CLIENT_INDEX_COMPONENT} from './index/index'; diff --git a/@salix/crud/src/client/index/index.html b/@salix/crud/src/client/index/index.html index f9fe275bac..2487fee348 100644 --- a/@salix/crud/src/client/index/index.html +++ b/@salix/crud/src/client/index/index.html @@ -2,10 +2,10 @@ - + - +
    diff --git a/@salix/crud/src/client/index/index.js b/@salix/crud/src/client/index/index.js index 0fee98c74b..a4138dd7f0 100644 --- a/@salix/crud/src/client/index/index.js +++ b/@salix/crud/src/client/index/index.js @@ -8,11 +8,11 @@ export const COMPONENT = { template: template, controller: function(){ this.items = [ - {text: "Datos básicos", image: "person"}, - {text: "Datos facturación", image: "assignment"}, - {text: "Acceso web", image: "language"}, - {text: "Consignatarios", image: "local_shipping"}, - {text: "Notas", image: "insert_drive_file"} + {text: "Datos básicos", image: "person", href: "#/client/basic-data"}, + {text: "Datos facturación", image: "assignment", href: "#/client/invoicing-data"}, + {text: "Acceso web", image: "language", href: "#/client/web-access"}, + {text: "Consignatarios", image: "local_shipping", href: "#/client/addresses"}, + {text: "Notas", image: "insert_drive_file", href: "#/client/notes"} ] } }; diff --git a/@salix/crud/src/client/routes.js b/@salix/crud/src/client/routes.js index e25da9fb5d..e7ff0d43f3 100644 --- a/@salix/crud/src/client/routes.js +++ b/@salix/crud/src/client/routes.js @@ -1,9 +1,8 @@ [{ - url: '/client/client-index', + url: '/client/index', state: 'client-index', template: '', module: 'crud', description: '', image: '', -} -] +}] diff --git a/@salix/gulpfile.js b/@salix/gulpfile.js index d3d530c2c0..706630d36f 100644 --- a/@salix/gulpfile.js +++ b/@salix/gulpfile.js @@ -78,6 +78,7 @@ gulp.task('webpack-dev-server', ['spliting'], function() { contentBase: buildDir, quiet: false, noInfo: false, + //hot: true, stats: { assets: true, colors: true, diff --git a/services/salix/client/index.ejs b/services/salix/client/index.ejs index 08d06de737..2194cf7df8 100644 --- a/services/salix/client/index.ejs +++ b/services/salix/client/index.ejs @@ -2,9 +2,8 @@ - Salix - + Salix +