mmo-filemanager
1 symbol · generated 5 Oct 2026
mmo-filemanager
mmo-filemanager.jhs:1The files of mmo.edms the user can see: filtered by a label of the tree, a search, whose they are or the trash, a page at a time. A file is opened on the side, to rename it, describe it, classify it, fill the fields its labels define; several are classified, downloaded or put in the trash at once. The files dropped go into the folder shown.
- Extends
CustomShadowElement
Index
| url | where mmo.edms' api is: the page's (MMO.edms.config.url) by default | |
| token | the session's CSRF token: the page's by default | |
| labels | the label shown first (its id) | |
| mine | only the user's own files | |
| readonly | files to see, not to change: no upload, no action | |
| readonly readonly accessor | ||
| init() | ||
| fail(title, error) | Say what went wrong | |
| loadLabels() | Load the tree of the labels | |
| sections() | The sections of the tree: the labels of the tree itself (_TAGS, _FILESYSTEM, a user's space) are titles | |
| renderTree() | Draw the tree | |
| showLabel(id) | Show the files of a label (and of those under it), or of every label | |
| createLabel(parent) | Make a label: under $parent, or one of the user's tags | |
| editLabel(label) | Rename a label, change its color, or delete it | |
| labelsWith(action) | ||
| reload() | Load the first page of the files again | |
| loadMore() | Load the next page of the files | |
| load(append) | ||
| search(text) | Search the files whose name holds $text | |
| setScope(scope) | ||
| sortBy(field) | Sort by $field, the other way when it is sorted by it already | |
| renderFiles() | Draw the files listed | |
| select(file, selected) | ||
| selectAll(selected) | ||
| clearSelection() | ||
| bulk(action, labels) | Act on the files selected: trash, restore, delete (from the trash), label, unlabel | |
| labelSelection() | Put the files selected in a label | |
| downloadSelection() | Download the files selected: one as it is, several in a zip | |
| open(file) | Open a file on the side | |
| close() | ||
| update(changes) | Save a change of the file opened | |
| renderDetail() | Draw the file opened: what it is, and what can be done with it | |
| trash(file) | ||
| restore(file) | ||
| destroy(file) |
Attributes5
url
mmo-filemanager.jhswhere mmo.edms' api is: the page's (MMO.edms.config.url) by default
url
token
mmo-filemanager.jhsthe session's CSRF token: the page's by default
token
labels
mmo-filemanager.jhsthe label shown first (its id)
labels
mine
mmo-filemanager.jhsonly the user's own files
mine
readonly
mmo-filemanager.jhsfiles to see, not to change: no upload, no action
readonly
Properties1
readonly
readonlyaccessormmo-filemanager.jhs:100- Type
boolean
Methods29
init()
mmo-filemanager.jhs:69fail(title, error)
mmo-filemanager.jhs:109Say what went wrong
| title | string | |
| error | Error |
loadLabels()
mmo-filemanager.jhs:120Load the tree of the labels
| returns | Promise |
sections()
mmo-filemanager.jhs:137The sections of the tree: the labels of the tree itself (_TAGS, _FILESYSTEM, a user's space) are titles
| returns | Array<{title: string, node: Object | >} |
renderTree()
mmo-filemanager.jhs:156Draw the tree
showLabel(id)
mmo-filemanager.jhs:197Show the files of a label (and of those under it), or of every label
| id | ?* |
createLabel(parent)
mmo-filemanager.jhs:207Make a label: under $parent, or one of the user's tags
| parent = null | ?Object |
editLabel(label)
mmo-filemanager.jhs:218Rename a label, change its color, or delete it
| label | Object |
labelsWith(action)
mmo-filemanager.jhs:252| action | string | - create (put files in them), edit... |
| returns | Array<Object> | the labels the user can do $action with, not those of the tree itself |
reload()
mmo-filemanager.jhs:263Load the first page of the files again
| returns | Promise |
loadMore()
mmo-filemanager.jhs:273Load the next page of the files
| returns | Promise |
load(append)
mmo-filemanager.jhs:282| append | boolean | - true to add the page to those listed |
| returns | Promise |
search(text)
mmo-filemanager.jhs:298Search the files whose name holds $text
| text | string |
setScope(scope)
mmo-filemanager.jhs:309| scope | string | - all, mine or trash |
sortBy(field)
mmo-filemanager.jhs:318Sort by $field, the other way when it is sorted by it already
| field | string |
renderFiles()
mmo-filemanager.jhs:326Draw the files listed
select(file, selected)
mmo-filemanager.jhs:366| file | Object | |
| selected | boolean |
selectAll(selected)
mmo-filemanager.jhs:375| selected | boolean | - true to select every file listed, false for none |
clearSelection()
mmo-filemanager.jhs:380bulk(action, labels)
mmo-filemanager.jhs:390Act on the files selected: trash, restore, delete (from the trash), label, unlabel
| action | string | |
| labels = [] | Array | - for label/unlabel |
| returns | Promise |
labelSelection()
mmo-filemanager.jhs:409Put the files selected in a label
downloadSelection()
mmo-filemanager.jhs:430Download the files selected: one as it is, several in a zip
open(file)
mmo-filemanager.jhs:446Open a file on the side
| file | Object |
close()
mmo-filemanager.jhs:452update(changes)
mmo-filemanager.jhs:464Save a change of the file opened
| changes | Object | - MMO.edms.Api#updateFile |
| returns | Promise |
renderDetail()
mmo-filemanager.jhs:481Draw the file opened: what it is, and what can be done with it
trash(file)
mmo-filemanager.jhs:559| file | Object |
restore(file)
mmo-filemanager.jhs:564| file | Object |
destroy(file)
mmo-filemanager.jhs:569| file | Object |