- {state.localization.AddFolder}
-
- {state.currentItems.folder.folderName.length > 0 &&[
- ,
- {state.currentItems.folder.folderName}
- ]}
-
- this.nameField = el}
- value={this.newFolderRequest.FolderName}
- onInput={e => this.newFolderRequest = {
- ...this.newFolderRequest,
- FolderName: (e.target as HTMLInputElement).value,
- }}
- />
- {!this.newFolderRequest.FolderName &&
- {state.localization.FolderNameRequiredMessage}
- }
- {this.canChooseFolderProvider() &&
- [
- ,
-
- ]
- }
- {this.canChooseFolderProvider() && this.folderMappings.find(m => m.FolderMappingID == this.newFolderRequest.FolderMappingId).IsDefault == false &&[
- ,
- this.newFolderRequest = {
- ...this.newFolderRequest,
- MappedName: (e.target as HTMLInputElement).value,
- }}
- />
- ]}
-
+ {state.localization?.Edit}
+
+
+
+
+ {this.folderIconUrl &&
+
+ }
+ {this.folderDetails &&
+
+
+ {this.folderDetails.folderId}
+
+
+ {this.folderDetails.createdBy}
+
+
+ {this.folderDetails.createdOnDate}
+
+
+ {this.folderDetails.lastModifiedBy}
+
+
+ {this.folderDetails.lastModifiedOnDate}
+
+ }
+
+
+
+
+
+ this.folderDetails = {
+ ...this.folderDetails,
+ folderName: (e.target as HTMLInputElement).value,
+ }
+ }
+ />
+
+
+
+
+
+ {this.folderDetails && this.folderDetails.permissions && this.roleGroups && this.roles &&
+ this.handlePermissionsChanged(e.detail)}
+ onUserSearchQueryChanged={e => this.handleUserSearchQueryChanged(e.detail)}
+ />
+ }
+
+
this.handleCancel()}
+ onClick={() => this.closeModal()}
>
{state.localization.Cancel}
this.handleSave()}
>
{state.localization.Save}
diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-edit-folder/readme.md b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-edit-folder/readme.md
index d34fa1b4186..53e91756e31 100644
--- a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-edit-folder/readme.md
+++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-edit-folder/readme.md
@@ -5,6 +5,13 @@
+## Properties
+
+| Property | Attribute | Description | Type | Default |
+| ----------------------- | ----------- | ----------------------------- | -------- | ----------- |
+| `folderId` _(required)_ | `folder-id` | The ID of the folder to edit. | `number` | `undefined` |
+
+
## Events
| Event | Description | Type |
@@ -16,19 +23,29 @@
### Used by
- - [dnn-action-create-folder](../actions/dnn-action-create-folder)
+ - [dnn-action-edit-item](../actions/dnn-action-edit-item)
### Depends on
+- dnn-tabs
+- dnn-tab
+- dnn-permissions-grid
- dnn-button
### Graph
```mermaid
graph TD;
+ dnn-rm-edit-folder --> dnn-tabs
+ dnn-rm-edit-folder --> dnn-tab
+ dnn-rm-edit-folder --> dnn-permissions-grid
dnn-rm-edit-folder --> dnn-button
+ dnn-permissions-grid --> dnn-checkbox
+ dnn-permissions-grid --> dnn-button
+ dnn-permissions-grid --> dnn-searchbox
+ dnn-permissions-grid --> dnn-collapsible
dnn-button --> dnn-modal
dnn-button --> dnn-button
- dnn-action-create-folder --> dnn-rm-edit-folder
+ dnn-action-edit-item --> dnn-rm-edit-folder
style dnn-rm-edit-folder fill:#f9f,stroke:#333,stroke-width:4px
```
diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-files-pane/dnn-rm-files-pane.tsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-files-pane/dnn-rm-files-pane.tsx
index 148a9a8bd91..e7d671c89a7 100644
--- a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-files-pane/dnn-rm-files-pane.tsx
+++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-files-pane/dnn-rm-files-pane.tsx
@@ -27,6 +27,12 @@ export class DnnRmFilesPane {
this.checkIfMoreItemsNeeded();
}
+ @Listen("dnnRmFoldersChanged", {target: "document"})
+ handleFoldersChanged(){
+ state.currentItems.items = [];
+ this.checkIfMoreItemsNeeded();
+ }
+
componentDidUpdate() {
const loadedFilesHeight = this.loadedFilesArea.getBoundingClientRect().height;
const heightPerItem = loadedFilesHeight / state.currentItems.items.length;
diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-files-pane/readme.md b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-files-pane/readme.md
index 700f908cd1a..23130d24d9e 100644
--- a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-files-pane/readme.md
+++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-files-pane/readme.md
@@ -31,11 +31,22 @@ graph TD;
dnn-rm-items-listview --> dnn-collapsible
dnn-rm-items-listview --> dnn-rm-folder-context-menu
dnn-rm-folder-context-menu --> dnn-action-create-folder
+ dnn-rm-folder-context-menu --> dnn-action-edit-item
dnn-action-create-folder --> dnn-modal
- dnn-action-create-folder --> dnn-rm-edit-folder
- dnn-rm-edit-folder --> dnn-button
+ dnn-action-create-folder --> dnn-rm-create-folder
+ dnn-rm-create-folder --> dnn-button
dnn-button --> dnn-modal
dnn-button --> dnn-button
+ dnn-action-edit-item --> dnn-modal
+ dnn-action-edit-item --> dnn-rm-edit-folder
+ dnn-rm-edit-folder --> dnn-tabs
+ dnn-rm-edit-folder --> dnn-tab
+ dnn-rm-edit-folder --> dnn-permissions-grid
+ dnn-rm-edit-folder --> dnn-button
+ dnn-permissions-grid --> dnn-checkbox
+ dnn-permissions-grid --> dnn-button
+ dnn-permissions-grid --> dnn-searchbox
+ dnn-permissions-grid --> dnn-collapsible
dnn-rm-items-cardview --> dnn-collapsible
dnn-rm-items-cardview --> dnn-rm-folder-context-menu
dnn-rm-right-pane --> dnn-rm-files-pane
diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list-item/dnn-rm-folder-list-item.tsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list-item/dnn-rm-folder-list-item.tsx
index 9d27ecc51ed..57f93e4c647 100644
--- a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list-item/dnn-rm-folder-list-item.tsx
+++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list-item/dnn-rm-folder-list-item.tsx
@@ -15,6 +15,9 @@ export class DnnRmFolderListItem {
/** If true, this node will be expanded on load. */
@Prop({mutable: true}) expanded = false;
+
+ /** The ID of the parent folder. */
+ @Prop() parentFolderId!: number;
/** Fires when a context menu is opened for this item. Emits the folder ID. */
@Event() dnnRmcontextMenuOpened: EventEmitter;
@@ -26,22 +29,12 @@ export class DnnRmFolderListItem {
}
}
- private dismissContextMenu() {
- if (this.contextMenu && this.contextMenu.expanded){
- this.contextMenu.expanded = false;
- requestAnimationFrame(() => {
- this.contextMenu.style.display = "none";
- });
- }
- }
-
@State() folderIconUrl: string;
@Element() el!: HTMLDnnRmFolderListItemElement;
private itemsClient: ItemsClient;
private internalServicesClient: InternalServicesClient;
- private contextMenu: HTMLDnnCollapsibleElement;
constructor(){
this.itemsClient = new ItemsClient(state.moduleId);
@@ -96,11 +89,27 @@ export class DnnRmFolderListItem {
private handleContextMenu(e: MouseEvent): void {
e.preventDefault();
- this.contextMenu.style.display = "block";
- this.contextMenu.style.left = `${e.pageX}px`;
- this.contextMenu.style.top = `${e.pageY}px`;
- this.contextMenu.expanded = true;
- this.dnnRmcontextMenuOpened.emit(Number.parseInt(this.folder.data.key));
+ this.itemsClient.getFolderItem(Number.parseInt(this.folder.data.key))
+ .then(item => {
+ const collapsible = document.createElement("dnn-collapsible");
+ const folderContextMenu = document.createElement("dnn-rm-folder-context-menu");
+ collapsible.appendChild(folderContextMenu);
+ folderContextMenu.item = item;
+ collapsible.style.left = `${e.pageX}px`;
+ collapsible.style.top = `${e.pageY}px`;
+ collapsible.style.display = "block";
+ this.el.shadowRoot.appendChild(collapsible);
+ setTimeout(() => {
+ collapsible.expanded = true;
+ }, 100);
+ this.dnnRmcontextMenuOpened.emit(Number.parseInt(this.folder.data.key));
+ })
+ .catch(reason => console.error(reason));
+ }
+
+ private dismissContextMenu() {
+ const existingMenus = this.el.shadowRoot.querySelectorAll(".contextMenu");
+ existingMenus?.forEach(contextMenu => this.el.shadowRoot.removeChild(contextMenu));
}
render() {
@@ -131,13 +140,14 @@ export class DnnRmFolderListItem {
,
this.folder.children && this.folder.children.length > 0 && this.folder.children.map(child =>
-
+
+
)
]}
- this.contextMenu = el}>
-
-
);
}
diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list-item/readme.md b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list-item/readme.md
index 15af50e763d..89ef76e4c8d 100644
--- a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list-item/readme.md
+++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list-item/readme.md
@@ -7,10 +7,11 @@
## Properties
-| Property | Attribute | Description | Type | Default |
-| --------------------- | ---------- | -------------------------------------------- | ---------------- | ----------- |
-| `expanded` | `expanded` | If true, this node will be expanded on load. | `boolean` | `false` |
-| `folder` _(required)_ | -- | The basic information about the folder | `FolderTreeItem` | `undefined` |
+| Property | Attribute | Description | Type | Default |
+| ----------------------------- | ------------------ | -------------------------------------------- | ---------------- | ----------- |
+| `expanded` | `expanded` | If true, this node will be expanded on load. | `boolean` | `false` |
+| `folder` _(required)_ | -- | The basic information about the folder | `FolderTreeItem` | `undefined` |
+| `parentFolderId` _(required)_ | `parent-folder-id` | The ID of the parent folder. | `number` | `undefined` |
## Events
@@ -29,22 +30,33 @@
### Depends on
-- dnn-treeview-item
-- [dnn-rm-folder-list-item](.)
- dnn-collapsible
- [dnn-rm-folder-context-menu](../context-menus/dnn-rm-folder-context-menu)
+- dnn-treeview-item
+- [dnn-rm-folder-list-item](.)
### Graph
```mermaid
graph TD;
dnn-rm-folder-list-item --> dnn-rm-folder-list-item
- dnn-treeview-item --> dnn-collapsible
dnn-rm-folder-context-menu --> dnn-action-create-folder
+ dnn-rm-folder-context-menu --> dnn-action-edit-item
dnn-action-create-folder --> dnn-modal
- dnn-action-create-folder --> dnn-rm-edit-folder
- dnn-rm-edit-folder --> dnn-button
+ dnn-action-create-folder --> dnn-rm-create-folder
+ dnn-rm-create-folder --> dnn-button
dnn-button --> dnn-modal
dnn-button --> dnn-button
+ dnn-action-edit-item --> dnn-modal
+ dnn-action-edit-item --> dnn-rm-edit-folder
+ dnn-rm-edit-folder --> dnn-tabs
+ dnn-rm-edit-folder --> dnn-tab
+ dnn-rm-edit-folder --> dnn-permissions-grid
+ dnn-rm-edit-folder --> dnn-button
+ dnn-permissions-grid --> dnn-checkbox
+ dnn-permissions-grid --> dnn-button
+ dnn-permissions-grid --> dnn-searchbox
+ dnn-permissions-grid --> dnn-collapsible
+ dnn-treeview-item --> dnn-collapsible
dnn-rm-folder-list --> dnn-rm-folder-list-item
style dnn-rm-folder-list-item fill:#f9f,stroke:#333,stroke-width:4px
```
diff --git a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list/dnn-rm-folder-list.tsx b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list/dnn-rm-folder-list.tsx
index fc6520ea678..f023bfd47f6 100644
--- a/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list/dnn-rm-folder-list.tsx
+++ b/DNN Platform/Modules/ResourceManager/ResourceManager.Web/src/components/dnn-rm-folder-list/dnn-rm-folder-list.tsx
@@ -57,6 +57,7 @@ export class DnnRmFolderList {
{state.rootFolders && state.rootFolders.Tree.children.map(item =>