Merge branch 'master' of ssh://git.verdnatura.es:/var/lib/git/salix

This commit is contained in:
nelo 2017-01-04 14:22:35 +01:00
commit 5d26fe5b39
18 changed files with 58 additions and 54 deletions

View File

@ -2,6 +2,6 @@ vn-app {
height: 100%;
}
vn-app .main-view > * {
.main-view > * {
height: 100%;
}

View File

@ -8,7 +8,7 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME];
export function directive(resolve) {
return {
require: 'E',
restrict: 'E',
template: function(_, attr) {
return resolve.getTemplate(_NAME, attr);
}

View File

@ -9,10 +9,15 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME];
export function directive(resolve, normalizer) {
return {
require: 'E',
restrict: 'E',
template: function(_, attrs) {
normalizer.normalize(attrs);
return resolve.getTemplate(_NAME, attrs);
},
link: function(scope, element, attrs) {
scope.$watch (attrs.model, () => {
element[0].firstChild.MaterialCheckbox.updateClasses_();
});
}
};
}

View File

@ -9,11 +9,16 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME];
export function directive(resolve, normalizer) {
return {
require: 'E',
restrict: 'E',
transclude: true,
template: function(_, attrs) {
normalizer.normalize(attrs);
return resolve.getTemplate(_NAME, attrs);
},
link: function(scope, element, attrs) {
scope.$watch(attrs.model, () => {
element[0].firstChild.MaterialTextfield.updateClasses_();
});
}
};
}

View File

@ -9,10 +9,15 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME];
export function directive(resolve, normalizer) {
return {
require: 'E',
restrict: 'E',
template: function(_, attrs) {
normalizer.normalize(attrs);
return resolve.getTemplate(_NAME, attrs);
},
link: function(scope, element, attrs) {
scope.$watch(attrs.model, () => {
element[0].firstChild.MaterialTextfield.updateClasses_();
});
}
};
}

View File

@ -8,7 +8,7 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME];
export function directive(resolve) {
return {
require: 'E',
restrict: 'E',
template: function(_, attr) {
return resolve.getTemplate(_NAME, attr);
}

View File

@ -8,7 +8,7 @@ export const NAME = util.getName(_NAME);
directive.$inject =[resolveFactory.NAME];
export function directive (resolve){
return{
require:'E',
restrict:'E',
template: function(_,attr){
return resolve.getTemplate(_NAME, attr);
}

View File

@ -19,8 +19,3 @@
.mdl-button--raised:hover {
background-color: #ffa410;
}
.mdl-textfield__label{
top: 0px;
font-size: 12px;
}

View File

@ -9,12 +9,16 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME];
export function directive(resolve, normalizer) {
return {
require:'E',
restrict: 'E',
template: function(_, attrs) {
normalizer.normalize(attrs);
return resolve.getTemplate(_NAME, attrs);
},
link: function(scope, element, attrs) {
scope.$watch(attrs.model, () => {
element[0].firstChild.MaterialTextfield.updateClasses_();
});
}
}
}
_module.directive(NAME,directive);

View File

@ -8,9 +8,9 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME];
export function directive(resolve) {
return{
require:'E',
template: function(_,attr){
return resolve.getTemplate(_NAME, attr);
restrict: 'E',
template: function(_, attrs) {
return resolve.getTemplate(_NAME, attrs);
}
}
}

View File

@ -8,9 +8,9 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME];
export function directive(resolve) {
return{
require:'E',
template: function(_,attr){
return resolve.getTemplate(_NAME, attr);
restrict: 'E',
template: function(_, attrs) {
return resolve.getTemplate(_NAME, attrs);
}
}
}

View File

@ -8,7 +8,7 @@ export const NAME = util.getName(_NAME);
directive.$inject =[resolveFactory.NAME];
export function directive (resolve){
return{
require:'E',
restrict:'E',
template: function(_,attr){
return resolve.getTemplate(_NAME, attr);
}

View File

@ -9,10 +9,15 @@ export const NAME = util.getName(_NAME);
directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME];
export function directive(resolve, normalizer) {
return {
require: 'E',
restrict: 'E',
template: function(_, attrs) {
normalizer.normalize(attrs);
return resolve.getTemplate(_NAME, attrs);
},
link: function(scope, element, attrs) {
scope.$watch(attrs.model, () => {
element[0].firstChild.MaterialTextfield.updateClasses_();
});
}
};
}

View File

@ -10,10 +10,7 @@ export const COMPONENT = {
},
controller: function($http) {
$http.get('/client/api/SalesPeople').then(
json => {
this.sales = json.data;
console.log(this.sales);
},
json => this.sales = json.data,
json => console.error(json.data.error.message)
);
this.submit = function() {

View File

@ -9,13 +9,6 @@ export const COMPONENT = {
client: '<'
},
controller: function($http) {
$http.get('/client/api/SalesPeople').then(
json => {
this.sales = json.data;
console.log(this.sales);
},
json => console.error(json.data.error.message)
);
this.submit = function() {
$http.put('/client/api/Clients', this.client).then(
json => console.log(json.statusText),

View File

@ -21,12 +21,10 @@ export const COMPONENT =
else
showMessage('Please insert your email and password');
};
function onLoginOk (response) {
setLoading(false);
window.location = response.data.location +'?access_token='+ response.data.accessToken;
}
function onLoginErr(response) {
setLoading(false);
self.model.password = '';
@ -46,11 +44,9 @@ export const COMPONENT =
showMessage(message);
}
function $(id) {
return document.getElementById(id);
}
function setLoading(isLoading) {
// FIXME: Al minimificar MaterialSpinner es undefined
/* var spinner = $('spinner').firstChild.MaterialSpinner;
@ -60,7 +56,6 @@ export const COMPONENT =
else
spinner.stop();
*/ }
function showMessage(message) {
// FIXME: Al minimificar no muestra la barra
var snackbar = $('snackbar').firstChild.MaterialSnackbar;