silverstripe-subsites/javascript/VirtualPage_Subsites.js
Ingo Schommer e17ecfbdee FEATURE Support for VirtualPage-style linkage between subsites with new SubsiteVirtualPage class
ENHANCEMENT Allowing to select a subsite explicitly through admin-URLs, e.g. /admin/show/22/?SubsiteID=2
2008-12-02 03:50:06 +00:00

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();
}
}
});