BUGFIX TreeSelectorField doubles up on concating base_url, doesn't include the security ID (#5164, thanks marcus) (from r100755)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105643 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-05-25 04:57:03 +00:00
parent c81a788ba7
commit e3873ef5f5

View File

@ -188,11 +188,12 @@ TreeDropdownField.prototype = {
},
ajaxGetTree: function(after) {
var ajaxURL = this.buildURL('tree?forceValues=' + this.inputTag.value);
ajaxURL += $('SecurityID') ? '&SecurityID=' + $('SecurityID').value : '';
var ajaxURL = this.buildURL('tree?forceValues=' + this.inputTag.value);
var secId = jQuery('[@name=SecurityID]');
ajaxURL += secId.length ? '&SecurityID=' + secId.val() : '';
if($('Form_EditForm_Locale')) ajaxURL += "&locale=" + $('Form_EditForm_Locale').value;
if ( this.inputTag.value ) ajaxURL += '&forceValue=' + this.inputTag.value;
if (this.search() != null) ajaxURL += "&search=" + this.search();
if(this.inputTag.value) ajaxURL += '&forceValue=' + this.inputTag.value;
if(this.search() != null) ajaxURL += "&search=" + this.search();
new Ajax.Request(ajaxURL, {
method : 'get',
onSuccess : after,