WebContent/js/explore/spaces.js
/**
 * Updates the URLs to perform actions on the current space
 * @param id The id of the current space
 */
Updates the URLs to perform actions on the current space
@param id The id of the current space
Updates the URLs to perform actions on the current space @param id The id of the current space
function updateButtonIds(id) {
	$('#editSpace')
	.attr('href', starexecRoot + "secure/edit/space.jsp?id=" + id);
	$('#editSpacePermissions')
	.attr('href', starexecRoot + "secure/edit/spacePermissions.jsp?id=" + id);
	$('#addSpace')
	.attr('href', starexecRoot + "secure/add/space.jsp?sid=" + id);
	$('#uploadBench')
	.attr('href', starexecRoot + "secure/add/benchmarks.jsp?sid=" + id);
	$('#uploadSolver')
	.attr('href', starexecRoot + "secure/add/solver.jsp?sid=" + id);
	$('#addJob').attr('href', starexecRoot + "secure/add/job.jsp?sid=" + id);
	$('#addQuickJob')
	.attr('href', starexecRoot + "secure/add/quickJob.jsp?sid=" + id);
	$("#processBenchmarks")
	.attr("href", starexecRoot + "secure/edit/processBenchmarks.jsp?sid=" + id);
	$("#downloadXML").unbind("click");
	$('#downloadXML').click(function(e) {
		$('#dialog-spacexml-attributes-txt')
		.text('Do you want benchmark attributes included in the XML?');
		$('#dialog-spacexml').dialog({
			modal: true,
			width: 380,
			height: 300,
			buttons: {
				"download": function() {
					var attVal = $('input[name=att]:checked').val();
					attBool = attVal == "true";
					createDownloadSpaceXMLRequest(attBool, false, -1, id);
					$(this).dialog("close");
				},
				"cancel": function() {
					$(this).dialog("close");
				}
			}
		});
	});
	$('#showUpdateDialog').click(function() {
		$("#dialog-spaceUpdateXml").dialog();
		$('#dialog-spacexml').dialog("close");
		$('#dialog-spacexml-updates-txt')
		.text('Enter default update processor id');
		$('#dialog-spaceUpdateXml').dialog({
			modal: true,
			width: 380,
			height: 300,
			buttons: {
				"download": function() {
					var updatePID = $('#updateID').val();
					createDownloadSpaceXMLRequest(false, true, updatePID, id);
					$(this).dialog("close");
				},
				"cancel": function() {
					$(this).dialog("close");
				}
			}
		});
	});
	$('#uploadJobXML')
	.attr('href', starexecRoot + "secure/add/batchJob.jsp?sid=" + id);
	$('#uploadXML')
	.attr('href', starexecRoot + "secure/add/batchSpace.jsp?sid=" + id);
	$("#downloadSpace").unbind("click");
	$("#downloadSpace").click(function() {
		$("#downloadBoth").prop("checked", "checked");
		$('#noIdDirectories').prop('checked', 'checked');
		var dialogHeight = 500;
		if (isLeafSpace) {
			$('#downloadHierarchyOptionContainer').hide();
			dialogHeight = 400;
		} else {
			$('#downloadHierarchyOptionContainer').show();
			dialogHeight = 500;
		}
		$('#dialog-download-space').dialog({
			modal: true,
			width: 380,
			height: dialogHeight,
			buttons: {
				'submit': function() {
					createDownloadSpacePost(id);
					$(this).dialog("close");
				}
			}
		});
	});
	log('updated action button space ids to ' + id);
}
function updateButtonIds ( id ) { $ ( '#editSpace' ) . attr ( 'href' , starexecRoot + "secure/edit/space.jsp?id=" + id ) ; $ ( '#editSpacePermissions' ) . attr ( 'href' , starexecRoot + "secure/edit/spacePermissions.jsp?id=" + id ) ; $ ( '#addSpace' ) . attr ( 'href' , starexecRoot + "secure/add/space.jsp?sid=" + id ) ; $ ( '#uploadBench' ) . attr ( 'href' , starexecRoot + "secure/add/benchmarks.jsp?sid=" + id ) ; $ ( '#uploadSolver' ) . attr ( 'href' , starexecRoot + "secure/add/solver.jsp?sid=" + id ) ; $ ( '#addJob' ) . attr ( 'href' , starexecRoot + "secure/add/job.jsp?sid=" + id ) ; $ ( '#addQuickJob' ) . attr ( 'href' , starexecRoot + "secure/add/quickJob.jsp?sid=" + id ) ; $ ( "#processBenchmarks" ) . attr ( "href" , starexecRoot + "secure/edit/processBenchmarks.jsp?sid=" + id ) ; $ ( "#downloadXML" ) . unbind ( "click" ) ; $ ( '#downloadXML' ) . click ( function ( e ) { $ ( '#dialog-spacexml-attributes-txt' ) . text ( 'Do you want benchmark attributes included in the XML?' ) ; $ ( '#dialog-spacexml' ) . dialog ( { modal : true , width : 380 , height : 300 , buttons : { "download" : function ( ) { var attVal = $ ( 'input[name=att]:checked' ) . val ( ) ; attBool = attVal == "true" ; createDownloadSpaceXMLRequest ( attBool , false , - 1 , id ) ; $ ( this ) . dialog ( "close" ) ; } , "cancel" : function ( ) { $ ( this ) . dialog ( "close" ) ; } } } ) ; } ) ; $ ( '#showUpdateDialog' ) . click ( function ( ) { $ ( "#dialog-spaceUpdateXml" ) . dialog ( ) ; $ ( '#dialog-spacexml' ) . dialog ( "close" ) ; $ ( '#dialog-spacexml-updates-txt' ) . text ( 'Enter default update processor id' ) ; $ ( '#dialog-spaceUpdateXml' ) . dialog ( { modal : true , width : 380 , height : 300 , buttons : { "download" : function ( ) { var updatePID = $ ( '#updateID' ) . val ( ) ; createDownloadSpaceXMLRequest ( false , true , updatePID , id ) ; $ ( this ) . dialog ( "close" ) ; } , "cancel" : function ( ) { $ ( this ) . dialog ( "close" ) ; } } } ) ; } ) ; $ ( '#uploadJobXML' ) . attr ( 'href' , starexecRoot + "secure/add/batchJob.jsp?sid=" + id ) ; $ ( '#uploadXML' ) . attr ( 'href' , starexecRoot + "secure/add/batchSpace.jsp?sid=" + id ) ; $ ( "#downloadSpace" ) . unbind ( "click" ) ; $ ( "#downloadSpace" ) . click ( function ( ) { $ ( "#downloadBoth" ) . prop ( "checked" , "checked" ) ; $ ( '#noIdDirectories' ) . prop ( 'checked' , 'checked' ) ; var dialogHeight = 500 ; if ( isLeafSpace ) { $ ( '#downloadHierarchyOptionContainer' ) . hide ( ) ; dialogHeight = 400 ; } else { $ ( '#downloadHierarchyOptionContainer' ) . show ( ) ; dialogHeight = 500 ; } $ ( '#dialog-download-space' ) . dialog ( { modal : true , width : 380 , height : dialogHeight , buttons : { 'submit' : function ( ) { createDownloadSpacePost ( id ) ; $ ( this ) . dialog ( "close" ) ; } } } ) ; } ) ; log ( 'updated action button space ids to ' + id ) ; }
Updates the URLs to perform actions on the current space
 @param id The id of the current space
Updates the URLs to perform actions on the current space @param id The id of the current space
// Display the confirmation dialog
