mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 10:24:38 +08:00
return selectAll
This commit is contained in:
@@ -710,6 +710,26 @@ var AddDatasets = Backbone.View.extend({
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* User clicked the checkbox in the table heading
|
||||
* @param {context} event
|
||||
*/
|
||||
selectAll: function (event) {
|
||||
var selected = event.target.checked;
|
||||
var self = this;
|
||||
// Iterate each checkbox
|
||||
$(":checkbox", "#dataset_list tbody").each(function () {
|
||||
this.checked = selected;
|
||||
var $row = $(this).closest("tr");
|
||||
// Change color of selected/unselected
|
||||
if (selected) {
|
||||
self.makeDarkRow($row);
|
||||
} else {
|
||||
self.makeWhiteRow($row);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
makeDarkRow: function ($row) {
|
||||
$row.addClass("table-primary");
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user