Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

UploadField doesn't allow you to choose the folder to attach files from #363

Merged
merged 3 commits into from Apr 23, 2012

Conversation

Projects
None yet
3 participants
Owner

mateusz commented Apr 23, 2012

http://open.silverstripe.org/ticket/7046

Adds a tree dropdown to upload field attach popup to be able to switch folders.

As part of this I propose to add a method on DataObject for fetching the class of the relationship. I've done it via Config, so we can be sure we are not calling random methods on the object. This is to protect ourselves from a scenario when someone names his field "delete" - we don't really want to call "delete" on the obj.

Another thing is that entwine does not support descending into iframes, so there is a separate JS file added that loads within the iframe and provides the tree dropdown binding (it can still communicate with other methods in the same "SS" entwine namespace).

Thanks for reviewing.

ENHANCEMENT: allow folder selection when attaching files from the CMS
http://open.silverstripe.org/ticket/7046
UploadField would default to one folder only, and wouldn't allow asset
tree traversal. HtmlEditorField MediaForm has this capability, so added
it here in a similar fashion via TreeDropdownField.
Owner

halkyon commented Apr 23, 2012

@mateusz Could you please reword "APICHANGE" to "API CHANGE" in your commits?

mateusz added some commits Apr 20, 2012

BUGFIX: list only files the autoset relation supports in UploadField
Otherwise when user selects an object that does not fit the relation,
the system will throw an Exception.
Owner

mateusz commented Apr 23, 2012

@halkyon Here you go :)

sminnee added a commit that referenced this pull request Apr 23, 2012

Merge pull request #363 from mateusz/uploadfield-choosefolder2
UploadField doesn't allow you to choose the folder to attach files from

@sminnee sminnee merged commit dc71df7 into silverstripe:master Apr 23, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment