mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX #118 - Fixed count of marked pages (hamish)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@66162 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5c97a59a5c
commit
6078fe75dc
@ -240,8 +240,7 @@ batchActionGlobals = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
getCsvIds : function() {
|
getCsvIds : function() {
|
||||||
var csvIDs = "";
|
var csvIDs = new Array();
|
||||||
batchActionGlobals.count = 0;
|
|
||||||
var st = $('sitetree');
|
var st = $('sitetree');
|
||||||
batchActionGlobals.newNodes = new Array();
|
batchActionGlobals.newNodes = new Array();
|
||||||
for(var idx in batchActionGlobals.selectedNodes) {
|
for(var idx in batchActionGlobals.selectedNodes) {
|
||||||
@ -253,15 +252,18 @@ batchActionGlobals = {
|
|||||||
} else {
|
} else {
|
||||||
var i, item, childrenTopublish = st.getTreeNodeByIdx(idx).getElementsByTagName('li');
|
var i, item, childrenTopublish = st.getTreeNodeByIdx(idx).getElementsByTagName('li');
|
||||||
for(i=0;item=childrenTopublish[i];i++) {
|
for(i=0;item=childrenTopublish[i];i++) {
|
||||||
csvIDs += (csvIDs ? "," : "") + st.getIdxOf(childrenTopublish[i]);
|
if(csvIDs.indexOf(st.getIdxOf(childrenTopublish[i])) == -1) {
|
||||||
batchActionGlobals.count++;
|
csvIDs.push(st.getIdxOf(childrenTopublish[i]));
|
||||||
}
|
}
|
||||||
csvIDs += (csvIDs ? "," : "") + idx;
|
}
|
||||||
batchActionGlobals.count++;
|
if(csvIDs.indexOf(idx) == -1) {
|
||||||
|
csvIDs.push(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return csvIDs;
|
}
|
||||||
|
batchActionGlobals.count=csvIDs.length;
|
||||||
|
return (csvIDs.toString());
|
||||||
},
|
},
|
||||||
unfilterSiteTree : function() {
|
unfilterSiteTree : function() {
|
||||||
// Reload the site tree if it has been filtered
|
// Reload the site tree if it has been filtered
|
||||||
|
Loading…
Reference in New Issue
Block a user