function _getChecked() {
var checkedList = [];
_.forEach(pkgInfo, function(value, key) {
- if(value.view[0].state.checked === true) {
+ if(value.checked === true) {
checkedList.push(value);
}
});
});
$tree.treeview('checkNode', [nodes, { silent: true }]);
- _.forEach(nodes, function(node) {
- node.state.checked = true;
- });
+ // _.forEach(nodes, function(node) {
+ // node.state.checked = true;
+ // });
}
// Compares two rpm version numbers (e.g. "1.7.1" or "1.2b").
// init check type
_.forEach(pkgInfo, function(value, key) {
// check type: -1(unchecked), 0(checked), 1~N(checking)
- selected[value.id] = value.view[0].state.checked ? 0 : -1;
+ selected[value.id] = value.checked ? 0 : -1;
scc_id[value.id] = 0;
});
// TODO: default profile rpm should be selected
_.forEach(provideList, function(provide) {
var tmpInfo = pkgInfo[provide.name];
- if (tmpInfo.view[0].state.checked || selected[tmpInfo.id] >= 1) {
+ if (tmpInfo.checked || selected[tmpInfo.id] >= 1) {
return tmpInfo;
}
});
function _checkAllBtnHandler() {
$tree.treeview('checkAll', { silent: true });
- _.forEach(packages, function(node) {
- node.state.checked = true;
- node.selfChecked = false;
+ _.forEach(pkgInfo, function(value, key){
+ value.checked = true;
+ value.selfChecked = false;
});
_updateSummary();
}
// FIXME: bug for state.checked = false in treeview objects
$tree.treeview('checkAll', { silent: true });
$tree.treeview('uncheckAll', { silent: true });
- _.forEach(packages, function(node) {
- node.state.checked = false;
- node.selfChecked = false;
+ _.forEach(pkgInfo, function(value, key){
+ value.checked = false;
+ value.selfChecked = false;
+ value.forward = null;
+ value.backward = null;
+ value.group = null;
+ groups = {};
});
_updateSummary();
}