os-js / osjs-filemanager-application

OS.js File Manager Application

Home Page:https://manual.os-js.org/v3/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multi Select rows for doing bulk operation like delete,copy and rename

miladhashemi opened this issue · comments

Is it possible to add multi select rows capability in file manager and do bulk operation for delete,copy,move?

Scenario

I select two rows(ctrl+leftClick) and click on delete button.

Expected Result

System returns an array of two pathes. finally delete them in an iterate manner.

This will require updates in two areas:

So it should be fairly simple to implement this

I've started on implementing this. Here's a sneak preview:

OS_js

Ref:

Actually I think beside gui, the VFS and Adapter needs to be changed too.
One part of problem is in osjs/gui that must select multiple rows, it seem you handled it.
Next step we need Adapter supports operations like delete on it.
Adapter operates on array of vfs.oject instead of single vfs.object.

The VFS does not need any changes The file manager can just use Promise.all to handle bulk operations.

I believe I've made all of the appropriate changes to the filemanager application, and now need to finish up the ListView component changes and I can put out a beta on npm for testing :)

Oh, Thank U Andres. How can I test beta version? Is it on npm rep at moment?

I haven't published it onto npm yet as I'm not 100% done.

You can try this out by checking out the code locally.

I tested multiselect option,but didnt works.
Even readdir throws bellow warning message:

TypeError: files.map is not a function

Also throws bellow warning as i click on edit menu:

TypeError: items.some is not a function

for readfile throws bellow error:

Uncaught TypeError: data.forEach is not a function

I haven't looked at it myself, but I'm pretty sure this is because I made some changes in the master codebase, then remastered this branch which made some calls invalid.

I'll update this ASAP.

I haven't looked at it myself, but I'm pretty sure this is because I made some changes in the master codebase, then remastered this branch which made some calls invalid.

I'll update this ASAP.

Status?

Status?

I always follow up in issues with updates. As you can see, I haven't really found any time for this.

I tested multiselect option,but didnt works. Even readdir throws bellow warning message:

TypeError: files.map is not a function

Also throws bellow warning as i click on edit menu:

TypeError: items.some is not a function

for readfile throws bellow error:

Uncaught TypeError: data.forEach is not a function

@miladhashemi I had that same problem a little bit ago, before realizing that you also need to update your local code with the linked unmerged LiveView PR on the GUI repository. Once you have those changes synced you will no longer experience those error messages. The PR still isn't perfect, the functionality isn't entirely up to what was initially requested quite yet, but I am going to try to get this working on my implementation then add to the PR and get this feature fully supported.