mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: fallback for changes in r98101, required if TreeDropdownField is used in a widgetarea, and does not know its field (from r98671)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102777 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
53d5a04655
commit
deb038ad2f
@ -113,7 +113,7 @@ class TreeDropdownField extends FormField {
|
|||||||
array (
|
array (
|
||||||
'id' => "TreeDropdownField_{$this->id()}",
|
'id' => "TreeDropdownField_{$this->id()}",
|
||||||
'class' => 'TreeDropdownField single' . ($this->extraClass() ? " {$this->extraClass()}" : ''),
|
'class' => 'TreeDropdownField single' . ($this->extraClass() ? " {$this->extraClass()}" : ''),
|
||||||
'href' => $this->Link(),
|
'href' => $this->form ? $this->Link() : "",
|
||||||
),
|
),
|
||||||
$this->createTag (
|
$this->createTag (
|
||||||
'input',
|
'input',
|
||||||
|
@ -60,6 +60,7 @@ TreeDropdownField.prototype = {
|
|||||||
// Build a URL from the field's base URL and the given sub URL
|
// Build a URL from the field's base URL and the given sub URL
|
||||||
buildURL: function(subURL) {
|
buildURL: function(subURL) {
|
||||||
var baseURL = jQuery(this).attr('href');
|
var baseURL = jQuery(this).attr('href');
|
||||||
|
if (!baseURL) baseURL = this.ownerForm().action + '/field/' + this.getName() + '/';
|
||||||
var subHasQuerystring = subURL.match(/\?/);
|
var subHasQuerystring = subURL.match(/\?/);
|
||||||
|
|
||||||
if(baseURL.match(/^(.*)\?(.*)$/)) {
|
if(baseURL.match(/^(.*)\?(.*)$/)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user