WebContent/js/explore/spaces.js
/**
 * Creates the space explorer tree for the left-hand side of the page, also
 * creates tooltips for the space explorer, .expd class, and userTable (if applicable)
 * @author Tyler Jensen & Todd Elvers & Skylar Stark
 */
Creates the space explorer tree for the left-hand side of the page, also
creates tooltips for the space explorer, .expd class, and userTable (if applicable)
@author Tyler Jensen & Todd Elvers & Skylar Stark
Creates the space explorer tree for the left - hand side of the page also creates tooltips for the space explorer . expd class and userTable ( if applicable ) @author Tyler Jensen & Todd Elvers & Skylar Stark
function initSpaceExplorer() {
	jsTree = makeSpaceTree("#exploreList", !usingSpaceChain);
	jsTree.bind("select_node.jstree", function(event, data) {
		id = data.rslt.obj.attr("id");
		var permalink = "?id=" + String(id);
		window.isLeafSpace = spaceIsLeaf(id);
		log('Selected space isLeafSpace=' + isLeafSpace);
		log('Space explorer node ' + id + ' was clicked');
		updateButtonIds(id);
		getSpaceDetails(id);
		window.history.replaceState(null, "Space Explorer", permalink);
		$(".qtip-userTooltip").remove();
		$(".qtip-expdTooltip").remove();
	}).bind("loaded.jstree", function(event, data) {
		handleSpaceChain("#spaceChain");
	}).bind("open_node.jstree", function(event, data) {
		window.openDone = true;
	});
	var $copyPrimitivesOptions = $("#copy-primitives-options");
	$("#hier-copy-options").change(function(e) {
		switch (e.target.value) {
		case "move":
			$copyPrimitivesOptions.hide();
			break;
		default:
			$copyPrimitivesOptions.show();
		}
	});
	log('Space explorer node list initialized');
}
function initSpaceExplorer ( ) { jsTree = makeSpaceTree ( "#exploreList" , ! usingSpaceChain ) ; jsTree . bind ( "select_node.jstree" , function ( event , data ) { id = data . rslt . obj . attr ( "id" ) ; var permalink = "?id=" + String ( id ) ; window . isLeafSpace = spaceIsLeaf ( id ) ; log ( 'Selected space isLeafSpace=' + isLeafSpace ) ; log ( 'Space explorer node ' + id + ' was clicked' ) ; updateButtonIds ( id ) ; getSpaceDetails ( id ) ; window . history . replaceState ( null , "Space Explorer" , permalink ) ; $ ( ".qtip-userTooltip" ) . remove ( ) ; $ ( ".qtip-expdTooltip" ) . remove ( ) ; } ) . bind ( "loaded.jstree" , function ( event , data ) { handleSpaceChain ( "#spaceChain" ) ; } ) . bind ( "open_node.jstree" , function ( event , data ) { window . openDone = true ; } ) ; var $copyPrimitivesOptions = $ ( "#copy-primitives-options" ) ; $ ( "#hier-copy-options" ) . change ( function ( e ) { switch ( e . target . value ) { case "move" : $copyPrimitivesOptions . hide ( ) ; break ; default : $copyPrimitivesOptions . show ( ) ; } } ) ; log ( 'Space explorer node list initialized' ) ; }
Creates the space explorer tree for the left-hand side of the page, also
 creates tooltips for the space explorer, .expd class, and userTable (if applicable)
 @author Tyler Jensen & Todd Elvers & Skylar Stark
Creates the space explorer tree for the left - hand side of the page also creates tooltips for the space explorer . expd class and userTable ( if applicable ) @author Tyler Jensen & Todd Elvers & Skylar Stark
// Initialize the jstree plugin for the explorer list
 // Bug: This is creating a global variable. Intentional?
 // When a node is clicked, get its ID and display the info in the details pane
 // Bug: This is creating a global variable. Intentional?
 /**
		 * The URL linking directly to this space
		 * @const {string}
		 */ // Update global variable `isLeafSpace`
 // Replace the current URL with a URL linking directly to this space
 // We replace rather than push so the Back button still navigates away
 //   from the Space Explorer
 // Remove all non-permanent tooltips from the page; helps keep
 // the page from getting filled with hundreds of qtip divs
 // Update global variable `openDone`
