aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortr4ck3ur <tr4ck3ur@style-python.fr>2015-02-20 16:41:39 +0100
committertr4ck3ur <tr4ck3ur@style-python.fr>2015-02-20 16:41:39 +0100
commitf0f228f173fc8f4e2988d784cc1a34e275cd8e37 (patch)
treeacbf9fa60ea29eeefc934105708590ac71ffd60b
parent1dd53af5c5bb48b5ba39b29860560e32ed33308b (diff)
downloadjm2l-f0f228f173fc8f4e2988d784cc1a34e275cd8e37.tar.gz
jm2l-f0f228f173fc8f4e2988d784cc1a34e275cd8e37.tar.bz2
jm2l-f0f228f173fc8f4e2988d784cc1a34e275cd8e37.tar.xz
jm2l-f0f228f173fc8f4e2988d784cc1a34e275cd8e37.zip
Added gradient on TimeTable
-rw-r--r--jm2l/static/img/shadow.svg18
-rw-r--r--jm2l/static/js/programme.js12
2 files changed, 18 insertions, 12 deletions
diff --git a/jm2l/static/img/shadow.svg b/jm2l/static/img/shadow.svg
index 6678a20..05fe88a 100644
--- a/jm2l/static/img/shadow.svg
+++ b/jm2l/static/img/shadow.svg
@@ -12,13 +12,17 @@
<feMergeNode in="SourceGraphic"/>
</feMerge>
</filter>
- <linearGradient id="BoxGradient"
- x1="0%" y1="0%"
- x2="0%" y2="100%"
- spreadMethod="pad">
-
- <stop offset="0%" fill-opacity="1" stop-opacity="1"/>
- <stop offset="100%" stop-opacity="1"/>
+ <linearGradient id="BoxGradient-Conference" spreadMethod="pad" x1="100%" y1="0%" x2="50%" y2="100%">
+ <stop offset="0%" stop-color="#EEE" stop-opacity="0"/>
+ <stop offset="15%" stop-color="#f9fde8" stop-opacity="1"/>
+ </linearGradient>
+ <linearGradient id="BoxGradient-Atelier" spreadMethod="pad" x1="100%" y1="0%" x2="50%" y2="100%">
+ <stop offset="0%" stop-color="#EEE" stop-opacity="0"/>
+ <stop offset="15%" stop-color="#faebeb" stop-opacity="1"/>
+ </linearGradient>
+ <linearGradient id="BoxGradient-Table-ronde" spreadMethod="pad" x1="100%" y1="0%" x2="50%" y2="100%">
+ <stop offset="0%" stop-color="#EEE" stop-opacity="0"/>
+ <stop offset="15%" stop-color="#fff4e5" stop-opacity="1"/>
</linearGradient>
</defs>
</svg> \ No newline at end of file
diff --git a/jm2l/static/js/programme.js b/jm2l/static/js/programme.js
index 9bbd6de..2ac8a16 100644
--- a/jm2l/static/js/programme.js
+++ b/jm2l/static/js/programme.js
@@ -120,13 +120,13 @@ function HandleEvents(Ctrl) {
function displayit(Set_of_Task, Set_of_Area, key) {
// Try to compute time range
Set_of_Task.sort(function(a, b) {
- return a.endDate - b.endDate;
- });
- timeDomainEnd = Set_of_Task[Set_of_Task.length - 1].endDate;
- Set_of_Task.sort(function(a, b) {
return a.startDate - b.startDate;
});
timeDomainStart = Set_of_Task[0].startDate;
+ Set_of_Task.sort(function(a, b) {
+ return a.endDate - b.endDate;
+ });
+ timeDomainEnd = Set_of_Task[Set_of_Task.length - 1].endDate;
// Prepare scales
xScale = d3.scale.ordinal()
@@ -197,7 +197,9 @@ function displayit(Set_of_Task, Set_of_Area, key) {
.attr("rx", 5)
.attr("ry", 5)
.attr("filter", "url(/img/shadow.svg#dropshadow)")
- //.attr("style", "fill:url(/img/shadow.svg#BoxGradient)")
+ .attr("style", function(d){
+ return "fill:url(/img/shadow.svg#BoxGradient-"+ taskStatus[d.status] +")"
+ })
.attr("class", function(d){
if(taskStatus[d.status] == null)
{ return "bar";}