WebContent/js/explore/spaces.js
/**
 * Updates a table by removing selected rows and updating the table's legend to match the new table size.
 *
 * @param dataTable the dataTable to update
 * @author Todd Elvers
 */
Updates a table by removing selected rows and updating the table's legend to match the new table size.

@param dataTable the dataTable to update
@author Todd Elvers
Updates a table by removing selected rows and updating the table ' s legend to match the new table size . @param dataTable the dataTable to update @author Todd Elvers
function updateTable(dataTable) {
	var rowsToRemove = $(dataTable)
	.children('tbody')
	.children('tr.row_selected');
	var rowsRemaining = $(dataTable)
	.children('tbody')
	.children(':not(tr.row_selected)');
	$.each(rowsToRemove, function(i, row) {
		dataTable.fnDeleteRow(row);
	});
	$(dataTable)
	.parent()
	.parent()
	.parent()
	.children('legend')
	.children('span:first-child')
	.text(rowsRemaining.length);
	log('table updated. rows removed: ' + rowsToRemove.length + ' rows remaining: ' + rowsRemaining.length);
}
function updateTable ( dataTable ) { var rowsToRemove = $ ( dataTable ) . children ( 'tbody' ) . children ( 'tr.row_selected' ) ; var rowsRemaining = $ ( dataTable ) . children ( 'tbody' ) . children ( ':not(tr.row_selected)' ) ; $ . each ( rowsToRemove , function ( i , row ) { dataTable . fnDeleteRow ( row ) ; } ) ; $ ( dataTable ) . parent ( ) . parent ( ) . parent ( ) . children ( 'legend' ) . children ( 'span:first-child' ) . text ( rowsRemaining . length ) ; log ( 'table updated. rows removed: ' + rowsToRemove . length + ' rows remaining: ' + rowsRemaining . length ) ; }
Updates a table by removing selected rows and updating the table's legend to match the new table size.
Updates a table by removing selected rows and updating the table ' s legend to match the new table size .