[go: up one dir, main page]

Menu

[r19]: / ngremacs_doc.cmp.js  Maximize  Restore  History

Download this file

11 lines (11 with data), 4.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
/*!
* ngReMaCs Documents
*
* @package ngReMaCs
* @author Jens Raabe <jens@raabe-berlin.de>
* @version $Id$
*
* @copyright Copyright (c) 2012, Jens Raabe
* license: MIT-style license, see jrcms.js
*/
;var NGReMaCs_Doc=new Class({_SubPortioninfo:{name:"NGReMaCs_Doc",version:"1.0.0",revision:"@$Revision$@",developer:"Jens Raabe",developer_url:"http://www.raabe-berlin.de",license:"MIT",classId:3600}});(function(){NGReMaCs_Doc.implement({Implements:[Options,JRCmsApi],initialize:function(b,a){this.setOptions(b);this.refactorNgReMaCs();this.registerFunctions({instance:($defined(a)?a:"ngReMaCs"),classId:this._SubPortioninfo.classId,functions:[{functionName:"getPrintDialog",methodId:50,functionType:"ajax"}]})},refactorNgReMaCs:function(){window.NGReMaCs=Class.refactor(NGReMaCs,{getPrintDialog:function(d,b){var d=d||new Object();d._div=this.options.jr_divMain;$(this.options.jr_divMain).empty();var c=new Element("br",{"class":"nf"});var a=new Element("div",{id:"divPrintDialog","class":"fll"});a.inject($(this.options.jr_divMain));c.inject($(this.options.jr_divMain));this.processRequest({requestType:"xol",url:this.options.jr_pluginsUrl+this.options.jr_phpSRC,data:Object.merge(d,{a:"getPrintDialog",dlgopt:{dlgContent:"divPrintDialog",dlgText:this.getLangItemSet(),dlgUrl:this.options.jr_pluginsUrl,dlgSrc:this.options.jr_phpSRC,dlgSaveAtOnce:true,dlgUseFieldset:true}}),onSuccess:function(g,e,f){this.processXolContainer(f)}.bind(this)})},printDocument:function(b,a){b=b||new Object();b.a="printDocument";b.regid=$("regid").get("value");b._div=this.options.jr_divMain;if($("_beginRennfolge").selectedIndex>0){b._beginRennfolge=$("_beginRennfolge").options[$("_beginRennfolge").selectedIndex].value;if($("_endRennfolge").selectedIndex>0){b._endRennfolge=$("_endRennfolge").options[$("_endRennfolge").selectedIndex].value}else{b._endRennfolge=$("_beginRennfolge").options[$("_beginRennfolge").selectedIndex].value}}if($("_documentToPrint").selectedIndex>0){b._documentToPrint=$("_documentToPrint").options[$("_documentToPrint").selectedIndex].value}else{alert("Keine Dokument!");return false}if($defined($("_layoutVariant"))){b._layoutVariant=$("_layoutVariant").get("value")}if($defined($("_contentOnly"))){b._contentOnly=$("_contentOnly").get("value")}if($defined($("_withAbt"))){b._withAbt=$("_withAbt").get("value")}if($defined($("_id"))&&$("_id").get("value").length>0){b._id=$("_id").get("value")}this.processRequest({requestType:"xol",url:this.options.jr_pluginsUrl+this.options.jr_phpSRC,data:b})},printMeldeergebnis:function(b,a){b=b||new Object();b._div=this.options.jr_divMain;this.processRequest({requestType:"xol",url:this.options.jr_pluginsUrl+this.options.jr_phpSRC,data:Object.merge(b,{a:"printMeldeergebnis"})})},printProgramBrochure:function(b,a){b=b||new Object();b._div=this.options.jr_divMain;this.processRequest({requestType:"xol",url:this.options.jr_pluginsUrl+this.options.jr_phpSRC,data:Object.merge(b,{a:"printProgramBrochure"})})},printFinishProtocol:function(b,a){b=b||new Object();b._div=this.options.jr_divMain;this.processRequest({requestType:"html",url:this.options.jr_pluginsUrl+this.options.jr_phpSRC,data:Object.merge(b,{a:"printRaceResult"}),onSuccess:function(e,c,f,d){}})},printVereinRegattaInvoice:function(b,a){b=b||new Object();b._div=this.options.jr_divMain;this.processRequest({requestType:"html",url:this.options.jr_pluginsUrl+this.options.jr_phpSRC,data:Object.merge(b,{a:"printClubBill"}),onSuccess:function(e,c,f,d){}})},documentToPrint:function(){var c={a:"getSupportedPrintTasks",regid:$("regid").get("value")};var b=this.getDialogParameter(c).docTypes;var a=new Array();if(b.length>0){Array.from(b).each(function(e,d){a.push({idx:e.idx,value:e.value})},this)}return a},documentTypSelect:function(b){if(b.stopPropagation){b.stopPropagation()}else{b.cancelBubble=true}var a=b.target.selectedIndex;switch($("_documentToPrint").options[a].value){case"printRennInfoComplete":$("_layoutVariant").set("value",1);$("_contentOnly").set("value",1);$("_withAbt").set("value",1);break;default:$("_layoutVariant").set("value",1);$("_contentOnly").set("value",0);$("_withAbt").set("value",0);break}},processDialogValue:function(a,c,b){switch(c){case"_documentToPrint":a.addEvent("change",this.documentTypSelect.bind(this));return this.elOptions(a,c,b,this.documentToPrint.bind(this));break;default:break}return this.previous(a,c,b)}})}})})();var ngReMaCs_Doc=new NGReMaCs_Doc(window.jrCmsInit.options);