mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
e17ecfbdee
ENHANCEMENT Allowing to select a subsite explicitly through admin-URLs, e.g. /admin/show/22/?SubsiteID=2
17 lines
451 B
JavaScript
17 lines
451 B
JavaScript
Behaviour.register({
|
|
'#CopyContentFromID_SubsiteID select' : {
|
|
initialize: function() {
|
|
var treeField = $('TreeDropdownField_Form_EditForm_CopyContentFromID');
|
|
if(!treeField) return false;
|
|
|
|
treeField.subsiteID = this.value;
|
|
},
|
|
onchange: function() {
|
|
var treeField = $('TreeDropdownField_Form_EditForm_CopyContentFromID');
|
|
if(!treeField) return false;
|
|
|
|
treeField.subsiteID = this.value;
|
|
treeField.refresh();
|
|
}
|
|
}
|
|
}); |