public/assets/js/custom_js/HaseImageActivityRegionTree.js
/**
 * Function is use for display selected value.
 * @param array treeView.
 * @param string treeNodePath.
 */
Function is use for display selected value.
@param array treeView.
Function is use for display selected value . @param array treeView .
function openCategoryTreePath(treeView, treeNodePath) {
    treeNodePath = JSON.parse(activityRegionTreeView.SQUARE_BRACKET_OPEN + treeNodePath + activityRegionTreeView.SQUARE_BRACKET_CLOSE);
    treeNodePath.splice(activityRegionTreeView.FIRST_NODE_INDEX, activityRegionTreeView.TREE_NODE_PATH_SPLICE_END);
    var treeDataSource = treeView.dataSource;
    var treeNode = treeDataSource.get(treeNodePath[activityRegionTreeView.FIRST_NODE_INDEX])
    while (treeNodePath.length > activityRegionTreeView.CHECK_IS_NOT_ZERO && (treeNode.expanded || treeNode.loaded())) {
        treeNode.set(activityRegionTreeView.EXPANDED_VALUE, true);
        treeNodePath.shift();
        treeNode = treeDataSource.get(treeNodePath[activityRegionTreeView.FIRST_NODE_INDEX]);
    }
    if (treeNodePath.length > activityRegionTreeView.CHECK_IS_NOT_ZERO) {
        treeDataSource.bind(activityRegionTreeView.CHANGE_VALUE, function expandLevel(changeEvent) {
            var lastNodeId = changeEvent.treeNode && changeEvent.treeNode.id;
            if (lastNodeId == treeNodePath[activityRegionTreeView.FIRST_NODE_INDEX]) {
                treeNodePath.shift();
                treeDataSource.unbind(activityRegionTreeView.CHANGE_VALUE, expandLevel);
                openTreePath(treeView, treeNodePath);
            }
        });
        treeDataSource.get(treeNodePath[activityRegionTreeView.FIRST_NODE_INDE]).set(activityRegionTreeView.EXPANDED_VALUE, true);
    } else {
        var currentNodeId = treeNodePath[treeNodePath.length - activityRegionTreeView.CHECK_IS_NOT_ZERO];
        treeNode = treeView.findByUid(treeDataSource.get(treeNodePath[activityRegionTreeView.FIRST_NODE_INDEX]).uid);
        jQuery(activityRegionTreeView.CHECKBOX_NAME_VALUE + currentNodeId + activityRegionTreeView.CHECKBOX_VALUE_BRACKET_OVER).trigger(activityRegionTreeView.CLICK_VALUE);
        jQuery(activityRegionTreeView.HASH_SYMBOL + currentNodeId).closest(activityRegionTreeView.DIV_VALUE).find(activityRegionTreeView.SPAN_LAST_VALUE).addClass(activityRegionTreeView.KENDO_STATE_SELECTED);
    }
}
function openCategoryTreePath ( treeView , treeNodePath ) { treeNodePath = JSON . parse ( activityRegionTreeView . SQUARE_BRACKET_OPEN + treeNodePath + activityRegionTreeView . SQUARE_BRACKET_CLOSE ) ; treeNodePath . splice ( activityRegionTreeView . FIRST_NODE_INDEX , activityRegionTreeView . TREE_NODE_PATH_SPLICE_END ) ; var treeDataSource = treeView . dataSource ; var treeNode = treeDataSource . get ( treeNodePath [ activityRegionTreeView . FIRST_NODE_INDEX ] ) while ( treeNodePath . length > activityRegionTreeView . CHECK_IS_NOT_ZERO && ( treeNode . expanded || treeNode . loaded ( ) ) ) { treeNode . set ( activityRegionTreeView . EXPANDED_VALUE , true ) ; treeNodePath . shift ( ) ; treeNode = treeDataSource . get ( treeNodePath [ activityRegionTreeView . FIRST_NODE_INDEX ] ) ; } if ( treeNodePath . length > activityRegionTreeView . CHECK_IS_NOT_ZERO ) { treeDataSource . bind ( activityRegionTreeView . CHANGE_VALUE , function expandLevel ( changeEvent ) { var lastNodeId = changeEvent . treeNode && changeEvent . treeNode . id ; if ( lastNodeId == treeNodePath [ activityRegionTreeView . FIRST_NODE_INDEX ] ) { treeNodePath . shift ( ) ; treeDataSource . unbind ( activityRegionTreeView . CHANGE_VALUE , expandLevel ) ; openTreePath ( treeView , treeNodePath ) ; } } ) ; treeDataSource . get ( treeNodePath [ activityRegionTreeView . FIRST_NODE_INDE ] ) . set ( activityRegionTreeView . EXPANDED_VALUE , true ) ; } else { var currentNodeId = treeNodePath [ treeNodePath . length - activityRegionTreeView . CHECK_IS_NOT_ZERO ] ; treeNode = treeView . findByUid ( treeDataSource . get ( treeNodePath [ activityRegionTreeView . FIRST_NODE_INDEX ] ) . uid ) ; jQuery ( activityRegionTreeView . CHECKBOX_NAME_VALUE + currentNodeId + activityRegionTreeView . CHECKBOX_VALUE_BRACKET_OVER ) . trigger ( activityRegionTreeView . CLICK_VALUE ) ; jQuery ( activityRegionTreeView . HASH_SYMBOL + currentNodeId ) . closest ( activityRegionTreeView . DIV_VALUE ) . find ( activityRegionTreeView . SPAN_LAST_VALUE ) . addClass ( activityRegionTreeView . KENDO_STATE_SELECTED ) ; } }
Function is use for display selected value.
Function is use for display selected value .