CSS and logic updates
This commit is contained in:
parent
52f3f359af
commit
c000c8f7b7
5 changed files with 297 additions and 78 deletions
|
@ -43,6 +43,16 @@ class lesson {
|
||||||
$this->subjecta = "";
|
$this->subjecta = "";
|
||||||
$this->classa = "";
|
$this->classa = "";
|
||||||
$this->rooma = "";
|
$this->rooma = "";
|
||||||
|
//$this->teacherb = "";
|
||||||
|
//$this->subjectb = "";
|
||||||
|
//$this->classb = "";
|
||||||
|
//$this->roomb = "";
|
||||||
|
$this->teacherchanged = false;
|
||||||
|
$this->subjectchanged = false;
|
||||||
|
$this->classchanged = false;
|
||||||
|
$this->roomchanged = false;
|
||||||
|
$this->reason = "";
|
||||||
|
$this->type = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -50,39 +60,43 @@ class lesson {
|
||||||
* @param object $substitution Substitution
|
* @param object $substitution Substitution
|
||||||
*/
|
*/
|
||||||
public function process_substitution($substitution) {
|
public function process_substitution($substitution) {
|
||||||
// echo "Entering substitution! $this->teacher, $this->subject, $this->class, $this->room \n\t $substitution->teacherb, $substitution->subjectb, $substitution->classb, $substitution->roomb\n";
|
|
||||||
if (//$this->lessonid == $substitution->lesson &&
|
if (//$this->lessonid == $substitution->lesson &&
|
||||||
$this->teacher == $substitution->teacherb &&
|
$this->teacher == $substitution->teacherb &&
|
||||||
$this->subject == $substitution->subjectb &&
|
$this->subject == $substitution->subjectb &&
|
||||||
$this->class == $substitution->classb &&
|
preg_match("/(^|~)".preg_quote($this->class,"/")."($|~)/", $substitution->classb) &&
|
||||||
$this->room == $substitution->roomb) {
|
preg_match("/(^|~)".preg_quote($this->room,"/")."($|~)/", $substitution->roomb) ) {
|
||||||
//preg_match("(^|~)$this->teacher($|~)", $substitution->teacherb) &&
|
|
||||||
//preg_match("(^|~)$this->subject($|~)", $substitution->subjectb) &&
|
|
||||||
//preg_match("(^|~)$this->class($|~)", $substitution->classb) &&
|
|
||||||
//preg_match("(^|~)$this->room($|~)", $substitution->roomb)) {
|
|
||||||
|
|
||||||
// Append change info
|
// Append change info
|
||||||
// if (!preg_match("(^|~)$this->teacher($|~)", $substitution->teachera)) $this->teachera = $substitution->teachera;
|
$this->teachera = $substitution->teachera;
|
||||||
// if (!preg_match("(^|~)$this->subject($|~)", $substitution->subjecta)) $this->subjecta = $substitution->subjecta;
|
$this->subjecta = $substitution->subjecta;
|
||||||
// if (!preg_match("(^|~)$this->class($|~)" , $substitution->classa )) $this->classa = $substitution->classa;
|
$this->classa = $substitution->classa;
|
||||||
// if (!preg_match("(^|~)$this->room($|~)" , $substitution->rooma )) $this->rooma = $substitution->rooma;
|
$this->rooma = $substitution->rooma;
|
||||||
if ($this->teacher != $substitution->teachera) $this->teachera = $substitution->teachera;
|
$this->teacherchanged = ($this->teacher != $this->teachera) ? true : false;
|
||||||
if ($this->subject != $substitution->subjecta) $this->subjecta = $substitution->subjecta;
|
$this->subjectchanged = ($this->subject != $this->subjecta) ? true : false;
|
||||||
if ($this->class != $substitution->classa ) $this->classa = $substitution->classa;
|
$this->classchanged = (!preg_match("/(^|~)".preg_quote($this->class,"/")."($|~)/" , $this->classa )) ? true : false;
|
||||||
if ($this->room != $substitution->rooma ) $this->rooma = $substitution->rooma;
|
$this->roomchanged = (!preg_match("/(^|~)".preg_quote($this->room,"/")."($|~)/" , $this->rooma )) ? true : false;
|
||||||
if ($substitution->text) $this->text .= $substitution->text;
|
if ($substitution->text) $this->text .= $substitution->text;
|
||||||
// echo "In substitution! $this->teachera, $this->subjecta, $this->classa, $this->rooma\n";
|
$this->type = $substitution->type;
|
||||||
$this->substitution = "1";
|
$this->substitution = "1";
|
||||||
return 1;
|
return 1;
|
||||||
} elseif (//$this->lessonid == $substitution->lesson &&
|
} elseif (//$this->lessonid == $substitution->lesson &&
|
||||||
$this->teacher == $substitution->teachera &&
|
$this->teacher == $substitution->teachera &&
|
||||||
$this->subject == $substitution->subjecta &&
|
$this->subject == $substitution->subjecta &&
|
||||||
$this->class == $substitution->classa &&
|
preg_match("/(^|~)".preg_quote($this->class,"/")."($|~)/", $substitution->classa) &&
|
||||||
$this->room == $substitution->rooma) {
|
preg_match("/(^|~)".preg_quote($this->room,"/")."($|~)/", $substitution->rooma) ) {
|
||||||
|
// Append change info
|
||||||
|
$this->teacherb = $substitution->teacherb;
|
||||||
|
$this->subjectb = $substitution->subjectb;
|
||||||
|
$this->classb = $substitution->classb;
|
||||||
|
$this->roomb = $substitution->roomb;
|
||||||
|
$this->teacherchanged = ($this->teacher != $this->teacherb) ? true : false;
|
||||||
|
$this->subjectchanged = ($this->subject != $this->subjectb) ? true : false;
|
||||||
|
$this->classchanged = (!preg_match("/(^|~)".preg_quote($this->class,"/")."($|~)/" , $this->classb )) ? true : false;
|
||||||
|
$this->roomchanged = (!preg_match("/(^|~)".preg_quote($this->room,"/")."($|~)/" , $this->roomb )) ? true : false;
|
||||||
if ($substitution->text) $this->text .= $substitution->text;
|
if ($substitution->text) $this->text .= $substitution->text;
|
||||||
$this->type .= $substitution->type;
|
// TODO Entfall, falls teacherb!=teacher bzw. class not in classb bzw. roomb!=room TODO
|
||||||
// echo "In substitution! $this->teachera, $this->subjecta, $this->classa, $this->rooma\n";
|
$this->type = $substitution->type;
|
||||||
#$this->substitution = "1";
|
$this->substitution = "1";
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -189,17 +189,32 @@ class timetable {
|
||||||
$this->times = $DB->get_records_select('timetable_time',$sql);
|
$this->times = $DB->get_records_select('timetable_time',$sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_periodmax() {
|
||||||
|
//$maxperiod = get_config('timetable', 'numperiod');
|
||||||
|
$maxperiod = 0;
|
||||||
|
for ($i=0; $i<$this->numdayweek; $i++) {
|
||||||
|
foreach($this->lessons[$i+1] as $period => $lessons)
|
||||||
|
if ($period > $maxperiod && count($lessons)) $maxperiod = $period;
|
||||||
|
foreach($this->lessons_canceled[$i+1] as $period => $lessons)
|
||||||
|
if ($period > $maxperiod && count($lessons)) $maxperiod = $period;
|
||||||
|
foreach($this->lessons_event[$i+1] as $period => $lessons)
|
||||||
|
if ($period > $maxperiod && count($lessons)) $maxperiod = $period;
|
||||||
|
}
|
||||||
|
return $maxperiod;
|
||||||
|
}
|
||||||
|
|
||||||
public function prepare_output() {
|
public function prepare_output() {
|
||||||
$resultdata = array();
|
$resultdata = array();
|
||||||
|
|
||||||
$numperiod = get_config('timetable', 'numperiod');
|
$numperiod = max($this->get_periodmax(), get_config('timetable', 'numperiod'));
|
||||||
if ($this->periodmax > $numperiod) $numperiod = $this->periodmax;
|
|
||||||
$numperiod = 13;
|
|
||||||
|
|
||||||
$numdayweek = 5 + get_config('timetable', 'saturday');
|
$numdayweek = 5 + get_config('timetable', 'saturday');
|
||||||
if ($numdayweek == 6) $resultdata['saturday'] = 1; else $resultdata['saturday'] = 0;
|
if ($numdayweek == 6) $resultdata['saturday'] = 1; else $resultdata['saturday'] = 0;
|
||||||
|
|
||||||
$resultdata['type'] = $this->type;
|
$resultdata['type'] = $this->type;
|
||||||
|
$resultdata['viewteacher'] = ($this->type == 'teacher') ? "1" : "";;
|
||||||
|
$resultdata['viewclass'] = ($this->type == 'class') ? "1" : "";;
|
||||||
|
$resultdata['viewroom'] = ($this->type == 'room') ? "1" : "";;
|
||||||
$resultdata['name'] = $this->name;
|
$resultdata['name'] = $this->name;
|
||||||
$resultdata['description'] = $this->description;
|
$resultdata['description'] = $this->description;
|
||||||
$resultdata['date'] = $this->monday->format('d.m') . " - " . $this->lastday->format('d.m');
|
$resultdata['date'] = $this->monday->format('d.m') . " - " . $this->lastday->format('d.m');
|
||||||
|
@ -225,12 +240,27 @@ class timetable {
|
||||||
$mylesson['teachera'] = $lesson->teachera;
|
$mylesson['teachera'] = $lesson->teachera;
|
||||||
$mylesson['rooma'] = $lesson->rooma;
|
$mylesson['rooma'] = $lesson->rooma;
|
||||||
$mylesson['subjecta'] = $lesson->subjecta;
|
$mylesson['subjecta'] = $lesson->subjecta;
|
||||||
|
$mylesson['classb'] = property_exists($lesson,'classb') ? $lesson->classb : null;
|
||||||
|
$mylesson['teacherb'] = property_exists($lesson,'teacherb') ? $lesson->teacherb : null;
|
||||||
|
$mylesson['roomb'] = property_exists($lesson,'roomb') ? $lesson->roomb : null;
|
||||||
|
$mylesson['subjectb'] = property_exists($lesson,'subjectb') ? $lesson->subjectb : null;
|
||||||
|
$mylesson['subjectchanged'] = $lesson->subjectchanged;
|
||||||
|
$mylesson['teacherchanged'] = $lesson->teacherchanged;
|
||||||
|
$mylesson['classchanged'] = $lesson->classchanged;
|
||||||
|
$mylesson['roomchanged'] = $lesson->roomchanged;
|
||||||
$mylesson['substitution'] = $lesson->substitution;
|
$mylesson['substitution'] = $lesson->substitution;
|
||||||
$mylesson['cancel'] = "";
|
$mylesson['cancel'] = "";
|
||||||
|
$mylesson['cancel4me'] = "";
|
||||||
$mylesson['event'] = $lesson->reason ? $lesson->reason : "Event";
|
$mylesson['event'] = $lesson->reason ? $lesson->reason : "Event";
|
||||||
$mylesson['status'] = "1";
|
$mylesson['status'] = "1";
|
||||||
$mylesson['flag'] = "1";
|
$mylesson['flag'] = "1";
|
||||||
$mylesson['text'] = $lesson->text;
|
$mylesson['text'] = $lesson->text;
|
||||||
|
$mylesson['subtype'] = Array();
|
||||||
|
if ($lesson->type) {
|
||||||
|
for ($i=0; $i<32; $i++) {
|
||||||
|
if ($lesson->type & (1<<$i)) $mylesson['subtype'][] = $i+1;
|
||||||
|
}
|
||||||
|
}
|
||||||
$days[$day]['substitutionold'] .= $lesson->text;
|
$days[$day]['substitutionold'] .= $lesson->text;
|
||||||
$days[$day]['lessons'][] = $mylesson;
|
$days[$day]['lessons'][] = $mylesson;
|
||||||
}
|
}
|
||||||
|
@ -244,12 +274,27 @@ class timetable {
|
||||||
$mylesson['teachera'] = $lesson->teachera;
|
$mylesson['teachera'] = $lesson->teachera;
|
||||||
$mylesson['rooma'] = $lesson->rooma;
|
$mylesson['rooma'] = $lesson->rooma;
|
||||||
$mylesson['subjecta'] = $lesson->subjecta;
|
$mylesson['subjecta'] = $lesson->subjecta;
|
||||||
|
$mylesson['classb'] = property_exists($lesson,'classb') ? $lesson->classb : null;
|
||||||
|
$mylesson['teacherb'] = property_exists($lesson,'teacherb') ? $lesson->teacherb : null;
|
||||||
|
$mylesson['roomb'] = property_exists($lesson,'roomb') ? $lesson->roomb : null;
|
||||||
|
$mylesson['subjectb'] = property_exists($lesson,'subjectb') ? $lesson->subjectb : null;
|
||||||
$mylesson['substitution'] = $lesson->substitution;
|
$mylesson['substitution'] = $lesson->substitution;
|
||||||
|
$mylesson['subjectchanged'] = $lesson->subjectchanged;
|
||||||
|
$mylesson['teacherchanged'] = $lesson->teacherchanged;
|
||||||
|
$mylesson['classchanged'] = $lesson->classchanged;
|
||||||
|
$mylesson['roomchanged'] = $lesson->roomchanged;
|
||||||
$mylesson['cancel'] = "";
|
$mylesson['cancel'] = "";
|
||||||
|
$mylesson['cancel4me'] = "";
|
||||||
$mylesson['event'] = "";
|
$mylesson['event'] = "";
|
||||||
$mylesson['status'] = "";
|
$mylesson['status'] = "";
|
||||||
$mylesson['flag'] = "";
|
$mylesson['flag'] = "";
|
||||||
$mylesson['text'] = $lesson->text;
|
$mylesson['text'] = $lesson->text;
|
||||||
|
$mylesson['subtype'] = Array();
|
||||||
|
if ($lesson->type) {
|
||||||
|
for ($i=0; $i<32; $i++) {
|
||||||
|
if ($lesson->type & (1<<$i)) $mylesson['subtype'][] = $i+1;
|
||||||
|
}
|
||||||
|
}
|
||||||
$days[$day]['substitutionold'] .= $lesson->text;
|
$days[$day]['substitutionold'] .= $lesson->text;
|
||||||
$days[$day]['lessons'][] = $mylesson;
|
$days[$day]['lessons'][] = $mylesson;
|
||||||
}
|
}
|
||||||
|
@ -263,12 +308,33 @@ class timetable {
|
||||||
$mylesson['teachera'] = $lesson->teachera;
|
$mylesson['teachera'] = $lesson->teachera;
|
||||||
$mylesson['rooma'] = $lesson->rooma;
|
$mylesson['rooma'] = $lesson->rooma;
|
||||||
$mylesson['subjecta'] = $lesson->subjecta;
|
$mylesson['subjecta'] = $lesson->subjecta;
|
||||||
|
$mylesson['classb'] = property_exists($lesson,'classb') ? $lesson->classb : null;
|
||||||
|
$mylesson['teacherb'] = property_exists($lesson,'teacherb') ? $lesson->teacherb : null;
|
||||||
|
$mylesson['roomb'] = property_exists($lesson,'roomb') ? $lesson->roomb : null;
|
||||||
|
$mylesson['subjectb'] = property_exists($lesson,'subjectb') ? $lesson->subjectb : null;
|
||||||
$mylesson['substitution'] = $lesson->substitution;
|
$mylesson['substitution'] = $lesson->substitution;
|
||||||
$mylesson['cancel'] = "1";
|
$mylesson['cancel'] = "1";
|
||||||
|
$mylesson['cancel4me'] = "";
|
||||||
|
if (($lesson->teacherchanged && $this->type == 'teacher') ||
|
||||||
|
($lesson->classchanged && $this->type == 'class') ||
|
||||||
|
($lesson->roomchanged && $this->type == 'room')) $mylesson['cancel4me'] = "cancel4me";
|
||||||
|
$mylesson['subjectchanged'] = $lesson->subjectchanged;
|
||||||
|
$mylesson['teacherchanged'] = $lesson->teacherchanged;
|
||||||
|
$mylesson['classchanged'] = $lesson->classchanged;
|
||||||
|
$mylesson['roomchanged'] = $lesson->roomchanged;
|
||||||
|
#if ((property_exists($lesson,'teacherb') && $this->type == 'teacher') ||
|
||||||
|
# (property_exists($lesson,'classb') && $this->type == 'class') ||
|
||||||
|
# (property_exists($lesson,'roomb') && $this->type == 'room')) $mylesson['cancel4me'] = "cancel4me";
|
||||||
$mylesson['event'] = "";
|
$mylesson['event'] = "";
|
||||||
$mylesson['status'] = "1";
|
$mylesson['status'] = "1";
|
||||||
$mylesson['flag'] = "1"; // status und flag werden vertauscht (im Template bzw. extern-lib.php
|
$mylesson['flag'] = "1"; // status und flag werden vertauscht (im Template bzw. extern-lib.php
|
||||||
$mylesson['text'] = $lesson->text;
|
$mylesson['text'] = $lesson->text;
|
||||||
|
$mylesson['subtype'] = Array();
|
||||||
|
if ($lesson->type) {
|
||||||
|
for ($i=0; $i<32; $i++) {
|
||||||
|
if ($lesson->type & (1<<$i)) $mylesson['subtype'][] = $i+1;
|
||||||
|
}
|
||||||
|
}
|
||||||
$days[$day]['substitutionold'] .= $lesson->text;
|
$days[$day]['substitutionold'] .= $lesson->text;
|
||||||
$days[$day]['lessons'][] = $mylesson;
|
$days[$day]['lessons'][] = $mylesson;
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,12 +215,23 @@ class mod_timetable_external extends external_api {
|
||||||
'teachera'=> new external_value(PARAM_TEXT, 'name of teacher'),
|
'teachera'=> new external_value(PARAM_TEXT, 'name of teacher'),
|
||||||
'rooma' => new external_value(PARAM_TEXT, 'name of room'),
|
'rooma' => new external_value(PARAM_TEXT, 'name of room'),
|
||||||
'subjecta' => new external_value(PARAM_TEXT, 'name of subject'),
|
'subjecta' => new external_value(PARAM_TEXT, 'name of subject'),
|
||||||
|
'classb' => new external_value(PARAM_TEXT, 'name of class'),
|
||||||
|
'teacherb'=> new external_value(PARAM_TEXT, 'name of teacher'),
|
||||||
|
'roomb' => new external_value(PARAM_TEXT, 'name of room'),
|
||||||
|
'subjectb' => new external_value(PARAM_TEXT, 'name of subject'),
|
||||||
|
'classchanged' => new external_value(PARAM_BOOL, 'name of class'),
|
||||||
|
'teacherchanged' => new external_value(PARAM_BOOL, 'name of teacher'),
|
||||||
|
'roomchanged' => new external_value(PARAM_BOOL, 'name of room'),
|
||||||
|
'subjectchanged' => new external_value(PARAM_BOOL, 'name of subject'),
|
||||||
'substitution'=> new external_value(PARAM_TEXT, 'lesson is substitution'),
|
'substitution'=> new external_value(PARAM_TEXT, 'lesson is substitution'),
|
||||||
'cancel' => new external_value(PARAM_TEXT, 'lesson is canceled'),
|
'cancel' => new external_value(PARAM_TEXT, 'lesson is canceled'),
|
||||||
|
'cancel4me' => new external_value(PARAM_TEXT, 'lesson is canceled 4 me'),
|
||||||
'event' => new external_value(PARAM_TEXT, 'lesson is event'),
|
'event' => new external_value(PARAM_TEXT, 'lesson is event'),
|
||||||
'status' => new external_value(PARAM_TEXT, 'status of lesson'),
|
'status' => new external_value(PARAM_TEXT, 'status of lesson'),
|
||||||
'flag' => new external_value(PARAM_TEXT, 'flag of lesson'),
|
'flag' => new external_value(PARAM_TEXT, 'flag of lesson'),
|
||||||
'text' => new external_value(PARAM_TEXT, 'description text')
|
'text' => new external_value(PARAM_TEXT, 'description text'),
|
||||||
|
'subtype' => new external_multiple_structure( new external_value(PARAM_INT, 'bitnumber'))
|
||||||
|
//'subtype' => new external_multiple_structure( new external_value('number', PARAM_INT, 'bitnumber'))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -231,6 +242,9 @@ class mod_timetable_external extends external_api {
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
'type' => new external_value(PARAM_TEXT, 'The type of timetable: class, teacher, room'),
|
'type' => new external_value(PARAM_TEXT, 'The type of timetable: class, teacher, room'),
|
||||||
|
'viewteacher' => new external_value(PARAM_TEXT, '1 if type of timetable teacher'),
|
||||||
|
'viewclass' => new external_value(PARAM_TEXT, '1 if type of timetable class'),
|
||||||
|
'viewroom' => new external_value(PARAM_TEXT, '1 if type of timetable room'),
|
||||||
'name' => new external_value(PARAM_TEXT, 'value of type'),
|
'name' => new external_value(PARAM_TEXT, 'value of type'),
|
||||||
'date' => new external_value(PARAM_TEXT, 'date'),
|
'date' => new external_value(PARAM_TEXT, 'date'),
|
||||||
'description' => new external_value(PARAM_TEXT, 'description'),
|
'description' => new external_value(PARAM_TEXT, 'description'),
|
||||||
|
|
88
styles.css
88
styles.css
|
@ -67,3 +67,91 @@ div.timetable {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 1rem;
|
width: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.time {
|
||||||
|
font-size: 6pt;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.lesson {
|
||||||
|
margin: 2px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.substitution {
|
||||||
|
//padding: 2px;
|
||||||
|
background-color: pink;
|
||||||
|
display: block!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lesson_detail {
|
||||||
|
font-size: 6pt;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.changed {
|
||||||
|
background-color: red;
|
||||||
|
color: white;
|
||||||
|
padding: 2px;
|
||||||
|
//box-sizing: border-box;
|
||||||
|
font-weight:bold;
|
||||||
|
//display: block!important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lesson_details {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lesson_detail {
|
||||||
|
display: inline-block;
|
||||||
|
margin: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lesson_txt {
|
||||||
|
background-color: pink;
|
||||||
|
color: blue;
|
||||||
|
padding: 2px;
|
||||||
|
font-weight:bold;
|
||||||
|
//display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.canceled {
|
||||||
|
background-color: red;
|
||||||
|
color: white;
|
||||||
|
padding: 2px;
|
||||||
|
font-weight:bold;
|
||||||
|
//display: inline;
|
||||||
|
//text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtype_1 .lesson_main {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtype_1 .lesson_detail {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancel4me .lesson_main {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cancel4me .lesson_detail {
|
||||||
|
text-decoration: line-through;
|
||||||
|
//display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
//.canceled .lesson_detail.cancel_detail {
|
||||||
|
// text-decoration: line-through;
|
||||||
|
//}
|
||||||
|
|
||||||
|
.canceled .lesson_detail.changed {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
|
||||||
|
.canceled.lesson_main.changed {
|
||||||
|
text-decoration: line-through;
|
||||||
|
}
|
||||||
|
//.canceled.lesson_main.cancel_detail {
|
||||||
|
// text-decoration: line-through;
|
||||||
|
//}
|
||||||
|
|
|
@ -20,44 +20,76 @@
|
||||||
{{#periods}}
|
{{#periods}}
|
||||||
<tr sstyle="border:1px black; padding-top:0rem; padding-bottom:0rem">
|
<tr sstyle="border:1px black; padding-top:0rem; padding-bottom:0rem">
|
||||||
<td>
|
<td>
|
||||||
<a href="javascript:;" style="color: black;" data-container="body" data-toggle="popover" data-placement="top" data-html="true" data-content="Beginn: {{starttime}} Uhr<br/>Ende: {{endtime}} Uhr" title="{{starttime}}-{{endtime}}">
|
<a href="javascript:;" style="color: black;" data-container="body" data-toggle="popover" data-placement="top" data-html="true" data-content="{{number}}. Stunde<br/>Beginn: {{starttime}} Uhr<br/>Ende: {{endtime}} Uhr" title="{{starttime}}-{{endtime}}">
|
||||||
{{number}}
|
{{number}}
|
||||||
|
<div class="time" id="{{id}}">{{starttime}}-{{endtime}}</div>
|
||||||
</a></td>
|
</a></td>
|
||||||
{{#days}}
|
{{#days}}
|
||||||
<td style="padding-top:0rem; padding-bottom:0rem; vertical-align:middle; border-left:1px black;" {{#substitutionolddd}}bgcolor="pink" data-toggle='tooltip' title='{{substitutionold}}'{{/substitutionolddd}}>
|
<td style="padding-top:0rem; padding-bottom:0rem; vertical-align:middle; border-left:1px black;">
|
||||||
{{#lessons}}
|
{{#lessons}}
|
||||||
<div class="lesson" style="padding:2pt; {{#substitution}}border-color:red; boder-width:2px; border-style:solid; background-color:pink;{{/substitution}} {{#cancel}}font-weight:bold; background-color:red; text-decoration:line-through;{{/cancel}}{{#text}} background-color:pink;{{/text}}">
|
<div class="lesson {{#substitution}}substitution{{/substitution}} {{cancel4me}} {{#subtype}}subtype_{{.}} {{/subtype}}">
|
||||||
<a href="javascript:;" style="color:{{#cancel}}white{{/cancel}}{{^cancel}}black{{/cancel}};" data-container="body" data-toggle="popover" data-placement="top" data-html="true" data-content="Fach: {{subject}},<br/>Lehrer: {{teacher}},<br/>Klasse: {{class}},</br>Raum: {{room}}</br>
|
<a href="javascript:;" data-container="body" data-toggle="popover" data-placement="top" data-html="true"
|
||||||
{{#cancel}} entfällt.{{/cancel}}{{#substitution}} statt: {{subjecta}}, {{teachera}}, {{classa}}, {{rooma}}{{/substitution}}{{#text}}<br><b>Hinweis: {{text}}</b>{{/text}}" title="{{#cancel}}Stunde entfällt{{/cancel}}{{#substitution}}Stundenänderung{{/substitution}}{{#event}} Event / Sonderplan{{/event}}">
|
data-content="Fach: {{subject}}
|
||||||
{{#event}}{{text}}{{/event}}
|
{{#subjectchanged}}
|
||||||
<div class="subject">
|
{{#cancel}}{{#subjectb}} wird ersetzt durch {{subjectb}}{{/subjectb}}{{^subjectb}} entfällt{{/subjectb}}{{/cancel}}
|
||||||
{{#subjecta}}<span style="background-color:red; color:white; font-weight:bold;">{{/subjecta}} {{subject}} {{#substitution}}{{#subjecta}}</span>{{/subjecta}}
|
{{^cancel}}{{#subjecta}} statt {{subjecta}}{{/subjecta}}{{/cancel}}
|
||||||
<span style="font-size:6pt">
|
{{/subjectchanged}},<br/>
|
||||||
{{#classa}}<span style="background-color:red; color:white; font-weight:bold;">{{/classa}} {{class}} {{#classa}}</span>{{/classa}},
|
Lehrer: {{teacher}}
|
||||||
{{#teachera}}<span style="background-color:red; color:white; font-weight:bold;">{{/teachera}} {{teacher}} {{#teachera}}</span>{{/teachera}},
|
{{#teacherchanged}}
|
||||||
{{#rooma}}<span style="background-color:red; color:white; font-weight:bold;">{{/rooma}} {{room}} {{#rooma}}</span>{{/rooma}}
|
{{#cancel}}{{#teacherb}} wird ersetzt durch {{teacherb}}{{/teacherb}}{{^teacherb}} entfällt{{/teacherb}}{{/cancel}}
|
||||||
</span>{{/substitution}}</div>
|
{{^cancel}}{{#teachera}} statt {{teachera}}{{/teachera}}{{/cancel}}
|
||||||
<div class="class">
|
{{/teacherchanged}},<br/>
|
||||||
{{#classa}}<span style="background-color:red; color:white; font-weight:bold;">{{/classa}} {{class}} {{#substitution}}{{#classa}}</span>{{/classa}}
|
Klasse: {{class}}
|
||||||
<span style="font-size:6pt">
|
{{#classchanged}}
|
||||||
{{#subjecta}}<span style="background-color:red; color:white; font-weight:bold;">{{/subjecta}} {{subject}} {{#subjecta}}</span>{{/subjecta}},
|
{{#cancel}}{{#classb}} wird ersetzt durch {{classb}}{{/classb}}{{^classb}} entfällt{{/classb}}{{/cancel}}
|
||||||
{{#teachera}}<span style="background-color:red; color:white; font-weight:bold;">{{/teachera}} {{teacher}} {{#teachera}}</span>{{/teachera}},
|
{{^cancel}}{{#classa}} statt {{classa}}{{/classa}}{{/cancel}}
|
||||||
{{#rooma}}<span style="background-color:red; color:white; font-weight:bold;">{{/rooma}} {{room}} {{#rooma}}</span>{{/rooma}}
|
{{/classchanged}},<br/>
|
||||||
</span>{{/substitution}}</div>
|
Raum: {{room}}
|
||||||
<div class="teacher">
|
{{#roomchanged}}
|
||||||
{{#teachera}}<span style="background-color:red; color:white; font-weight:bold;">{{/teachera}} {{teacher}} {{#substitution}}{{#teachera}}</span>{{/teachera}}
|
{{#cancel}}{{#roomb}} wird ersetzt durch {{roomb}}{{/roomb}}{{^roomb}} entfällt{{/roomb}}{{/cancel}}
|
||||||
<span style="font-size:6pt">
|
{{^cancel}}{{#rooma}} statt {{rooma}}{{/rooma}}{{/cancel}}
|
||||||
{{#subjecta}}<span style="background-color:red; color:white; font-weight:bold;">{{/subjecta}} {{subject}} {{#subjecta}}</span>{{/subjecta}},
|
{{/roomchanged}},<br/>
|
||||||
{{#classa}}<span style="background-color:red; color:white; font-weight:bold;">{{/classa}} {{class}} {{#classa}}</span>{{/classa}}
|
<!-- {{#cancel}} entfällt.
|
||||||
{{#rooma}}<span style="background-color:red; color:white; font-weight:bold;">{{/rooma}} {{room}} {{#rooma}}</span>{{/rooma}}
|
{{^subjectb}}<br>{{subject}} entfällt{{/subjectb}}
|
||||||
</span>{{/substitution}}</div>
|
{{^teacherb}}<br>{{teacher}} entfällt{{/teacherb}}
|
||||||
<div class="room">
|
{{^roomb}}<br>{{room}} entfällt{{/roomb}}
|
||||||
{{#rooma}}<span style="background-color:red; color:white; font-weight:bold;">{{/rooma}} {{room}} {{#substitution}}{{#rooma}}</span>{{/rooma}}
|
{{^classb}}<br>{{class}} entfällt{{/classb}}
|
||||||
<span style="font-size:6pt">
|
{{/cancel}}
|
||||||
{{#subjecta}}<span style="background-color:red; color:white; font-weight:bold;">{{/subjecta}} {{subject}} {{#subjecta}}</span>{{/subjecta}},
|
{{^cancel}}
|
||||||
{{#classa}}<span style="background-color:red; color:white; font-weight:bold;">{{/classa}} {{class}} {{#classa}}</span>{{/classa}}
|
{{#substitution}} statt:
|
||||||
{{#teachera}}<span style="background-color:red; color:white; font-weight:bold;">{{/teachera}} {{teacher}} {{#teachera}}</span>{{/teachera}},
|
{{#subjecta}}{{subjecta}}, {{/subjecta}}
|
||||||
</span>{{/substitution}}</div>
|
{{#teachera}}{{teachera}}, {{/teachera}}
|
||||||
|
{{#classa}}{{classa}}, {{/classa}}
|
||||||
|
{{#rooma}}{{rooma}} {{/rooma}}
|
||||||
|
{{/substitution}}
|
||||||
|
{{/cancel}}
|
||||||
|
-->
|
||||||
|
{{#text}}
|
||||||
|
<br><b>Hinweis: {{text}}</b>
|
||||||
|
{{/text}}"
|
||||||
|
title="{{#cancel}}Stunde entfällt / {{/cancel}}{{#substitution}}Stundenänderung{{/substitution}}{{#event}} Event / Sonderplan{{/event}}">
|
||||||
|
{{#viewteacher}}
|
||||||
|
<div class="lesson_main {{#subjectchanged}}changed{{/subjectchanged}} {{#cancel}}canceled{{/cancel}}">{{subject}}</div>
|
||||||
|
<div class="lesson_details {{#cancel}}canceled{{/cancel}} {{#substitution}}substitution{{/substitution}}" id="{{id}}">
|
||||||
|
<span class="lesson_detail {{#classchanged}}changed{{/classchanged}}" id="class">{{class}}</span>
|
||||||
|
<span class="lesson_detail {{#roomchanged}}changed{{/roomchanged}}" id="room">{{room}}</span>
|
||||||
|
</div>
|
||||||
|
{{/viewteacher}}
|
||||||
|
{{#viewclass}}
|
||||||
|
<div class="lesson_main {{#subjectchanged}}changed{{/subjectchanged}} {{#cancel}}canceled{{/cancel}}">{{subject}}</div>
|
||||||
|
<div class="lesson_details {{#cancel}}canceled{{/cancel}} {{#substitution}}substitution{{/substitution}}" id="{{id}}">
|
||||||
|
<span class="lesson_detail {{#teacherchanged}}changed{{/teacherchanged}}" id="teacher">{{teacher}}</span>
|
||||||
|
<span class="lesson_detail {{#roomchanged}}changed{{/roomchanged}}" id="room">{{room}}</span>
|
||||||
|
</div>
|
||||||
|
{{/viewclass}}
|
||||||
|
{{#viewroom}}
|
||||||
|
<div class="lesson_main {{#classa}}changed{{/classa}} {{#cancel}}canceled{{/cancel}}">{{class}}</div>
|
||||||
|
<div class="lesson_details {{#cancel}}canceled{{/cancel}} {{#substitution}}substitution{{/substitution}}" id="{{id}}">
|
||||||
|
<span class="lesson_detail {{#teacherchanged}}changed{{/teacherchanged}}" id="teacher">{{teacher}}</span>
|
||||||
|
<span class="lesson_detail {{#roomchanged}}changed{{/roomchanged}}" id="room">{{room}}</span>
|
||||||
|
</div>
|
||||||
|
{{/viewroom}}
|
||||||
|
{{#text}}<div class="lesson_txt">{{text}}</div>{{/text}}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{/lessons}}
|
{{/lessons}}
|
||||||
|
@ -66,23 +98,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
{{/periods}}
|
{{/periods}}
|
||||||
</table>
|
</table>
|
||||||
|
<br>
|
||||||
|
<a href="javascript:;" class="block_timetable_detail_show" id="{{id}}">{{#pix}}i/show, core, Details anzeigen{{/pix}}Details anzeigen</a>
|
||||||
|
<a href="javascript:;" class="block_timetable_detail_hide" id="{{id}}" style="display:none;">{{#pix}}i/hide, core, Details verbergen{{/pix}}Details verbergen</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="timetable_legend" sssstyle="text-align:left; width:100%; align:center;">
|
|
||||||
<a href="javascript:;" class="block_timetable_select" data-type="class">{{#pix}}i/show, core, Klassen anzeigen{{/pix}}Klassen</a><br>
|
|
||||||
<a href="javascript:;" class="block_timetable_select" data-type="teacher">{{#pix}}i/hide, core, Lehrer ausblenden{{/pix}}Lehrer</a><br>
|
|
||||||
<a href="javascript:;" class="block_timetable_select" data-type="subject">{{#pix}}i/show, core, Fächer anzeigen{{/pix}}Fächer</a><br>
|
|
||||||
<a href="javascript:;" class="block_timetable_select" data-type="room">{{#pix}}i/show, core, Räume anzeigen{{/pix}}Räume</a><br>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="timetable_legend" style="text-align:center; width:100%; align:center; display: none;">
|
|
||||||
<a href="javascript:;" class="block_timetable_select" data-type="class">Klassen</a> -
|
|
||||||
<a href="javascript:;" class="block_timetable_select" data-type="teacher">Lehrer</a> -
|
|
||||||
<a href="javascript:;" class="block_timetable_select" data-type="subject">Fächer</a> -
|
|
||||||
<a href="javascript:;" class="block_timetable_select" data-type="room">Räume</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{# js }}
|
{{# js }}
|
||||||
require([
|
require([
|
||||||
|
@ -128,6 +147,24 @@ require([
|
||||||
$(".block_timetable_select").click(function() {
|
$(".block_timetable_select").click(function() {
|
||||||
select_type($(event.target).data('type'));
|
select_type($(event.target).data('type'));
|
||||||
});
|
});
|
||||||
|
$(".block_timetable_detail_show").click(function(event) {
|
||||||
|
//$(".lesson_detail").show();
|
||||||
|
var id = event.currentTarget.id;
|
||||||
|
$("#"+id+".lesson_details").css({"display":"inline"});
|
||||||
|
$("#"+id+".time").css({"display":"block"});
|
||||||
|
//$("#"+id+".lesson_details").show();
|
||||||
|
$("#"+id+".block_timetable_detail_show").hide();
|
||||||
|
$("#"+id+".block_timetable_detail_hide").show();
|
||||||
|
});
|
||||||
|
$(".block_timetable_detail_hide").click(function(event) {
|
||||||
|
//$(".lesson_detail").hide();
|
||||||
|
var id = event.currentTarget.id;
|
||||||
|
$("#"+id+".lesson_details").css({"display":"none"});
|
||||||
|
$("#"+id+".time").css({"display":"none"});
|
||||||
|
//$("#"+id+".lesson_details").hide();
|
||||||
|
$("#"+id+".block_timetable_detail_show").show();
|
||||||
|
$("#"+id+".block_timetable_detail_hide").hide();
|
||||||
|
});
|
||||||
|
|
||||||
if (typeof block_timetable_type !== 'undefined') {
|
if (typeof block_timetable_type !== 'undefined') {
|
||||||
console.log("block_timetable_type found:"+block_timetable_type);
|
console.log("block_timetable_type found:"+block_timetable_type);
|
||||||
|
|
Loading…
Add table
Reference in a new issue