diff --git a/content/dragboard.js.php b/content/dragboard.js.php index 07012ca78..b4fc7da1e 100644 --- a/content/dragboard.js.php +++ b/content/dragboard.js.php @@ -460,17 +460,53 @@ var boardObserver= { var styleNow=evt.target.getAttribute("style"); if (evt.target.tagName=="label") + { evt.target.setAttribute("style","background-color:#AAFFAA;"); + + var tagesinfo = evt.target.parentNode.getElementsByClassName('stplweek_tagesinfo'); + if(typeof tagesinfo[0]!='undefined') + { + var Tagesinfostyle = tagesinfo[0].getAttribute("style"); + tagesinfo[0].setAttribute("style",Tagesinfostyle+";visibility:visible;"); + } + } else + { evt.target.setAttribute("style",styleNow+";border:1px dashed black;"); + + var tagesinfo = evt.target.getElementsByClassName('stplweek_tagesinfo'); + if(typeof tagesinfo[0]!='undefined') + { + var Tagesinfostyle = tagesinfo[0].getAttribute("style"); + tagesinfo[0].setAttribute("style",Tagesinfostyle+";visibility:visible;"); + } + } }, onDragExit: function (evt,flavour,session) { var styleNow=evt.target.getAttribute("style"); if (evt.target.tagName=="label") + { evt.target.setAttribute("style",""); + + var tagesinfo = evt.target.parentNode.getElementsByClassName('stplweek_tagesinfo'); + if(typeof tagesinfo[0]!='undefined') + { + var Tagesinfostyle = tagesinfo[0].getAttribute("style"); + tagesinfo[0].setAttribute("style",Tagesinfostyle+";visibility:hidden;"); + } + } else + { evt.target.setAttribute("style",styleNow+";border:1px solid black;"); + + var tagesinfo = evt.target.getElementsByClassName('stplweek_tagesinfo'); + if(typeof tagesinfo[0]!='undefined') + { + var Tagesinfostyle = tagesinfo[0].getAttribute("style"); + tagesinfo[0].setAttribute("style",Tagesinfostyle+";visibility:hidden;"); + } + } }, onDragOver: function(evt,flavour,session) { diff --git a/content/lvplanung/timetable-week.xul.php b/content/lvplanung/timetable-week.xul.php index 04cd4fef9..16ed153d1 100644 --- a/content/lvplanung/timetable-week.xul.php +++ b/content/lvplanung/timetable-week.xul.php @@ -275,6 +275,10 @@ if ($aktion=='stpl_move' || $aktion=='stpl_set') $lehrstunde->ort_kurzbz=$ort; if ($aktion=='stpl_set') $lehrstunde->ort_kurzbz=$new_ort; + + if($new_unr!='') + $lehrstunde->unr = $new_unr; + $kollision=$lehrstunde->kollision($db_stpl_table); if ($kollision && !$ignore_kollision) $kollision_msg.=$lehrstunde->errormsg; @@ -308,6 +312,9 @@ if ($aktion=='stpl_move' || $aktion=='stpl_set') $lehrstunde->ort_kurzbz=$ort; if ($aktion=='stpl_set') $lehrstunde->ort_kurzbz=$new_ort; + if($new_unr!='') + $lehrstunde->unr = $new_unr; + $kollision=$lehrstunde->kollision($db_stpl_table); if ($kollision && !$ignore_kollision) $kollision_msg.=$lehrstunde->errormsg; diff --git a/include/lehrstunde.class.php b/include/lehrstunde.class.php index ba3fe65d1..50310123f 100644 --- a/include/lehrstunde.class.php +++ b/include/lehrstunde.class.php @@ -156,6 +156,8 @@ class lehrstunde extends basis_db $sql_query='UPDATE '.$stpl_table; $sql_query.=" SET datum=".$this->db_add_param($this->datum).", stunde=".$this->db_add_param($this->stunde); $sql_query.=", ort_kurzbz=".$this->db_add_param($this->ort_kurzbz).", mitarbeiter_uid=".$this->db_add_param($this->lektor_uid); + if($this->unr!='') + $sql_query.=", unr=".$this->db_add_param($this->unr); $sql_query.=", updateamum=now(), updatevon=".$this->db_add_param($uid); $sql_query.=" WHERE $stpl_id=".$this->db_add_param($this->stundenplan_id); diff --git a/include/wochenplan.class.php b/include/wochenplan.class.php index 4aac262b2..6f3b9eba0 100644 --- a/include/wochenplan.class.php +++ b/include/wochenplan.class.php @@ -1417,9 +1417,12 @@ class wochenplan extends basis_db if(isset($lktcheck[$lehrstunde->lektor]) && $lktcheck[$lehrstunde->lektor]!=$lehrstunde->unr) { - $kollision++; - $kollisionsmeldungen[$lehrstunde->unr][]=" LektorIn ".$lehrstunde->lektor; //." ".$lehrstunde->unr."!=".$lktcheck[$lehrstunde->lektor]; - $kollisionsmeldungen[$lktcheck[$lehrstunde->lektor]][]=" LektorIn ".$lehrstunde->lektor; //." ".$lehrstunde->unr."!=".$lktcheck[$lehrstunde->lektor]; + if(!in_array($lehrstunde->lektor_uid, unserialize(KOLLISIONSFREIE_USER))) + { + $kollision++; + $kollisionsmeldungen[$lehrstunde->unr][]=" LektorIn ".$lehrstunde->lektor; //." ".$lehrstunde->unr."!=".$lktcheck[$lehrstunde->lektor]; + $kollisionsmeldungen[$lktcheck[$lehrstunde->lektor]][]=" LektorIn ".$lehrstunde->lektor; //." ".$lehrstunde->unr."!=".$lktcheck[$lehrstunde->lektor]; + } } else $lktcheck[$lehrstunde->lektor]=$lehrstunde->unr; diff --git a/skin/tempus.css b/skin/tempus.css index 52c5fa1e1..0b48efb26 100644 --- a/skin/tempus.css +++ b/skin/tempus.css @@ -154,11 +154,11 @@ toolbarbutton.stplweekoverlay-toolbarbutton:hover .stplweek_vbox:hover .stplweek_tagesinfo { - color: #AAAAAA; visibility:visible; } .stplweek_tagesinfo { + color: #AAAAAA; visibility:hidden; }