From 2982e19bfc1c79aa84ad93654a12dee8d61c0e27 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Sun, 14 Apr 2019 12:15:49 +0200 Subject: Rev: 4508 --- .../www/include/modules/naplo/haladasi/haladasi.php | 17 +++++++++++++++++ .../www/policy/private/naplo/haladasi/haladasi-pre.php | 11 +++++++++++ .../skin/classic/module-naplo/css/haladasi/haladasi.css | 12 ++++++++++++ .../classic/module-naplo/html/haladasi/haladasi.phtml | 13 +++++++++++++ .../javascript/haladasi/haladasi.jquery.min.js | 8 +++++++- 5 files changed, 60 insertions(+), 1 deletion(-) (limited to 'mayor-orig/mayor-naplo/www') 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 391ef7c8..7b890fad 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 @@ -152,4 +152,21 @@ return $RESULT; } + function exportTankorHaladasi($file, $ADAT) { + + + $EXPORT = array(array('Óraszám','Téma')); + foreach ($ADAT['haladasi'] as $dt => $nAdat) { + foreach ($nAdat as $index => $oAdat) { + if ($oAdat['oraszam'] != '') + $EXPORT[] = array($oAdat['oraszam'], $oAdat['leiras']); + } + } + if ($ADAT['formatum'] == 'xml') return generateXLS("$file.${ADAT['formatum']}", $EXPORT, 'haladási napló'); + elseif ($ADAT['formatum'] == 'csv') return generateCSV("$file.${ADAT['formatum']}", $EXPORT, 'haladási napló'); + elseif ($ADAT['formatum'] == 'ods') return generateODS("$file.${ADAT['formatum']}", $EXPORT, 'haladási naplo'); + else return false; + + } + ?> diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php index f6a59939..460e4ec9 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php @@ -17,6 +17,7 @@ require_once('include/modules/naplo/share/tanmenet.php'); require_once('include/modules/naplo/share/hetes.php'); require_once('include/modules/naplo/share/helyettesitesModifier.php'); + require_once('include/modules/naplo/share/file.php'); require_once('include/share/date/names.php'); @@ -247,6 +248,16 @@ if ( $skin == 'ajax' // for ($i=0; $ihref('index.php?page=naplo&sub=haladasi&f=haladasi'), 'name'=>'haladasiExport', 'class'=>'exportForm')); + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + echo ''."\n"; + formEnd(); + } + function putHaladasiBejegyzesek($ADAT) { global $_TANEV,$SZLO; @@ -19,6 +30,8 @@ if ($tankorId!='') $AKTIV_TH['tankor'] = true; + if ($tankorId!='') putExportForm($ADAT); + $FORM = array('action'=>href('index.php?page=naplo&sub=haladasi&f=haladasi'), 'name'=>'haladasiOrabeiras', 'class'=>'onChangeRequest'); formBegin($FORM); echo ''."\n"; diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/haladasi.jquery.min.js b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/haladasi.jquery.min.js index 578a6f0e..68881382 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/haladasi.jquery.min.js +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/haladasi.jquery.min.js @@ -26,6 +26,12 @@ $(function() { /* onload */ if (x.hasClass('gomb DOA')) x.prop('disabled', false); }); + $('.exportForm').click(function(event) { + $('table.haladasiBejegyzesek input[type="text"].data').prop('readonly',true); + $('table.haladasiBejegyzesek input[type="text"].data').prop('disabled',true); + $('table.haladasiBejegyzesek input[type="submit"].gomb').prop('readonly',true); + $('table.haladasiBejegyzesek input[type="submit"].gomb').prop('disabled',true); + }); /* $('body').change(function(event) { var x = $(event.target); // itt kezelhetnénk a haladasi tankorvaltasbol adodo dolgot @@ -49,7 +55,7 @@ $(function() { /* onload */ }); processJSON = function(json) { - console.log(json.toDo); + // console.log(json.toDo); var elementId = "#ORAID_"+json.oraId.toString(); if (json.toDo=='oraElmarad') { -- cgit v1.2.3