MINOR Fixed ajax load binding to folder selection in ThumbnailStripField.js (was broken after move to jquery)

This commit is contained in:
Ingo Schommer 2011-03-22 09:00:38 +13:00
parent cfea011680
commit 49a76a0c95

View File

@ -21,17 +21,18 @@ ThumbnailStripField.prototype = {
updateMethod: 'getimages', updateMethod: 'getimages',
initialize: function() { initialize: function() {
var self = this;
try { try {
this.updateMethod = this.className.match(/updatemethod=([^ ]+)/)[1]; this.updateMethod = this.className.match(/updatemethod=([^ ]+)/)[1];
} catch(err) {} } catch(err) {}
if(this.className.match(/parent=([^ ]+)/)) { if(this.className.match(/parent=([^ ]+)/)) {
// HACK: This is hard-coded to only work with TreeDropdownFields // HACK: This is hard-coded to only work with TreeDropdownFields
var parentField = $(RegExp.$1).parentNode; var inputField = $(RegExp.$1), parentField = inputField.parentNode;
if(parentField) { if(parentField) jQuery(parentField).bind('change', function() {
// TODO Fix observing in IE7/IE8 self.ajaxGetFiles(jQuery(inputField).val());
// parentField.observeMethod('Change', this.ajaxGetFiles.bind(this)); });
}
var searchField = $$('#' + this.updateMethod + 'Search input')[0]; var searchField = $$('#' + this.updateMethod + 'Search input')[0];
var timeout = undefined; var timeout = undefined;