WebContent/js/explore/spaces.js
/**
 * For a given dataTable, this returns true if the user is allowed to delete
 * every selected primitive. This occurs if they own all of them and none of them
 * have already been recycled / deleted
 *
 * @param dataTable the particular dataTable the selections are in
 * @author Eric Burns
 */
For a given dataTable, this returns true if the user is allowed to delete
every selected primitive. This occurs if they own all of them and none of them
have already been recycled / deleted

@param dataTable the particular dataTable the selections are in
@author Eric Burns
For a given dataTable this returns true if the user is allowed to delete every selected primitive . This occurs if they own all of them and none of them have already been recycled / deleted @param dataTable the particular dataTable the selections are in @author Eric Burns
function userCanDeleteAll(dataTable) {
	allMatch = true;
	var rows = $(dataTable).children('tbody').children('tr.row_selected');
	$.each(rows, function(i, row) {
		if (!allMatch) {
			return;
		}
		input = $(this).children('td:first').children("input");
		if (parseInt(input.attr("userId")) != currentUserId) {
			allMatch = false;
		} else if (parseBoolean(input.attr("recycled")) || parseBoolean(input.attr(
				"deleted"))) {
			allMatch = false;
		}
	});
	return allMatch;
}
function userCanDeleteAll ( dataTable ) { allMatch = true ; var rows = $ ( dataTable ) . children ( 'tbody' ) . children ( 'tr.row_selected' ) ; $ . each ( rows , function ( i , row ) { if ( ! allMatch ) { return ; } input = $ ( this ) . children ( 'td:first' ) . children ( "input" ) ; if ( parseInt ( input . attr ( "userId" ) ) != currentUserId ) { allMatch = false ; } else if ( parseBoolean ( input . attr ( "recycled" ) ) || parseBoolean ( input . attr ( "deleted" ) ) ) { allMatch = false ; } } ) ; return allMatch ; }
For a given dataTable, this returns true if the user is allowed to delete
 every selected primitive.
For a given dataTable this returns true if the user is allowed to delete every selected primitive .