This commit is contained in:
Vicente Falco 2017-02-21 13:21:49 +01:00
commit 034c3214fc
15 changed files with 169 additions and 60 deletions

View File

@ -5,7 +5,6 @@
<form name="form" ng-submit="$ctrl.submit()">
<vn-textfield label="User" field="$ctrl.model.email"></vn-textfield>
<vn-password label="Password" field="$ctrl.model.password"></vn-password>
<vn-check label="Do not close session" field="$ctrl.model.remember"></vn-check>
<div class="footer">
<vn-submit label="Enter"></vn-submit>
<div class="spinner-wrapper">

View File

@ -7,7 +7,6 @@ export * from './util';
export {default 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 GET_DATA_MODIFIED, factory as Modified} from './modified';

View File

@ -1,26 +0,0 @@
import {module} from '../module';
import * as util from './util';
export const NAME = util.getProviderName('RoutesLoader');
function $get($http) {
let script = document.currentScript || (() => {
let scripts = document.getElementsByTagName('script');
return scripts[scripts.length - 1];
})();
let routesCdn = script.getAttribute('routes-cdn');
return $http({
method: 'GET',
url: routesCdn
});
}
$get.$inject = ["$http"];
export class RoutesLoader { constructor() {} }
RoutesLoader.prototype.$get = $get;
var routes = new RoutesLoader();
module.provider(NAME, () => routes);

View File

