if(!this.auth.getLoggedInUser().manager || this.auth.hasRole('ROLE_ADMIN')){
ctxfile.push('Delete');
ctxfolder.push('Delete');
layout.push('Delete');
items.push('Download');
items.push('Upload');
layout.push('Upload');
}
this.toolbarSettings = {
items: items,
visible: true
};
$folders = [];
$openFolder = opendir($privateBasePath);
while ($folder = readdir($openFolder)) {
if ($folder != '.' && $folder != '..') {
$folders[] = (object)[
'action' => null,
'data' => null,
'dateCreated' => '2019-11-04T11:53:34.2297495+00:00',
'dateModified' => '2019-11-04T11:53:34.2297495+00:00',
'filterId' => null,
'filterPath' => $requestPath,
'hasChild' => $this->folderHasChildren($privateBasePath . $folder),
'id' => null,
'isFile' => is_dir($privateBasePath . $folder) ? false : true,
'name' => is_dir($privateBasePath . $folder) ? $folder : basename($privateBasePath . $folder),
'names' => null,
'newName' => null,
'parentId' => null,
'path' => null,
'permission'=>null,
'previousName' => null,
'renameFiles' => null,
'searchString' => null,
'showHiddenItems' => false,
'size' => 12403,
'targetData' => null,
'targetPath' => null,
'type' => is_dir($privateBasePath . $folder) ? '' : '.'.pathinfo($privateBasePath . $folder, PATHINFO_EXTENSION),
'uploadFiles' => null
];
}
}
$response = (object)[
'cwd' => (object)[
'action' => null,
'caseSensitive' => false,
'data' => null,
'dateCreated' => '2020-10-03T15:35:04.8659233+00:00',
'dateModified' => '2020-10-03T15:35:04.8659233+00:00',
'filterId' => null,
'filterPath' => isset($requestPath) && !empty($requestPath) ? $requestPath : '/',
'hasChild' => $this->folderHasChildren($privateBasePath),
'id' => null,
'isFile' => is_dir($privateBasePath . $folder) ? false : true,
'name' => basename($privateBasePath . $folder),
'names' => null,
'newName' => null,
'parentId' => null,
'permission' => null,
'previousName' => null,
'renameFiles' => null,
'searchString' => null,
'showHiddenItems' => false,
'size' => is_dir($privateBasePath . $folder) ? null : filesize($privateBasePath . $folder),
'targetData' => null,
'targetPath' => null,
'type' =>is_dir($privateBasePath . $folder) ? '' : pathinfo($privateBasePath . $folder, PATHINFO_EXTENSION),
'uploadFiles' => null
],
'details' => null,
'error' => null,
'files' => $folders
];
@Input() navPaneSettings: FMNavPaneSettings = {
visible:true
};
created(args) {
/*disbale the toolbar items.*/
(this.filemanager as any).disableToolbarItems(["Upload"]);
}
fileOpen(args) {
if (
this.flag &&
(args.module === "NavigationPane" || args.module === "BreadCrumbBar") &&
args.fileDetails.filterPath === ""
) {
// Disable new folder toolbar item on root path
(this.filemanager as any).disableToolbarItems(["Upload"]);
this.flag = false;
} else if (!this.flag) {
// Enable new folder toolbar item other than root path
(this.filemanager as any).enableToolbarItems(["Upload"]);
this.flag = true;
}
}
<style>
.e-toolbar .e-toolbar-items .e-toolbar-item.e-overlay {
display: none;
}
</style> |
Hi Glen,
Sorry for the inconvenience.
To proceed further with the reported issue, we request you to share the following details.
- Whether you are using custom columns in FileManager?
- Complete code snippet of the FileManager.
- Response received in JSON format.
These details would help us to serve you better.
Regards,Keerthana.
<ejs-filemanager (menuClick)="menuClick($event)" (fileSelect)="fileSelected($event)" (failure)="failed($event)" (beforePopupOpen)="preventImagePopup($event)" (fileOpen)="openFile($event)" [rootAliasName]="rootAlias" [view]="view" [showThumbnail]="false" [toolbarSettings]="toolbarSettings" [contextMenuSettings]="contextMenuSettings" [allowMultiSelection]="true" id='default-filemanager' [height]="'800px'" [path]="basePath" [ajaxSettings]="ajaxSettings" [allowDragAndDrop]="false" [navigationPaneSettings]="navPaneSettings"></ejs-filemanager>
@Input() hostUrl: string = environment.apiUrl; // has a slash on the end
@Input() ajaxSettings: FMAjaxSettings = {
url: this.hostUrl + 'filemanager/fileoperations',
getImageUrl: this.hostUrl + 'filemanager/GetImage',
uploadUrl: this.hostUrl + 'filemanager/upload',
downloadUrl: this.hostUrl + 'filemanager/download'
};
@Input() basePath: string = '/';
@Input() rootAlias: string = 'Start';
@Input() lockPath: string = '';
public contextMenuSettings: any = {
//file: ['Open','|', 'Cut', 'Copy', '|', 'Delete', 'Rename'],
file: ['Open','|', 'Cut', 'Copy', '|', 'Rename'],
//folder: ['Open','|', 'Cut', 'Copy', 'Paste', '|', 'Delete', 'Rename'],
folder: ['Open','|', 'Cut', 'Copy', 'Paste', '|', 'Rename'],
layout: ['Refresh', '|', 'Paste', '|', 'NewFolder', 'Upload', '|', 'SelectAll'],
visible: true
}
public toolbarSettings: any = {
//items: ['NewFolder', 'Upload', 'Copy', 'Paste', 'Download', 'Rename', 'Refresh'],
items: ['NewFolder', 'Copy', 'Paste', 'Rename', 'Refresh'],
visible: true
};
Hi Glen Elkins,We have tried to replicate the issue in shared code snippet with the provided details and unable to replicate it. Please refer the below validation sample.Kindly, share the below details to proceed further with your reported issue.1. If possible, replicate the issue in attached sample.2. Share us the video footage of your reported issue.3. Share us the package version you have used in your application.4. Share us a simple issue replicating samplePlease let us know, if you need any further assistance.Regards,Sowmiya.P
"@syncfusion/ej2": "^18.3.35",
"@syncfusion/ej2-angular-filemanager": "^18.3.35",
"@syncfusion/ej2-data": "^18.3.35",