Blame view

framework/javascript/UploadField_select.js 556 Bytes
0084d336   Administrator   Importers CRUD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  (function($) {
  	$.entwine('ss', function($) {
  		// Install the directory selection handler
  		$('form.uploadfield-form #ParentID .TreeDropdownField').entwine({
  			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();
  				});
  			},
  			onunmatch: function() {
  				this._super();
  			}
  		});
  	});
  })(jQuery);