silverstripe/sapphire — pull request #363 by mateusz (2012-04-23 00:49:23+00:00)
Title: UploadField doesn't allow you to choose the folder to attach files from

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.