added TSLint for TypeScript code style checking, fixed associated errors
This commit is contained in:
parent
6a7722cadb
commit
41e7e559a6
43 changed files with 253 additions and 730 deletions
|
@ -1,6 +1,7 @@
|
|||
import { Input, Output, Component, Inject } from 'ng-metadata/core';
|
||||
import { Input, Component, Inject } from 'ng-metadata/core';
|
||||
import * as moment from "moment";
|
||||
|
||||
|
||||
/**
|
||||
* A component that allows for selecting a time duration.
|
||||
*/
|
||||
|
@ -9,6 +10,7 @@ import * as moment from "moment";
|
|||
templateUrl: '/static/js/directives/ui/duration-input/duration-input.component.html'
|
||||
})
|
||||
export class DurationInputComponent implements ng.IComponentController {
|
||||
|
||||
@Input('<') public min: string;
|
||||
@Input('<') public max: string;
|
||||
@Input('=?') public value: string;
|
||||
|
@ -17,7 +19,7 @@ export class DurationInputComponent implements ng.IComponentController {
|
|||
private min_s: number;
|
||||
private max_s: number;
|
||||
|
||||
constructor (@Inject('$scope') private $scope: ng.IScope) {
|
||||
constructor(@Inject('$scope') private $scope: ng.IScope) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -33,7 +35,7 @@ export class DurationInputComponent implements ng.IComponentController {
|
|||
}
|
||||
|
||||
private updateValue(): void {
|
||||
this.value = this.seconds + 's';
|
||||
this.value = `${this.seconds}s`;
|
||||
}
|
||||
|
||||
private refresh(): void {
|
||||
|
@ -41,8 +43,8 @@ export class DurationInputComponent implements ng.IComponentController {
|
|||
this.max_s = this.toSeconds(this.max || '1h');
|
||||
|
||||
if (this.value) {
|
||||
this.seconds = this.toSeconds(this.value || '0s')
|
||||
};
|
||||
this.seconds = this.toSeconds(this.value || '0s');
|
||||
}
|
||||
}
|
||||
|
||||
private durationExplanation(durationSeconds: string): string {
|
||||
|
|
Reference in a new issue