summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2016-02-01 10:01:27 +0100
committergebele <gebele@in-silico.ch>2016-02-01 10:01:27 +0100
commiteb266fdab537922a870b7b8b87775c0922356e98 (patch)
tree9f7bd75cabac4106467998b519635217a7639d24
parent111811340b889f0ad964ef8083de7981cf50bb5f (diff)
changed theme for cross browser compatibility (FF, Chrome, IE, Safari). added filter row
-rw-r--r--public/css/style.css63
-rw-r--r--public/css/style2.css31
-rw-r--r--views/layout.haml2
-rw-r--r--views/prediction.haml7
4 files changed, 75 insertions, 28 deletions
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)