summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorJan-Philipp Litza <janphilipp@litza.de>2012-12-28 03:27:08 +0100
committerJan-Philipp Litza <janphilipp@litza.de>2012-12-28 03:32:31 +0100
commit378d524fbd7687e577f5e9c4be5e0726435b2bad (patch)
tree46b338ca11a374af6e1b35927d936d8f38439638 /public
parentdd5ca95975d368d3fb1bbf9cca422222049242aa (diff)
polished the table view by offloading "is this shift free" to SQL. Might put too much load on db server, need to evaluate. Also, replaced loads of & with &amp; and simplified some expressions
Diffstat (limited to 'public')
-rw-r--r--public/css/base.css14
-rw-r--r--public/css/scrolltable.js2
2 files changed, 15 insertions, 1 deletions
diff --git a/public/css/base.css b/public/css/base.css
index 6bcb95d1..0f37c8f0 100644
--- a/public/css/base.css
+++ b/public/css/base.css
@@ -112,6 +112,18 @@ table {
background-color: #fff;
}
+#shifts td.free {
+ background-color: #F6CECE;
+}
+
+#shifts td.occupied {
+ background-color: #BCF5A9;
+}
+
+#shifts td:not(.free):not(.occupied) {
+ border: 0;
+}
+
table.scrollable {
max-width: 100%;
overflow-x: scroll;
@@ -170,6 +182,8 @@ fieldset p label input {
th {
background: #f0f0f0;
+}
+thead th {
vertical-align: bottom;
}
diff --git a/public/css/scrolltable.js b/public/css/scrolltable.js
index 1184207f..1319495c 100644
--- a/public/css/scrolltable.js
+++ b/public/css/scrolltable.js
@@ -12,7 +12,7 @@ function scrolltable(elem) {
elem.className = elem.className + ' scrollable';
var tbodywidth = widths.pop();
tbody.style.width = (tbodywidth + 16) + 'px';
- tbody.style.height = (window.innerHeight - 50) + 'px';
+ tbody.style.height = (window.innerHeight - 100) + 'px';
for(var i = 0; i < ths.length; i++) {
var paddingLeft = parseInt(window.getComputedStyle(ths[i], null).getPropertyValue('padding-left'));
var paddingRight = parseInt(window.getComputedStyle(ths[i], null).getPropertyValue('padding-right'));