Fix some linting errors.
This commit is contained in:
parent
133287988e
commit
0d33434dbf
5 changed files with 12 additions and 12 deletions
|
@ -21,7 +21,7 @@ export class CookieHandler {
|
||||||
|
|
||||||
getLayout(): string {
|
getLayout(): string {
|
||||||
const oldCookie = this.getCookie('uhr-language');
|
const oldCookie = this.getCookie('uhr-language');
|
||||||
if (!!oldCookie) {
|
if (oldCookie) {
|
||||||
// aha, old cookie is set. migrate to new one!
|
// aha, old cookie is set. migrate to new one!
|
||||||
this.removeCookie('uhr-language');
|
this.removeCookie('uhr-language');
|
||||||
this.setLayout(oldCookie);
|
this.setLayout(oldCookie);
|
||||||
|
@ -64,7 +64,7 @@ export class CookieHandler {
|
||||||
|
|
||||||
private setCookie(cookieName: string, cookieValue: string): void {
|
private setCookie(cookieName: string, cookieValue: string): void {
|
||||||
let options;
|
let options;
|
||||||
if (!!this.cookiePath) {
|
if (this.cookiePath) {
|
||||||
options = {expires: 365, path: this.cookiePath};
|
options = {expires: 365, path: this.cookiePath};
|
||||||
} else {
|
} else {
|
||||||
options = {expires: 365};
|
options = {expires: 365};
|
||||||
|
@ -73,7 +73,7 @@ export class CookieHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
private removeCookie(cookieName: string): void {
|
private removeCookie(cookieName: string): void {
|
||||||
if (!!this.cookiePath) {
|
if (this.cookiePath) {
|
||||||
Cookies.remove(cookieName + this.widgetId, {path: this.cookiePath});
|
Cookies.remove(cookieName + this.widgetId, {path: this.cookiePath});
|
||||||
} else {
|
} else {
|
||||||
Cookies.remove(cookieName + this.widgetId);
|
Cookies.remove(cookieName + this.widgetId);
|
||||||
|
|
|
@ -24,7 +24,7 @@ export class Letter {
|
||||||
|
|
||||||
constructor(value: string, style?: string) {
|
constructor(value: string, style?: string) {
|
||||||
this.value = value;
|
this.value = value;
|
||||||
if (!!style) {
|
if (style) {
|
||||||
this.style = style;
|
this.style = style;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,9 +35,9 @@ export class Letter {
|
||||||
} else {
|
} else {
|
||||||
this.style += ` ${style}`;
|
this.style += ` ${style}`;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
toString(): string {
|
toString(): string {
|
||||||
return `<span class="item letter ${this.style}">${this.value}</span>`;
|
return `<span class="item letter ${this.style}">${this.value}</span>`;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,7 +245,7 @@ class LayoutRendererV2Delegate {
|
||||||
this.parseTimeDefinition(letters, 'minute', this.layout.minutes);
|
this.parseTimeDefinition(letters, 'minute', this.layout.minutes);
|
||||||
this.parseTimeDefinition(letters, 'hour', this.layout.hours);
|
this.parseTimeDefinition(letters, 'hour', this.layout.hours);
|
||||||
return letters;
|
return letters;
|
||||||
};
|
}
|
||||||
|
|
||||||
private parseObject(letters: Letter[][], styleClass: string, object: WordDefinition): void {
|
private parseObject(letters: Letter[][], styleClass: string, object: WordDefinition): void {
|
||||||
if (typeof object !== 'undefined' && object !== null) {
|
if (typeof object !== 'undefined' && object !== null) {
|
||||||
|
@ -313,10 +313,10 @@ export class LayoutRenderer {
|
||||||
this.renderarea.append('<br/>');
|
this.renderarea.append('<br/>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!!beforeshow) {
|
if (beforeshow) {
|
||||||
beforeshow();
|
beforeshow();
|
||||||
}
|
}
|
||||||
this.renderarea.fadeIn('fast');
|
this.renderarea.fadeIn('fast');
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ export class UhrRenderer {
|
||||||
configlink.on({click: () => this.toggleConfigScreen()});
|
configlink.on({click: () => this.toggleConfigScreen()});
|
||||||
this.$element.after(configlink);
|
this.$element.after(configlink);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
private wireFunctionality(): void {
|
private wireFunctionality(): void {
|
||||||
// on/off switch
|
// on/off switch
|
||||||
|
@ -203,5 +203,5 @@ export class UhrRenderer {
|
||||||
|
|
||||||
private toggleConfigScreen() {
|
private toggleConfigScreen() {
|
||||||
$(`#uhr-controlpanel${this.id}`).toggle('fast');
|
$(`#uhr-controlpanel${this.id}`).toggle('fast');
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ export class Uhr {
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy(): void {
|
destroy(): void {
|
||||||
if (!!this.timer) {
|
if (this.timer) {
|
||||||
window.clearInterval(this.timer);
|
window.clearInterval(this.timer);
|
||||||
this.timer = null;
|
this.timer = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue