mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
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:
committed by
Eugenio Romano
parent
26c5982a1a
commit
a7a48e8b2b
@@ -130,7 +130,7 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements
|
||||
}
|
||||
|
||||
openSelectDialogFromFileSource() {
|
||||
let params = this.field.params;
|
||||
const params = this.field.params;
|
||||
if (this.isDefinedSourceFolder()) {
|
||||
this.contentDialog.openFileBrowseDialogByFolderId(params.fileSource.selectedFolder.pathId).subscribe(
|
||||
(selections: Node[]) => {
|
||||
@@ -183,10 +183,10 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements
|
||||
|
||||
openSelectDialog(repository) {
|
||||
const accountIdentifier = 'alfresco-' + repository.id + '-' + repository.name;
|
||||
let currentECMHost = this.getDomainHost(this.appConfigService.get(AppConfigValues.ECMHOST));
|
||||
let chosenRepositoryHost = this.getDomainHost(repository.repositoryUrl);
|
||||
const currentECMHost = this.getDomainHost(this.appConfigService.get(AppConfigValues.ECMHOST));
|
||||
const chosenRepositoryHost = this.getDomainHost(repository.repositoryUrl);
|
||||
if (chosenRepositoryHost !== currentECMHost) {
|
||||
let formattedRepositoryHost = repository.repositoryUrl.replace('/alfresco', '');
|
||||
const formattedRepositoryHost = repository.repositoryUrl.replace('/alfresco', '');
|
||||
this.attachDialogService.openLogin(formattedRepositoryHost).subscribe(
|
||||
(selections: any[]) => {
|
||||
selections.forEach((node) => node.isExternal = true);
|
||||
@@ -229,7 +229,7 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements
|
||||
}
|
||||
|
||||
private getDomainHost(urlToCheck) {
|
||||
let result = urlToCheck.match('^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)');
|
||||
const result = urlToCheck.match('^(?:https?:\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^:\/?\n]+)');
|
||||
return result[1];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user