From c878db837c32ff28821e608e95b5c0143cf012c0 Mon Sep 17 00:00:00 2001 From: kindlm Date: Tue, 3 Feb 2015 16:53:43 +0100 Subject: [PATCH] =?UTF-8?q?Alternatives=20Outputformat=20nun=20auch=20f?= =?UTF-8?q?=C3=BCr=20Studienblatt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Studienblatt kann nun auch als .odt und .doc direkt aus dem FAS generiert werden. --- content/fas.xul.php | 2 +- content/fasoverlay.js.php | 21 ++++++++++++++++++--- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/content/fas.xul.php b/content/fas.xul.php index a037eeedc..3d63038b5 100644 --- a/content/fas.xul.php +++ b/content/fas.xul.php @@ -132,7 +132,7 @@ foreach($addon_obj->result as $addon) - + diff --git a/content/fasoverlay.js.php b/content/fasoverlay.js.php index 26b35a835..ac4a6b72d 100644 --- a/content/fasoverlay.js.php +++ b/content/fasoverlay.js.php @@ -1692,7 +1692,7 @@ function PrintZutrittskarte() // **** // * Druckt das Studienblatt // **** -function PrintStudienblatt() +function PrintStudienblatt(event) { if(document.getElementById('main-content-tabs').selectedItem==document.getElementById('tab-studenten')) @@ -1728,12 +1728,27 @@ function PrintStudienblatt() alert('Das Studienblatt kann nur für Studierende erstellt werden'); return false; } - + var output = 'pdf'; + if(typeof(event)!=='undefined') + { + if (event.shiftKey) + { + var output = 'odt'; + } + else if (event.ctrlKey) + { + var output = 'doc'; + } + else + { + var output = 'pdf'; + } + } if(data!='') { if(error>0) alert(error+' der ausgewaehlten Personen haben keinen Account'); - action = 'content/pdfExport.php?xsl=Studienblatt&xml=studienblatt.xml.php&output=pdf&&uid='+data; + action = 'content/pdfExport.php?xsl=Studienblatt&xml=studienblatt.xml.php&output='+output+'&&uid='+data; window.open(action,'Studienblatt','height=520,width=500,left=350,top=350,hotkeys=0,resizable=yes,status=no,scrollbars=yes,toolbar=no,location=no,menubar=no,dependent=yes'); } else