From 6ea4218853b30d4a8fed841af0cc2edb2aac765b Mon Sep 17 00:00:00 2001 From: oesi Date: Wed, 25 Mar 2015 14:00:05 +0100 Subject: [PATCH] Accountinfoblatt wird per Default als PDF erstellt --- content/fas.xul.php | 2 +- content/fasoverlay.js.php | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/content/fas.xul.php b/content/fas.xul.php index 32d9dfe09..a4ff5f1ef 100644 --- a/content/fas.xul.php +++ b/content/fas.xul.php @@ -133,7 +133,7 @@ foreach($addon_obj->result as $addon) - + diff --git a/content/fasoverlay.js.php b/content/fasoverlay.js.php index 763e97a12..93a9dadc1 100644 --- a/content/fasoverlay.js.php +++ b/content/fasoverlay.js.php @@ -1545,7 +1545,7 @@ function EinstellungenKontoFilterStgChange() // **** // * Druckt das AccountInfoBlatt // **** -function PrintAccountInfoBlatt() +function PrintAccountInfoBlatt(event) { if(document.getElementById('main-content-tabs').selectedItem==document.getElementById('tab-studenten')) @@ -1603,11 +1603,28 @@ function PrintAccountInfoBlatt() } } + 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=AccountInfo&xml=accountinfoblatt.xml.php&uid='+data; + action = 'content/pdfExport.php?xsl=AccountInfo&xml=accountinfoblatt.xml.php&output='+output+'&uid='+data; window.open(action,'AccountInfoBlatt','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