aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wqflask/wqflask/static/new/javascript/search_results.js14
-rw-r--r--wqflask/wqflask/templates/gsearch_gene.html16
-rw-r--r--wqflask/wqflask/templates/gsearch_pheno.html17
-rw-r--r--wqflask/wqflask/templates/mapping_results.html12
-rw-r--r--wqflask/wqflask/templates/search_result_page.html15
5 files changed, 23 insertions, 51 deletions
diff --git a/wqflask/wqflask/static/new/javascript/search_results.js b/wqflask/wqflask/static/new/javascript/search_results.js
index 4e87d67a..b696dc4d 100644
--- a/wqflask/wqflask/static/new/javascript/search_results.js
+++ b/wqflask/wqflask/static/new/javascript/search_results.js
@@ -281,4 +281,18 @@ $(function() {
}
});
+ $.fn.dataTable.ext.order['dom-checkbox'] = function ( settings, col )
+ {
+ return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
+ return $('input', td).prop('checked') ? '1' : '0';
+ } );
+ };
+
+ $.fn.dataTable.ext.order['dom-inner-text'] = function ( settings, col )
+ {
+ return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
+ return $(td).text();
+ } );
+ }
+
}); \ No newline at end of file
diff --git a/wqflask/wqflask/templates/gsearch_gene.html b/wqflask/wqflask/templates/gsearch_gene.html
index 478d6f5f..d2c78d65 100644
--- a/wqflask/wqflask/templates/gsearch_gene.html
+++ b/wqflask/wqflask/templates/gsearch_gene.html
@@ -59,20 +59,6 @@
</script>
<script type="text/javascript" charset="utf-8">
- $.fn.dataTable.ext.order['dom-checkbox'] = function ( settings, col )
- {
- return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
- return $('input', td).prop('checked') ? '1' : '0';
- } );
- };
-
- $.fn.dataTable.ext.order['dom-inner-text'] = function ( settings, col )
- {
- return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
- return $(td).text();
- } );
- }
-
$(document).ready( function () {
$('#trait_table tr').click(function(event) {
@@ -252,7 +238,7 @@
'sDom': "pitirp",
'autoWidth': true,
'iDisplayLength': 500,
- 'deferRender': true,
+ 'deferRender': false,
'paging': true,
'orderClasses': true,
'processing': true,
diff --git a/wqflask/wqflask/templates/gsearch_pheno.html b/wqflask/wqflask/templates/gsearch_pheno.html
index eb998d15..c44231f3 100644
--- a/wqflask/wqflask/templates/gsearch_pheno.html
+++ b/wqflask/wqflask/templates/gsearch_pheno.html
@@ -59,20 +59,6 @@
</script>
<script type="text/javascript" charset="utf-8">
- $.fn.dataTable.ext.order['dom-checkbox'] = function ( settings, col )
- {
- return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
- return $('input', td).prop('checked') ? '1' : '0';
- } );
- };
-
- $.fn.dataTable.ext.order['dom-inner-text'] = function ( settings, col )
- {
- return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
- return $(td).text();
- } );
- }
-
$(document).ready( function () {
$('#trait_table tr').click(function(event) {
@@ -172,6 +158,7 @@
'title': "Record",
'type': "natural",
'data': null,
+ 'orderDataType': "dom-inner-text",
'render': function(data, type, row, meta) {
return '<a target="_blank" href="/show_trait?trait_id=' + data.name + '&dataset=' + data.dataset + '">' + data.display_name + '</a>'
}
@@ -252,7 +239,7 @@
'order': [[1, "asc" ]],
'sDom': "pitirp",
'autoWidth': false,
- 'deferRender': true,
+ 'deferRender': false,
'iDisplayLength': 500,
'paging': true,
'orderClasses': true,
diff --git a/wqflask/wqflask/templates/mapping_results.html b/wqflask/wqflask/templates/mapping_results.html
index 8edda548..9c170494 100644
--- a/wqflask/wqflask/templates/mapping_results.html
+++ b/wqflask/wqflask/templates/mapping_results.html
@@ -395,16 +395,16 @@
$('td', row).eq(9).attr("align", "right");
},
"columns": [
- { "bSortable": false},
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
- { "type": "natural" },
+ { "orderDataType": "dom-checkbox" },
+ { "type": "natural"},
+ { "type": "natural" , "orderDataType": "dom-inner-text" },
+ { "type": "natural" , "orderDataType": "dom-inner-text" },
+ { "type": "natural" , "orderDataType": "dom-inner-text" },
{ "type": "natural" },
{ "type": "natural" },
{ "type": "natural" },
{ "type": "natural" },
+ { "type": "natural" , "orderDataType": "dom-inner-text" },
{ "type": "natural" }
],
"columnDefs": [ {
diff --git a/wqflask/wqflask/templates/search_result_page.html b/wqflask/wqflask/templates/search_result_page.html
index 53373b41..282e752d 100644
--- a/wqflask/wqflask/templates/search_result_page.html
+++ b/wqflask/wqflask/templates/search_result_page.html
@@ -174,21 +174,6 @@
</script>
<script type="text/javascript" charset="utf-8">
-
- $.fn.dataTable.ext.order['dom-checkbox'] = function ( settings, col )
- {
- return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
- return $('input', td).prop('checked') ? '1' : '0';
- } );
- };
-
- $.fn.dataTable.ext.order['dom-inner-text'] = function ( settings, col )
- {
- return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
- return $(td).text();
- } );
- }
-
$(document).ready( function () {
$('#trait_table tr').click(function(event) {