#1521 - Clicking "show only changed pages" removes checkboxes

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@43938 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-10-29 02:36:44 +00:00
parent f83acd219e
commit 5e95e6893a

View File

@ -142,8 +142,15 @@ batchactions.prototype = {
}, },
onclick : function() { onclick : function() {
if(treeactions.toggleSelection(this)) { if(treeactions.toggleSelection(this)) {
this.multiselectTransform();
}
return false;
},
multiselectTransform : function() {
batchActionGlobals.o1 = $('sitetree').observeMethod('SelectionChanged', batchActionGlobals.treeSelectionChanged); batchActionGlobals.o1 = $('sitetree').observeMethod('SelectionChanged', batchActionGlobals.treeSelectionChanged);
batchActionGlobals.o2 = $(_HANDLER_FORMS.batchactions).observeMethod('Close', batchActionGlobals.popupClosed); batchActionGlobals.o2 = $(_HANDLER_FORMS.batchactions).observeMethod('Close', batchActionGlobals.popupClosed);
addClass($('sitetree'),'multiselect'); addClass($('sitetree'),'multiselect');
batchActionGlobals.selectedNodes = { }; batchActionGlobals.selectedNodes = { };
@ -156,8 +163,6 @@ batchactions.prototype = {
sel.addNodeClass('selected'); sel.addNodeClass('selected');
} }
} }
return false;
}
} }
/** /**
@ -174,6 +179,7 @@ showonlydrafts.prototype = {
$('sitetree_ul').innerHTML = response.responseText; $('sitetree_ul').innerHTML = response.responseText;
Behaviour.apply(); Behaviour.apply();
$('SiteTreeIsFiltered').value = 1; $('SiteTreeIsFiltered').value = 1;
$('batchactions').multiselectTransform();
statusMessage('Filtered tree to only show changed pages','good'); statusMessage('Filtered tree to only show changed pages','good');
}, },
onFailure : function(response) { onFailure : function(response) {
@ -263,6 +269,7 @@ batchActionGlobals = {
$('sitetree_ul').innerHTML = response.responseText; $('sitetree_ul').innerHTML = response.responseText;
Behaviour.apply(); Behaviour.apply();
$('SiteTreeIsFiltered').value = 0; $('SiteTreeIsFiltered').value = 0;
$('batchactions').multiselectTransform();
statusMessage('Unfiltered tree','good'); statusMessage('Unfiltered tree','good');
}, },
onFailure : function(response) { onFailure : function(response) {