From 0e8de1ea03765f564bc1757504e0d8c14334b79e Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Tue, 19 Nov 2019 00:13:36 +0100 Subject: Rev: 4572 --- mayor-orig/mayor-naplo/log/mayor-naplo.rev | 2 +- .../include/modules/naplo/haladasi/haladasi.php | 18 +++++---- .../private/naplo/orarend/orarendModosito-pre.php | 43 ++++++++++++++++++---- .../www/skin/classic/module-naplo/css/naplo.css | 10 ++++- .../module-naplo/css/orarend/orarendModosito.css | 4 +- .../www/skin/classic/module-naplo/html/base.phtml | 22 +++++++++-- .../html/orarend/orarendModosito.phtml | 14 ++++++- .../module-naplo/html/osztalyozo/diak.phtml | 8 +++- .../module-naplo/javascript/naplo.jquery.min.js | 2 +- 9 files changed, 95 insertions(+), 28 deletions(-) (limited to 'mayor-orig/mayor-naplo') diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index cc8a8a9f..6dc04883 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4569 +4572 diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php index 9c46b400..e5090c18 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php @@ -39,15 +39,17 @@ // Az érintett tankörök id-inek listája $tankorIds = $tankorAdat = array(); if (is_array($Tankorok) && ($count = count($Tankorok)) > 0) { - $tankorFeltetel = 'tankorId IN (' . $Tankorok[0]['tankorId']; - $tankorIds[] = $Tankorok[0]['tankorId']; - $Tankorok[0]['tanar'] = getTankorTanaraiByInterval($Tankorok[0]['tankorId'], array('tanev' => __TANEV, 'tolDt' => _SHOW_DAYS_FROM, 'igDt' => _SHOW_DAYS_TO, 'result' => 'nevsor')); - $tankorAdat[$Tankorok[0]['tankorId']] = $Tankorok[0]; + $_tankorId = intval($Tankorok[0]['tankorId']); + $tankorFeltetel = 'tankorId IN (' . $_tankorId; + $tankorIds[] = $_tankorId; + $Tankorok[0]['tanar'] = getTankorTanaraiByInterval($_tankorId, array('tanev' => __TANEV, 'tolDt' => _SHOW_DAYS_FROM, 'igDt' => _SHOW_DAYS_TO, 'result' => 'nevsor')); + $tankorAdat[$_tankorId] = $Tankorok[0]; for ($i = 1; $i < $count; $i++) { - $tankorFeltetel .= ', '.$Tankorok[$i]['tankorId']; - $tankorIds[] = $Tankorok[$i]['tankorId']; - $Tankorok[$i]['tanar'] = getTankorTanaraiByInterval($Tankorok[$i]['tankorId'], array('tanev' => __TANEV, 'tolDt' => _SHOW_DAYS_FROM, 'igDt' => _SHOW_DAYS_TO, 'result' => 'nevsor')); - $tankorAdat[$Tankorok[$i]['tankorId']] = $Tankorok[$i]; + $_tankorId = intval($Tankorok[$i]['tankorId']); + $tankorFeltetel .= ', '.$_tankorId; + $tankorIds[] = $_tankorId; + $Tankorok[$i]['tanar'] = getTankorTanaraiByInterval($_tankorId, array('tanev' => __TANEV, 'tolDt' => _SHOW_DAYS_FROM, 'igDt' => _SHOW_DAYS_TO, 'result' => 'nevsor')); + $tankorAdat[$_tankorId] = $Tankorok[$i]; } $tankorFeltetel .= ')'; } diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php index 17acc6ff..e0fe07db 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarendModosito-pre.php @@ -33,7 +33,14 @@ $refTolDt = readVariable($_POST['refTolDt'],'date'); $refIgDt = readVariable($_POST['refIgDt'],'date'); - if ($refTolDt=='' || $refIgDt=='') $_SESSION['alert'][] = 'info:nincs_intervallum'; + if ($refTolDt=='' || $refIgDt=='') { + //$_SESSION['alert'][] = 'info:nincs_intervallum'; + $refTolIgNincsKitoltve = true; + } + if ($tanarId=='' && $osztalyId =='') { + $missingTanarOsztaly = true; + } + $ADAT['telephelyek'] = getTelephelyek(); $ADAT['haladasiModositando'] = readVariable($_POST['haladasiModositando'], 'bool'); @@ -67,9 +74,18 @@ // itt ellenőrizzük, hogy a dt (referenciadátum) beleesik-e a tolIg be! if (isset($tolDt) && isset($refTolDt) && isset($refIgDt)) { - if (strtotime($tolDt)strtotime($refIgDt)) $_SESSION['alert'][] = 'message:wrong_data:hibás referenciadátum!'; - if (strtotime($refTolDt)>strtotime($refIgDt)) $_SESSION['alert'][] = 'message:wrong_data:hibás referenciadátum!'; + if (strtotime($tolDt)strtotime($refIgDt)) { + // $_SESSION['alert'][] = 'message:wrong_data:hibás referenciadátum!'; + $refDtHibas = true; + } + if (strtotime($refTolDt)>strtotime($refIgDt)) { + // $_SESSION['alert'][] = 'message:wrong_data:hibás referenciadátum!'; + $refDtHibas = true; + } } if ($action==='do') { $HOT = readVariable($_POST['HALADASIORATOROL'],'id'); @@ -262,6 +278,9 @@ 'tolDt' => date('Y-m-d', strtotime('last Monday', strtotime($_TANEV['kezdesDt']))), // 'tolDt' => $_TANEV['elozoZarasDt'], 'igDt' => $_TANEV['kovetkezoKezdesDt'], + 'kotelezo' => true, + 'hianyzik' => $refTolIgNincsKitoltve, + 'hibas' => $refDtHibas ); $TOOL['datumTolIgSelect'] = array( 'tipus' => 'sor', 'title' => 'REFDT', @@ -272,18 +291,28 @@ 'override' => true, 'tolDt' => date('Y-m-d', strtotime('last Monday', strtotime($_TANEV['kezdesDt']))), 'igDt' => $_TANEV['zarasDt'], + 'kotelezo' => true, + 'hianyzik' => $refTolIgNincsKitoltve, + 'hibas' => $refDtHibas ); + //$TOOL['orarendiHetSelect'] = array('tipus'=>'cella' , 'paramName' => 'het', 'post'=>array('targyId','tankorId','osztalyId','tanarId'), 'disabled'=>true); // if ($osztalyId!='' || $diakId!='') { // $TOOL['diakSelect'] = array('tipus'=>'sor','paramName'=>'diakId', 'post'=>array('refTolDt','refIgDt','tolDt','osztalyId','telephely')); // } else // $TOOL['munkakozossegSelect'] = array('tipus'=>'sor', 'paramName'=>'mkId', 'post'=>array('refTolDt','refIgDt','tolDt','telephely')); - $TOOL['tanarSelect'] = array('tipus'=>'cella', 'paramName'=>'tanarId', 'post'=>array('refTolDt','refIgDt','tolDt','telephely')); - $TOOL['osztalySelect']= array('tipus'=>'cella', 'paramName'=>'osztalyId', 'post'=>array('refTolDt','refIgDt','tolDt')); + $TOOL['tanarSelect'] = array('tipus'=>'cella', 'paramName'=>'tanarId', 'post'=>array('refTolDt','refIgDt','tolDt','telephely'), + 'kotelezo'=>true, + 'hianyzik'=>$missingTanarOsztaly + ); + $TOOL['osztalySelect']= array('tipus'=>'cella', 'paramName'=>'osztalyId', 'post'=>array('refTolDt','refIgDt','tolDt'), + 'kotelezo'=>true, + 'hianyzik'=>$missingTanarOsztaly + ); // $TOOL['telephelySelect'] = array('tipus'=>'cella', 'paramName'=>'telephely', 'post'=>array('refTolDt','refIgDt','tolDt','mkId','tanarId')); // $TOOL['teremSelect'] = array('tipus'=>'cella', 'paramName'=>'teremId', 'telephely'=>$telephely, 'post'=>array('refTolDt','refIgDt','tolDt','telephely')); - if ($osztalyId!='' || $tanarId!='' || $diakId!='' || $mkId!='') $TOOL['tankorSelect'] = array('tipus'=>'sor','paramName'=>'tankorId', 'post'=>array('refTolDt','refIgDt','tolDt','osztalyId','targyId','tanarId','diakId','telephely')); +// if ($osztalyId!='' || $tanarId!='' || $diakId!='' || $mkId!='') $TOOL['tankorSelect'] = array('tipus'=>'sor','paramName'=>'tankorId', 'post'=>array('refTolDt','refIgDt','tolDt','osztalyId','targyId','tanarId','diakId','telephely')); getToolParameters(); ?> diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/naplo.css b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/naplo.css index 539cd4ea..849a5afe 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/naplo.css +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/naplo.css @@ -31,7 +31,6 @@ table.toolBar form { margin: 0px; padding: 0px;} -/* TH */ table.toolBar th { background-color: rgb(90,133,184); @@ -45,6 +44,12 @@ border-width: 1px 1px 1px 1px; border-style: solid; } + + table.toolBar tr.kotelezo.hianyzo td.toolBarTool table , + table.toolBar td.toolBarTool.kotelezo.hianyzo { background-color: orange } + table.toolBar tr.kotelezo.hibas td.toolBarTool table , + table.toolBar td.toolBarTool.kotelezo.hibas { background-color: red; } + table.toolBar th button.toolBarClear { float:right; border: none; background-color: #5A85B8; height:10px;font-size:9px; color:inherit; padding:0px 2px; color: rgba(255,255,255,0.5);} table.toolBar th button.toolBarClear:hover { color: rgba(255,255,255,1);} @@ -61,7 +66,6 @@ table.toolBar tr td.csoport:hover { color: rgba(255,255,255,1);} -/* TD */ table.toolBar td {padding: 0px;} table.toolBar td form td {padding: 1px;} table.toolBar td.gap { width: 50%; border-spacing: 0px; } @@ -161,6 +165,8 @@ table.toolBar input { font-size: 10px; } + table.toolbar tr.kotelezo table th.toolBarTool { background-color: orange !important; } + table.toolBar #toolBarHamburgerVezerlo { color:rgb(170, 170, 170); } table.toolBar #toolBarHamburgerVezerlo:hover { color:white; } diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/orarend/orarendModosito.css b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/orarend/orarendModosito.css index c25f4328..8e20186a 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/orarend/orarendModosito.css +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/orarend/orarendModosito.css @@ -121,9 +121,11 @@ div.unfinished { div.orarendModositoToolbox { background-color: #444; border: solid 1px #ccc; padding:0.5em; color:white; width:80%; margin:auto; border-radius: 4px; colow: white;} div.orarendModositoToolbox table.tanarTankor {font-size: smaller; position:fixed; top:2px ; right: 2px; background-color: #444; z-index:1000; } + + div.oraKartya {border-radius: 2px; margin: 2px 1px;} div.oraKartya.highlight { outline: solid 1px yellow } div.oraKartya span.highlight { background-color:yellow; } - div.orarendModositoToolbox button#tankorHelper { float:right; } + div.orarendModositoToolbox button#tankorHelper { } } diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/base.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/base.phtml index 805e57dc..cd9ec7cc 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/base.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/base.phtml @@ -44,7 +44,12 @@ echo ''; $colspan++; } - + if (_POLICY=='private') { + echo ''; + echo ''; + echo ''; + $colspan++; + } echo ''; if (defined('__PAGETITLE')) echo __PAGETITLE.'
'; else echo 'MaYoR elektronikus napló'.'
'; @@ -57,12 +62,18 @@ echo ''."\n"; reset($TOOL); foreach ( $TOOL as $tool => $params ) { + // if ( function_exists( $func = "put$tool" ) && $params['tipus']=='cella') { if ( isset($params['tipus']) && $params['tipus']=='cella') { if (isset($params['title'])) $title = '__'.$params['title']; else $title = '__'.nagybetus($tool).'TITLE'; - echo ''; + $_kotelezoClass = ($params['kotelezo'] === true) ? 'kotelezo':''; + $_hianyzoClass = ($params['hianyzik'] === true) ? 'hianyzo':''; + $_hibasClass = ($params['hibas'] === true) ? 'hibas':''; + + echo ''; + echo ''."\n"; if (defined($title)) { echo ''; + echo '
'; @@ -138,8 +149,11 @@ reset($TOOL); foreach ( $TOOL as $tool => $params ) { if ( function_exists( $func = "put$tool" ) && $params['tipus']=='sor') { - echo '
'; - + $_kotelezoClass = ($params['kotelezo'] === true) ? 'kotelezo':''; + $_hianyzoClass = ($params['hianyzik'] === true) ? 'hianyzo':''; + $_hibasClass = ($params['hibas'] === true) ? 'hibas':''; + echo '
'; echo ''; if (isset($params['title'])) $title = '__'.$params['title']; else $title = '__'.nagybetus($tool).'TITLE'; diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/orarend/orarendModosito.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/orarend/orarendModosito.phtml index 38fa3a5a..160c2be7 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/orarend/orarendModosito.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/orarend/orarendModosito.phtml @@ -2,10 +2,14 @@ function putOrarend($ADAT) { + global $aHetNapjai; + echo '
'; echo '
'; - global $aHetNapjai; + // jó lenne tudni, hogy milyen tipikus dátumbeállítások vannak + // az orarendiHet beállítás is jól jönne itt + $TANKOROK = $ADAT['felvehetoTankorok']; $BLOKKOK = $ADAT['felvehetoBlokkok']; if (is_array($ADAT['felvehetoTankorok']) && count($ADAT['felvehetoTankorok']) > 0) { @@ -59,8 +63,14 @@ $_th_class = ($ADAT['vanHaladasi'][$dt]['db']>0) ? 'spec': ''; echo ''; } echo ''; diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/osztalyozo/diak.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/osztalyozo/diak.phtml index 79c33e0f..81a60f0e 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/osztalyozo/diak.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/osztalyozo/diak.phtml @@ -110,8 +110,12 @@ echo '
'; if (count($ADAT['vanHaladasi'][$dt]['db'])>0) echo ' '; - echo ''.str_replace('-','.',$ADAT['orarend']['napok'][$nap]['dt']).'. ('.$ADAT['orarend']['napok'][$nap]['het'].') '; + echo ''.str_replace('-','.',$ADAT['orarend']['napok'][$nap]['dt']).'.'; + echo ' '; + echo ($ADAT['orarend']['napok'][$nap]['megjegyzes']=='') ? $aHetNapjai[($nap-1)] : $ADAT['orarend']['napok'][$nap]['megjegyzes']; + echo '
Órarendi hét: '; + echo '
'; if (count($ADAT['targyTankor'][$targyId]) == 1) { echo ''.$targyNev.''; - } else - echo $targyNev; + } else { + echo $targyNev; + for ($i=0; $i'.($i+1).''; + } + } /* VIRTUAL */ echo ' '; putJegySelect(array( diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js index d35c38c7..c57e142e 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js @@ -907,7 +907,7 @@ processJSONTankorAdat = function(adat) { content += '

Tankörcsoport ('+adat.tankorCsoport.length+')

'; content += '
    '; for (i=0; i'; + content += '
  • '+adat.tankorCsoport[i].csoportNev+'
  • '; } content += '
'; } -- cgit v1.2.3