mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
MINOR Fixed ajax load binding to folder selection in ThumbnailStripField.js (was broken after move to jquery)
This commit is contained in:
parent
cfea011680
commit
49a76a0c95
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user