2012-04-20 11:05:54 +12:00
|
|
|
(function($) {
|
|
|
|
$.entwine('ss', function($) {
|
|
|
|
// Install the directory selection handler
|
2013-05-26 11:11:05 +12:00
|
|
|
$('form.uploadfield-form .TreeDropdownField').entwine({
|
2012-04-20 11:05:54 +12:00
|
|
|
onmatch: function() {
|
|
|
|
this._super();
|
|
|
|
|
|
|
|
var self = this;
|
|
|
|
this.bind('change', function() {
|
|
|
|
// Display the contents of the folder in the listing field.
|
|
|
|
var fileList = self.closest('form').find('.ss-gridfield');
|
|
|
|
fileList.setState('ParentID', self.getValue());
|
|
|
|
fileList.reload();
|
|
|
|
});
|
2012-05-14 11:43:36 +12:00
|
|
|
},
|
|
|
|
onunmatch: function() {
|
|
|
|
this._super();
|
2012-04-20 11:05:54 +12:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
})(jQuery);
|