mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX Open selected node and immediate child nodes when using batch actions to ensure that all nodes can actually be selected. This will optionally trigger ajax loading for further nodes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@81457 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
923bf6e103
commit
119121b0f2
@ -323,9 +323,22 @@ batchActionGlobals = {
|
|||||||
batchActionGlobals.selectedNodes[idx] = false;
|
batchActionGlobals.selectedNodes[idx] = false;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
// Open node in order to allow proper selection of children
|
||||||
|
if(Element.hasClassName(selectedNode, 'unexpanded')) {
|
||||||
|
selectedNode.open();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Select node
|
||||||
selectedNode.addNodeClass('selected');
|
selectedNode.addNodeClass('selected');
|
||||||
selectedNode.selected = true;
|
selectedNode.selected = true;
|
||||||
batchActionGlobals.selectedNodes[idx] = true;
|
batchActionGlobals.selectedNodes[idx] = true;
|
||||||
|
|
||||||
|
// Open all existing children, which might trigger further
|
||||||
|
// ajaxExansion calls to ensure all nodes are selectable
|
||||||
|
var children = selectedNode.getElementsByTagName('li');
|
||||||
|
for(var i=0; i<children.length; i++) {
|
||||||
|
children[i].open();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user