Rutas
This commit is contained in:
parent
6fa4ade789
commit
b82e8941f4
|
@ -1,4 +1,4 @@
|
|||
<div style="position: fixed; top: 0; right: 0; padding: 1em 1.5em; color: white; z-index: 10;">
|
||||
<div style="position: fixed; top: 0; right: 0; padding: .8em 1.5em; color: white; z-index: 10;">
|
||||
<i class="material-icons" title="Logout" ng-click="$ctrl.onLogoutClick()">exit_to_app</i>
|
||||
<i class="material-icons" id="apps" style="cursor: pointer;">apps</i>
|
||||
<i class="material-icons" title="Notifications">notifications</i>
|
||||
|
|
|
@ -6,20 +6,12 @@
|
|||
padding: $pad-large;
|
||||
max-width: 1000px;
|
||||
}
|
||||
|
||||
html [vn-auto], vn-auto, .vn-auto,
|
||||
html [vn-none], vn-none, .vn-none,
|
||||
html [vn-one], vn-one, .vn-one,
|
||||
html [vn-two], vn-two, .vn-two,
|
||||
html [vn-three], vn-three, .vn-three,
|
||||
html [vn-four], vn-four, .vn-four,
|
||||
html [vn-five], vn-five, .vn-five,
|
||||
html [vn-six], vn-six, .vn-six,
|
||||
html [vn-seven], vn-seven, .vn-seven,
|
||||
html [vn-eight], vn-eight, .vn-eight,
|
||||
html [vn-nine], vn-nine, .vn-nine,
|
||||
html [vn-ten], vn-ten, .vn-ten,
|
||||
html [vn-eleven], vn-eleven, .vn-eleven,
|
||||
html [vn-twelve], vn-twelve, .vn-twelve,{
|
||||
padding-right: .4em;
|
||||
form vn-horizontal > * {
|
||||
padding: 0 .4em;
|
||||
}
|
||||
form vn-horizontal > *:first-child {
|
||||
padding-left: 0;
|
||||
}
|
||||
form vn-horizontal > *:last-child {
|
||||
padding-right: 0;
|
||||
}
|
|
@ -1,51 +1,45 @@
|
|||
import {module as _module} from './module';
|
||||
import {module} from './module';
|
||||
import {ng} from 'vendor';
|
||||
import * as util from './util';
|
||||
import {ng} from 'vendor'
|
||||
|
||||
export const NAME = util.getProviderName('interpolate');
|
||||
|
||||
function minErr() {}
|
||||
|
||||
function minErr(){
|
||||
|
||||
}
|
||||
|
||||
function stringify(value) {
|
||||
if (value == null) { // null || undefined
|
||||
function stringify(value) {
|
||||
if (value == null) { // null || undefined
|
||||
return '';
|
||||
}
|
||||
switch (typeof value) {
|
||||
case 'string':
|
||||
break;
|
||||
case 'number':
|
||||
value = '' + value;
|
||||
break;
|
||||
default:
|
||||
value = angular.toJson(value);
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
switch (typeof value) {
|
||||
case 'string':
|
||||
break;
|
||||
case 'number':
|
||||
value = '' + value;
|
||||
break;
|
||||
default:
|
||||
value = angular.toJson(value);
|
||||
}
|
||||
|
||||
var $interpolateMinErr =ng.angular.$interpolateMinErr = ng.$$minErr('$interpolate');
|
||||
return value;
|
||||
}
|
||||
|
||||
var $interpolateMinErr = ng.angular.$interpolateMinErr = ng.$$minErr('$interpolate');
|
||||
|
||||
$interpolateMinErr.throwNoconcat = function (text) {
|
||||
throw $interpolateMinErr('noconcat',
|
||||
'Error while interpolating: {0}\nStrict Contextual Escaping disallows ' +
|
||||
'interpolations that concatenate multiple expressions when a trusted value is ' +
|
||||
'required. See http://docs.angularjs.org/api/ng.$sce', text);
|
||||
};
|
||||
|
||||
$interpolateMinErr.interr = function (text, err) {
|
||||
return $interpolateMinErr('interr', 'Can\'t interpolate: {0}\n{1}', text, err.toString());
|
||||
};
|
||||
|
||||
$interpolateMinErr.throwNoconcat = function (text) {
|
||||
throw $interpolateMinErr('noconcat',
|
||||
'Error while interpolating: {0}\nStrict Contextual Escaping disallows ' +
|
||||
'interpolations that concatenate multiple expressions when a trusted value is ' +
|
||||
'required. See http://docs.angularjs.org/api/ng.$sce', text);
|
||||
};
|
||||
|
||||
$interpolateMinErr.interr = function (text, err) {
|
||||
return $interpolateMinErr('interr', 'Can\'t interpolate: {0}\n{1}', text, err.toString());
|
||||
};
|
||||
|
||||
export class Interpolate
|
||||
{
|
||||
constructor (){
|
||||
constructor () {
|
||||
this._startSymbol='*[';
|
||||
|
||||
this._endSymbol = ']*';
|
||||
}
|
||||
|
||||
|
@ -94,114 +88,113 @@ export class Interpolate
|
|||
|
||||
function $interpolate(text, mustHaveExpression, trustedContext, allOrNothing)
|
||||
{
|
||||
// Provide a quick exit and simplified result function for text with no interpolation
|
||||
if (!text.length || text.indexOf(self._startSymbol) === -1)
|
||||
{
|
||||
var constantInterp;
|
||||
if (!mustHaveExpression) {
|
||||
var unescapedText = unescapeText(text);
|
||||
constantInterp = valueFn(unescapedText);
|
||||
constantInterp.exp = text;
|
||||
constantInterp.expressions = [];
|
||||
constantInterp.$$watchDelegate = constantWatchDelegate;
|
||||
}
|
||||
return constantInterp;
|
||||
// Provide a quick exit and simplified result function for text with no interpolation
|
||||
if (!text.length || text.indexOf(self._startSymbol) === -1)
|
||||
{
|
||||
var constantInterp;
|
||||
if (!mustHaveExpression) {
|
||||
var unescapedText = unescapeText(text);
|
||||
constantInterp = valueFn(unescapedText);
|
||||
constantInterp.exp = text;
|
||||
constantInterp.expressions = [];
|
||||
constantInterp.$$watchDelegate = constantWatchDelegate;
|
||||
}
|
||||
return constantInterp;
|
||||
}
|
||||
|
||||
allOrNothing = !!allOrNothing;
|
||||
var startIndex,
|
||||
endIndex,
|
||||
index = 0,
|
||||
expressions = [],
|
||||
parseFns = [],
|
||||
textLength = text.length,
|
||||
exp,
|
||||
concat = [],
|
||||
expressionPositions = [];
|
||||
allOrNothing = !!allOrNothing;
|
||||
var startIndex,
|
||||
endIndex,
|
||||
index = 0,
|
||||
expressions = [],
|
||||
parseFns = [],
|
||||
textLength = text.length,
|
||||
exp,
|
||||
concat = [],
|
||||
expressionPositions = [];
|
||||
|
||||
while (index < textLength) {
|
||||
if (((startIndex = text.indexOf(self._startSymbol, index)) !== -1) &&
|
||||
((endIndex = text.indexOf(self._endSymbol, startIndex + startSymbolLength)) !== -1)) {
|
||||
if (index !== startIndex) {
|
||||
concat.push(unescapeText(text.substring(index, startIndex)));
|
||||
}
|
||||
exp = text.substring(startIndex + startSymbolLength, endIndex);
|
||||
expressions.push(exp);
|
||||
parseFns.push($parse(exp, parseStringifyInterceptor));
|
||||
index = endIndex + endSymbolLength;
|
||||
expressionPositions.push(concat.length);
|
||||
concat.push('');
|
||||
} else {
|
||||
// we did not find an interpolation, so we have to add the remainder to the separators array
|
||||
if (index !== textLength) {
|
||||
concat.push(unescapeText(text.substring(index)));
|
||||
}
|
||||
break;
|
||||
while (index < textLength) {
|
||||
if (((startIndex = text.indexOf(self._startSymbol, index)) !== -1) &&
|
||||
((endIndex = text.indexOf(self._endSymbol, startIndex + startSymbolLength)) !== -1)) {
|
||||
if (index !== startIndex) {
|
||||
concat.push(unescapeText(text.substring(index, startIndex)));
|
||||
}
|
||||
}
|
||||
|
||||
if (trustedContext && concat.length > 1) {
|
||||
$interpolateMinErr.throwNoconcat(text);
|
||||
}
|
||||
|
||||
if (!mustHaveExpression || expressions.length) {
|
||||
var compute = function (values) {
|
||||
for (var i = 0, ii = expressions.length; i < ii; i++) {
|
||||
if (allOrNothing && isUndefined(values[i])) return;
|
||||
concat[expressionPositions[i]] = values[i];
|
||||
}
|
||||
return concat.join('');
|
||||
};
|
||||
|
||||
var getValue = function (value) {
|
||||
return trustedContext ?
|
||||
$sce.getTrusted(trustedContext, value) :
|
||||
$sce.valueOf(value);
|
||||
};
|
||||
|
||||
return angular.extend(function interpolationFn(context) {
|
||||
var i = 0;
|
||||
var ii = expressions.length;
|
||||
var values = new Array(ii);
|
||||
|
||||
try {
|
||||
for (; i < ii; i++) {
|
||||
values[i] = parseFns[i](context);
|
||||
}
|
||||
|
||||
return compute(values);
|
||||
} catch (err) {
|
||||
$exceptionHandler($interpolateMinErr.interr(text, err));
|
||||
}
|
||||
|
||||
}, {
|
||||
// all of these properties are undocumented for now
|
||||
exp: text, //just for compatibility with regular watchers created via $watch
|
||||
expressions: expressions,
|
||||
});
|
||||
}
|
||||
|
||||
function parseStringifyInterceptor(value) {
|
||||
try {
|
||||
value = getValue(value);
|
||||
return allOrNothing && !isDefined(value) ? value : stringify(value);
|
||||
} catch (err) {
|
||||
$exceptionHandler($interpolateMinErr.interr(text, err));
|
||||
exp = text.substring(startIndex + startSymbolLength, endIndex);
|
||||
expressions.push(exp);
|
||||
parseFns.push($parse(exp, parseStringifyInterceptor));
|
||||
index = endIndex + endSymbolLength;
|
||||
expressionPositions.push(concat.length);
|
||||
concat.push('');
|
||||
} else {
|
||||
// we did not find an interpolation, so we have to add the remainder to the separators array
|
||||
if (index !== textLength) {
|
||||
concat.push(unescapeText(text.substring(index)));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$interpolate.startSymbol = function () {
|
||||
return startSymbol;
|
||||
};
|
||||
if (trustedContext && concat.length > 1) {
|
||||
$interpolateMinErr.throwNoconcat(text);
|
||||
}
|
||||
|
||||
$interpolate.endSymbol = function () {
|
||||
return endSymbol;
|
||||
};
|
||||
|
||||
return $interpolate;
|
||||
if (!mustHaveExpression || expressions.length) {
|
||||
var compute = function (values) {
|
||||
for (var i = 0, ii = expressions.length; i < ii; i++) {
|
||||
if (allOrNothing && isUndefined(values[i])) return;
|
||||
concat[expressionPositions[i]] = values[i];
|
||||
}
|
||||
return concat.join('');
|
||||
};
|
||||
|
||||
var getValue = function (value) {
|
||||
return trustedContext ?
|
||||
$sce.getTrusted(trustedContext, value) :
|
||||
$sce.valueOf(value);
|
||||
};
|
||||
|
||||
return angular.extend(function interpolationFn(context) {
|
||||
var i = 0;
|
||||
var ii = expressions.length;
|
||||
var values = new Array(ii);
|
||||
|
||||
try {
|
||||
for (; i < ii; i++) {
|
||||
values[i] = parseFns[i](context);
|
||||
}
|
||||
|
||||
return compute(values);
|
||||
} catch (err) {
|
||||
$exceptionHandler($interpolateMinErr.interr(text, err));
|
||||
}
|
||||
|
||||
}, {
|
||||
// all of these properties are undocumented for now
|
||||
exp: text, //just for compatibility with regular watchers created via $watch
|
||||
expressions: expressions,
|
||||
});
|
||||
}
|
||||
|
||||
function parseStringifyInterceptor(value) {
|
||||
try {
|
||||
value = getValue(value);
|
||||
return allOrNothing && !isDefined(value) ? value : stringify(value);
|
||||
} catch (err) {
|
||||
$exceptionHandler($interpolateMinErr.interr(text, err));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$interpolate.startSymbol = function () {
|
||||
return startSymbol;
|
||||
};
|
||||
|
||||
$interpolate.endSymbol = function () {
|
||||
return endSymbol;
|
||||
};
|
||||
|
||||
return $interpolate;
|
||||
}
|
||||
}
|
||||
|
||||
_module.provider(NAME, () => new Interpolate());
|
||||
module.provider(NAME, () => new Interpolate());
|
||||
|
|
|
@ -6,24 +6,23 @@ import Interpolate from './interpolate';
|
|||
export const NAME = util.getProviderName('ResolveDefaultComponent');
|
||||
|
||||
export class ResolveDefaultComponent {
|
||||
constructor(){
|
||||
constructor() {
|
||||
this._frameworkName='Mdl';
|
||||
}
|
||||
set frameworkName(value){
|
||||
//mt or bt
|
||||
set frameworkName(value) {
|
||||
this._frameworkName = value;
|
||||
}
|
||||
$get($injector,vnInterpolate){
|
||||
//Service Locator
|
||||
$get($injector,vnInterpolate) {
|
||||
return {
|
||||
getTemplate:function(name ,attr){
|
||||
this._frameworkName='Mdl';
|
||||
getTemplate:function(name ,attr) {
|
||||
this._frameworkName = 'Mdl';
|
||||
let _name = util.getFactoryName( name + this._frameworkName);
|
||||
let defaultfactory = $injector.has(_name) ? $injector.get(_name):undefined; // vnbutonmtFactory
|
||||
if(!defaultfactory)
|
||||
{
|
||||
let defaultfactory = $injector.has(_name) ? $injector.get(_name) : undefined;
|
||||
|
||||
if(!defaultfactory) {
|
||||
throw new Error("factory is not defined");
|
||||
}
|
||||
|
||||
let defaultValues = defaultfactory.default;
|
||||
let template = defaultfactory.template;
|
||||
let scope = Object.assign(defaultValues || {},attr||{});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
|
||||
<input class="*[className]*" type="*[type]*" name="*[name]*" ng-model="*[model]*.*[name]*" *[enabled]*>
|
||||
<input class="*[className]*" type="*[type]*" name="*[name]*" ng-model="*[model]*.*[name]*" *[enabled]* *[focus]*>
|
||||
<label class="mdl-textfield__label">*[label]*</label>
|
||||
</div>
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
<form ng-submit="$ctrl.submit()" pad-large>
|
||||
<vn-title>Datos básicos</vn-title>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Alias" name="alias" model="$ctrl.model"></vn-textfield>
|
||||
<vn-textfield vn-one label="Alias" name="alias" model="$ctrl.model"></vn-textfield>
|
||||
<vn-textfield vn-one label="NIF/CIF" name="fi" model="$ctrl.model"></vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Razón social" name="socialName" model="$ctrl.model"></vn-textfield>
|
||||
<vn-textfield autofocus vn-one label="Razón social" name="socialName" model="$ctrl.model"></vn-textfield>
|
||||
<vn-date-picker vn-one label="Fecha alta" name="dischargeDate" model="$ctrl.model"></vn-date-picker>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<vn-vertical class="full-height">
|
||||
<vn-topbar></vn-topbar>
|
||||
<vn-horizontal class="full-height">
|
||||
<vn-empty class="bg-content" style="width: 18em">
|
||||
<vn-descriptor descriptor = "$ctrl.descriptor"></vn-descriptor>
|
||||
|
|
Loading…
Reference in New Issue