forked from dnnsoftware/Dnn.Platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from valadas/edit-folder
Added folder editing capability
- Loading branch information
Showing
38 changed files
with
1,367 additions
and
273 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
DNN Platform/Modules/ResourceManager/ResourceManager.Web/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
.../ResourceManager.Web/src/components/actions/dnn-action-edit-item/dnn-action-edit-item.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Component, Host, h, Prop } from '@stencil/core'; | ||
import { Item } from '../../../services/ItemsClient'; | ||
import state from "../../../store/store"; | ||
|
||
@Component({ | ||
tag: 'dnn-action-edit-item', | ||
styleUrl: '../dnn-action.scss', | ||
shadow: true, | ||
}) | ||
export class DnnActionEditItem { | ||
|
||
@Prop() item!: Item; | ||
|
||
private handleClick(): void { | ||
this.showModal(); | ||
} | ||
|
||
private showModal(){ | ||
const modal = document.createElement("dnn-modal"); | ||
modal.backdropDismiss = false; | ||
modal.showCloseButton = false; | ||
// We also need to show a different model depending if we have a file or folder | ||
if (this.item.isFolder){ | ||
const editor = document.createElement("dnn-rm-edit-folder") as HTMLDnnRmEditFolderElement; | ||
editor.folderId = this.item.itemId; | ||
modal.appendChild(editor); | ||
} | ||
document.body.appendChild(modal); | ||
modal.show(); | ||
} | ||
|
||
render() { | ||
return ( | ||
<Host> | ||
<button onClick={() => this.handleClick()}> | ||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M14.06 9.02l.92.92L5.92 19H5v-.92l9.06-9.06M17.66 3c-.25 0-.51.1-.7.29l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.2-.2-.45-.29-.71-.29zm-3.6 3.19L3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"/></svg> | ||
<span>{state.localization.Edit}</span> | ||
</button> | ||
</Host> | ||
); | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...nager/ResourceManager.Web/src/components/actions/dnn-action-edit-item/readme.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# dnn-action-edit-item | ||
|
||
|
||
|
||
<!-- Auto Generated Below --> | ||
|
||
|
||
## Properties | ||
|
||
| Property | Attribute | Description | Type | Default | | ||
| ------------------- | --------- | ----------- | ------ | ----------- | | ||
| `item` _(required)_ | -- | | `Item` | `undefined` | | ||
|
||
|
||
## Dependencies | ||
|
||
### Used by | ||
|
||
- [dnn-rm-actions-bar](../../dnn-rm-actions-bar) | ||
- [dnn-rm-folder-context-menu](../../context-menus/dnn-rm-folder-context-menu) | ||
|
||
### Depends on | ||
|
||
- dnn-modal | ||
- [dnn-rm-edit-folder](../../dnn-rm-edit-folder) | ||
|
||
### Graph | ||
```mermaid | ||
graph TD; | ||
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-button --> dnn-modal | ||
dnn-button --> dnn-button | ||
dnn-rm-actions-bar --> dnn-action-edit-item | ||
dnn-rm-folder-context-menu --> dnn-action-edit-item | ||
style dnn-action-edit-item fill:#f9f,stroke:#333,stroke-width:4px | ||
``` | ||
|
||
---------------------------------------------- | ||
|
||
*Built with [StencilJS](https://stenciljs.com/)* |
Oops, something went wrong.