enable prefer-const rule for tslint, fix issues (#4409)

* enable prefer-const rule for tslint, fix issues

* Update content-node-selector.component.spec.ts

* Update content-node-selector.component.spec.ts

* fix const

* fix lint issues

* update tests

* update tests

* update tests

* fix code

* fix page class
This commit is contained in:
Denys Vuika
2019-03-25 12:19:33 +00:00
committed by Eugenio Romano
parent 26c5982a1a
commit a7a48e8b2b
581 changed files with 5435 additions and 5402 deletions

View File

@@ -51,7 +51,7 @@ export class DocumentActionsService {
*/
getHandler(key: string): ContentActionHandler {
if (key) {
let lKey = key.toLowerCase();
const lKey = key.toLowerCase();
return this.handlers[lKey] || null;
}
return null;
@@ -65,7 +65,7 @@ export class DocumentActionsService {
*/
setHandler(key: string, handler: ContentActionHandler): boolean {
if (key) {
let lKey = key.toLowerCase();
const lKey = key.toLowerCase();
this.handlers[lKey] = handler;
return true;
}
@@ -125,10 +125,10 @@ export class DocumentActionsService {
if (this.contentService.hasAllowableOperations(node.entry, permission)) {
handlerObservable = this.documentListService.deleteNode(node.entry.id);
handlerObservable.subscribe(() => {
let message = this.translation.instant('CORE.DELETE_NODE.SINGULAR', { name: node.entry.name });
const message = this.translation.instant('CORE.DELETE_NODE.SINGULAR', { name: node.entry.name });
this.success.next(message);
}, () => {
let message = this.translation.instant('CORE.DELETE_NODE.ERROR_SINGULAR', { name: node.entry.name });
const message = this.translation.instant('CORE.DELETE_NODE.ERROR_SINGULAR', { name: node.entry.name });
this.error.next(message);
});
return handlerObservable;