WebContent/js/explore/spaces.js
/**
 * Handles removal of subspace(s) from a space
 * @author Todd Elvers
 */
Handles removal of subspace(s) from a space
@author Todd Elvers
Handles removal of subspace ( s ) from a space @author Todd Elvers
function removeSubspaces(selectedSubspaces) {
	$('#dialog-confirm-delete-txt')
	.text('Do you want to recycle the solvers and benchmarks, and delete the jobs in the selected subspace(s), and all their subspaces, or do you only want to remove the selected subspace(s) from ' + spaceName + '?'); 
	$('#dialog-confirm-delete').dialog({
		modal: true,
		height: 400,
		width: 400,
		buttons: {
			"remove subspace(s) only": function() {
				log('user confirmed subspace deletion');
				$('#dialog-confirm-delete').dialog('close');
				makeRemoveSubspacesPost(selectedSubspaces, false);
				selectedSubspaces.forEach(function(subspace) {
					$('#exploreList').jstree("remove", "#" + subspace);
				});
				$('#exploreList').jstree("refresh");
			},
			'remove subspace(s), and recycle primitives': function() {
				log('user confirmed subspace deletion');
				$('#dialog-confirm-delete').dialog('close');
				makeRemoveSubspacesPost(selectedSubspaces, true);
				selectedSubspaces.forEach(function(subspace) {
					$('#exploreList').jstree("remove", "#" + subspace);
				});
				$('#exploreList').jstree("refresh");
			},
			"cancel": function() {
				log('user canceled subspace deletion');
				$(this).dialog("close");
			}
		}
	});
}
function removeSubspaces ( selectedSubspaces ) { $ ( '#dialog-confirm-delete-txt' ) . text ( 'Do you want to recycle the solvers and benchmarks, and delete the jobs in the selected subspace(s), and all their subspaces, or do you only want to remove the selected subspace(s) from ' + spaceName + '?' ) ; $ ( '#dialog-confirm-delete' ) . dialog ( { modal : true , height : 400 , width : 400 , buttons : { "remove subspace(s) only" : function ( ) { log ( 'user confirmed subspace deletion' ) ; $ ( '#dialog-confirm-delete' ) . dialog ( 'close' ) ; makeRemoveSubspacesPost ( selectedSubspaces , false ) ; selectedSubspaces . forEach ( function ( subspace ) { $ ( '#exploreList' ) . jstree ( "remove" , "#" + subspace ) ; } ) ; $ ( '#exploreList' ) . jstree ( "refresh" ) ; } , 'remove subspace(s), and recycle primitives' : function ( ) { log ( 'user confirmed subspace deletion' ) ; $ ( '#dialog-confirm-delete' ) . dialog ( 'close' ) ; makeRemoveSubspacesPost ( selectedSubspaces , true ) ; selectedSubspaces . forEach ( function ( subspace ) { $ ( '#exploreList' ) . jstree ( "remove" , "#" + subspace ) ; } ) ; $ ( '#exploreList' ) . jstree ( "refresh" ) ; } , "cancel" : function ( ) { log ( 'user canceled subspace deletion' ) ; $ ( this ) . dialog ( "close" ) ; } } } ) ; }
Handles removal of subspace(s) from a space
 @author Todd Elvers
Handles removal of subspace ( s ) from a space @author Todd Elvers
// Display the confirmation dialog
 // If the user actually confirms, close the dialog right away
 // If the user actually confirms, close the dialog right away
