mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 13:22:36 +00:00 
			
		
		
		
	git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3596 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
window.noderange="";
 | 
						|
function updatenoderange() {
 | 
						|
    myselection=nrtree.selected_arr;
 | 
						|
    window.noderange="";
 | 
						|
    for (node in myselection) {
 | 
						|
        window.noderange+=myselection[node][0].id;
 | 
						|
    }
 | 
						|
    window.noderange=window.noderange.substring(1);
 | 
						|
 | 
						|
    if (window.nodetabs) {
 | 
						|
    	var index = window.nodetabs.data('selected.tabs');
 | 
						|
		// todo: figure out a better way to determine if the current tab is one of those that needs to be reloaded with the new noderange
 | 
						|
    	if (index == 0) {
 | 
						|
    		//alert('here');
 | 
						|
    		//window.nodetabs.tabs('select', index);	// simulate selecting it, so it reloads.  Did not work.
 | 
						|
    		loadAttrTab($('#attributes-tab'));
 | 
						|
    		}
 | 
						|
    	if (index == 2) {
 | 
						|
    		loadVitalsTab($('#rvitals-tab'));
 | 
						|
    		}
 | 
						|
    	}
 | 
						|
        if (index == 3) {
 | 
						|
            loadRpowerTab($('#rpower-tab'));
 | 
						|
        }
 | 
						|
        if (index == 4) {
 | 
						|
            loadPingTab($('#ping-tab'));
 | 
						|
        }
 | 
						|
        if (index == 5) {
 | 
						|
            loadCopyTab($('#copy-tab'));
 | 
						|
        }
 | 
						|
        if (index == 6) {
 | 
						|
            loadSPCfgTab($('#spcfg-tab'));
 | 
						|
        }
 | 
						|
 | 
						|
}
 | 
						|
 | 
						|
$(document).ready(function() {
 | 
						|
 | 
						|
    nrtree = new tree_component(); // -Tree begin
 | 
						|
    nrtree.init($("#nrtree"),{
 | 
						|
        rules: { multiple: "Ctrl" },
 | 
						|
        ui: { animation: 250 },
 | 
						|
        callback : { onchange : updatenoderange },
 | 
						|
        data : {
 | 
						|
            type : "json",
 | 
						|
            async : "true",
 | 
						|
            url: "noderangesource.php"
 | 
						|
        }
 | 
						|
    });  //Tree finish
 | 
						|
});
 |