summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
authorJan-Philipp Litza <janphilipp@litza.de>2012-12-30 12:09:48 +0100
committerJan-Philipp Litza <janphilipp@litza.de>2012-12-30 12:09:48 +0100
commit0dae68a9a3370fb517009f4d5aa31094851ff188 (patch)
tree5b901d7d0c74e42591db7ac404949aaeeea25f8f /public
parentbf226f87dcb4ab7f72cfd596cc989e95cdfa02e4 (diff)
indicate colliding shifts in new shift view
Diffstat (limited to 'public')
-rw-r--r--public/css/base.css10
-rw-r--r--public/css/scrolltable.js26
2 files changed, 9 insertions, 27 deletions
diff --git a/public/css/base.css b/public/css/base.css
index 638f6ef4..61e0702e 100644
--- a/public/css/base.css
+++ b/public/css/base.css
@@ -129,7 +129,15 @@ table {
background-color: #BCF5A9;
}
-#shifts td:not(.free):not(.occupied) {
+#shifts td.own {
+ background-color: #CECEF6;
+}
+
+#shifts td.collides {
+ background-color: #9B9B9B;
+}
+
+#shifts td.empty {
border: 0;
}
diff --git a/public/css/scrolltable.js b/public/css/scrolltable.js
deleted file mode 100644
index 1319495c..00000000
--- a/public/css/scrolltable.js
+++ /dev/null
@@ -1,26 +0,0 @@
-function scrolltable(elem) {
- var widths = new Array();
- var thead = elem.getElementsByTagName('thead')[0];
- var tbody = elem.getElementsByTagName('tbody')[0];
- var ths = Array.prototype.slice.call(thead.getElementsByTagName('th'),0);
- ths = ths.concat(Array.prototype.slice.call(tbody.getElementsByTagName('tr')[0].getElementsByTagName('td'), 0));
- ths.push(tbody.getElementsByTagName('th')[0]);
- console.debug(ths);
- for(var i = 0; i < ths.length; i++)
- widths.push(ths[i].offsetWidth);
- widths.push(tbody.offsetWidth);
- elem.className = elem.className + ' scrollable';
- var tbodywidth = widths.pop();
- tbody.style.width = (tbodywidth + 16) + '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'));
- var borderLeft = parseInt(window.getComputedStyle(ths[i], null).getPropertyValue('border-left-width'));
- var borderRight = parseInt(window.getComputedStyle(ths[i], null).getPropertyValue('border-right-width'));
- var targetwidth = widths.shift();
- ths[i].style.maxWidth = ths[i].style.minWidth = (targetwidth - paddingLeft - paddingRight - borderRight) + 'px';
- if (ths[i].offsetWidth > targetwidth)
- ths[i].style.maxWidth = ths[i].style.minWidth = (parseInt(ths[i].style.minWidth) - 1) + 'px';
- }
-}