summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/css/bootstrap-theme.min.css5
-rw-r--r--public/css/style.css33
-rw-r--r--public/css/theme.bootstrap.css158
-rw-r--r--public/javascripts/widget-scroller.js921
-rw-r--r--views/layout.haml2
-rw-r--r--views/prediction.haml125
6 files changed, 1013 insertions, 231 deletions
diff --git a/public/css/bootstrap-theme.min.css b/public/css/bootstrap-theme.min.css
deleted file mode 100644
index cefa3d1..0000000
--- a/public/css/bootstrap-theme.min.css
+++ /dev/null
@@ -1,5 +0,0 @@
-/*!
- * Bootstrap v3.3.4 (http://getbootstrap.com)
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} \ No newline at end of file
diff --git a/public/css/style.css b/public/css/style.css
index 45b5c52..e03c660 100644
--- a/public/css/style.css
+++ b/public/css/style.css
@@ -1,9 +1,32 @@
-.tablesorter thead tr th {
- vertical-align: middle;
+.neighbor {
+}
+.tablesorter tbody tr td {
+ padding: 8px;
}
.tablesorter tbody tr td {
- white-space: nowrap;
+ padding: 8px;
+}
+.tablesorter thead tr th {
+ vertical-align: middle;
}
-.tablesorter tbody tr.static td {
- background-color: #B0B0B0;
+.tablesorter thead tr
+ td.physchem {
+ white-space: nowrap;
+ min-width: 60px;}
+ td.tox {
+ white-space: nowrap;}
+.tablesorter tbody tr
+ td.physchem {
+ white-space: nowrap;
+ min-width: 60px;}
+ td.tox {
+ white-space: nowrap;}
+ td {
+ padding: 4px 18px 4px 4px;
+ font-size: 14px;
+ font-weight: 700;
+ line-height: 20px;}
+
+.tablesorter thead tr.static td {
+ background-color: #99cc00;
}
diff --git a/public/css/theme.bootstrap.css b/public/css/theme.bootstrap.css
deleted file mode 100644
index 11a3ea7..0000000
--- a/public/css/theme.bootstrap.css
+++ /dev/null
@@ -1,158 +0,0 @@
-/*************
- Bootstrap theme
- *************/
-/* jQuery Bootstrap Theme */
-.tablesorter-bootstrap {
- width: 100%;
-}
-.tablesorter-bootstrap thead th,
-.tablesorter-bootstrap thead td,
-.tablesorter-bootstrap tfoot th,
-.tablesorter-bootstrap tfoot td {
- font: 14px/20px Arial, Sans-serif;
- font-weight: bold;
- padding: 4px;
- margin: 0 0 18px;
- background-color: #eee;
-}
-
-.tablesorter-bootstrap .tablesorter-header {
- cursor: pointer;
-}
-
-.tablesorter-bootstrap .tablesorter-header-inner {
- position: relative;
- padding: 4px 18px 4px 4px;
-}
-
-/* bootstrap uses <i> for icons */
-.tablesorter-bootstrap .tablesorter-header i.tablesorter-icon {
- font-size: 11px;
- position: absolute;
- right: 2px;
- top: 50%;
- margin-top: -7px; /* half the icon height; older IE doesn't like this */
- width: 14px;
- height: 14px;
- background-repeat: no-repeat;
- line-height: 14px;
- display: inline-block;
-}
-
-/* black unsorted icon */
-.tablesorter-bootstrap .bootstrap-icon-unsorted {
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOCAMAAADOvxanAAAAVFBMVEUAAABCQkJZWVkZGRnJyckgICAZGRkZGRn8/PweHh4dHR0aGhoaGhpUVFQbGxvQ0NDc3NxMTExSUlIbGxvr6+s4ODhKSkogICAtLS00NDQzMzMnJydSEPrQAAAAGHRSTlMA1ssZRLgdAQbDyisqsZo8QdXUq0r9xPepSRwiAAAAX0lEQVQI13XHSQKAIAwEwQAKxn13Ev7/T2Pu9qmarJKPXIicI4PH4hxaKNrhm2S8bJK5h4YzKHrzJNtK6yYT/TdXzpS5zuYg4MSQYF6i4IHExdw1UVRi05HPrrvT53a+qyMFC9t04gcAAAAASUVORK5CYII=);
-}
-
-/* white unsorted icon */
-.tablesorter-bootstrap .icon-white.bootstrap-icon-unsorted {
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAOBAMAAAALT/umAAAAKlBMVEUAAAD///////////////////////////////////////////////////+Gu8ovAAAADXRSTlMA4EXKBtQqvR0+sxmalc142gAAAFdJREFUCNdjYGDoamAAAjZbMxCVfvd6AgMDd+3du9UMDKx3hWSvMjBwXZww8RYDGuC53NB8h4GB8a617UUGBs7Yu3cjGRhYVO9eVQFKOskKOQApFmUgBwBZ+xXRTttNdAAAAABJRU5ErkJggg==);
-}
-
-/* since bootstrap (table-striped) uses nth-child(), we just use this to add a zebra stripe color */
-.tablesorter-bootstrap > tbody > tr.odd > td,
-.tablesorter-bootstrap > tbody > tr.tablesorter-hasChildRow.odd:hover ~ tr.tablesorter-hasChildRow.odd ~ .tablesorter-childRow.odd > td {
- background-color: #f9f9f9;
-}
-.tablesorter-bootstrap > tbody > tr.hover > td,
-.tablesorter-bootstrap > tbody > tr.odd:hover > td,
-.tablesorter-bootstrap > tbody > tr.even:hover > td,
-.tablesorter-bootstrap > tbody > tr.tablesorter-hasChildRow.odd:hover ~ .tablesorter-childRow.odd > td,
-.tablesorter-bootstrap > tbody > tr.tablesorter-hasChildRow.even:hover ~ .tablesorter-childRow.even > td {
- background-color: #f5f5f5;
-}
-.tablesorter-bootstrap > tbody > tr.even > td,
-.tablesorter-bootstrap > tbody > tr.tablesorter-hasChildRow.even:hover ~ tr.tablesorter-hasChildRow.even ~ .tablesorter-childRow.even > td {
- background-color: #fff;
-}
-
-/* processing icon */
-.tablesorter-bootstrap .tablesorter-processing {
- background-image: url('data:image/gif;base64,R0lGODlhFAAUAKEAAO7u7lpaWgAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQBCgACACwAAAAAFAAUAAACQZRvoIDtu1wLQUAlqKTVxqwhXIiBnDg6Y4eyx4lKW5XK7wrLeK3vbq8J2W4T4e1nMhpWrZCTt3xKZ8kgsggdJmUFACH5BAEKAAIALAcAAAALAAcAAAIUVB6ii7jajgCAuUmtovxtXnmdUAAAIfkEAQoAAgAsDQACAAcACwAAAhRUIpmHy/3gUVQAQO9NetuugCFWAAAh+QQBCgACACwNAAcABwALAAACE5QVcZjKbVo6ck2AF95m5/6BSwEAIfkEAQoAAgAsBwANAAsABwAAAhOUH3kr6QaAcSrGWe1VQl+mMUIBACH5BAEKAAIALAIADQALAAcAAAIUlICmh7ncTAgqijkruDiv7n2YUAAAIfkEAQoAAgAsAAAHAAcACwAAAhQUIGmHyedehIoqFXLKfPOAaZdWAAAh+QQFCgACACwAAAIABwALAAACFJQFcJiXb15zLYRl7cla8OtlGGgUADs=');
- background-position: center center !important;
- background-repeat: no-repeat !important;
-}
-
-/* caption */
-.caption {
- background-color: #fff;
-}
-
-/* filter widget */
-.tablesorter-bootstrap .tablesorter-filter-row input.tablesorter-filter,
-.tablesorter-bootstrap .tablesorter-filter-row select.tablesorter-filter {
- width: 98%;
- margin: 0;
- padding: 4px 6px;
- color: #333;
- -webkit-box-sizing: border-box;
- -moz-box-sizing: border-box;
- box-sizing: border-box;
- -webkit-transition: height 0.1s ease;
- -moz-transition: height 0.1s ease;
- -o-transition: height 0.1s ease;
- transition: height 0.1s ease;
-}
-.tablesorter-bootstrap .tablesorter-filter-row .tablesorter-filter.disabled {
- background-color: #eee;
- color: #555;
- cursor: not-allowed;
- border: 1px solid #ccc;
- border-radius: 4px;
- box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.075) inset;
- box-sizing: border-box;
- transition: height 0.1s ease;
-}
-.tablesorter-bootstrap .tablesorter-filter-row {
- background-color: #efefef;
-}
-.tablesorter-bootstrap .tablesorter-filter-row td {
- background-color: #efefef;
- line-height: normal;
- text-align: center;
- padding: 4px 6px;
- vertical-align: middle;
- -webkit-transition: line-height 0.1s ease;
- -moz-transition: line-height 0.1s ease;
- -o-transition: line-height 0.1s ease;
- transition: line-height 0.1s ease;
-}
-/* hidden filter row */
-.tablesorter-bootstrap .tablesorter-filter-row.hideme td {
- padding: 2px; /* change this to modify the thickness of the closed border row */
- margin: 0;
- line-height: 0;
-}
-.tablesorter-bootstrap .tablesorter-filter-row.hideme * {
- height: 1px;
- min-height: 0;
- border: 0;
- padding: 0;
- margin: 0;
- /* don't use visibility: hidden because it disables tabbing */
- opacity: 0;
- filter: alpha(opacity=0);
-}
-/* rows hidden by filtering (needed for child rows) */
-.tablesorter .filtered {
- display: none;
-}
-
-/* pager plugin */
-.tablesorter-bootstrap .tablesorter-pager select {
- padding: 4px 6px;
-}
-.tablesorter-bootstrap .tablesorter-pager .pagedisplay {
- border: 0;
-}
-/* tfoot i for pager controls */
-.tablesorter-bootstrap tfoot i {
- font-size: 11px;
-}
-
-/* ajax error row */
-.tablesorter .tablesorter-errorRow td {
- text-align: center;
- cursor: pointer;
- background-color: #e6bf99;
-}
diff --git a/public/javascripts/widget-scroller.js b/public/javascripts/widget-scroller.js
new file mode 100644
index 0000000..82a8730
--- /dev/null
+++ b/public/javascripts/widget-scroller.js
@@ -0,0 +1,921 @@
+/*! Widget: scroller - updated 10/31/2015 (v2.24.0) *//*
+ Copyright (C) 2011 T. Connell & Associates, Inc.
+
+ Dual-licensed under the MIT and GPL licenses
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+ NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ Resizable scroller widget for the jQuery tablesorter plugin
+
+ Version 2.0 - modified by Rob Garrison 4/12/2013;
+ updated 3/5/2015 (v2.22.2) with lots of help from TheSin-
+ Requires jQuery v1.7+
+ Requires the tablesorter plugin, v2.8+, available at http://mottie.github.com/tablesorter/docs/
+
+ Usage:
+ $(function() {
+ $('table.tablesorter').tablesorter({
+ widgets: ['zebra', 'scroller'],
+ widgetOptions : {
+ scroller_height : 300, // height of scroll window
+ scroller_jumpToHeader : true, // header snap to browser top when scrolling the tbody
+ scroller_upAfterSort : true, // scroll tbody to top after sorting
+ scroller_fixedColumns : 0 // set number of fixed columns
+ }
+ });
+ });
+
+ Website: www.tconnell.com
+*/
+/*jshint browser:true, jquery:true, unused:false */
+;( function( $, window ) {
+ 'use strict';
+
+ var ts = $.tablesorter,
+ tscss = ts.css;
+
+ $.extend( ts.css, {
+ scrollerWrap : 'tablesorter-scroller',
+ scrollerHeader : 'tablesorter-scroller-header',
+ scrollerTable : 'tablesorter-scroller-table',
+ scrollerFooter : 'tablesorter-scroller-footer',
+ scrollerFixed : 'tablesorter-scroller-fixed',
+ scrollerFixedPanel : 'tablesorter-scroller-fixed-panel',
+ scrollerHasFix : 'tablesorter-scroller-has-fixed-columns',
+ scrollerHideColumn : 'tablesorter-scroller-hidden-column',
+ scrollerHideElement : 'tablesorter-scroller-hidden',
+ scrollerSpacerRow : 'tablesorter-scroller-spacer',
+ scrollerBarSpacer : 'tablesorter-scroller-bar-spacer',
+ scrollerAddedHeight : 'tablesorter-scroller-added-height',
+ scrollerHack : 'tablesorter-scroller-scrollbar-hack',
+ // class name on table cannot start with 'tablesorter-' or the
+ // suffix 'scroller-rtl' will match as a theme name
+ scrollerRtl : 'ts-scroller-rtl'
+ });
+
+ ts.addWidget({
+ id : 'scroller',
+ priority : 60, // run after the filter widget
+ options : {
+ scroller_height : 300,
+ // pop table header into view while scrolling up the page
+ scroller_jumpToHeader : true,
+ // scroll tbody to top after sorting
+ scroller_upAfterSort : true,
+ // set number of fixed columns
+ scroller_fixedColumns : 0,
+ // add hover highlighting to the fixed column (disable if it causes slowing)
+ scroller_rowHighlight : 'hover',
+ // add a fixed column overlay for styling
+ scroller_addFixedOverlay : false,
+ // In tablesorter v2.19.0 the scroll bar width is auto-detected
+ // add a value here to override the auto-detected setting
+ scroller_barWidth : null
+ },
+ format : function( table, c, wo ) {
+ if ( !c.isScrolling ) {
+ // initialize here instead of in widget init to give the
+ // filter widget time to finish building the filter row
+ ts.scroller.setup( c, wo );
+ }
+ },
+ remove : function( table, c, wo ) {
+ ts.scroller.remove( c, wo );
+ }
+ });
+
+ /* Add window resizeEnd event (also used by columnSelector widget) */
+ ts.window_resize = function() {
+ if ( ts.timer_resize ) {
+ clearTimeout( ts.timer_resize );
+ }
+ ts.timer_resize = setTimeout( function() {
+ $( window ).trigger( 'resizeEnd' );
+ }, 250 );
+ };
+
+ // Add extra scroller css
+ $( function() {
+ var style = '<style>' +
+ /* overall wrapper & table section wrappers */
+ '.' + tscss.scrollerWrap + ' { position: relative; overflow: hidden; }' +
+ /* add border-box sizing to all scroller widget tables; see #135 */
+ '.' + tscss.scrollerWrap + ' * { box-sizing: border-box; }' +
+ '.' + tscss.scrollerHeader + ', .' + tscss.scrollerFooter + ' { position: relative; overflow: hidden; }' +
+ '.' + tscss.scrollerHeader + ' table.' + tscss.table + ' { margin-bottom: 0; }' +
+ /* always leave the scroll bar visible for tbody, or table overflows into the scrollbar
+ when height < max height (filtering) */
+ '.' + tscss.scrollerTable + ' { position: relative; overflow: auto; }' +
+ '.' + tscss.scrollerTable + ' table.' + tscss.table +
+ ' { border-top: 0; margin-top: 0; margin-bottom: 0; overflow: hidden; }' +
+ /* hide footer in original table */
+ '.' + tscss.scrollerTable + ' tfoot, .' + tscss.scrollerHideElement + ', .' + tscss.scrollerHideColumn +
+ ' { display: none; }' +
+
+ /*** fixed column ***/
+ /* disable pointer-events on fixed column wrapper or the user can't interact with the horizontal scrollbar */
+ '.' + tscss.scrollerFixed + ', .' + tscss.scrollerFixed + ' .' + tscss.scrollerFixedPanel +
+ ' { pointer-events: none; }' +
+ /* enable pointer-events for fixed column children; see #135 & #878 */
+ '.' + tscss.scrollerFixed + ' > div { pointer-events: all; }' +
+ '.' + tscss.scrollerWrap + ' .' + tscss.scrollerFixed + ' { position: absolute; top: 0; z-index: 1; left: 0 } ' +
+ '.' + tscss.scrollerWrap + ' .' + tscss.scrollerFixed + '.' + tscss.scrollerRtl + ' { left: auto; right: 0 } ' +
+ /* add horizontal scroll bar; set to 'auto', see #135 */
+ '.' + tscss.scrollerWrap + '.' + tscss.scrollerHasFix + ' > .' + tscss.scrollerTable + ' { overflow: auto; }' +
+ /* need to position the tbody & tfoot absolutely to hide the scrollbar & move the footer
+ below the horizontal scrollbar */
+ '.' + tscss.scrollerFixed + ' .' + tscss.scrollerFooter + ' { position: absolute; bottom: 0; }' +
+ /* hide fixed tbody scrollbar - see http://goo.gl/VsLe6n - set overflow to auto here for mousewheel scroll */
+ '.' + tscss.scrollerFixed + ' .' + tscss.scrollerTable +
+ ' { position: relative; left: 0; overflow: auto; -ms-overflow-style: none; }' +
+ '.' + tscss.scrollerFixed + ' .' + tscss.scrollerTable + '::-webkit-scrollbar { display: none; }' +
+ /*** fixed column panel ***/
+ '.' + tscss.scrollerWrap + ' .' + tscss.scrollerFixedPanel +
+ ' { position: absolute; top: 0; bottom: 0; z-index: 2; left: 0; right: 0; } ' +
+ '</style>';
+ $( style ).appendTo( 'body' );
+ });
+
+ ts.scroller = {
+
+ // Ugh.. Firefox misbehaves, so it needs to be detected
+ isFirefox : navigator.userAgent.toLowerCase().indexOf( 'firefox' ) > -1,
+ // old IE needs a wrap to hide the fixed column scrollbar; http://stackoverflow.com/a/24408672/145346
+ isOldIE : document.all && !window.atob,
+ isIE : ( document.all && !window.atob ) || navigator.appVersion.indexOf( 'Trident/' ) > 0,
+ // http://stackoverflow.com/questions/7944460/detect-safari-browser - needed to position scrolling body
+ // when the table is set up in RTL direction
+ isSafari : navigator.userAgent.toLowerCase().indexOf( 'safari' ) > -1 &&
+ navigator.userAgent.toLowerCase().indexOf( 'chrome' ) === -1,
+
+ hasScrollBar : function( $target, checkWidth ) {
+ if ( checkWidth ) {
+ return $target.get(0).scrollWidth > $target.width();
+ } else {
+ return $target.get(0).scrollHeight > $target.height();
+ }
+ },
+
+ setWidth : function( $el, width ) {
+ $el.css({
+ 'width' : width,
+ 'min-width' : width,
+ 'max-width' : width
+ });
+ },
+
+ // modified from http://davidwalsh.name/detect-scrollbar-width
+ getBarWidth : function() {
+ var $div = $( '<div>' ).css({
+ 'position' : 'absolute',
+ 'top' : '-9999px',
+ 'left' : 0,
+ 'width' : '100px',
+ 'height' : '100px',
+ 'overflow' : 'scroll',
+ 'visibility' : 'hidden'
+ }).appendTo( 'body' ),
+ div = $div[0],
+ barWidth = div.offsetWidth - div.clientWidth;
+ $div.remove();
+ return barWidth;
+ },
+
+ setup : function( c, wo ) {
+ var maxHt, tbHt, $hdr, $t, $hCells, $fCells, $tableWrap, events, tmp, detectedWidth,
+ $win = $( window ),
+ tsScroller = ts.scroller,
+ namespace = c.namespace + 'tsscroller',
+ $foot = $(),
+ // c.namespace contains a unique tablesorter ID, per table
+ id = c.namespace.slice( 1 ) + 'tsscroller',
+ $table = c.$table;
+
+ // force config.widthFixed option - this helps maintain proper alignment across cloned tables
+ c.widthFixed = true;
+
+ wo.scroller_calcWidths = [];
+ wo.scroller_saved = [ 0, 0 ];
+ wo.scroller_isBusy = true;
+
+ // set scrollbar width to one of the following (1) explicitly set scroller_barWidth option,
+ // (2) detected scrollbar width or (3) fallback of 15px
+ if ( wo.scroller_barWidth !== null ) {
+ wo.scroller_barSetWidth = wo.scroller_barWidth;
+ } else {
+ detectedWidth = tsScroller.getBarWidth();
+ wo.scroller_barSetWidth = detectedWidth !== null ? detectedWidth : 15;
+ }
+
+ maxHt = wo.scroller_height || 300;
+
+ $hdr = $( '<table class="' + $table.attr( 'class' ) + '" cellpadding=0 cellspacing=0>' +
+ $table.children( 'thead' )[ 0 ].outerHTML + '</table>' );
+ wo.scroller_$header = $hdr.addClass( c.namespace.slice( 1 ) + '_extra_table' );
+
+ $t = $table.children( 'tfoot' );
+ if ( $t.length ) {
+ $foot = $( '<table class="' + $table.attr( 'class' ) +
+ '" cellpadding=0 cellspacing=0 style="margin-top:0"></table>' )
+ .addClass( c.namespace.slice( 1 ) + '_extra_table' )
+ // maintain any bindings on the tfoot cells
+ .append( $t.clone( true ) )
+ .wrap( '<div class="' + tscss.scrollerFooter + '"/>' );
+ $fCells = $foot.children( 'tfoot' ).eq( 0 ).children( 'tr' ).children();
+ }
+ wo.scroller_$footer = $foot;
+
+ $table
+ .wrap( '<div id="' + id + '" class="' + tscss.scrollerWrap + '" />' )
+ .before( $hdr )
+ // shrink filter row but don't completely hide it because the inputs/selectors may distort the columns
+ .find( '.' + tscss.filterRow )
+ .addClass( tscss.filterRowHide );
+
+ wo.scroller_$container = $table.parent();
+
+ if ( $foot.length ) {
+ // $foot.parent() to include <div> wrapper
+ $table.after( $foot.parent() );
+ }
+
+ $hCells = $hdr
+ .wrap( '<div class="' + tscss.scrollerHeader + '" />' )
+ .find( '.' + tscss.header );
+
+ // use max-height, so the height resizes dynamically while filtering
+ $table.wrap( '<div class="' + tscss.scrollerTable + '" style="max-height:' + maxHt + 'px;" />' );
+ $tableWrap = $table.parent();
+
+ // make scroller header sortable
+ ts.bindEvents( c.table, $hCells );
+
+ // look for filter widget
+ if ( $table.hasClass( 'hasFilters' ) ) {
+ ts.filter.bindSearch( $table, $hdr.find( '.' + tscss.filter ) );
+ }
+
+ $table
+ .find( 'thead' )
+ .addClass( tscss.scrollerHideElement );
+
+ tbHt = $tableWrap.parent().height();
+
+ // The header will always jump into view if scrolling the table body
+ $tableWrap
+ .off( 'scroll' + namespace )
+ .on( 'scroll' + namespace, function() {
+ if ( wo.scroller_jumpToHeader ) {
+ var pos = $win.scrollTop() - $hdr.offset().top;
+ if ( $( this ).scrollTop() !== 0 && pos < tbHt && pos > 0 ) {
+ $win.scrollTop( $hdr.offset().top );
+ }
+ }
+ $hdr
+ .parent()
+ .add( $foot.parent() )
+ .scrollLeft( $( this ).scrollLeft() );
+ });
+
+ // resize/update events - filterEnd fires after "tablesorter-initialized" and "updateComplete"
+ events = ( ( ts.hasWidget( c.table, 'filter' ) ? 'filterEnd' : 'tablesorter-initialized updateComplete' ) +
+ ' sortEnd pagerComplete columnUpdate ' ).split( ' ' ).join( namespace + ' ' );
+
+ $table
+ .off( namespace )
+ .on( 'sortEnd filterEnd'.split( ' ' ).join( namespace + ' ' ), function( event ) {
+ // Sorting, so scroll to top
+ if ( event.type === 'sortEnd' && wo.scroller_upAfterSort ) {
+ $tableWrap.animate({
+ scrollTop : 0
+ }, 'fast' );
+ } else if ( wo.scroller_fixedColumns ) {
+ setTimeout( function() {
+ // restore previous scroll position
+ $tableWrap
+ .scrollTop( wo.scroller_saved[1] )
+ .scrollLeft( wo.scroller_saved[0] );
+ tsScroller.updateFixed( c, wo );
+ }, 0 );
+ }
+ })
+ .on( 'setFixedColumnSize' + namespace, function( event, size ) {
+ var $wrap = wo.scroller_$container;
+ if ( typeof size !== 'undefined' && !isNaN( size ) ) {
+ wo.scroller_fixedColumns = parseInt( size, 10 );
+ }
+ // remove fixed columns
+ tsScroller.removeFixed( c, wo );
+ size = wo.scroller_fixedColumns;
+ if ( size > 0 && size < c.columns - 1 ) {
+ tsScroller.updateFixed( c, wo );
+ } else if ( $wrap.hasClass( tscss.scrollerHasFix ) ) {
+ $wrap.removeClass( tscss.scrollerHasFix );
+ // resize needed to make tables full width
+ tsScroller.resize( c, wo );
+ }
+ })
+ .on( events, function( event ) {
+ // Stop from running twice with pager
+ if ( ts.hasWidget( 'pager' ) && event.type === 'updateComplete' ) {
+ return;
+ }
+ if ( wo.scroller_fixedColumns > 0 ) {
+ tsScroller.updateFixed( c, wo );
+ }
+ // adjust column sizes after an update
+ tsScroller.resize( c, wo );
+ });
+
+ // Setup window.resizeEnd event
+ $win
+ .off( 'resize resizeEnd '.split( ' ' ).join( namespace + ' ' ) )
+ .on( 'resize' + namespace, ts.window_resize )
+ .on( 'resizeEnd' + namespace, function() {
+ // IE calls resize when you modify content, so we have to unbind the resize event
+ // so we don't end up with an infinite loop. we can rebind after we're done.
+ $win.off( 'resize' + namespace, ts.window_resize );
+ tsScroller.resize( c, wo );
+ $win.on( 'resize' + namespace, ts.window_resize );
+ $tableWrap.trigger( 'scroll' + namespace );
+ });
+
+ // initialization flag
+ c.isScrolling = true;
+
+ tsScroller.updateFixed( c, wo );
+
+ // updateAll called - need to give the browser time to adjust the layout
+ // before calculating fix column widths
+ if ( c.table.hasInitialized && c.isScrolling ) {
+ setTimeout(function(){
+ ts.scroller.resize( c, wo );
+ }, 50);
+ }
+
+ },
+
+ resize : function( c, wo ) {
+ if ( wo.scroller_isBusy ) { return; }
+ var index, borderWidth, setWidth, $hCells, $bCells, $fCells, $headers, $this, temp,
+ tsScroller = ts.scroller,
+ $container = wo.scroller_$container,
+ $table = c.$table,
+ $tableWrap = $table.parent(),
+ $hdr = wo.scroller_$header,
+ $foot = wo.scroller_$footer,
+ id = c.namespace.slice( 1 ) + 'tsscroller',
+ // Hide other scrollers so we can resize
+ $div = $( 'div.' + tscss.scrollerWrap + '[id!="' + id + '"]' )
+ .addClass( tscss.scrollerHideElement ),
+ row = '<tr class="' + tscss.scrollerSpacerRow + ' ' + c.selectorRemove.slice(1) + '">';
+
+ wo.scroller_calcWidths = [];
+
+ // Remove fixed so we get proper widths and heights
+ tsScroller.removeFixed( c, wo );
+ $container.find( '.' + tscss.scrollerSpacerRow ).remove();
+ // remove ts added colgroups
+ $container.find( '.' + ts.css.colgroup ).remove();
+
+ // show original table elements to get proper alignment
+ $table
+ .find( '.' + tscss.scrollerHideElement )
+ .removeClass( tscss.scrollerHideElement );
+
+ // include left & right border widths
+ borderWidth = parseInt( $table.css( 'border-left-width' ), 10 );
+
+ $headers = c.$headerIndexed;
+
+ for ( index = 0; index < c.columns; index++ ) {
+ $this = $headers[ index ];
+ // code from https://github.com/jmosbech/StickyTableHeaders
+ if ( $this.css( 'box-sizing' ) === 'border-box' ) {
+ setWidth = $this.outerWidth();
+ } else {
+ if ( $this.css( 'border-collapse' ) === 'collapse' ) {
+ if ( $this.length && window.getComputedStyle ) {
+ setWidth = parseFloat( window.getComputedStyle( $this[ 0 ], null ).width );
+ } else {
+ // ie8 only
+ setWidth = $this.outerWidth() - parseFloat( $this.css( 'padding-left' ) ) -
+ parseFloat( $this.css( 'padding-right' ) ) -
+ ( parseFloat( $this.css( 'border-width' ) ) || 0 );
+ }
+ } else {
+ setWidth = $this.width();
+ }
+ }
+ row += '<td data-column="' + index + '" style="padding:0;margin:0;border:0;height:0;max-height:0;' +
+ 'min-height:0;width:' + setWidth + 'px;min-width:' + setWidth + 'px;max-width:' + setWidth + 'px"></td>';
+
+ // save current widths
+ wo.scroller_calcWidths[ index ] = setWidth;
+ }
+ row += '</tr>';
+ c.$tbodies.eq(0).prepend( row ); // tbody
+ $hdr.children( 'thead' ).append( row );
+ $foot.children( 'tfoot' ).append( row );
+
+ // include colgroup or alignment is off
+ ts.fixColumnWidth( c.table );
+ row = c.$table.children( 'colgroup' )[0].outerHTML;
+ $hdr.prepend( row );
+ $foot.prepend( row );
+
+ temp = $tableWrap.parent().innerWidth() -
+ ( tsScroller.hasScrollBar( $tableWrap ) ? wo.scroller_barSetWidth : 0 );
+ $tableWrap.width( temp );
+
+ temp = ( tsScroller.hasScrollBar( $tableWrap ) ? wo.scroller_barSetWidth : 0 ) + borderWidth;
+ setWidth = $tableWrap.innerWidth() - temp;
+
+ $hdr
+ .parent()
+ .add( $foot.parent() )
+ .width( setWidth );
+
+ $tableWrap
+ .width( setWidth + temp );
+
+ // hide original table thead
+ $table.children( 'thead' ).addClass( tscss.scrollerHideElement );
+
+ // update fixed column sizes
+ tsScroller.updateFixed( c, wo );
+
+ $div.removeClass( tscss.scrollerHideElement );
+
+ // restore scrollTop - fixes #926
+ $tableWrap.scrollTop( wo.scroller_saved[1] );
+ wo.scroller_$container
+ .find( '.' + tscss.scrollerFixed )
+ .find( '.' + tscss.scrollerTable )
+ .scrollTop( wo.scroller_saved[1] );
+
+ // update resizable widget handles
+ setTimeout( function() {
+ c.$table.triggerHandler( 'resizableUpdate' );
+ }, 100 );
+
+ },
+
+ // Add fixed (frozen) columns (Do not call directly, use updateFixed)
+ setupFixed : function( c, wo ) {
+ var index, index2, $el, len, temp, $fixedColumn, $fixedTbody,
+ $table = c.$table,
+ $wrapper = wo.scroller_$container,
+ fixedColumns = wo.scroller_fixedColumns;
+
+ $fixedColumn = $wrapper
+ .addClass( tscss.scrollerHasFix )
+ .clone()
+ .addClass( tscss.scrollerFixed )
+ .removeClass( tscss.scrollerWrap )
+ .attr( 'id', '' );
+
+ if ( wo.scroller_addFixedOverlay ) {
+ $fixedColumn.append( '<div class="' + tscss.scrollerFixedPanel + '">' );
+ }
+
+ $fixedTbody = $fixedColumn.find( '.' + tscss.scrollerTable );
+ $fixedTbody
+ .children( 'table' )
+ .addClass( c.namespace.slice( 1 ) + '_extra_table' )
+ .attr( 'id', '' )
+ .children( 'thead, tfoot' )
+ .remove();
+
+ wo.scroller_$fixedColumns = $fixedColumn;
+
+ // RTL support (fixes column on right)
+ if ( $table.hasClass( tscss.scrollerRtl ) ) {
+ $fixedColumn.addClass( tscss.scrollerRtl );
+ }
+
+ $el = $fixedColumn.find( 'tr' );
+ len = $el.length;
+ for ( index = 0; index < len; index++ ) {
+ $el.eq( index ).children( ':gt(' + ( fixedColumns - 1 ) + ')' ).remove();
+ }
+ $fixedColumn
+ .addClass( tscss.scrollerHideElement )
+ .prependTo( $wrapper );
+
+ // look for filter widget
+ if ( c.$table.hasClass( 'hasFilters' ) ) {
+ // make sure fixed column filters aren't disabled
+ $el = $fixedColumn
+ .find( '.' + tscss.filter )
+ .not( '.' + tscss.filterDisabled )
+ .prop( 'disabled', false );
+ ts.filter.bindSearch( $table, $fixedColumn.find( '.' + tscss.filter ) );
+ // disable/enable filters behind fixed column
+ $el = $wrapper
+ .children( '.' + tscss.scrollerHeader )
+ .find( '.' + tscss.filter );
+ len = $el.length;
+ for ( index = 0; index < len; index++ ) {
+ // previously disabled filter; don't mess with it! filterDisabled class added by filter widget
+ if ( !$el.eq( index ).hasClass( tscss.filterDisabled || 'disabled' ) ) {
+ // disable filters behind fixed column; don't disable visible filters
+ $el.eq( index ).prop( 'disabled', index < fixedColumns );
+ }
+ }
+ }
+
+ // disable/enable tab indexes behind fixed column
+ c.$table
+ .add( '.' + tscss.scrollerFooter + ' table' )
+ .children( 'thead' )
+ .children( 'tr.' + tscss.headerRow )
+ .children()
+ .attr( 'tabindex', -1 );
+
+ $el = wo.scroller_$header
+ .add( $fixedColumn.find( '.' + tscss.scrollerTable + ' table' ) )
+ .children( 'thead' )
+ .children( 'tr.' + tscss.headerRow );
+ len = $el.length;
+ for ( index = 0; index < len; index++ ) {
+ temp = $el.eq( index ).children();
+ for ( index2 = 0; index2 < temp.length; index2++ ) {
+ temp.eq( index2 ).attr( 'tabindex', index2 < fixedColumns ? -1 : 0 );
+ }
+ }
+
+ ts.bindEvents( c.table, $fixedColumn.find( '.' + tscss.header ) );
+ ts.scroller.bindFixedColumnEvents( c, wo );
+
+ /*** Scrollbar hack! Since we can't hide the scrollbar with css ***/
+ if ( ts.scroller.isFirefox || ts.scroller.isOldIE ) {
+ $fixedTbody.wrap( '<div class="' + tscss.scrollerHack + '" style="overflow:hidden;">' );
+ }
+
+ },
+
+ bindFixedColumnEvents : function( c, wo ) {
+ // update thead & tbody in fixed column
+ var tsScroller = ts.scroller,
+ namespace = c.namespace + 'tsscrollerFixed',
+ events = 'scroll' + namespace,
+ $fixedTbody = wo.scroller_$fixedColumns.find( '.' + tscss.scrollerTable ),
+ fixedScroll = true,
+ tableScroll = true;
+
+ c.$table
+ .parent()
+ // *** SCROLL *** scroll fixed column along with main
+ .off( events )
+ .on( events, function() {
+ if ( wo.scroller_isBusy ) { return; }
+ // using flags to prevent firing the scroll event excessively leading to slow scrolling in Firefox
+ if ( !wo.scroller_isBusy && ( fixedScroll || !( tsScroller.isFirefox || tsScroller.isIE ) ) ) {
+ tableScroll = false;
+ var $this = $( this );
+ $fixedTbody[0].scrollTop = wo.scroller_saved[1] = $this.scrollTop();
+ wo.scroller_saved[0] = $this.scrollLeft();
+ setTimeout( function() {
+ tableScroll = true;
+ }, 20 );
+ }
+ });
+ // scroll main along with fixed column
+ $fixedTbody
+ .off( events )
+ .on( events, function() {
+ // using flags to prevent firing the scroll event excessively leading to slow scrolling in Firefox
+ if ( !wo.scroller_isBusy && ( tableScroll || !( tsScroller.isFirefox || tsScroller.isIE ) ) ) {
+ fixedScroll = false;
+ var $this = $( this );
+ c.$table.parent()[0].scrollTop = wo.scroller_saved[1] = $this.scrollTop();
+ setTimeout( function() {
+ fixedScroll = true;
+ }, 20 );
+ }
+ })
+ .scroll();
+
+ // *** ROW HIGHLIGHT ***
+ if ( wo.scroller_rowHighlight !== '' ) {
+ events = 'mouseover mouseleave '.split( ' ' ).join( namespace + ' ' );
+ // can't use c.$tbodies because it doesn't include info-only tbodies
+ c.$table
+ .off( events, 'tbody > tr' )
+ .on( events, 'tbody > tr', function( event ) {
+ var indx = c.$table.children( 'tbody' ).children( 'tr' ).index( this );
+ $fixedTbody
+ .children( 'table' )
+ .children( 'tbody' )
+ .children( 'tr' )
+ .eq( indx )
+ .add( this )
+ .toggleClass( wo.scroller_rowHighlight, event.type === 'mouseover' );
+ });
+ $fixedTbody
+ .find( 'table' )
+ .off( events, 'tbody > tr' )
+ .on( events, 'tbody > tr', function( event ) {
+ var $fixed = $fixedTbody.children( 'table' ).children( 'tbody' ).children( 'tr' ),
+ indx = $fixed.index( this );
+ c.$table
+ .children( 'tbody' )
+ .children( 'tr' )
+ .eq( indx )
+ .add( this )
+ .toggleClass( wo.scroller_rowHighlight, event.type === 'mouseover' );
+ });
+ }
+ },
+
+ adjustWidth : function( c, wo, totalWidth, adj, dir ) {
+ var $wrapper = wo.scroller_$container;
+
+ // RTL support (fixes column on right)
+ $wrapper
+ .children( '.' + tscss.scrollerTable )
+ .css( dir ? 'right' : 'left', totalWidth );
+ $wrapper
+ .children( '.' + tscss.scrollerHeader + ', .' + tscss.scrollerFooter )
+ // Safari needs a scrollbar width of extra adjusment to align the fixed & scrolling columns
+ .css( dir ? 'right' : 'left', totalWidth + ( dir && ts.scroller.isSafari ? adj : 0 ) );
+ },
+
+ updateFixed : function( c, wo ) {
+ var temp, adj,
+ $wrapper = wo.scroller_$container,
+ $hdr = wo.scroller_$header,
+ $foot = wo.scroller_$footer,
+ $table = c.$table,
+ $tableWrap = $table.parent(),
+ scrollBarWidth = wo.scroller_barSetWidth,
+ dir = $table.hasClass( tscss.scrollerRtl );
+
+ if ( wo.scroller_fixedColumns === 0 ) {
+ wo.scroller_isBusy = false;
+ ts.scroller.removeFixed( c, wo );
+ temp = $wrapper.width();
+ $tableWrap.width( temp );
+ adj = ts.scroller.hasScrollBar( $tableWrap ) ? scrollBarWidth : 0;
+ $hdr
+ .parent()
+ .add( $foot.parent() )
+ .width( temp - adj );
+ return;
+ }
+
+ if ( !c.isScrolling ) {
+ return;
+ }
+
+ wo.scroller_isBusy = true;
+
+ // Make sure the wo.scroller_$fixedColumns container exists, if not build it
+ if ( !$wrapper.find( '.' + tscss.scrollerFixed ).length ) {
+ ts.scroller.setupFixed( c, wo );
+ }
+
+ // scroller_fixedColumns
+ var index, tbodyIndex, rowIndex, $tbody, $adjCol, $fb, $fixHead, $fixBody, $fixFoot,
+ totalRows, row,
+
+ // source cells for measurement
+ $mainTbodies = wo.scroller_$container
+ .children( '.' + tscss.scrollerTable )
+ .children( 'table' )
+ .children( 'tbody' ),
+ // variable gets redefined
+ $rows = wo.scroller_$header
+ .children( 'thead' )
+ .children( '.' + tscss.headerRow ),
+
+ // hide fixed column during resize, or we get a FOUC
+ $fixedColumn = wo.scroller_$fixedColumns
+ .addClass( tscss.scrollerHideElement ),
+
+ // target cells
+ $fixedTbodiesTable = $fixedColumn
+ .find( '.' + tscss.scrollerTable )
+ .children( 'table' ),
+ $fixedTbodies = $fixedTbodiesTable
+ .children( 'tbody' ),
+ // variables
+ tsScroller = ts.scroller,
+ fixedColumns = wo.scroller_fixedColumns,
+ // get dimensions
+ $temp = $table.find( 'tbody td' ),
+ borderRightWidth = parseInt( $temp.css( 'border-right-width' ), 10 ) || 1,
+ borderSpacing = parseInt( ( $temp.css( 'border-spacing' ) || '' ).split( /\s/ )[ 0 ], 10 ) / 2 || 0,
+ totalWidth = parseInt( $table.css( 'padding-left' ), 10 ) +
+ parseInt( $table.css( 'padding-right' ), 10 ) -
+ borderRightWidth,
+ widths = wo.scroller_calcWidths;
+
+ ts.scroller.removeFixed( c, wo, false );
+
+ // calculate fixed column width
+ for ( index = 0; index < fixedColumns; index++ ) {
+ totalWidth += widths[ index ] + borderSpacing;
+ }
+
+ // set fixed column width
+ totalWidth = totalWidth + borderRightWidth * 2 - borderSpacing;
+ tsScroller.setWidth( $fixedColumn.add( $fixedColumn.children() ), totalWidth );
+ tsScroller.setWidth( $fixedColumn.children().children( 'table' ), totalWidth );
+
+ // update fixed column tbody content, set cell widths on hidden row
+ for ( tbodyIndex = 0; tbodyIndex < c.$tbodies.length; tbodyIndex++ ) {
+ $tbody = $mainTbodies.eq( tbodyIndex );
+ if ( $tbody.length ) {
+ // get tbody
+ $rows = $tbody.children();
+ totalRows = $rows.length;
+ $fb = ts.processTbody( $fixedTbodiesTable, $fixedTbodies.eq( tbodyIndex ), true );
+ $fb.empty();
+ // update tbody cells after sort/filtering
+ for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
+ $adjCol = $( $rows[ rowIndex ].outerHTML );
+ $adjCol
+ .children( 'td, th' )
+ .slice( fixedColumns )
+ .remove();
+ $fb.append( $adjCol );
+ }
+
+ // restore tbody
+ ts.processTbody( $fixedTbodiesTable, $fb, false );
+ }
+ }
+
+ adj = ts.scroller.hasScrollBar( $tableWrap ) ? scrollBarWidth : 0;
+
+ /*** scrollbar HACK! Since we can't hide the scrollbar with css ***/
+ if ( tsScroller.isFirefox || tsScroller.isOldIE ) {
+ $fixedTbodiesTable
+ .css( 'width', totalWidth )
+ .parent()
+ .css( 'width', totalWidth + adj );
+ }
+
+ $fixedColumn.removeClass( tscss.scrollerHideElement );
+ for ( index = 0; index < fixedColumns; index++ ) {
+ $wrapper
+ .children( 'div' )
+ .children( 'table' )
+ .find( 'th:nth-child(' + ( index + 1 ) + '), td:nth-child(' + ( index + 1 ) + ')' )
+ .addClass( tscss.scrollerHideColumn );
+ }
+
+ totalWidth = totalWidth - borderRightWidth;
+ temp = $tableWrap.parent().innerWidth() - totalWidth;
+ $tableWrap.width( temp );
+ // RTL support (fixes column on right)
+ $wrapper
+ .children( '.' + tscss.scrollerTable )
+ .css( dir ? 'right' : 'left', totalWidth );
+ $wrapper
+ .children( '.' + tscss.scrollerHeader + ', .' + tscss.scrollerFooter )
+ // Safari needs a scrollbar width of extra adjusment to align the fixed & scrolling columns
+ .css( dir ? 'right' : 'left', totalWidth + ( dir && ts.scroller.isSafari ? adj : 0 ) );
+
+ $hdr
+ .parent()
+ .add( $foot.parent() )
+ .width( temp - adj );
+
+ // fix gap under the tbody for the horizontal scrollbar
+ temp = ts.scroller.hasScrollBar( $tableWrap, true );
+ adj = temp ? scrollBarWidth : 0;
+ if ( !$fixedColumn.find( '.' + tscss.scrollerBarSpacer ).length && temp ) {
+ $temp = $( '<div class="' + tscss.scrollerBarSpacer + '">' )
+ .css( 'height', adj + 'px' );
+ $fixedColumn.find( '.' + tscss.scrollerTable ).append( $temp );
+ } else if ( !temp ) {
+ $fixedColumn.find( '.' + tscss.scrollerBarSpacer ).remove();
+ }
+
+ ts.scroller.updateRowHeight( c, wo );
+ // set fixed column height (changes with filtering)
+ $fixedColumn.height( $wrapper.height() );
+
+ $fixedColumn.removeClass( tscss.scrollerHideElement );
+
+ wo.scroller_isBusy = false;
+
+ },
+
+ fixHeight : function( $rows, $fixedRows ) {
+ var index, heightRow, heightFixed, $r, $f,
+ addedHt = tscss.scrollerAddedHeight,
+ len = $rows.length;
+ for ( index = 0; index < len; index++ ) {
+ $r = $rows.eq( index );
+ $f = $fixedRows.eq( index );
+ heightRow = $r.height();
+ heightFixed = $f.height();
+ if ( heightRow > heightFixed ) {
+ $f.addClass( addedHt ).height( heightRow );
+ } else if ( heightRow < heightFixed ) {
+ $r.addClass( addedHt ).height( heightFixed );
+ }
+ }
+ },
+
+ updateRowHeight : function( c, wo ) {
+ var $rows, $fixed,
+ $fixedColumns = wo.scroller_$fixedColumns;
+
+ wo.scroller_$container
+ .find( '.' + tscss.scrollerAddedHeight )
+ .removeClass( tscss.scrollerAddedHeight )
+ .height( '' );
+
+ $rows = wo.scroller_$header
+ .children( 'thead' )
+ .children( 'tr' );
+ $fixed = $fixedColumns
+ .children( '.' + tscss.scrollerHeader )
+ .children( 'table' )
+ .children( 'thead' )
+ .children( 'tr' );
+ ts.scroller.fixHeight( $rows, $fixed );
+
+ $rows = wo.scroller_$footer
+ .children( 'tfoot' )
+ .children( 'tr' );
+ $fixed = $fixedColumns
+ .children( '.' + tscss.scrollerFooter )
+ .children( 'table' )
+ .children( 'tfoot' )
+ .children( 'tr' );
+ ts.scroller.fixHeight( $rows, $fixed );
+
+ if ( ts.scroller.isFirefox || ts.scroller.isOldIE ) {
+ // Firefox/Old IE scrollbar hack (wraps table to hide the scrollbar)
+ $fixedColumns = $fixedColumns.find( '.' + tscss.scrollerHack );
+ }
+ $rows = c.$table
+ .children( 'tbody' )
+ .children( 'tr' );
+ $fixed = $fixedColumns
+ .children( '.' + tscss.scrollerTable )
+ .children( 'table' )
+ .children( 'tbody' )
+ .children( 'tr' );
+ ts.scroller.fixHeight( $rows, $fixed );
+
+ },
+
+ removeFixed : function( c, wo, removeIt ) {
+ var $table = c.$table,
+ $wrapper = wo.scroller_$container,
+ dir = $table.hasClass( tscss.scrollerRtl );
+
+ // remove fixed columns
+ if ( removeIt || typeof removeIt === 'undefined' ) {
+ $wrapper.find( '.' + tscss.scrollerFixed ).remove();
+ }
+
+ $wrapper
+ .find( '.' + tscss.scrollerHideColumn )
+ .removeClass( tscss.scrollerHideColumn );
+
+ // RTL support ( fixes column on right )
+ $wrapper
+ .children( ':not(.' + tscss.scrollerFixed + ')' )
+ .css( dir ? 'right' : 'left', 0 );
+ },
+
+ remove : function( c, wo ) {
+ var $wrap = wo.scroller_$container,
+ namespace = c.namespace + 'tsscroller';
+ c.$table.off( namespace );
+ $( window ).off( namespace );
+ if ( $wrap ) {
+ c.$table
+ .insertBefore( $wrap )
+ .find( 'thead' )
+ .removeClass( tscss.scrollerHideElement )
+ .children( 'tr.' + tscss.headerRow )
+ .children()
+ .attr( 'tabindex', 0 )
+ .end()
+ .find( '.' + tscss.filterRow )
+ .removeClass( tscss.scrollerHideElement + ' ' + tscss.filterRowHide );
+ c.$table
+ .find( '.' + tscss.filter )
+ .not( '.' + tscss.filterDisabled )
+ .prop( 'disabled', false );
+ $wrap.remove();
+ c.isScrolling = false;
+ }
+ }
+
+ };
+
+})( jQuery, window );
diff --git a/views/layout.haml b/views/layout.haml
index f3843cc..76d02c3 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -8,12 +8,12 @@
%link{:rel=>'icon', :type=>'image/x-icon', :href=>'/images/favicon.ico'}
%link{:rel=>'stylesheet', :href=>"#{'/css/style.css'}"}
%link{:rel=>'stylesheet', :href=>"#{'/css/bootstrap.min.css'}"}
- %link{:rel=>'stylesheet', :href=>"#{'/css/theme.default.min.css'}"}
%link{:rel=>'stylesheet', :href=>"#{'/css/theme.bootstrap.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"}
%script{:src=>"/javascripts/jquery.tablesorter.staticrow.min.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 029800a..991af9f 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -5,6 +5,7 @@
%h3.help-block
Similar particles
+
%hr
:javascript
$(document).ready(function(){
@@ -12,25 +13,28 @@
debug: false,
theme: "bootstrap",
headerTemplate: '{content} {icon}',
- widgets: ['uitheme', 'stickyHeaders', 'staticRow'],
+ widgets: ['uitheme', 'stickyHeaders', 'staticRow', 'scroller'],
widgetOptions: {
+ //scroller_upAfterSort: true,
+ //scroller_jumpToHeader: true,
+ //scroller_height: 600,
+ scroller_fixedColumns: 4,
+ //scroller_addFixedOverlay : false,
+ //scroller_rowHighlight : null,
+ //scroller_barWidth : null,
stickyHeaders : '',
stickyHeaders_offset : 0,
stickyHeaders_cloneId : '-sticky',
- stickyHeaders_addResizeEvent : true,
- stickyHeaders_includeCaption : true,
+ //stickyHeaders_addResizeEvent : true,
+ //stickyHeaders_includeCaption : true,
stickyHeaders_zIndex : 2,
stickyHeaders_attachTo : null,
stickyHeaders_xScroll : null,
stickyHeaders_yScroll : null,
- stickyHeaders_filteredToTop: true
+ stickyHeaders_filteredToTop: false
},
sortList: [[1,1]],
- widthFixed: false
- });
- $("table#physchem").tablesorter({
- debug: false,
- theme: "bootstrap",
+ widthFixed: true,
});
});
@@ -48,95 +52,92 @@
Tox
%th
Physchem
- %tbody
- / query
+ / query and match combined
%tr.static
/ id
%td
- %h5 Query
+ - if @prediction[:match]
+ = @prediction[:match].keys[0]
+ - else
+ Query
/ similarity
%td
- x
+ - if @prediction[:match]
+ 1
+ - else
+ x
/ composition
%td
- x
+ - if @prediction[:match]
+ - @prediction[:match].values[0]["composition"].each do |k,v|
+ = k
+ %p= v
+ - else
+ x
/ tox
- %td
+ %td.tox
- if @prediction[:prediction]
- @prediction[:prediction].each do |k,v|
- %h5 Prediction
+ Prediction
%p= k
- if v == nil
%p 0
- else
%p= v.round(5)
- - else
- x
- / physchem
- %td
- - @input.each do |v|
- %div{:style=>"display:inline-block;padding-right:20px;"}
- %h5= v[0].gsub(/\sMean/, '')
- %p= v[1].round(3)
- / match
- - if @prediction[:match]
- %tr.static
- / id
- %td
- %h5= @prediction[:match].keys[0]
- / similarity
- %td
- %h5 match
- / composition
- %td
- - @prediction[:match].values[0]["composition"].each do |k,v|
- %h5= k
- %p= v
- / tox
- %td
+ - if @prediction[:match]
- @prediction[:match].values[0]["tox"].each do |k,v|
- %h5 Measurement prediction
+ Measurement
%p= k
%p= v.round(3)
- - if @prediction[:prediction]
- - @prediction[:prediction].each do |k,v|
- %h5 Prediction
- %p= k
- - if v == nil
- %p 0
- - else
- %p= v.round(5)
- / physchem
- %td
- - @prediction[:match].values[0]["physchem"].each do |k,v|
+ - if !@prediction[:prediction] && !@prediction[:match]
+ x
+ / physchem
+ %td.physchem
+ - if @prediction[:match]
+ - sorted = {}
+ - @input.each{|i| sorted[i[0]]=@prediction[:match].values[0]["physchem"][i[0]]}
+ - sorted.each do |k,v|
%div{:style=>"display:inline-block;padding-right:20px;"}
- %h5= k.gsub(/\sMean/, '')
+ = k.gsub(/\sMean/, '')
%p= v.round(3)
+ - else
+ - @input.each do |v|
+ %div{:style=>"display:inline-block;padding-right:20px;"}
+ = v[0].gsub(/\sMean/, '')
+ - if v[1].nil?
+ %p x
+ - else
+ %p= v[1].round(3)
+
+ %tbody
/ neighbors
- if @prediction[:neighbors]
- @prediction[:neighbors].each_with_index do |neighbor,idx|
%tr
/ ID
%td
- %h5= neighbor["id"]
+ = neighbor["id"]
/ Similarity
%td
- %h5= neighbor["similarity"].round(3)
+ = neighbor["similarity"].round(3)
/ Composition
%td
- neighbor["composition"].each do |k,v|
- %h5= k
+ = k
%p= v
/ Tox
%td
- neighbor["tox"].each do |k,v|
- %h5 Measurement prediction
+ Measurement
%p= k
%p= v.round(3)
/ Physchem
- %td
- - neighbor["physchem"].each do |k,v|
- %div{:style=>"display:inline-block;padding-right:20px;"}
- %h5= k.gsub(/\sMean/, '')
- %p= v.round(3)
+ %td.physchem
+ %div.neighbor
+ - sorted = {}
+ - @input.each{|i| sorted[i[0]]=neighbor["physchem"][i[0]]}
+ - sorted.each do |k,v|
+ %div{:style=>"display:inline-block;padding-right:20px;"}
+ = k.gsub(/\sMean/, '')
+ %p= v.round(3)