mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[AAE-3507] ADF - Change default destination folder alias -root- to -my- (#6126)
* [AAE-3507] ADF - Change default destination folder alias -root- to -my- * * After rebase
This commit is contained in:
@@ -368,8 +368,8 @@ describe('AttachFileCloudWidgetComponent', () => {
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(widget.rootNodeId).toEqual('-root-');
|
||||
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-root-', 'multiple', true);
|
||||
expect(widget.rootNodeId).toEqual('-my-');
|
||||
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-my-', 'multiple', true);
|
||||
});
|
||||
|
||||
it('Should be able to set default alias as rootNodeId if destinationFolderPath does not have alias', async () => {
|
||||
@@ -390,8 +390,8 @@ describe('AttachFileCloudWidgetComponent', () => {
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(widget.rootNodeId).toEqual('-root-');
|
||||
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-root-', 'multiple', true);
|
||||
expect(widget.rootNodeId).toEqual('-my-');
|
||||
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-my-', 'multiple', true);
|
||||
});
|
||||
|
||||
it('should return the application name in case -appname- placeholder is present', async() => {
|
||||
@@ -450,8 +450,8 @@ describe('AttachFileCloudWidgetComponent', () => {
|
||||
await fixture.whenStable();
|
||||
fixture.detectChanges();
|
||||
|
||||
expect(widget.rootNodeId).toEqual('-root-');
|
||||
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-root-', 'single', true);
|
||||
expect(widget.rootNodeId).toEqual('-my-');
|
||||
expect(openUploadFileDialogSpy).toHaveBeenCalledWith('-my-', 'single', true);
|
||||
});
|
||||
|
||||
it('should display tooltip when tooltip is set', async(() => {
|
||||
|
@@ -52,13 +52,12 @@ import { DestinationFolderPathModel } from '../../../models/form-cloud-represent
|
||||
})
|
||||
export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent implements OnInit {
|
||||
|
||||
static MY_FILES_FOLDER_ID = '-my-';
|
||||
static ROOT_FOLDER_ID = '-root-';
|
||||
static ALIAS_USER_FOLDER = '-my-';
|
||||
static APP_NAME = '-appname-';
|
||||
static VALID_ALIAS = [AttachFileCloudWidgetComponent.ROOT_FOLDER_ID, AttachFileCloudWidgetComponent.MY_FILES_FOLDER_ID, '-shared-'];
|
||||
static VALID_ALIAS = ['-root-', AttachFileCloudWidgetComponent.ALIAS_USER_FOLDER, '-shared-'];
|
||||
|
||||
typeId = 'AttachFileCloudWidgetComponent';
|
||||
rootNodeId = AttachFileCloudWidgetComponent.MY_FILES_FOLDER_ID;
|
||||
rootNodeId = AttachFileCloudWidgetComponent.ALIAS_USER_FOLDER;
|
||||
|
||||
constructor(
|
||||
formService: FormService,
|
||||
@@ -133,7 +132,7 @@ export class AttachFileCloudWidgetComponent extends UploadCloudWidgetComponent i
|
||||
}
|
||||
}
|
||||
|
||||
return this.isValidAlias(alias) ? { alias, path } : { alias: AttachFileCloudWidgetComponent.ROOT_FOLDER_ID, path: undefined };
|
||||
return this.isValidAlias(alias) ? { alias, path } : { alias: AttachFileCloudWidgetComponent.ALIAS_USER_FOLDER, path: undefined };
|
||||
}
|
||||
|
||||
removeExistingSelection(selections: Node[]) {
|
||||
|
Reference in New Issue
Block a user