From bf12972813affdcb95bdb8404880e9ad4727e68a Mon Sep 17 00:00:00 2001 From: Luke Hudson Date: Tue, 12 Jan 2010 21:29:15 +0000 Subject: [PATCH] BUGFIX: Make sure Linkto Dropdown works right with filter() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@96705 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- javascript/TreeSelectorField.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/javascript/TreeSelectorField.js b/javascript/TreeSelectorField.js index 3336a67a0..281cd9242 100755 --- a/javascript/TreeSelectorField.js +++ b/javascript/TreeSelectorField.js @@ -229,7 +229,8 @@ TreeDropdownField.prototype = { var ajaxURL = this.options.dropdownField.helperURLBase() + 'tree/' + this.getIdx(); ajaxURL += $('SecurityID') ? '&SecurityID=' + $('SecurityID').value : ''; if($('Form_EditForm_Locale')) ajaxURL += "&locale=" + $('Form_EditForm_Locale').value; - if (this.filter() != null) ajaxURL += "&filter=" + this.filter(); + // ajaxExpansion is called in context of TreeNode, not Tree, so filter() doesn't exist. + if (this.filter && this.filter() != null) ajaxURL += "&filter=" + this.filter(); new Ajax.Request(ajaxURL, { onSuccess : this.installSubtree.bind(this),