@ -1,5 +1,6 @@
import {module} from '../module';
import Component from '../lib/component';
import './style.css';
/**
* A spinner to inform the user about loading process.

View File

@ -0,0 +1,3 @@
vn-spinner {
display: inline-block;
}

View File

@ -1,8 +1,11 @@
<vn-vertical full-height class="bg-content">
<vn-topbar vn-empty>
<img class="logo" src="./logo.svg" alt="Logo"></img>
<vn-spinner enable="$root.loading"></vn-spinner>
<vn-snackbar></vn-snackbar>
<vn-main-menu></vn-main-menu>
</vn-topbar>
<vn-vertical vn-auto ui-view scrollable class="main-view"></vn-vertical>
<vn-vertical vn-auto ui-view scrollable class="main-view">
<div class="default" translate>Push on applications menu</div>
</vn-vertical>
<vn-snackbar></vn-snackbar>
</vn-vertical>

View File

@ -1,5 +1,5 @@
require('./style.css');
import {module} from '../../module';
import './style.scss';
export const NAME = 'vnApp';
export const COMPONENT = {

View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="336.95386"
height="30"
viewBox="0 0 336.95386 29.999999"
enable-background="new 0 0 960 119.621"
xml:space="preserve"
sodipodi:docname="logo.svg"
inkscape:version="0.92.1 r15371"><metadata
id="metadata43"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs41" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1016"
id="namedview39"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:zoom="3.3298328"
inkscape:cx="168.47693"
inkscape:cy="15"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:current-layer="Layer_1" /><g
id="g36"
transform="matrix(0.36896285,0,0,0.36896285,-6.8501643,-7.1527138)"><g
id="g22"><path
d="M 45.55,97.917 18.566,19.388 h 21.328 l 11.035,40.357 0.901,3.306 c 1.351,4.833 2.377,8.887 3.086,12.155 0.391,-1.601 0.871,-3.484 1.436,-5.65 0.568,-2.167 1.365,-5.012 2.396,-8.532 L 70.321,19.388 h 21.214 l -27.2,78.529 z"
id="path2"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
d="m 595.5,97.917 h -19.315 c 0.043,-0.92 0.123,-1.879 0.242,-2.873 l 0.413,-3.086 c -3.414,2.66 -6.809,4.625 -10.173,5.902 -3.365,1.278 -6.845,1.916 -10.44,1.916 -5.589,0 -9.583,-1.537 -11.98,-4.605 -2.396,-3.075 -2.865,-7.225 -1.405,-12.445 1.344,-4.797 3.707,-8.697 7.092,-11.698 3.383,-2.999 7.821,-5.104 13.315,-6.313 3.029,-0.637 6.846,-1.33 11.438,-2.08 6.85,-1.065 10.568,-2.629 11.144,-4.689 l 0.394,-1.394 c 0.473,-1.688 0.199,-2.969 -0.822,-3.846 -1.017,-0.878 -2.772,-1.315 -5.265,-1.315 -2.705,0 -5.008,0.555 -6.904,1.666 -1.896,1.109 -3.337,2.739 -4.33,4.89 h -17.48 c 2.762,-6.555 6.839,-11.432 12.233,-14.638 5.396,-3.203 12.236,-4.806 20.521,-4.806 5.155,0 9.33,0.622 12.519,1.871 3.191,1.244 5.427,3.132 6.711,5.658 0.877,1.815 1.25,3.978 1.116,6.487 -0.132,2.511 -0.977,6.54 -2.531,12.093 l -6.151,21.973 c -0.735,2.623 -1.076,4.692 -1.025,6.201 0.049,1.51 0.481,2.491 1.298,2.955 z M 582.277,70.635 c -1.723,0.922 -4.527,1.778 -8.419,2.563 -1.882,0.353 -3.326,0.654 -4.319,0.905 -2.463,0.639 -4.305,1.457 -5.528,2.451 -1.226,0.992 -2.066,2.328 -2.534,4 -0.58,2.063 -0.404,3.724 0.523,4.988 0.935,1.261 2.448,1.894 4.556,1.894 3.246,0 6.149,-0.938 8.727,-2.806 2.571,-1.861 4.279,-4.311 5.125,-7.33 z"
id="path4"
inkscape:connector-curvature="0"
style="fill:#95d600" /><path
d="m 499.566,97.917 16.242,-57.998 h 18.256 l -2.842,10.15 c 3.144,-3.981 6.479,-6.888 10.017,-8.72 3.536,-1.828 7.645,-2.779 12.325,-2.85 l -5.259,18.779 c -0.789,-0.104 -1.577,-0.188 -2.363,-0.239 -0.786,-0.054 -1.532,-0.08 -2.243,-0.08 -2.916,0 -5.448,0.436 -7.597,1.305 -2.146,0.872 -4.043,2.214 -5.688,4.029 -1.052,1.207 -2.048,2.941 -2.979,5.199 -0.935,2.258 -2.106,5.907 -3.524,10.959 l -5.449,19.465 h -18.896 z"
id="path6"
inkscape:connector-curvature="0"
style="fill:#95d600" /><path
d="m 506.521,39.92 -16.236,57.998 h -18.583 l 2.241,-7.99 c -3.177,3.226 -6.415,5.603 -9.706,7.129 -3.286,1.521 -6.799,2.283 -10.535,2.283 -6.399,0 -10.756,-1.641 -13.072,-4.926 -2.318,-3.279 -2.571,-8.154 -0.764,-14.615 l 11.166,-39.878 h 19.007 l -9.088,32.455 c -1.333,4.771 -1.66,8.055 -0.968,9.854 0.683,1.794 2.5,2.693 5.449,2.693 3.305,0 6.019,-1.094 8.143,-3.279 2.118,-2.191 3.875,-5.757 5.256,-10.705 l 8.685,-31.017 h 19.005 z"
id="path8"
inkscape:connector-curvature="0"
style="fill:#95d600" /><path
d="m 406.931,51.388 3.211,-11.468 h 7.755 l 4.592,-16.383 h 19.001 l -4.586,16.383 h 9.724 l -3.212,11.468 h -9.723 l -7.035,25.128 c -1.073,3.844 -1.29,6.386 -0.641,7.63 0.648,1.244 2.346,1.868 5.087,1.868 l 1.424,-0.028 1.011,-0.08 -3.394,12.117 c -2.101,0.382 -4.134,0.684 -6.098,0.893 -1.964,0.207 -3.836,0.314 -5.612,0.314 -6.585,0 -10.644,-1.607 -12.163,-4.825 -1.519,-3.218 -0.81,-10.067 2.124,-20.554 l 6.29,-22.463 z"
id="path10"
inkscape:connector-curvature="0"
style="fill:#95d600" /><path
d="m 393.925,97.917 h -19.316 c 0.043,-0.92 0.123,-1.879 0.245,-2.873 l 0.41,-3.086 c -3.414,2.66 -6.809,4.625 -10.174,5.902 -3.364,1.278 -6.847,1.916 -10.438,1.916 -5.595,0 -9.589,-1.537 -11.983,-4.605 -2.395,-3.075 -2.866,-7.225 -1.4,-12.445 1.341,-4.797 3.707,-8.697 7.086,-11.698 3.388,-2.999 7.824,-5.104 13.321,-6.313 3.026,-0.637 6.836,-1.33 11.432,-2.08 6.85,-1.065 10.567,-2.629 11.146,-4.689 l 0.394,-1.394 c 0.47,-1.688 0.199,-2.969 -0.823,-3.846 -1.017,-0.878 -2.773,-1.315 -5.267,-1.315 -2.708,0 -5.006,0.555 -6.904,1.666 -1.895,1.109 -3.34,2.739 -4.333,4.89 h -17.477 c 2.763,-6.555 6.84,-11.432 12.234,-14.638 5.396,-3.203 12.234,-4.806 20.522,-4.806 5.155,0 9.326,0.622 12.516,1.871 3.188,1.244 5.429,3.132 6.71,5.658 0.88,1.815 1.255,3.978 1.119,6.487 -0.136,2.511 -0.974,6.54 -2.534,12.093 l -6.15,21.973 c -0.736,2.623 -1.081,4.692 -1.026,6.201 0.051,1.51 0.487,2.491 1.304,2.955 z M 380.703,70.635 c -1.725,0.922 -4.532,1.778 -8.422,2.563 -1.882,0.353 -3.319,0.654 -4.319,0.905 -2.462,0.639 -4.305,1.457 -5.525,2.451 -1.226,0.992 -2.07,2.328 -2.537,4 -0.581,2.063 -0.401,3.724 0.53,4.988 0.928,1.261 2.447,1.894 4.549,1.894 3.246,0 6.156,-0.938 8.727,-2.806 2.574,-1.861 4.282,-4.311 5.13,-7.33 z"
id="path12"
inkscape:connector-curvature="0"
style="fill:#95d600" /><path
d="m 268.557,19.386 -21.994,78.531 h -19.001 l 2.138,-7.621 c -3.022,3.158 -6.141,5.49 -9.353,6.998 -3.218,1.51 -6.69,2.267 -10.43,2.267 -7.254,0 -12.355,-2.801 -15.312,-8.401 -2.947,-5.604 -3.152,-12.935 -0.615,-22 2.56,-9.14 6.91,-16.586 13.061,-22.349 6.149,-5.757 12.764,-8.64 19.841,-8.64 3.804,0 6.98,0.768 9.523,2.299 2.539,1.533 4.354,3.795 5.436,6.787 l 7.807,-27.871 z m -58.639,48.942 c -1.455,5.188 -1.6,9.159 -0.433,11.916 1.167,2.752 3.563,4.133 7.186,4.133 3.623,0 6.75,-1.359 9.378,-4.078 2.628,-2.721 4.676,-6.711 6.146,-11.971 1.364,-4.867 1.443,-8.635 0.229,-11.3 -1.206,-2.668 -3.604,-4.001 -7.19,-4.001 -3.377,0 -6.443,1.368 -9.199,4.107 -2.755,2.736 -4.793,6.468 -6.117,11.194"
id="path14"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
d="m 138.98,97.917 16.24,-57.998 h 18.255 l -2.842,10.15 c 3.146,-3.981 6.486,-6.888 10.017,-8.72 3.539,-1.828 15.585,-2.779 20.266,-2.85 l -5.261,18.779 c -0.786,-0.104 -1.572,-0.188 -2.36,-0.239 -0.782,-0.054 -1.531,-0.08 -2.247,-0.08 -2.916,0 -13.381,0.436 -15.53,1.305 -2.149,0.872 -4.04,2.214 -5.688,4.029 -1.051,1.207 -2.044,2.941 -2.975,5.199 -0.935,2.258 -2.11,5.907 -3.525,10.959 l -5.452,19.465 H 138.98 Z"
id="path16"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
d="m 119.113,79.677 h 18.238 c -3.485,6.363 -8.214,11.283 -14.188,14.765 -5.968,3.488 -12.649,5.228 -20.046,5.228 -8.994,0 -15.34,-2.732 -19.042,-8.188 C 80.38,86.024 79.85,78.58 82.487,69.157 c 2.69,-9.6 7.448,-17.199 14.278,-22.801 6.83,-5.597 14.708,-8.4 23.634,-8.4 9.208,0 15.646,2.847 19.309,8.543 3.67,5.692 4.101,13.555 1.287,23.59 l -0.612,2.109 -0.436,1.256 h -39.219 c -1.14,4.077 -1.13,7.191 0.031,9.342 1.155,2.145 3.447,3.221 6.86,3.221 2.528,0 4.758,-0.535 6.691,-1.598 1.939,-1.066 3.539,-2.647 4.803,-4.742 m -15.918,-16.929 21.629,-0.052 c 0.971,-3.717 0.797,-6.626 -0.521,-8.716 -1.318,-2.09 -3.628,-3.137 -6.938,-3.137 -3.132,0 -5.919,1.027 -8.365,3.083 -2.442,2.054 -4.373,4.995 -5.805,8.822"
id="path18"
inkscape:connector-curvature="0"
style="fill:#ffffff" /><path
d="m 310.952,98.755 -16.59,-48.276 -16.718,48.276 h -18.791 l 24.774,-78.532 h 21.218 l 11.481,40.356 0.906,3.308 c 1.347,4.832 2.377,8.886 3.086,12.157 l 1.438,-5.654 c 0.567,-2.168 1.364,-5.012 2.396,-8.531 l 11.574,-41.636 h 21.216 L 329.74,98.755 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#95d600" /></g><g
enable-background="new "
id="g34"><path
d="m 687.35,32.291 c -2.915,-3.214 -6.131,-5.476 -9.644,-6.785 -3.516,-1.307 -7.626,-1.962 -12.336,-1.962 -8.449,0 -14.578,1.608 -18.391,4.822 -3.813,3.215 -5.72,7.513 -5.72,12.896 0,2.691 0.466,4.954 1.401,6.785 0.935,1.832 2.373,3.383 4.318,4.653 1.943,1.272 4.447,2.338 7.514,3.196 3.064,0.86 6.728,1.738 10.989,2.635 4.335,0.897 8.26,1.87 11.774,2.916 3.514,1.048 6.504,2.374 8.971,3.981 2.468,1.608 4.374,3.607 5.72,5.999 1.346,2.394 2.019,5.346 2.019,8.859 0,3.364 -0.655,6.318 -1.963,8.858 -1.309,2.543 -3.195,4.674 -5.662,6.393 -2.467,1.721 -5.439,3.01 -8.916,3.869 -3.477,0.858 -7.345,1.289 -11.605,1.289 -6.355,0 -12.075,-0.99 -17.158,-2.972 -5.085,-1.979 -9.795,-5.027 -14.129,-9.14 l 2.354,-2.803 c 3.738,3.813 8,6.691 12.785,8.635 4.783,1.944 10.205,2.915 16.26,2.915 7.475,0 13.362,-1.363 17.662,-4.093 4.299,-2.729 6.448,-6.896 6.448,-12.504 0,-2.84 -0.524,-5.251 -1.569,-7.233 -1.049,-1.979 -2.636,-3.662 -4.767,-5.046 -2.131,-1.383 -4.822,-2.579 -8.074,-3.589 -3.252,-1.009 -7.084,-1.962 -11.494,-2.859 -4.337,-0.896 -8.169,-1.831 -11.495,-2.804 -3.326,-0.971 -6.131,-2.204 -8.41,-3.7 -2.281,-1.495 -4,-3.326 -5.158,-5.495 -1.16,-2.167 -1.738,-4.896 -1.738,-8.187 0,-3.513 0.673,-6.634 2.019,-9.363 1.346,-2.729 3.233,-5.008 5.663,-6.841 2.429,-1.831 5.363,-3.232 8.803,-4.205 3.438,-0.971 7.251,-1.458 11.438,-1.458 5.159,0 9.681,0.748 13.569,2.243 3.887,1.496 7.438,3.888 10.653,7.177 z"
id="path24"
inkscape:connector-curvature="0"
style="fill:#ff9300" /><path
d="m 732.767,20.515 h 3.365 l 34.202,79.62 h -4.149 L 754.411,72.66 h -39.922 l -11.774,27.475 h -4.262 z M 753.177,69.296 734.45,25.45 715.61,69.297 h 37.567 z"
id="path26"
inkscape:connector-curvature="0"
style="fill:#ff9300" /><path
d="m 783.117,100.135 v -79.62 h 3.926 v 76.031 h 48.781 v 3.589 z"
id="path28"
inkscape:connector-curvature="0"
style="fill:#ff9300" /><path
d="m 848.158,100.135 v -79.62 h 3.924 v 79.62 z"
id="path30"
inkscape:connector-curvature="0"
style="fill:#ff9300" /><path
d="m 868.566,20.515 29.381,37.455 29.381,-37.455 h 4.484 l -31.735,40.371 30.839,39.249 h -4.486 l -28.482,-36.333 -28.484,36.333 h -4.71 L 895.593,60.886 863.857,20.515 Z"
id="path32"
inkscape:connector-curvature="0"
style="fill:#ff9300" /></g></g></svg>

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,18 +0,0 @@
body {
height: 100%;
}
vn-app {
display: block;
height: 100%;
}
vn-app vn-spinner {
display: block;
padding: 1em;
}
.main-view > * {
height: 100%;
overflow: auto;
}

View File

@ -0,0 +1,33 @@
body {
height: 100%;
}
vn-app {
display: block;
height: 100%;
vn-topbar {
overflow: hidden;
.logo {
float: left;
height: 30px;
padding: 1em;
}
vn-spinner {
float: left;
padding: .9em;
}
}
.main-view {
& > * {
height: 100%;
overflow: auto;
}
& > .default {
text-align: center;
font-size: 1.3em;
padding: 2em;
}
}
}

View File

@ -1,8 +1,8 @@
require('./style.css');
import template from './left-menu.html';
import {module} from '../../module';
import template from './left-menu.html';
import './style.css';
export const NAME = "vnLeftMenu";
export const NAME = 'vnLeftMenu';
export const COMPONENT = {
template: template,
controllerAs: "menu",

View File

@ -1,10 +1,9 @@
import template from './menu-item.html';
import {module} from '../../module';
export const NAME = 'vnMenuItem';
export const COMPONENT = {
template: template,
controllerAs: "menu",
template: require('./menu-item.html'),
controllerAs: 'menu',
bindings: {
item: '<'
}

View File

@ -4,5 +4,6 @@
"Logout": "Logout",
"Change language": "Change language",
"Profile": "Profile",
"Data saved!": "Data saved!"
"Data saved!": "Data saved!",
"Push on applications menu": "To open a module push on applications menu"
}

View File

@ -4,5 +4,6 @@
"Logout": "Cerrar sesión",
"Change language": "Cambiar idioma",
"Profile": "Perfil",
"Data saved!": "¡Datos guardados!"
"Data saved!": "¡Datos guardados!",
"Push on applications menu": "Para abrir un módulo pulsa en el menú de aplicaciones"
}