os-js / osjs-filemanager-application

OS.js File Manager Application
https://manual.os-js.org/v3/
Other
10 stars 13 forks source link

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

Open miladhashemi opened 4 years ago

miladhashemi commented 4 years ago

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.

andersevenrud commented 4 years ago

This will require updates in two areas:

So it should be fairly simple to implement this

andersevenrud commented 4 years ago

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

OS_js

Ref:

miladhashemi commented 4 years ago

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.

andersevenrud commented 4 years ago

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

andersevenrud commented 4 years ago

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 :)

miladhashemi commented 4 years ago

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

andersevenrud commented 4 years ago

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.

miladhashemi commented 3 years ago

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

andersevenrud commented 3 years ago

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.

hello-smile6 commented 2 years ago

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?

andersevenrud commented 2 years ago

Status?

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

ajmeese7 commented 2 years ago

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.