From 111811340b889f0ad964ef8083de7981cf50bb5f Mon Sep 17 00:00:00 2001 From: gebele Date: Sun, 31 Jan 2016 13:15:08 +0100 Subject: updated layout. works with FF,Chrome --- views/layout.haml | 2 +- views/prediction.haml | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'views') diff --git a/views/layout.haml b/views/layout.haml index 78a8878..edf6e3e 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -14,7 +14,7 @@ %script{:src=>"/javascripts/jquery.tablesorter.widgets.js"} %script{:src=>"/javascripts/jquery.tablesorter.staticrow.min.js"} -#%script{:src=>"/javascripts/jquery.doubleScroll.js"} - -#%script{:src=>"/javascripts/widget-scroller.js"} + %script{:src=>"/javascripts/widget-scroller.js"} %script{:src=>"/javascripts/bootstrap.min.js"} %body %noscript diff --git a/views/prediction.haml b/views/prediction.haml index 29cba40..14fc75b 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -9,20 +9,27 @@ %hr :javascript $(document).ready(function(){ - $("table#neighbors").tablesorter({ + $(".tablesorter").tablesorter({ debug: false, theme: "bootstrap", headerTemplate: '{content} {icon}', - widgets: ['uitheme', 'staticRow'], + widgets: ['uitheme', 'staticRow', 'scroller'], widgetOptions: { + scroller_upAfterSort: true, + scroller_jumpToHeader: true, + scroller_height : 300, + scroller_fixedColumns : 4, + scroller_addFixedOverlay : false, + scroller_barWidth : null }, sortList: [[1,1]], widthFixed: false, }); }); - #results.table-responsive - %table.tablesorter{:id=>"neighbors"} + + #neighbors + %table.tablesorter{:id=>"fixed-columns-table"} %thead %tr %th @@ -125,4 +132,3 @@ %div{:style=>"display:inline-block;padding-right:20px;"} /= k.gsub(/\sMean/, '') %p= v.round(3) - -- cgit v1.2.3