From eb266fdab537922a870b7b8b87775c0922356e98 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 1 Feb 2016 10:01:27 +0100 Subject: changed theme for cross browser compatibility (FF, Chrome, IE, Safari). added filter row --- public/css/style.css | 63 +++++++++++++++++++++++++++++++-------------------- public/css/style2.css | 31 +++++++++++++++++++++++++ views/layout.haml | 2 ++ views/prediction.haml | 7 +++--- 4 files changed, 75 insertions(+), 28 deletions(-) create mode 100644 public/css/style2.css diff --git a/public/css/style.css b/public/css/style.css index 7595f4c..eb41f70 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1,26 +1,39 @@ -.tablesorter-scroller-bar-spacer { - background: #eee; -} -.tablesorter-scroller-fixed:after { - content: ''; - border-right: 1px solid #444; - width: 1px; - position: absolute; - top: 0; - bottom: 0; - z-index: 2; - right: 0; -} -.tablesorter thead tr - th.physchem { - min-width: 60px;} - th.tox { - white-space: nowrap;} -.tablesorter tbody tr - td.physchem { - min-width: 60px;} - td.tox { - white-space: nowrap;} -.tablesorter tbody tr.static td { - background-color: #CCFFCC; +/* tables */ +table.tablesorter { + font-family:arial; + background-color: #CDCDCD; + margin:10px 0pt 15px; + font-size: 8pt; + width: 100%; + text-align: left; +} +table.tablesorter thead tr th, table.tablesorter tfoot tr th { + background-color: #e6EEEE; + border: 1px solid #FFF; + font-size: 8pt; + padding: 4px; +} +table.tablesorter thead tr .header { + background-image: url(bg.gif); + background-repeat: no-repeat; + background-position: center right; + cursor: pointer; +} +table.tablesorter tbody td { + color: #3D3D3D; + padding: 4px; + background-color: #FFF; + vertical-align: top; +} +table.tablesorter tbody tr.odd td { + background-color:#F0F0F6; +} +table.tablesorter thead tr .headerSortUp { + background-image: url(asc.gif); +} +table.tablesorter thead tr .headerSortDown { + background-image: url(desc.gif); +} +table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp { +background-color: #8dbdd8; } diff --git a/public/css/style2.css b/public/css/style2.css new file mode 100644 index 0000000..5b0b8ae --- /dev/null +++ b/public/css/style2.css @@ -0,0 +1,31 @@ +.tablesorter-scroller-bar-spacer { + background: #eee; +} +.tablesorter-scroller-fixed:after { + content: ''; + border-right: 1px solid #444; + width: 1px; + position: absolute; + top: 0; + bottom: 0; + z-index: 2; + right: 0; + margin: 10px 0 15px; +} +.tablesorter thead tr + th { + border: 1px solid black;} +.tablesorter thead tr + th.physchem { + min-width: 60px;} + th.tox { + white-space: nowrap;} +.tablesorter tbody tr + td { + border: 1px solid black;} +.tablesorter tbody tr + td.physchem { + min-width: 60px;} +.tablesorter tbody tr.static td { + background-color: #CCFFCC; +} diff --git a/views/layout.haml b/views/layout.haml index edf6e3e..23d251c 100644 --- a/views/layout.haml +++ b/views/layout.haml @@ -7,8 +7,10 @@ %title Nano Lazar Toxicity Predictions %link{:rel=>'icon', :type=>'image/x-icon', :href=>'/images/favicon.ico'} %link{:rel=>'stylesheet', :href=>"#{'/css/style.css'}"} + %link{:rel=>'stylesheet', :href=>"#{'/css/style2.css'}"} %link{:rel=>'stylesheet', :href=>"#{'/css/bootstrap.min.css'}"} %link{:rel=>'stylesheet', :href=>"#{'/css/theme.bootstrap.min.css'}"} + %link{:rel=>'stylesheet', :href=>"#{'/css/theme.default.min.css'}"} %script{:src=>"/javascripts/jquery-1.11.2.min.js"} %script{:src=>"/javascripts/jquery.tablesorter.min.js"} %script{:src=>"/javascripts/jquery.tablesorter.widgets.js"} diff --git a/views/prediction.haml b/views/prediction.haml index 14fc75b..9385fa7 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -11,9 +11,9 @@ $(document).ready(function(){ $(".tablesorter").tablesorter({ debug: false, - theme: "bootstrap", + //theme: "bootstrap", headerTemplate: '{content} {icon}', - widgets: ['uitheme', 'staticRow', 'scroller'], + widgets: ['filter', 'staticRow', 'scroller'], widgetOptions: { scroller_upAfterSort: true, scroller_jumpToHeader: true, @@ -75,9 +75,10 @@ - if v == nil %p 0 - else - %p= v.round(5) + %h5= v.round(5) - if @prediction[:match] - @prediction[:match].values[0]["tox"].each do |k,v| + %hr %h5 Measurement %p= k %p= v.round(3) -- cgit v1.2.3