Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Moving the 'Delete' and 'Move Files' buttons


Go to End


24 Posts   55424 Views

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

3 July 2007 at 9:38am

Edited: 03/07/2007 9:43am

> I'm really looking forward to seeing this :-)

Here is a patch against the cms gsoc branch showing my current progress after about 4 hours of work:
http://elijahlofgren.com/silverstripe/diffs/Drag-and-Drop-File-Moving-2007-07-02-1632-cms-gsoc-r37632.diff

Working:
* Drag any drop any file to any folder (Edit: except the "assets" folder). :)
* Check the boxes next to multiple files, then grab a "Drag" handle next to one of them and drop it into a folder and all the selected files will be moved.

To Do:
* Test in browsers other than Firefox 2.
* Add ctrl clicking for easy checkbox range selection
* Add drag indicator showing how many files are being moved
* Clean up the code (formatting, old debug code, etc)
* Remove the "Move Selected Files" button? (It still works)
* Implement any of your suggestions. :)

Let me know what you think,

Elijah

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

3 July 2007 at 10:25am

Now with "Moving # files" drag indicator. :)
See: http://www.elijahlofgren.com/silverstripe/diffs/Drag-and-Drop-File-Moving-with-num-indicator-2007-07-02-1722-cms-gsoc-r37632.diff

I'll now work on adding ctrl clicking for easy range selection of checkboxes.

Avatar
Tim

Community Member, 201 Posts

3 July 2007 at 3:15pm

Nice - let me know when you have a demo up!

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

3 July 2007 at 3:41pm

Edited: 03/07/2007 3:41pm

> Nice - let me know when you have a demo up!

Thanks. I'll hopefully get ctrl select working and put up a demo tomorrow. It has gotten late and I need to go to bed.

What do you think about removing the "Move Selected Files" button and the folder drop-down? It still works. Should I just leave it for now?

Good night,

Elijah

Avatar
Tim

Community Member, 201 Posts

3 July 2007 at 4:35pm

I suggest we remove it - it will just confuse people having two methods

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

3 July 2007 at 4:46pm

Edited: 03/07/2007 4:56pm

Well, I was about to go to bed, then I found: http://jroller.com/page/rmcmahon?entry=checkboxrange_with_prototype

So I spent about 45 minutes getting it and a demo working.

Edit: Here is the current patch:
http://www.elijahlofgren.com/silverstripe/diffs/Drag-and-Drop-File-Moving-with-checkbox-select-2007-07-02-2348-cms-gsoc-r37635.diff

Here is a demo allowing ctrl and shift checkbox select and shows the drag effect.

Demo: http://www.elijahlofgren.com/silverstripe/demos/filedragdrop.html

What do you think?

Of course, on this demo the files are not actually moved when dropped. You test out shift and ctrl checkbox range selection and see how the drag and drop works. ;)

To Do:
* Fix opacity problem in IE.
* Clean up old debug code and fix formatting
> I suggest we remove it - it will just confuse people having two methods
Sounds good. I'll plan on removing the "Move selected files" button and drop-down.

I'll hopefully implement any suggestions you have and commit this tomorrow. :)

Should adding "Delete file" (X) buttons next to each file be added as a feature request to my To Do list? I assume we want to keep the "Delete selected" button?

Thanks for your feedback, and good night for real now. ;)

Elijah

Avatar
Sean

Forum Moderator, 922 Posts

4 July 2007 at 11:48am

The [x] buttons next to each asset would be good for deletion. Does the table field class already support this maybe? Last I checked it was relatively easy to turn on different functionality like this. In TableField I know it is...

I like the demo, it's looking good so far. :-)

Cheers,
Sean

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

4 July 2007 at 4:48pm

> The [x] buttons next to each asset would be good for deletion. Does the table field class already support this maybe?

Thanks, The delete buttons were very easy to add by simply copying a bit of code from MemberTableField.ss :)

Drag and drop file moving is now complete. I have committed the following change the to the cms gsoc branch:
http://www.elijahlofgren.com/silverstripe/patches/Fix-Usability-Issue-48-delete-and-move-files-buttons-need-repositioning-using-drag-and-drop-cms-gsoc-r37813.patch

------------------------------------------------------------------------
r37813 | elofgren | 2007-07-03 23:30:43 -0500 (Tue, 03 Jul 2007) | 9 lines

USABILITY: Fix usability issue #48 "Delete and Move Files buttons need repositioning"
Changes:
* Remove the 'Move Files' button and enable multi-file drag and drop file moving
* Position the 'Delete selected files' button under the checkboxes and make it turn red on hover
* Add 'Ctrl' and 'Shift' range selection to file checkboxes
* Add 'X' delete links to the right of each file
* Rename the 'Save' button to 'Save folder name' and don't show it when listing 'assets' folder since it can't be renamed
More info: http://www.silverstripe.com/google-summer-of-code-forum/flat/1607

------------------------------------------------------------------------

Tested and works in Firefox 2, IE 6, IE 7, and Safari 3.

The last "Critical" usability issue is now complete! :)

I'm taking July 4th off, so I'll get back to work on other Usability Issues in 2 days. ;)

Let me know if there is anything else I need to change,

Elijah

Go to Top