Edit C:\Users\Administrator\Desktop\CGI\LIVRAISONS\v1.6.5.1 28-10-2024\02-APPLI\marketing\event\read.jsp
<%@page import="com.edeal.frontline.FormBean"%> <%@page import="com.edeal.frontline.FrontlineException"%> <%@page import="java.util.Collection"%> <%@page import="com.edeal.frontline.helper.custom.PersonEventHelper"%> <%@page import="com.edeal.frontline.helper.EventBaseHelper"%> <%@page import="com.edeal.frontline.helper.custom.EventHelper"%> <%@page import="java.util.ArrayList"%> <% /****************************************************************************** * Copyright (c) 2000-2012 E-DEAL * * E-DEAL S.A. * 41, rue Périer * 92120 Montrouge * France * * T: +33 (0)1 73 03 29 80 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. ******************************************************************************/ %> <%@ page session="true" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.WebOperationBean" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="java.util.Hashtable" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Calendar" %> <%@ page import="java.util.Date" %> <%@ page import="java.text.DecimalFormat" %> <%@ page import="com.edeal.frontline.SalesInvestBean" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.helper.EventBaseHelper.EventCategory" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.EventBean" id="Event" scope="request"/> <% //http://u-project2.umanis.com/view.php?id=45257 final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); String id = null; try { id = Event.getID(); } catch (FieldNotInitializedException e) { } boolean isSalesInvest = false; try { isSalesInvest = Event.isEvtIsSalesInvest(); } catch (FieldNotInitializedException e) { } String evtCity = null; try { evtCity = Event.getEvtCity(); } catch (FieldNotInitializedException e){ } String evtZip = null; try { evtZip = Event.getEvtZip(); } catch (FieldNotInitializedException e) { } String eventCategoryID = null; try { eventCategoryID = Event.getEvtCategory(); } catch (FieldNotInitializedException e) { } String eventCategory = null; try { eventCategory = (String) dico.getRefDisp("Ect", "Te2", eventCategoryID); } catch (Exception e) { } boolean isActiveSalesInvest = SalesInvestBean.isSalesInvestActive(context); Vector formList = (Vector)flRequest.getAttribute("formList"); Vector scriptList = (Vector)flRequest.getAttribute("scriptList"); String formID = null; String typeFrm = null; Date finDispoFrm =null; if (formList == null) { formList = new Vector(); }else{ if(formList.size()>0){ Hashtable row = (Hashtable)formList.elementAt(0); formID = (String)row.get("FrmID"); try{ typeFrm = (String)FormBean.lookup(context, "FrmTypID_:RefVal", formID); finDispoFrm = (Date)FormBean.lookup(context, "FrmAvailableToDt", formID); }catch(FrontlineException e){ } } } Date currentDate = new Date(); String listName = "EVTQSTNAT"; //pour les natif autre que guide / stat if(typeFrm!=null && !typeFrm.isEmpty()){ if("FRMGUIDE".equals(typeFrm)){ if(finDispoFrm.before(currentDate)) listName = "EVTQSTCSTV"; else listName = "EVTQSTCST"; } else if ("FRMSTAT".equals(typeFrm)){ listName = "EVTQSTSTAT"; } else if ("FRMMARCHE".equals(typeFrm)){ //if(finDispoFrm.before(currentDate)) listName = "EVTQSTMM"; //else //listName = "EVTQSTCSTV"; } } Date evtEndDate = null; Date evtDate = null; try { evtEndDate = (Date) Event.lookup(context, "EvtEndDate", id); evtDate = (Date) Event.lookup(context, "EvtDate", id); } catch (FieldNotInitializedException fnie) { } boolean canValidate = false; if (evtDate != null && evtEndDate != null) { long currentDayMillis = currentDate.getTime(); long evtDateMillis = evtDate.getTime(); long evtEndDateMillis = evtEndDate.getTime(); if (currentDayMillis >= evtDateMillis && currentDayMillis <= evtEndDateMillis) { canValidate = true; } } if (scriptList == null) { scriptList = new Vector(); } DecimalFormat df = FlLocale.getInstance(session).getDecimalFormat("#,##0.##"); DecimalFormat df2 = FlLocale.getInstance(session).getDecimalFormat("0000"); Vector eventActors = null; try { eventActors = Event.getEvtActors(); } catch (FieldNotInitializedException e) { } int evtQuota = 0; try { evtQuota = Event.getEvtQuota(); } catch (FieldNotInitializedException e) { } String pvtids = ""; ArrayList<String> list = PersonEventHelper.getListPersonEventForEvent(context, id); if(!list.isEmpty()){ Vector<String> vecpvt = new Vector<String>(list); pvtids = Utils.implodeList(vecpvt, "|"); } String valid_id = null; try{ valid_id = context.getDataDictionary().getRefIdByCode("Ct_Statut", "VAL"); }catch(Exception e){ e.printStackTrace(); } String enAttValid_id = null; try{ enAttValid_id = context.getDataDictionary().getRefIdByCode("Ct_Statut", "EAV"); }catch(Exception e){ e.printStackTrace(); } %> <script language="javascript" src="<fl:webapp/>/js/edeal/libraries/jqplot/1.0.8/excanvas.min.js" type="text/javascript"/><!-- comment --></script> <script src="<fl:webapp/>/js/edeal/libraries/jqplot/1.0.8/jquery.jqplot.min.js" type="text/javascript"/><!-- comment --></script> <script src="<fl:webapp/>/js/edeal/libraries/jqplot/1.0.8/plugins/jqplot.pieRenderer.min.js" type="text/javascript"/><!-- comment --></script> <link href="<fl:webapp/>/js/edeal/libraries/jqplot/1.0.8/jquery.jqplot.css" rel="stylesheet" type="text/css"/> <script language="javascript"> /* * demande d'ajout la génération des contrats en attente de validation QG22 */ function isContratValid(){ var formlst = document.forms['<%=listName%>_search_criteria']; var ctsta; var validID = "<%=valid_id%>"; var enAttValID = "<%=enAttValid_id%>";; try{ ctsta = formlst.elements['Ct_Statut'].value; if(validID != ctsta && enAttValID != ctsta && "" != ctsta){ alert('<fl:getMessage code="MF19C" alt="Vous ne pouvez pas utiliser une action en masse pour des contrats non valides !" js="true"/>'); return false; } }catch(e){ ctsta = ""; } return true; } //http://u-project2.umanis.com/view.php?id=43373 //changement du popup si le devis est absent function initGuideResponse(pvtID){ var formID = '<%= formID!=null ? formID : "" %>'; var eventID = '<%= id %>' var url = '<fl:link url="/init_frmguide_ajax.fl?1=1"/>&id=' + pvtID + '&formID=' + formID + '&eventID=' + eventID; showWaiting(); $.getJSON(url, function(data) { hideWaiting(); var msg =""; try{ $.each( data, function( key, val ) { msg = val; }); }catch(e){ // logger.error("Erreur lors de la récupération du message", e); } if(msg === "KO"){ alert('<fl:getMessage code="MF1A1" alt="Le questionnaire n\\\'a pas pu être généré pour cause de devis de cotisation absent." js="true"/>'); return; }else{ alert('<fl:getMessage code="MF175" alt="Génération terminée avec succès !" js="true"/>'); setTimeout('refreshEvent()', 10); //alert(msg); } }); } function reInitQuestionnaire(pvtID){ if(confirm('<fl:getMessage code="MF167" alt="Etes-vous certain de vouloir générer à nouveau le questionnaire web ? Cette action a pour conséquence la perte de données initialement saisies par la FIL et/ou l affilié." js="true"/>')) { var formID = '<%= formID!=null ? formID : "" %>'; var eventID = '<%= id %>' var url = '<fl:link url="/reinit_frmguide_ajax.fl?1=1"/>&id=' + pvtID + '&formID=' + formID + '&eventID=' + eventID; showWaiting(); $.getJSON(url, function(data) { hideWaiting(); var msg =""; console.log(data); try{ $.each( data, function( key, val ) { msg = val; }); }catch(e){ //e.printStackTrace(); } if(msg === "KO"){ alert('<fl:getMessage code="MF1A1" alt="Le questionnaire n\\\'a pas pu être généré pour cause de devis de cotisation absent." js="true"/>'); //setTimeout('refreshEvent()', 10); }else{ alert('<fl:getMessage code="MF175" alt="Génération terminée avec succès !" js="true"/>'); setTimeout('refreshEvent()', 10); //alert(msg); } }); } } function initGenerateResponses(eventID){ if(isContratValid()){ if (confirm('<fl:getMessage code="MF113" alt="Etes-vous sûr de vouloir Générer les questionnaires ?" js="true"/>')) { var formID = '<%= formID!=null ? formID : "" %>'; var url = '<fl:webapp/>/mass_generation_quest.fl?id=' + eventID + '&formID=' + formID + getOtherParameters(); //doAjax(url , massGenCallback); showWaiting(); $.getJSON(url, function(data) { hideWaiting(); var msg =""; $.each( data, function( key, val ) { msg = val; }); var partsOfStr = msg.split(':'); alert(partsOfStr[0]+'<fl:getMessage code="MF1A2" alt="questionnaires ont été générés." js="true"/>'); if(!(partsOfStr[1]==="0")){ alert('\n'+partsOfStr[1]+'<fl:getMessage code="MF1A3" alt="questionnaire(s) n\\\'a(ont) pas pu être généré(s) pour cause de devis de cotisation absent." js="true"/>'); } setTimeout('refreshEvent()', 10); }); } } } function getOtherParameters(){ var url = ''; //form name : EVTQSTCST_search_criteria var formlst = document.forms['<%=listName%>_search_criteria']; var entri = formlst.elements['PvtPersonID$PerEntID$EntTriName_'].value; var lotri = formlst.elements['PvtPersonID$PerEntID$EntLocalityID_$Lo_NomTri'].value; var pername = formlst.elements['PvtPersonID$PerName'].value;//personne : PvtPersonID$PerName var lodep = formlst.elements['PvtPersonID$PerEntID$EntLocalityID_$Lo_Dep'].value;//departement : PvtPersonID$PerEntID$EntLocalityID_$Lo_Dep var ctry = formlst.elements['PvtPersonID$PerEntID$EntCtrID'].value;//pays : PvtPersonID$PerEntID$EntCtrID var entye = formlst.elements['PvtPersonID$PerEntID$EntTyeID'].value; var inssta = formlst.elements['PvtInsStatus'].value;//statut inscription : PvtInsStatus var parsta = formlst.elements['PvtParStatus'].value;//statut participation : PvtParStatus var ctsta; try{ ctsta = formlst.elements['Ct_Statut'].value; }catch(e){ctsta = "";} var finsta; try{ finsta = formlst.elements['PvtFinStatus_'].value; }catch(e){finsta = "";} //ABM Evolution : http://u-project2.umanis.com/view.php?id=41726 = modification de la liste EVTQSTCST var region; try{ region = formlst.elements['PvtPersonID$PerEntID$EntRegionID_'].value; }catch(e){region = "";} //var entcorpname = formlst.elements['PvtPersonID$PerEntID$EntCorpName'].value;//enterprise : PvtPersonID$PerEntID$EntCorpName //alert(entcorpname); //while(pername.indexOf("%")>-1) //pername = pername.replace("%",""); //while(entcorpname.indexOf("%")>-1) //entcorpname = entcorpname.replace("%",""); if(!(entri.indexOf("<")==0 && entri.indexOf(">")==(entri.length-1))) url += '&entri=' + entri; if(!(lotri.indexOf("<")==0 && lotri.indexOf(">")==(lotri.length-1))) url += '&lotri=' + lotri; if(!(pername.indexOf("<")==0 && pername.indexOf(">")==(pername.length-1))) url += '&pername=' + pername; if(!(lodep.length==0)) url += '&lodep=' + lodep; if(!(region.length==0)) url += '®ion=' + region; if(!(ctry.length==0)) url += '&ctry=' + ctry; if(!(entye.length==0)) url += '&entye=' + entye; if(!(inssta.length==0)) url += '&inssta=' + inssta; if(!(parsta.length==0)) url += '&parsta=' + parsta; if(!(ctsta.length==0)) url += '&ctsta=' + ctsta; if(!(finsta.length==0)) url += '&finsta=' + finsta; //if(!(entcorpname.indexOf("<")==0 && entcorpname.indexOf(">")==(entcorpname.length-1))) //url += '&corpname=' + entcorpname; //alert(url); url = encodeURI(url); //alert("after :" + url); return url; } function refreshGuestLst() { _grid__GUESTLST_js_.render() } function refreshPopFilles() { _grid__PPF_EMB_js_.render() } <fl:access operation="create" name="Population"> function createPopulation(type, statusID) { var attr = '&statusType=' + type; if (statusID != '') { attr = attr + '&statusID=' + statusID; } window.open('<fl:link url="<%= \"/generate_pop_from_event_start.fl?id=\" + id %>"/>' + attr, 'gen<%= id %>', 'width=700,height=240,left=150,top=150,menubar=no,status=no,resizable=yes,toolbar=no,location=no'); } </fl:access> function doInscription() { window.open('<fl:webapp/>/edit_personevent.fl?initEvtID=<%= id == null ? "" : id %>' , 'Inscription', 'width=800,height=300,menubar=no,status=no,toolbar=no,scrollbars=auto,resizable=no'); } function loadGraph() { $.getJSON('<fl:webapp/>/get_event_graph.fl?id=<%= id %>', function(result) { if (result != null) { <%--[{"TYPE":"PARTICIPATION","STATUS":[["Venu",0],["Absent",0],["Excusé",0],["Intéressé",0],["Pas intéressé",0],["Souhaite RDV",0],["Souhaite brochure",0],["Souhaite inscription",0],["NPAI",0],["Injoignable",0]]},{"TYPE":"INSCRIPTION","STATUS":[["A valider",0],["Ecarté",0],["Invité",0],["Viendra",1],["Ne viendra pas",1],["Ne sait pas",0],["A contacter",0],["A envoyer",0],["Envoyé",0],["A cliqué",0]]}]--%> plotGraph('chartInscription', result[1].STATUS); if (result[0] && result[0].STATUS) { plotGraph('chartParticipation', result[0].STATUS); } } }); } function plotGraph(graphID, jsonData) { $.jqplot (graphID, [jsonData], { seriesDefaults: { // Make this a pie chart. renderer: $.jqplot.PieRenderer, rendererOptions: { // Put data labels on the pie slices. // By default, labels show the percentage of the slice. showDataLabels: true } }, legend: { show:true } } ); } function doOnLoad() { <%-- var data = [ ['Heavy Industry', 12],['Retail', 9], ['Light Industry', 14], ['Out of home', 16],['Commuting', 7], ['Orientation', 9] ]; plotGraph('chartInscription', data); plotGraph('chartParticipation', data); --%> loadGraph(); loadStatistic(); loadNbrOccupedPlace(); } function loadStatistic() { $.getJSON('<fl:webapp/>/get_event_statistics.fl?id=<%= id %>', function(result) { if (result != null) { $("#stats_inscriptions").html(result[0].INSCRIPTION); $("#stats_participations").html(result[1].PARTICIPATION); } }); } function doRefreshEvents() { refreshEvent(); loadGraph(); loadStatistic(); } //EVTTMK //EVTQST //EVTOTHER function refreshEventTMK() { _grid__EVTTMK_js_.renderWithCriteria({"PvtEventID" : "<%= id %>"}) } function refreshEventQST() { _grid__<%=listName%>_js_.renderWithCriteria({"PvtEventID" : "<%= id %>"}) } function refreshEventOTHER() { _grid__EVTOTHER_js_.renderWithCriteria({"PvtEventID" : "<%= id %>"}) } function refreshEvent() { <% if (EventCategory.TMK.toString().equals(eventCategory)) { %> refreshEventTMK(); <% } else if (EventCategory.QST.toString().equals(eventCategory)) { %> refreshEventQST(); <% } else { %> loadNbrOccupedPlace(); refreshEventOTHER(); <% } %> } function doAssignCall() { <% if (eventActors == null) { %> alert('<fl:getMessage code="M9041" alt="Merci de renseigner le champ \\u0022Agent(s)\\u0022" js="true"/>'); return; <% } %> assignCall(); } function assignCall() { jQuery.openPopupLayer({ name: "WaitingPopup", width: "auto", height: "auto", url: "<fl:webapp/>/waiting_operation_popup.fl", success : function(result) { $.ajax({ type: "POST", url: "<fl:webapp/>/assign_call.fl?evtID=<%= id %>", timeout: 20000, contentType: "application/json;charset=utf-8", dataType: 'json', success: analyseResponse }); } }); } function analyseResponse(data) { if (data != null) { if (data.status == "OK") { $("#waiting_popup").attr("src", "<fl:webapp/>/js/progressbar/images/success.png"); $("#detail_popup").html("<fl:getMessage code="L81A0" alt="L\\\'affectation s\\\'est terminé avec succès" js="true"/>"); } else if (data.status == "KO") { $("#waiting_popup").attr("src", "<fl:webapp/>/js/progressbar/images/failure.png"); $("#detail_popup").html(""); $("#error_popup").html(decodeURIComponent(data.detail)); } else { $("#waiting_popup").attr("src", "<fl:webapp/>/js/progressbar/images/failure.png"); } } } function loadNbrOccupedPlace() { var ajaxURL = '<fl:webapp/>/get_personevent_count.fl?id=<%= id %>'; doAjax(ajaxURL, nbOccupedCallBack); } function nbOccupedCallBack(index) { if (eDealXmlhttpArr[index].readyState == 4) { var nbPar = eval(eDealXmlhttpArr[index].responseText); var perPart = 0; if (<%= evtQuota %> > 0) { perPart = nbPar/<%= evtQuota %> ; } $("#nbPart").html(nbPar); if (perPart >= 0.7) { $("#nbPart").css('color', 'red'); $("#nbPart").css('font-wight', 'bold'); } else { $("#nbPart").css('color', 'black') $("#nbPart").css('font-wight', 'normal'); } hideWaiting(); } } function editMarkedEvent(PvtID) { window.open('<fl:webapp/>/edit_personevent.fl?id=' + PvtID , 'Inscription', 'width=765,height=300,menubar=no,status=no,toolbar=no,scrollbars=auto,resizable=no'); } function deleteMarkedEvent(PvtID) { if (confirm('<fl:getMessage code="M6102" alt="Etes-vous sûr de vouloir supprimer ce marquage ?" js="true"/>')) { doAjax('<fl:webapp/>/delete_object_ajax.fl?type=PersonEvent&id=' + PvtID , delPvtCallback); } } function delPvtCallback(arrIndex){ if (eDealXmlhttpArr[arrIndex].readyState == 4) { hideWaiting(); eval(eDealXmlhttpArr[arrIndex].responseText); setTimeout('refreshEvent()', 10); } } function refreshInteraction() { _grid__INTT_EMB_js_.render(); } function previewScriptResponse(id, hasNotes, perID){ window.open('<fl:webapp/>/read_scriptresponse.fl?scriptID='+id+'&preview=0&lsePosition=0&hasNotes='+hasNotes+'&perID='+perID, 'PreviewFormResponse' , 'menubar=no,status=no,toolbar=no,scrollbars=no,resizable=yes,width=800,height=500'); } function editResponse(formID,perID,event,utk,editing){ var canValidate = '<%= canValidate%>'; if (canValidate === "true"){ window.open('<fl:webapp/>/web_form.fl?formID='+formID+'&perID='+perID+'&event='+event+'&utk='+utk+'&editing='+editing, 'EditFormResponse' , 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=1024,height=850'); } else { alert("La date de l'événement n'est pas valide. Veuillez vérifier que la date d'aujourd'hui est comprise entre la date de début et la date de fin de l'événement."); } } function editResponseFIL(formID,perID,event,utk){ window.open('<fl:webapp/>/web_form.fl?formID='+formID+'&perID='+perID+'&event='+event+'&utk='+utk+'&init=ok', 'EditFormResponseFIL' , 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=1024,height=850'); } //http://u-project2.umanis.com/view.php?id=46749 : Optimisation des données : lot fevrier 2018 : abm function showArchivedVersion(formID,perID,event,utk,version){ window.open('<fl:webapp/>/web_form.fl?formID='+formID+'&perID='+perID+'&event='+event+'&utk='+utk+'&version='+version+'&init=ok', 'showArchivedVersion' , 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=1024,height=850'); } function massPrintQst(pvtID){ var typeFrm = '<%= typeFrm!=null ? typeFrm : "" %>'; var url = '<fl:webapp/>/export_mass_questionn.fl?id=' + pvtID + '&typeFrm=' + typeFrm; doAjax(url , InitFrpCallback); } function InitFrpCallback(arrIndex){ if (eDealXmlhttpArr[arrIndex].readyState == 4) { hideWaiting(); eval(eDealXmlhttpArr[arrIndex].responseText); setTimeout('refreshEvent()', 10); } } function integrateFrp(pvtID,typeOpp){ if (confirm('<fl:getMessage code="MF10D" alt="Etes-vous sûr de vouloir Intégrer ?" js="true"/>')) { if ((typeOpp.indexOf('F')>-1 && confirm('<fl:getMessage code="MF17A" alt="attention, la facture a été générée, le nombre d\'hébergements ne sera pas modifié dans la facture MAIS il le sera dans le contrat." js="true"/>')) || typeOpp.indexOf('D')>-1) { var formID = '<%= formID!=null ? formID : "" %>'; var url = '<fl:webapp/>/formresponse_integrate_ajax.fl?id=' + pvtID + '&formID=' + formID; doAjax(url , integrateFrpCallback); } } } function integrateFrpCallback(arrIndex){ if (eDealXmlhttpArr[arrIndex].readyState == 4) { hideWaiting(); eval(eDealXmlhttpArr[arrIndex].responseText); setTimeout('refreshEvent()', 10); } } function statutFinancier(pvtID,statut,flag){ if(flag==0){ if (confirm('<fl:getMessage code="MF118" alt="Etes-vous sûr de vouloir changer le Statut financier ?" js="true"/>')) { var url = '<fl:webapp/>/perevt_finsta_ajax.fl?id=' + pvtID + '&statut=' + statut; doAjax(url , statutFinancierCallback); } } } function statutFinancierCallback(arrIndex){ if (eDealXmlhttpArr[arrIndex].readyState == 4) { hideWaiting(); eval(eDealXmlhttpArr[arrIndex].responseText); setTimeout('refreshEvent()', 10); } } function sendPvtQstMail(pvtID){ if (confirm('<fl:getMessage code="MF10E" alt="Etes-vous sûr de vouloir Envoyer ?" js="true"/>')) { //doAjax('<fl:webapp/>/send_pvt_qst_ajax.fl?pvtID=' + pvtID , sendPvtQstCallBack); //doAjax('<fl:webapp/>/send_to_web.fl?id=' + id, sendCallback); var eventID = '<%= id %>'; var url = '<fl:link url="/send_pvt_qst_ajax.fl?1=1"/>&pvtID=' + pvtID + '&eventID=' + eventID; showWaiting(); $.getJSON(url, function(data) { hideWaiting(); var msg =""; console.log(data); $.each( data, function( key, val ) { msg = val; }); if(msg === "OK"){ alert('Mail envoyé !'); setTimeout('refreshEvent()', 10); }else alert(msg); }); } } function reSendPvtQstMail(frpID,pvtID){ if (confirm('<fl:getMessage code="MF10F" alt="Etes-vous sûr de vouloir Relancer ?" js="true"/>')) { //doAjax('<fl:webapp/>/resend_web_form.fl?pvtID=' + pvtID + '&frpID=' + frpID , sendPvtQstCallBack); var url = '<fl:link url="/resend_web_form.fl?1=1"/>&pvtID=' + pvtID + '&frpID=' + frpID; showWaiting(); $.getJSON(url, function(data) { hideWaiting(); var msg =""; $.each( data, function( key, val ) { msg = val; }); if(msg === "OK"){ alert('Mail envoyé !'); setTimeout('refreshEvent()', 10); }else alert(msg); }); } } function doSendQstToAllPersons(){ if(isContratValid()){ if (confirm('<fl:getMessage code="MF110" alt="Etes-vous sûr de vouloir Envoyer les questionnaires ?" js="true"/>')) { var pvts = '<%= id %>'; //doAjax('<fl:webapp/>/send_allpvt_ajax.fl?action=send&id=' + pvts , sendAllPvtQstCallBack); var url = '<fl:link url="/send_allpvt_ajax.fl?action=send"/>&id=' + pvts + getOtherParameters() ; $.getJSON(url, function(data) { }); alert('Le traitement a bien été lancé et est en cours. Un mail avec les informations ad hoc vous est envoyé en fin de traitement.'); } } } function doReSendQstToAllPersons(){ if(isContratValid()){ if (confirm('<fl:getMessage code="MF112" alt="Etes-vous sûr de vouloir Relancer les questionnaires ?" js="true"/>')) { var pvts = '<%= id %>'; var url = '<fl:link url="/send_allpvt_ajax.fl?action=resend"/>&id=' + pvts + getOtherParameters() ; $.getJSON(url, function(data) { }); alert('Le traitement a bien été lancé et est en cours. Un mail avec les informations ad hoc vous est envoyé en fin de traitement.'); } } } function initIntegrateFrp(eventID){ if(isContratValid()){ if (confirm('<fl:getMessage code="MF114" alt="Etes-vous sûr de vouloir Intégrer les questionnaires ?" js="true"/>')) { var formID = '<%= formID!=null ? formID : "" %>'; var url = '<fl:webapp/>/mass_integration_quest.fl?id=' + eventID + '&formID=' + formID + getOtherParameters(); doAjax(url , massIntegrCallback); } } } function massIntegrCallback(arrIndex){ if (eDealXmlhttpArr[arrIndex].readyState == 4) { hideWaiting(); //eval(eDealXmlhttpArr[arrIndex].responseText); setTimeout('refreshEvent()', 10); } } function initPrintQuest(eventID,typeForm){ if(isContratValid()){ var formID = '<%= formID!=null ? formID : "" %>'; //var url = '<fl:webapp/>/export_mass_questionn.fl?id=' + eventID + '&typeFrm=' + typeForm + getOtherParameters(); //doAjax(url , massGenCallback); var url = '<fl:link url="/export_mass_questionn.fl?1=1"/>&id=' + eventID + '&typeFrm=' + typeForm + getOtherParameters(); //alert(url); showWaiting(); $.getJSON(url, function(data) { hideWaiting(); var id =""; $.each( data, function( key, val ) { id = val; }); window.location = '<fl:link url="/download?id='+id+'" />'; }); } } //0064985: questionnaire séjour plus sûr ABM executeSearch = (function() { var cached_function = executeSearch; return function() { $("#PvtEventID").val("<%= id %>"); var result = cached_function.apply(this, arguments); // use .apply() to call it return result; }; })(); </script> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L305F\", true, \"Evénement\") %>" ou="<%=\"/read_event.fl?id=\" + id %>" > <table class="container" cellpadding="0"> <tr> <td class="titreFiche" colspan="3"> <fl:getProperty name="Event" property="EvtLabel" alt=""/> </td> </tr> <tr class="ligne_separation"><td></td></tr> <tr class="fieldline"> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldRead property="EvtCategory"/> <fl:fieldRead property="EvtCode"/> <fl:fieldRead property="EvtDate"/> <fl:fieldRead property="EvtEndDate"/> <fl:fieldRead property="EvtModelMail_" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_messages.fl\") %>"/> <% if (EventCategory.TMK.toString().equals(eventCategory)) { %> <% } if (EventCategory.MEET.toString().equals(eventCategory)) { %> <fl:fieldRead property="EvtActors" bean="true" disp="<%= flRequest.computeURL(\"/read_actor.fl\") %>"/> <fl:fieldRead property="EvtQuota"/> <% if (evtQuota > 0) { %> <tr> <td class="dataLabel"><%= Utils.getMessage(session, "L81ED", "Nombre de participants") %></td> <td class="dataValue" id="nbPart"></td> </tr> <% } %> <% } %> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldRead property="EvtCategorie_"/> <%--if ( EventCategory.MEET.toString().equals(eventCategory)) { --%> <%-- <fl:fieldRead property="EvtTiers_" separator="<br>" bean="true" href="true" disp="<%= flRequest.computeURL(\"/read_enterprise.fl\") %>"/> --%> <%--} --%> <fl:fieldRead property="EvtStatut_"/> <% if (scriptList.size() > 0) { %> <tr class="fieldline"> <td id="EvtTool_label" class="dataLabel"><fl:label code="F6086" label="Outil"/></td> <td id="EvtTool_value" class="dataValue"> <% Hashtable row = (Hashtable)scriptList.elementAt(0); Integer cScrSeqNumI = (Integer) row.get("ScrSeqNum"); int cScrSeqNum = 0; if (cScrSeqNumI != null) { cScrSeqNum = cScrSeqNumI.intValue(); } %> <div><a href="<fl:link url="<%= \"/read_script.fl?id=\" + (String)row.get(\"ScrID\") %>"/>" title="<fl:getMessage code="L61EA" alt="Script"/> <%= df2.format((long) cScrSeqNum) + " - " + (String)row.get("ScrLabel") %>"><fl:getMessage code="L61EA" alt="Script"/> <%= df2.format((long) cScrSeqNum) + " - " + (String)row.get("ScrLabel") %></a></div> </td> </tr> <% } else if (formList.size() > 0) { %> <tr> <td id="EvtTool_label" class="dataLabel"><fl:label code="F6086" label="Outil"/></td> <td id="EvtTool_value" class="dataValue"> <% Hashtable row = (Hashtable)formList.elementAt(0); Integer cFrmSeqNumI = (Integer) row.get("FrmSeqNum"); int cFrmSeqNum = 0; if (cFrmSeqNumI != null) { cFrmSeqNum = cFrmSeqNumI.intValue(); } %> <div><a href="<fl:link url="<%= \"/read_customform.fl?id=\" + (String)row.get(\"FrmID\") %>"/>" title="<fl:getMessage code="L613C" alt="Questionnaire"/> <%= df2.format((long) cFrmSeqNum) + " - " + (String)row.get("FrmLabel") %>"><fl:getMessage code="L613C" alt="Questionnaire"/> <%= df2.format((long) cFrmSeqNum) + " - " + (String)row.get("FrmLabel") %></a> </td> </tr> <%--http://u-project2.umanis.com/view.php?id=39749: Export guide / localités et Millésime --%> <% Integer mill = 0; try{ mill = (Integer)FormBean.lookup(context, "FrmMillesime_", ((String)row.get("FrmID"))); }catch(Exception e){ mill = 0; } if(mill !=null && mill>0){ %> <tr> <td id="EvtFrmMillesime__label" class="dataLabel"><fl:label code="" label="Millesime questionnaire"/></td> <td id="EvtFrmMillesime__value" class="dataValue"><%=mill %></td> </tr> <%} } else if (isActiveSalesInvest && isSalesInvest) { %> <fl:fieldRead property="EvtIsSalesInvest" valueCodeIfTrue="L2005" valueCodeIfFalse="L2006"/> <fl:fieldRead property="EvtAvgAmountInvest" postText="€"/> <% } else { %> <tr> <td class="dataLabel"> </td> <td class="dataValue"> </td> </tr> <% } %> <%-- if (EventCategory.MEET.toString().equals(eventCategory)) { --%> <tr class="fieldline"> <td id="Evt.Address_label" class="dataLabel"><fl:label code="F2012" label="Adresse"/></td> <td id="Evt.Address_value" class="dataValue"> <div> <%-- <fl:getProperty name="Event" property="EvtNumVoie" alt="" postText="<br>"/> <fl:getProperty name="Event" property="EvtNatureVoie" alt="" postText="<br>"/> <fl:getProperty name="Event" property="EvtLibelleVoie" alt="" postText="<br>"/> --%> <fl:getProperty name="Event" property="EvtNumVoie_" alt=""/> <fl:getProperty name="Event" property="EvtNatureVoie" alt=""/> <fl:getProperty name="Event" property="EvtLibelleVoie" alt=""/> <br> </br> <fl:getProperty name="Event" property="EvtZip" alt="" postText=" "/><fl:getProperty name="Event" property="EvtCity" alt="" postText=""/><% try { Event.getEvtZip(); Event.getEvtCity(); %><br><% } catch(FieldNotInitializedException e) { try { Event.getEvtCity(); %><br><% } catch (FieldNotInitializedException ex) {}} %> <fl:getProperty name="Event" property="EvtCtrID" alt=" " preText="<%= (evtCity == null && evtZip != null) ? \"<br>\" : \"\"%>"/> </div> </td> </tr> <%-- } --%> </table> </td> </tr> </table> <fl:notes name="EvtRemarks" title="<%= Utils.getMessage(session, \"F2024\", \"Notes\") %>" nbPix="35"><fl:getProperty name="Event" property="EvtRemarks" alt=" " edit="false" /></fl:notes> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="EventTabs"> <fl:sTab id="SYNTHESE" title="<%= Utils.getMessage(session, \"L6382\", false, true, \"Synthèse\") %>"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="column2"> <table class="container"> <tr> <td class="titreInterneSmalltabs"> <fl:getMessage code="L8187" alt="Inscriptions"/> </td> </tr> <tr> <td colspan="2"> <div id="chartInscription"></div> </td> </tr> <tr> <td> <div class="edealGrid"> <div id="grid-data" class="data"> <table cellpadding="0" id="stats_inscriptions"> <%-- Inscription table will be here --%> </table> </div> </div> </td> </tr> </table> </td> <td class="separation"><div class="separation"></div></td> <td class="column2"> <table class="container"> <tr> <td class="titreInterneSmalltabs"> <fl:getMessage code="L8186" alt="Participation"/> </td> </tr> <tr style="vertical-align: top"> <td colspan="2"> <div id="chartParticipation"></div> </td> </tr> <tr> <td> <div class="edealGrid"> <div id="grid-data" class="data"> <table cellpadding="0" id="stats_participations" > <%-- Participation table will be here --%> </table> </div> </div> </td> </tr> </table> </td> </tr> </table> </fl:sTab> <fl:sTab id="PARTICIPANTS" title="<%= Utils.getMessage(session, \"F6121\", false, true, \"Cibles\") %>" onselect="refreshEvent();"> <table class="container" cellpadding="0"> <% if (EventCategory.QST.toString().equals(eventCategory)) { %> <tr> <td colspan="13"> <%-- <fl:grid name="EVTQST" ajaxUrl="/embedded_list_ajax_criteria.fl"/> --%> <%-- Ignore these changes --%> <%if(listName.contains("EVTQSTNAT")){ %> <fl:grid name="EVTQSTNAT" ajaxUrl="<%=\"/embedded_list_ajax_criteria.fl?code=\"+listName+\"&PvtEventID=\" + id %>"/> <%}else if("FRMMARCHE".equals(typeFrm)){ %> <fl:grid name="<%=listName%>" ajaxUrl="<%= \"/embedded_list_ajax_criteria_for_QST.fl?code=\"+listName+\"&pEvtID=\" + id +\"&Ct_Statut=\" + dico.getRefIdByCode(\"Ct_Statut\", \"EAV\") %>"/> <% }else{ //http://u-project2.umanis.com/view.php?id=41726 //41726: Questionnaire web - "Onglet Cibles"%> <fl:grid name="<%=listName%>" ajaxUrl="<%= \"/embedded_list_ajax_criteria_for_QST.fl?code=\"+listName+\"&pEvtID=\" + id +\"&Ct_Statut=\" + dico.getRefIdByCode(\"Ct_Statut\", \"VAL\") %>"/> <% } %> </td> </tr> <% } else if (EventCategory.TMK.toString().equals(eventCategory)) { %> <tr> <td colspan="3"> <fl:grid name="EVTTMK" ajaxUrl="/embedded_list_ajax_criteria.fl"/> </td> </tr> <% } else { %> <tr> <td colspan="3"> <fl:grid name="EVTOTHER" ajaxUrl="/embedded_list_ajax_criteria.fl"/> </td> </tr> <% } %> </table> </fl:sTab> <fl:sTab id="EVENT1" title="<%= context.getAutoDisplayManager().getTitle(session, \"Event\", \"Evénement 1\") %>" visible="<%= context.getAutoDisplayManager().hasEntry(\"Event\", \"Evénement 1\") %>"> <fl:autodisplay name="Event" zone="Evénement 1"/> </fl:sTab> <%/* <!-- <fl:sTab id="GuestLst" title="Utils.getMessage(session, \"L65CE\", true, \"Validations\")" onselect="refreshGuestLst();"> <fl:grid name="GUESTLST" ajaxUrl="\"/embedded_list_ajax.fl?GliEvtID=\" + id"/> </fl:sTab> --> */ %> <fl:sTab id="POPULATIONS_FILLES" title="<%= Utils.getMessage(session, \"L6037\", true, \"Populations\") %>" onselect="refreshPopFilles();"> <fl:grid name="PPF_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?PopEvtID=\" + id %>" /> </fl:sTab> <fl:sTab id="RETURNS" title="<%= Utils.getMessage(session, \"L2039\", true, \"Interactions\") %>" onselect="refreshInteraction();"> <fl:grid name="INTT_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=INTT_EMB&IntPvtID:PvtEventID=\" + id %>"/> </fl:sTab> <fl:sTab id="FATTACH" title="<%= Utils.getMessage(session, \"L201C\", false, true, \"Fichiers\") %>"> <fl:attach name="Enterprise" colID="EvtAttID" edit="false" listFobs="true" /> </fl:sTab> </fl:smallTabs> </fl:bigTabs>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de