Skip to content

Commit

Permalink
Cleaned up datasets page a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewels committed Nov 9, 2015
1 parent 55df35f commit 80db2b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
13 changes: 6 additions & 7 deletions datasets.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,11 @@
<?php endif; ?>

<?php if($admin || in_array($user['id'], $project_users)){ ?>
<a class="btn pull-right" href="datasets.php?edit=<?php echo $project['id']; ?>">Edit Datasets</a>
<a style="margin-right:15px;" class="btn pull-right" href="datasets.php?add=<?php echo $project['id']; ?>">Add Datasets</a>
<div class="pull-right">
<a class="btn" href="datasets.php?edit=<?php echo $project['id']; ?>">Edit Datasets</a> &nbsp;
<a class="btn" href="datasets.php?add=<?php echo $project['id']; ?>">Add Datasets</a> &nbsp;
<a href="#sra-links-modal" role="button" class="btn btn-primary" data-toggle="modal">Get SRA Links</a>
</div>
<?php } ?>


Expand All @@ -278,11 +281,7 @@
$existing_datasets = array();
if(mysqli_num_rows($datasets) > 0){
?>

<p style="margin-bottom:20px;">
<a href="#sra-links-modal" role="button" class="btn btn-primary pull-right" data-toggle="modal">Get SRA Links</a>
<label>Filter datasets: &nbsp; <input type="text" id="filter-datasets" /></label>
</p>

<table id="existing_datasets_table" class="display compact sortable order-column hover">
<thead>
<tr>
Expand Down
17 changes: 0 additions & 17 deletions js/datasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,6 @@
datasets.js
Javascript for the Labrador Datasets page
*/

// View - Filter datasets by text entry
$('#filter-datasets').keyup(function(e){
if($(this).val().length == 0){
$('#existing_datasets_table tbody tr').show();
} else {
$('#existing_datasets_table tbody tr').hide();
var filterText = $(this).val().toLowerCase();
$('#existing_datasets_table tbody tr td').filter(function(i){
if($(this).text().toLowerCase().indexOf(filterText) >= 0){
return true;
} else {
return false;
}
}).parent().show();
}
});

// Download text file of dataset URLs
$('#sra-links-modal').on('show', function () {
Expand Down

0 comments on commit 80db2b8

Please sign in to comment.