select all lpars on this cec when it is clicked

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8291 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2010-12-01 07:11:30 +00:00
parent 52b5c45a7e
commit 2b1d775d28

View File

@ -241,7 +241,32 @@ function createGraphical(bpa, fsp, area){
$('.fspDiv2, .fspDiv4, .fspDiv42').bind('click', function(){
var fspName = $(this).attr('value');
showSelectDialog(fspList[fspName]['children']);
var selectCount = 0;
for (var lparIndex in fspList[fspName]['children']){
var lparName = fspList[fspName]['children'][lparIndex];
if (selectNode[lparName]){
selectCount ++;
}
}
//all the lpars are selected, so unselect nodes
if (selectCount == fspList[fspName]['children'].length){
for (var lparIndex in fspList[fspName]['children']){
var lparName = fspList[fspName]['children'][lparIndex];
delete selectNode[lparName];
$('#graphTable [name=' + lparName + ']').css('border-color', '#BDBDBD');
}
}
//not select all lpars on the cec, so add all lpars into selectNode Hash.
else{
for (var lparIndex in fspList[fspName]['children']){
var lparName = fspList[fspName]['children'][lparIndex];
selectNode[lparName] = 1;
$('#graphTable [name=' + lparName + ']').css('border-color', 'aqua');
}
}
updateSelectNodeDiv();
});
}