aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www
diff options
context:
space:
mode:
Diffstat (limited to 'mayor-orig/mayor-naplo/www')
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php17
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php11
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css12
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml13
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/haladasi.jquery.min.js8
5 files changed, 60 insertions, 1 deletions
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; $i<count($_NAPOK); $i++) {
// checkNaplo($_NAPOK[$i]);
// }
+ } elseif ($action == 'haladasiExport') {
+ $ADAT['formatum'] = readVariable($_POST['formatum'], 'enum', 'ods', array('csv','ods','xml'));
+ $orderBy = array('dt','ora');
+ if ($ADAT['formatum'] == 'xml') $ADAT['mime'] = 'application/vnd.ms-excel';
+ $file = $tankorId;
+ $Tankorok = getTankorById($tankorId, __TANEV); // felül kell írnunk
+ $ADAT['haladasi'] = getHaladasi($Tankorok, $ADAT['munkaterv'], $orderBy, $csakUres);
+ if (exportTankorHaladasi($file, $ADAT))
+ header('Location: '.location('index.php?page=session&f=download&download=true&dir=naplo/haladasi/haladasi&file='.$file.'.'.$ADAT['formatum'].'&mimetype='.$ADAT['mime']));
+
}
}
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css
index 4eae0808..f3899611 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css
@@ -295,6 +295,18 @@
table.haladasiBejegyzesek tbody tr td.ora a.tankorStat {display:none;}
table.haladasiBejegyzesek tbody tr:hover td.ora a.tankorStat { display:inline;}
+ form.exportForm { text-align: right; width:95%; }
+ form.exportForm input{
+ cursor: pointer;
+ border: solid 1px #888;
+ color: #888;
+ background-color: #eee;
+ border-radius: 4px;
+ padding: 2px 4px;
+ opacity: 0.9;
+ }
+ form.exportForm input:hover { color:black; border-color: black; background-color: white; opacity: 1; }
+ form.exportForm input:active { background-color: cornflowerblue; color:white; }
}
@media print {
table.haladasiBejegyzesek thead tr th { border-bottom: solid 1px black;}
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml
index 11c42ede..0638edf6 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml
@@ -1,6 +1,17 @@
<?php
global $SZLO;
+ function putExportForm($ADAT) {
+ $tankorId = $ADAT['tankorId'];
+
+ formBegin(array('action'=>href('index.php?page=naplo&sub=haladasi&f=haladasi'), 'name'=>'haladasiExport', 'class'=>'exportForm'));
+ echo '<input type="hidden" name="action" value="haladasiExport" />'."\n";
+ echo '<input type="hidden" name="tankorId" value="'.$tankorId.'" />'."\n";
+ echo '<input type="hidden" name="formatum" value="xml" />'."\n";
+ echo '<input type="submit" name="Export" value="Export"/>'."\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 '<input type="hidden" name="igDt" value="'._SHOW_DAYS_TO.'" />'."\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') {