#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,21 +142,26 @@ batchactions.prototype = {
},
onclick : function() {
if(treeactions.toggleSelection(this)) {
batchActionGlobals.o1 = $('sitetree').observeMethod('SelectionChanged', batchActionGlobals.treeSelectionChanged);
batchActionGlobals.o2 = $(_HANDLER_FORMS.batchactions).observeMethod('Close', batchActionGlobals.popupClosed);
addClass($('sitetree'),'multiselect');
batchActionGlobals.selectedNodes = { };
var sel = $('sitetree').firstSelected();
if(sel && sel.className.indexOf('nodelete') == -1) {
var selIdx = $('sitetree').getIdxOf(sel);
batchActionGlobals.selectedNodes[selIdx] = true;
sel.removeNodeClass('current');
sel.addNodeClass('selected');
}
this.multiselectTransform();
}
return false;
},
multiselectTransform : function() {
batchActionGlobals.o1 = $('sitetree').observeMethod('SelectionChanged', batchActionGlobals.treeSelectionChanged);
batchActionGlobals.o2 = $(_HANDLER_FORMS.batchactions).observeMethod('Close', batchActionGlobals.popupClosed);
addClass($('sitetree'),'multiselect');
batchActionGlobals.selectedNodes = { };
var sel = $('sitetree').firstSelected();
if(sel && sel.className.indexOf('nodelete') == -1) {
var selIdx = $('sitetree').getIdxOf(sel);
batchActionGlobals.selectedNodes[selIdx] = true;
sel.removeNodeClass('current');
sel.addNodeClass('selected');
}
}
}
@ -174,6 +179,7 @@ showonlydrafts.prototype = {
$('sitetree_ul').innerHTML = response.responseText;
Behaviour.apply();
$('SiteTreeIsFiltered').value = 1;
$('batchactions').multiselectTransform();
statusMessage('Filtered tree to only show changed pages','good');
},
onFailure : function(response) {
@ -263,6 +269,7 @@ batchActionGlobals = {
$('sitetree_ul').innerHTML = response.responseText;
Behaviour.apply();
$('SiteTreeIsFiltered').value = 0;
$('batchactions').multiselectTransform();
statusMessage('Unfiltered tree','good');
},
onFailure : function(response) {