Skip to content

Commit 0994537

Browse files
author
Tomasz
authored
Merge pull request #2515 from antgonza/fix-2512
fix #2512
2 parents 7462867 + 617831b commit 0994537

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

qiita_pet/templates/list_studies.html

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
$('#user-studies-table').dataTable({
5959
"lengthMenu": [[5, 10, 50, -1], [5, 10, 50, "All"]],
6060
"deferRender": true,
61+
"sDom": '<"top">l',
6162
"columns": [
6263
{ "orderable": false, "data": "artifact_biom_ids" },
6364
{ "data": "study_title" },
@@ -112,7 +113,6 @@
112113
}, targets: [5]},
113114
],
114115
"language": {
115-
"search": "Filter results by column data (Title, abstract, PI, etc):",
116116
"loadingRecords": "Please wait - loading information ...",
117117
"zeroRecords": "No studies found"
118118
},
@@ -176,7 +176,6 @@
176176
}, targets: [1]},
177177
],
178178
"language": {
179-
"search": "Filter results by column data (Title, abstract, PI, etc):",
180179
"loadingRecords": "Please wait - loading information ...",
181180
"zeroRecords": "No studies found"
182181
},
@@ -241,8 +240,9 @@
241240
});
242241

243242
// connecting searches
244-
$('#user-studies-table').on('search.dt', function () {
245-
var search_text = $('.dataTables_filter input').val();
243+
$('#study-search-input').keyup(function(){
244+
var search_text = $(this).val();
245+
$('#user-studies-table').DataTable().search(search_text).draw();
246246
$('#studies-table').DataTable().search(search_text).draw();
247247
});
248248

@@ -341,14 +341,22 @@
341341
<!--User Studies-->
342342
<div class="row">
343343
<div class="col-sm-12" id="user-studies-div">
344-
<h5 class="gray-msg">
345-
Filter studies by tags:
346-
<small>(
347-
<span style="color: #FFA500">Admin</span>,
348-
<span style="color: #1E90FF">User</span>
349-
)</small>
350-
</h5>
351-
<select class="js-select2-multiple form-control" id="study_tags_multiple" multiple="multiple" style="width: 100%"></select>
344+
<div class="row">
345+
<div class="col-md-8">
346+
<h5 class="gray-msg">Filter by column data (Title, abstract, PI, etc):</h5>
347+
<input type="text" class="form-control" id="study-search-input" style="width: 100%">
348+
</div>
349+
<div class="col-md-4">
350+
<h5 class="gray-msg">
351+
Filter studies by tags:
352+
<small>(
353+
<span style="color: #FFA500">Admin</span>,
354+
<span style="color: #1E90FF">User</span>
355+
)</small>
356+
</h5>
357+
<select class="js-select2-multiple form-control" id="study_tags_multiple" multiple="multiple" style="width: 100%"></select>
358+
</div>
359+
</div>
352360

353361
<h3 class="gray-msg">Your Studies</h3>
354362
<table id="user-studies-table" class="table table-bordered gray-msg">

0 commit comments

Comments
 (0)