Errores solucionados

This commit is contained in:
Juan Ferrer Toribio 2017-01-05 17:40:18 +01:00
parent 9e5f24c4e0
commit d2fc2e794c
12 changed files with 27 additions and 15 deletions

View File

@ -1,6 +1,6 @@
<vn-horizontal>
<vn-textfield vn-one label="Search"></vn-textfield>
<i class="material-icons">keyboard_arrow_down</i>
<vn-icon-button icon="search" margin-small-top></vn-icon-button>
<vn-icon icon="keyboard_arrow_down"></vn-icon>
<vn-icon-button icon="search"></vn-icon-button>
</vn-horizontal>

View File

@ -1 +1 @@
<div class="display-block demo-card-wide mdl-shadow--2dp bg-panel" *[foo]* ng-transclude></div>
<div class="demo-card-wide mdl-shadow--2dp bg-panel" *[foo]* ng-transclude></div>

View File

@ -15,8 +15,10 @@ export function directive(resolve, normalizer) {
return resolve.getTemplate(_NAME, attrs);
},
link: function(scope, element, attrs) {
scope.$watch (attrs.model, () => {
element[0].firstChild.MaterialCheckbox.updateClasses_();
scope.$watch(attrs.model, () => {
let mdlField = element[0].firstChild.MaterialCheckbox;
if (mdlField)
mdlField.updateClasses_();
});
}
};

View File

@ -17,7 +17,9 @@ export function directive(resolve, normalizer) {
},
link: function(scope, element, attrs) {
scope.$watch(attrs.model, () => {
element[0].firstChild.MaterialTextfield.updateClasses_();
let mdlField = element[0].firstChild.MaterialTextfield;
if (mdlField)
mdlField.updateClasses_();
});
}
};

View File

@ -16,7 +16,9 @@ export function directive(resolve, normalizer) {
},
link: function(scope, element, attrs) {
scope.$watch(attrs.model, () => {
element[0].firstChild.MaterialTextfield.updateClasses_();
let mdlField = element[0].firstChild.MaterialTextfield;
if (mdlField)
mdlField.updateClasses_();
});
}
};

View File

@ -1,3 +1,3 @@
<button type="*[typeName]*" class="mdl-button mdl-js-button mdl-button--raised *[className]*">
<i class="material-icons">*[icon]*</i>*[label]*
<button class="mdl-button mdl-js-button mdl-button--raised *[className]*" *[enabled]*>
<vn-icon icon="*[icon]*"></vn-icon>*[label]*
</button>

View File

@ -6,8 +6,7 @@ export function factory() {
return {
template: template,
default: {
enabled: 'true',
typeName: 'button',
enabled: 'enabled',
icon: '',
label: '',
}

View File

@ -1,6 +1,11 @@
.mdl-textfield {
width: 100%;
padding-bottom: 10px;
}
.mdl-textfield__label::after {
bottom: 10px;
}
.mdl-button--raised {
background-color: #ff9400;
font-weight: bolder;

View File

@ -16,7 +16,9 @@ export function directive(resolve, normalizer) {
},
link: function(scope, element, attrs) {
scope.$watch(attrs.model, () => {
element[0].firstChild.MaterialTextfield.updateClasses_();
let mdlField = element[0].firstChild.MaterialTextfield;
if (mdlField)
mdlField.updateClasses_();
});
}
}

View File

@ -8,7 +8,6 @@ export function factory() {
template: template,
default: {
label: 'Password',
name: 'password',
enabled: 'enabled',
className: 'mdl-textfield__input'
}

View File

@ -16,7 +16,9 @@ export function directive(resolve, normalizer) {
},
link: function(scope, element, attrs) {
scope.$watch(attrs.model, () => {
element[0].firstChild.MaterialTextfield.updateClasses_();
let mdlField = element[0].firstChild.MaterialTextfield;
if (mdlField)
mdlField.updateClasses_();
});
}
};

View File

@ -15,7 +15,6 @@ export function factory() {
template: template,
default: {
label: DEFAULT_LABEL,
name: 'textfield',
className: DEFAULT_CLASS,
type: DEFAULT_TYPE
}