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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Attach Images to ImageDataObjectManager on Upload


Go to End


6 Posts   1185 Views

Avatar
purplespider

Community Member, 89 Posts

30 May 2011 at 6:02am

I'm using ImageDataObjectManager to all allow me to add many images to a page. I'm also using the latest version of uploadify.

After clicking the Add button on the IDOM, and uploading the images using the Uploadify popup, I get to this state:

The problem I have is that the images only get attached to the page if I click the Continue button, and then Close. If I just click Close, the images do not appear in the page's ImageDataObjectManager despite being uploaded.

How can I avoid users having to remember to click Continue after uploading, and make it fine if they just click Close?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

31 May 2011 at 3:00pm

That's not the way it works. The upload saves the files to the filesystem and to the database, but you need to save the form to attach them to your dataobject. Plus, with IDOM, you're going to want to advance to the next form to add any extra attributes you have in your DataObject class. That's why the language on the button is "continue" and not "save." In FDOM and IDOM, you're not done adding content until you advance past the upload.

Avatar
purplespider

Community Member, 89 Posts

31 May 2011 at 8:08pm

That's a shame, I just feel it could be made a bit more user friendly, either by attaching the files on Upload, or even just having a "Warning: you need to click Continue to attach these files" message if the user just clicks Close.

Also, there are going to be times when users do not need to advance through each file they uploaded, for example, if there are no extra attributes, or if they only wish to add extra data to a few of the files at a later date. At the moment you can click Continue then Close and all the files will be attached, but this isn't obvious, ideally, there would be a button labelled "Attach All Images".

Minor points maybe, but I'm always thinking about how to make things as simple and obvious as possible for my clients, and a couple of little additions here will avoid the need for me to explain to them how exactly to go about adding multiple images.

Thanks for your time.
James

Avatar
UncleCheese

Forum Moderator, 4102 Posts

2 June 2011 at 1:52am

It's definitely a point well-taken. I'm a usability nut, too, and there are a lot of things that bug me about the DOM workflow. I think the easiest solution would be to change the event handler that starts the upload from the completion of the dialog box to the submission of the form. That way, there's no way to upload without saving the record.

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
UncleCheese

Forum Moderator, 4102 Posts

2 June 2011 at 3:15am

OK, I've just checked in that change. That should improve the experience a bit for you!

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
purplespider

Community Member, 89 Posts

2 June 2011 at 8:06pm

Ah, that works! Thank you very much!!!