From c279e479aa9c943fd0fc2b396638a5208c78cfb9 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Wed, 28 Oct 2020 11:35:04 +0100 Subject: Rev: 4695 --- .../www/include/modules/portal/hirek/egyhir.php | 9 ++- .../www/include/modules/portal/share/hirek.php | 2 +- .../www/policy/private/portal/hirek/egyhir-pre.php | 1 + .../policy/private/portal/hirek/hirekAdmin-pre.php | 35 +++++++++++- .../www/policy/private/portal/hirek/hirekAdmin.php | 6 +- .../classic/module-portal/css/hirek/egyhir.css | 34 +++++++++-- .../classic/module-portal/css/hirek/hirekAdmin.css | 15 ++++- .../www/skin/classic/module-portal/css/portal.css | 6 +- .../classic/module-portal/html/hirek/egyhir.phtml | 35 ++++++++---- .../module-portal/html/hirek/hirekAdmin.phtml | 66 +++++++++++++++++----- .../classic/module-portal/html/share/doboz.phtml | 3 +- .../module-portal/javascript/portal.jquery.min.js | 29 ++++++++++ 12 files changed, 200 insertions(+), 41 deletions(-) (limited to 'mayor-orig/mayor-portal/www') diff --git a/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php b/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php index c93a81bd..1c5c8bc9 100644 --- a/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php +++ b/mayor-orig/mayor-portal/www/include/modules/portal/hirek/egyhir.php @@ -13,7 +13,7 @@ $flag = intval($DATA['flag']); $class = intval($DATA['class']); $lang = (in_array($DATA['lang'],$LANGUAGES)) ? $DATA['lang'] : _DEFAULT_LANG; - if ($DATA['cid']>0) $cid = $DATA['cid']; + if ($DATA['cid']>0) $cid = $DATA['cid']; // -- TODO!!!! $csoport = $DATA['csoport']; if ($hirId!='' && __HIREKADMIN == false ) { $q = "SELECT owner FROM hirek WHERE owner='%s'"; @@ -41,6 +41,13 @@ } } else $q = ''; if ($q!='') $r = db_query($q,array('modul'=>'portal','result'=>'insert','values'=>$v)); + if (is_array($DATA['kategoriaId'])) { + for ($i=0; $i'portal','result'=>'insert','values'=>$v)); + } + } return $r; } diff --git a/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php b/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php index d7db431e..0de316b6 100644 --- a/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php +++ b/mayor-orig/mayor-portal/www/include/modules/portal/share/hirek.php @@ -42,7 +42,7 @@ } else $WHERE = ''; if ($SET['all']===true) $WHERE = ''; - $q = "SELECT * FROM hirek $WHERE ORDER BY kdt DESC,vdt DESC".$L; + $q = "SELECT hirek.*, hirek.id AS hirId, GROUP_CONCAT(kategoriaId) AS hirkategoriak FROM hirek LEFT JOIN hirKategoria ON (hirek.id=hirId) $WHERE GROUP BY hirek.id ORDER BY kdt DESC,vdt DESC".$L; $HIREK['szovegek'] = db_query($q, array('modul'=>'portal','result'=>'indexed')); return $HIREK; } diff --git a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php index 0d5cbf71..ef18e58c 100644 --- a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php +++ b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/egyhir-pre.php @@ -26,6 +26,7 @@ if (_RIGHTS_OK !== true) die(); $DATA['flag']= readVariable($_POST['flag'],'numeric',null); $DATA['class']= readVariable($_POST['class'],'numeric',null); $DATA['cid']= readVariable($_POST['cid'],'numeric',null); + $DATA['kategoriaId']= readVariable($_POST['kategoriaId'],'id',null); $DATA['lang'] = readVariable($_POST['lang'],'strictstring',$LANGUAGES); $DATA['owner'] = _USERACCOUNT; if (is_array($_POST['csoport'])) { diff --git a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin-pre.php b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin-pre.php index 630c9cbd..1e51b811 100644 --- a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin-pre.php +++ b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin-pre.php @@ -6,6 +6,39 @@ } require_once('include/modules/portal/share/hirek.php'); - $HIREK = getHirek(array('all'=>true)); // minden nyelvű hír + if ($action=='kategoriaSzerkeszt') { + $_id = readVariable($_POST['id'],'id'); + if (is_numeric($_id)) { + $_leiras = readVariable($_POST['leiras'],'string'); + $_precode = readVariable($_POST['precode'],'html'); + $_postcode = readVariable($_POST['postcode'],'html'); + $q = "INSERT INTO kategoriak (id,leiras,precode,postcode) VALUES (%u,'%s','%s','%s')"; + $v = array($_id,$_leiras,$_precode,$_postcode); + db_query($q,array('modul'=>'portal','values'=>$v)); + } + $KATEGORIAIDK = readVariable($_POST['kategoriaId'],'id'); + for ($i=0; $i'portal','values'=>$v)); + } + $KATEGORIAIDK = readVariable($_POST['kategoriaTorlendo'],'id'); + for ($i=0; $i'portal','values'=>$v)); + } + } + + + $ADAT = getHirek(array('all'=>true)); // minden nyelvű hír + $ADAT['kategoriak'] = getKategoriak(); + $ADAT['kategoriaId2txt'] = reindex($ADAT['kategoriak'],array('id')); +dump($ADAT['kategoriaId2txt']); ?> diff --git a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin.php b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin.php index 2474b23e..909018dc 100644 --- a/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin.php +++ b/mayor-orig/mayor-portal/www/policy/private/portal/hirek/hirekAdmin.php @@ -1,5 +1,7 @@ diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/hirek/egyhir.css b/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/hirek/egyhir.css index 8be4a7c3..1ea5cb6d 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/hirek/egyhir.css +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/hirek/egyhir.css @@ -3,40 +3,62 @@ div.egyhir { margin-left: 50px; + margin-right:50px; } div.egyhir form { font-weight: bold; + margin-bottom: 40px; + border-bottom: solid 1px #eee; } div.egyhir label { - + padding-right: 1em; } div.egyhir input { - background-color: white; +/* background-color: white; border: solid 1px #667766; - } +*/ } div.egyhir textarea { width: 80%; height: 300px; +/* border: solid 1px #667766; background-color: white; +*/ } table.egyhirdetail { background-color: #eeeeee; - border-bottom: solid 2px #667766; } table.egyhirdetail td { border: solid 1px #667766; + line-height: 2em; + padding: 0.4em; } table.egyhirdetail th { - background-color: #667766; + background-color: cornflowerblue; color: white; height:30px; - border-bottom: solid 2px #001100; } .mceEditor iframe { border: blue 1px solid; } + + #pic, #cim { line-height: 1.4em; margin-bottom:1em;} + +span.kategoriaSelector { border-radius: 4px; padding: 2px 4px; background-color: white; border: solid 1px black; font-weight:normal; +cursor: pointer; +-webkit-transition : 100ms ease-out; + -moz-transition : 100ms ease-out; + -o-transition : 100ms ease-out; + transition : 100ms ease-out; + } + +span.kategoriaSelector.selected { background-color: #d64161; color:white; } +span.kategoriaSelector.modified { background-color: #878f99; color:white; border-color:white; } +span.kategoriaSelector.selected.modified { background-color: #6b5b95; color:white; border-color: black;} +span.kategoriaSelector:hover { border: solid 1px #6b5b95; background-color: #ff7b25; color:white; } +span.kategoriaSelector.selected:hover { background-color: #878f99; color:white; } + diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/hirek/hirekAdmin.css b/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/hirek/hirekAdmin.css index 9e05068d..347cd17f 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/hirek/hirekAdmin.css +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/hirek/hirekAdmin.css @@ -10,15 +10,24 @@ table.hAdmin { background-color: #445560; - + width:90%; } table.hAdmin tr td { - background-color: #eeeeee; + background-color: #eee; + padding: 2px 4px; + line-height: 1.6em; + } + table.hAdmin tr:hover td { + outline: solid 1px #d64161; + background-color: #fff; } + table.hAdmin tr td.latszik { + background-color: #d64161; color:white; + } table.hAdmin tr.unk td { - background-color: #993456; + background-color: #feb236; } table.hAdmin tr.old td { background-color: #999999; diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css b/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css index cc128d4f..5152e545 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/css/portal.css @@ -86,8 +86,10 @@ hr {display: none;} table.portalMain div.dobozTart a { color: black } - - + + div.static h1 { margin: 20px;} + div.static p { margin-left: 26px; margin-right:26px; margin-bottom: 1.2rem; font-size: 14px; line-height:1.6em;} + @media (max-width: 850px) { .bal, .jobb { display: none; diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml index b8e0f7ee..f24068ca 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/egyhir.phtml @@ -30,7 +30,10 @@ echo ''; echo ''; - echo ''; + echo ''; echo ''; - echo ''; echo ''; @@ -67,7 +83,6 @@ $_CHK = ($FLAGS[$i]==$HIR['flag']) ? ' checked="checked" ':''; echo ''; echo ''; @@ -124,8 +139,8 @@ echo "\n".''."\n"; echo '
'; - echo _KEP; - echo '
'; + echo _KEP.': '; + echo '
'; echo ''; echo ''; echo ''; diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/hirekAdmin.phtml b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/hirekAdmin.phtml index 6dc5900d..1f55154a 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/hirekAdmin.phtml +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/hirek/hirekAdmin.phtml @@ -1,27 +1,55 @@ '; + + for ($i=0; $i'; + echo ''; +// echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + } -/* - hideShowContainer - onClickHideShow - openable -*/ + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
'._BEALLITASOK.'
'; + echo _BEALLITASOK; + if ($HIR['owner']!='') echo ' ('.$HIR['owner'].')'; + echo '
'; echo _TOLDT.':
'; @@ -40,21 +43,34 @@ echo '
'; reset($LANGUAGES); - echo ''; + for($i=0; $i'; $_CHK = ($LANGUAGES[$i]==$HIR['lang']) ? ' selected="selected" ':''; echo ''; + } + echo ''; } - echo ''; - _putKategoriak($ADAT,$HIR['cid']); echo ''; - echo $HIR['owner']; + echo ''; + // ujfajta kategoria kezelés + $SELECTED_HIRKATEGORIAK = explode(',',$HIR['hirkategoriak']); + for ($i=0; $i'.$_D['leiras'].' '; + } + echo ''; + // ------------------------- echo '
'; + echo ''; + echo $D['id']; + echo ''.$D['leiras'].''.$D['precode'].''.$D['postcode'].'
'; + echo ''; + echo ''; + echo '
'; + formEnd(); + } + function putHirek($ADAT) { $CLASS = array(1=>'külső hír',2=>'kis hír',6=>'csak belső',0=>'ISMERETLEN'); $FLAGS = array(0=>'nem látszik', 1=>'látszik', 2=>2, 3=>3); $now = time(); - echo ''; - echo ''."\n"; - for ($i=0; $i'; + echo ''."\n"; + for ($i=0; $i'; - echo ''; + // echo ''; echo ''; echo ''; + echo ''; + echo ''; echo "\n\n"; diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/doboz.phtml b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/doboz.phtml index 7c903e27..8c8ded7b 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/doboz.phtml +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/html/share/doboz.phtml @@ -22,8 +22,9 @@ $bgcolor = ($SET['background-color']=='') ? '#eeeeee' : $SET['background-color'] ; $width = ($SET['width']=='') ? '100%':$SET['width']; if ($SET['header-link']!='') $cime = ''.$cime.''; + if (isset($SET['header-css']) && $SET['header-css']!='') $_style = $SET['header-css']; echo '
'; - echo '
'.$cime.'
'; + echo '
'.$cime.'
'; echo '
'.$bele.'
'; echo '
'; diff --git a/mayor-orig/mayor-portal/www/skin/classic/module-portal/javascript/portal.jquery.min.js b/mayor-orig/mayor-portal/www/skin/classic/module-portal/javascript/portal.jquery.min.js index 0969c5c7..41d70923 100644 --- a/mayor-orig/mayor-portal/www/skin/classic/module-portal/javascript/portal.jquery.min.js +++ b/mayor-orig/mayor-portal/www/skin/classic/module-portal/javascript/portal.jquery.min.js @@ -10,4 +10,33 @@ $(function() { } }); + $('span.kategoriaSelector').click(function() { + $(this).toggleClass('selected'); + $(this).toggleClass('modified'); + $('#kategoriaSelectorContainer').html(''); + $('span.kategoriaSelector.selected').each(function() { + $('', { + type: 'hidden', + name: 'kategoriaId[]', + value: $(this).data('kategoriaid') + }).appendTo($('#kategoriaSelectorContainer')); + }); + }); + + +/* + myForm.on('submit', function(e) { + //e.preventDefault(); + $('span.kategoriaSelector.selected').each(function() { + $('', { + type: 'text', + name: 'kategoriaId[]', + value: $(this).data('kategoriaid') + }).appendTo(myForm); // append each input to the form + }); + + //myForm.submit(); // submit the form + }); +*/ + }); -- cgit v1.2.3
'; - echo $D['lang']; - echo ''; + // echo $D['lang']; + // echo ''; echo ''; @@ -36,10 +64,20 @@ echo ' '.$D['csoport']; echo ''; - echo $D['owner']; + if ($D['hirkategoriak']!='') { + $_K = explode(',',$D['hirkategoriak']); + for($j=0; $j'; echo ''; + echo $D['owner']; + echo ''; echo $D['kdt']; + echo ''; echo $D['vdt']; echo '