Fix 'Login' code style issues (tslint)

This commit is contained in:
Denys Vuika
2016-06-16 13:24:01 +01:00
parent 770057557b
commit 326e25d99e
3 changed files with 6 additions and 10 deletions

View File

@@ -44,7 +44,7 @@ module.exports = function (config) {
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_DEBUG,
logLevel: config.LOG_INFO,
colors: true,

View File

@@ -2,7 +2,7 @@
<div class="login-card-wide mdl-card mdl-shadow--4dp">
<form [ngFormModel]="form" (submit)="onSubmit(form.value, $event)">
<div class="mdl-card__title alfresco-logo">
<img class="center" [src]="__baseUrl + '/../assets/images/logo_for_light_bg_28.png'">
<img class="center" [src]="baseComponentPath + '/../assets/images/logo_for_light_bg_28.png'">
</div>
<div class="mdl-card__supporting-text">
<div class="error">

View File

@@ -37,7 +37,7 @@ declare let __moduleName: string;
})
export class AlfrescoLoginComponent {
__baseUrl = __moduleName.replace('/alfresco-login.component.js', '');
baseComponentPath = __moduleName.replace('/alfresco-login.component.js', '');
isPasswordShow: boolean = false;
@@ -148,9 +148,9 @@ export class AlfrescoLoginComponent {
toggleShowPassword() {
this.isPasswordShow = !this.isPasswordShow;
if (this.isPasswordShow) {
(<HTMLInputElement>document.getElementById("password")).type = 'text'
(<HTMLInputElement>document.getElementById('password')).type = 'text';
} else {
(<HTMLInputElement>document.getElementById("password")).type = 'password';
(<HTMLInputElement>document.getElementById('password')).type = 'password';
}
}
@@ -163,10 +163,6 @@ export class AlfrescoLoginComponent {
if (typeof componentHandler !== 'undefined') {
componentHandler.upgradeAllRegistered();
}
if (field.valid) {
return false;
} else {
return true;
}
return !field.valid;
}
}