From 07aae82ac77edab4a208cd61f81535735cafa66b Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 12 Apr 2010 01:43:49 +0000 Subject: [PATCH] BUGFIX: Make sure Linkto Dropdown works right with filter() (from r96705) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102334 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 80cf6a06f..3e7b5825c 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),