# HG changeset patch # User ethanzonca # Date 2010-10-04 20:37:47 # Node ID bc5accd3cbd493c693f46b5674461a623e720a81 # Parent 2a9e1c9634e5bde12f34288cae776bc35b79c81f Added styling for output: color-coding and rounded edges diff --git a/class.schedule.php b/class.schedule.php --- a/class.schedule.php +++ b/class.schedule.php @@ -344,7 +344,7 @@ class Schedule $table .= ""; // Header row - $table .= "\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t"; + $table .= "\n\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t"; for($r = 0; $r < (count($time)-1); $r++) { @@ -368,11 +368,11 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $M = $j; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } } @@ -382,10 +382,10 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $M = -1; $filled = true; } @@ -411,11 +411,11 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $Tu = $j; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } } @@ -425,10 +425,10 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $Tu = -1; $filled = true; } @@ -454,11 +454,11 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $W = $j; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } } @@ -468,10 +468,10 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $W = -1; $filled = true; } @@ -497,11 +497,11 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $Th = $j; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } } @@ -511,10 +511,10 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $Th = -1; $filled = true; } @@ -540,11 +540,11 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $F = $j; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } } @@ -554,10 +554,10 @@ class Schedule { if($this->classStorage[$j]->getSection($this->storage[$i][$j])->getEndTime() > $time[$r+1]) { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $filled = true; } else { - $table .= "\n\t\t"; + $table .= "\n\t\t"; $F = -1; $filled = true; } diff --git a/styles/general.css b/styles/general.css --- a/styles/general.css +++ b/styles/general.css @@ -65,6 +65,9 @@ td.center { .section:nth-child(even) { background: #DDDDDD; } +.section:nth-child(odd) { + background: #DDDDDD; +} .none { background: #fff; } @@ -148,4 +151,4 @@ td.center { } .centeredtext { text-align: center; -} \ No newline at end of file +} diff --git a/styles/output.css b/styles/output.css --- a/styles/output.css +++ b/styles/output.css @@ -1,31 +1,55 @@ /* Output Table Styling */ .top{ - border-style:solid solid none solid; -background-color:#dddddd; + border-style:solid solid none solid; + background-color:#dddddd; + -moz-border-radius-topright: 5px; + border-top-right-radius: 5px; + -moz-border-radius-topleft: 5px; + border-top-left-radius: 5px; } .mid{ - border-style:none solid none solid; -background-color:#dddddd; + border-style:none solid none solid; + background-color:#dddddd; } .end{ - border-style:none solid solid solid; -background-color:#dddddd; + border-style:none solid solid solid; + background-color:#dddddd; + -moz-border-radius-bottomright: 5px; + border-bottom-right-radius: 5px; + -moz-border-radius-bottomleft: 5px; + border-bottom-left-radius: 5px; + } .none{ - border-style:none; + border-style:none; + border-bottom: 1px solid #DDD; } .single{ - border-style:solid; - background-color:#dddddd; + border-style:solid; + background-color:#dddddd; } td{ - text-align:center; -width:7em; + text-align:center; + width:7em; } .time{ - border-style:none none solid none; + border-style:none none solid none; } .day{ - border-style:none none solid solid; + border-style:none none solid solid; } +/* Class Coloring */ + +.class0 { background: #69c76f; } +.class1 { background: #c5c769; } +.class2 { background: #c76b69; } +.class3 { background: #696fc7; } +.class4 { background: #69a7c7; } +.class5 { background: #c769c6; } +.class6 { background: #989898; } +.class7 { background: #e8e8e8; } +.class8 { background: #111111; color: #fff; } +.class9 { background: #00437d; color: #fff; } +.class10 { background: #7e2400; color: #fff; } +.permuteNum { border-bottom: 1px solid #000; font-weight: bold; color: #fff; background: #222; }
" . ($i+1) . "MondayTuesdayWednesdayThursdayFriday
" . ($i+1) . "MondayTuesdayWednesdayThursdayFriday
" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "    " . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "    " . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "    " . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "    " . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "" . $this->classStorage[$j]->getName() . " " . $this->classStorage[$j]->getSection($this->storage[$i][$j])->getLetter() . "