Edit C:\galaxie\Back\galaxie\marketing\campaign\campaign_edit_js.jsp
<% /****************************************************************************** * Copyright (c) 2000-2005 e-Deal * * e-Deal S.A. * 55 rue Brillat Savarin * 75013 Paris * France * * T: +33 (0)1 53 80 80 30 * 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.FieldNotInitializedException" %><%@ page import="com.edeal.frontline.FlContext" %><%@ page import="com.edeal.frontline.navigation.FlRequest" %><%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.CampaignBean" id="Campaign" scope="request"/> <% response.setContentType("application/x-javascript"); FlContext context = (new FlRequest(request)).getContext(); String salesModel = context.getContextParameter("salesModel"); int eveEnt = 0; int evePer = 0; try { eveEnt = Campaign.getCpgEventEnt(); } catch (FieldNotInitializedException e) { } try { evePer = Campaign.getCpgEventPer(); } catch (FieldNotInitializedException e) { } %> function moveSelect(monSelect, laDirection, champResu) { var i, p, n; p = monSelect.selectedIndex; n = monSelect.options.length; if (p == -1) return; if ( (p == 0) && (laDirection == 1) ) return; if ( (p == n-1) && (laDirection == -1) ) return; nouvOrdre = new Array(n); nouvOrdreText = new Array(n); for (i=0 ; i<n ; i++) { if ( (laDirection == 1) && (i == p-1) ) { nouvOrdre[i] = monSelect.options[p].value; nouvOrdreText[i] = monSelect.options[p].text; } else if ( (laDirection == 1) && (i == p) ) { nouvOrdre[i] = monSelect.options[p-1].value; nouvOrdreText[i] = monSelect.options[p-1].text; } else if ( (laDirection == -1) && (i == p) ) { nouvOrdre[i] = monSelect.options[p+1].value; nouvOrdreText[i] = monSelect.options[p+1].text; } else if ( (laDirection == -1) && (i == p+1) ) { nouvOrdre[i] = monSelect.options[p].value; nouvOrdreText[i] = monSelect.options[p].text; } else { nouvOrdre[i] = monSelect.options[i].value; nouvOrdreText[i] = monSelect.options[i].text; } } while (monSelect.options.length > 0) monSelect.options[monSelect.options.length - 1] = null; for (i = 0 ; i < nouvOrdre.length ; i++) { monSelect.options[i] = new Option(nouvOrdreText[i], nouvOrdre[i]); } monSelect.selectedIndex = p - laDirection; resu = ""; for (i=0 ; i<monSelect.options.length ; i++) { resu += "|" + monSelect.options[i].value; } resu = resu.substring(1,resu.length); champResu.value = resu; } function nbrFormat(valTxt) { if (valTxt.indexOf('.') != -1) return (valTxt + '000').substring(0, valTxt.indexOf('.') + 3); else return valTxt; } function doCalculResultat(leChamp) { if (isNaN(parseFloat(leChamp.value))) leChamp.value = ""; myForm = document.forms[0]; if ((myForm.CpgIndicEst1.value != "") && (myForm.CpgIndicReal1.value != "")) { qReel = parseFloat(toSysNum(myForm.CpgIndicReal1.value)); qPrev = parseFloat(toSysNum(myForm.CpgIndicEst1.value)); myForm.QEcartN.value = checkFloat(roundDecimal(qReel - qPrev).toString()); myForm.QEcartP.value = checkFloat(roundDecimal(((qReel - qPrev) / qPrev)*100).toString()); } else { myForm.QEcartN.value = ""; myForm.QEcartP.value = ""; } if ((myForm.CpgIndicEst2.value != "") && (myForm.CpgIndicReal2.value != "")) { lReel = parseFloat(toSysNum(myForm.CpgIndicReal2.value)); lPrev = parseFloat(toSysNum(myForm.CpgIndicEst2.value)); myForm.LEcartN.value = checkFloat(roundDecimal(lReel - lPrev).toString()); myForm.LEcartP.value = checkFloat(roundDecimal(((lReel - lPrev) / lPrev)*100).toString()); } else { myForm.LEcartN.value = ""; myForm.LEcartP.value = ""; } if ((myForm.CpgIndicEst3.value != "") && (myForm.CpgIndicReal3.value != "")) { rReel = parseFloat(toSysNum(myForm.CpgIndicReal3.value)); rPrev = parseFloat(toSysNum(myForm.CpgIndicEst3.value)); myForm.REcartN.value = checkFloat(roundDecimal(rReel - rPrev).toString()); myForm.REcartP.value = checkFloat(roundDecimal(((rReel - rPrev) / rPrev)*100).toString()); } else { myForm.REcartN.value = ""; myForm.REcartP.value = ""; } if ((myForm.CpgIndicEst4.value != "") && (myForm.CpgIndicReal4.value != "")) { cReel = parseFloat(toSysNum(myForm.CpgIndicReal4.value)); cPrev = parseFloat(toSysNum(myForm.CpgIndicEst4.value)); myForm.CEcartN.value = checkFloat(roundDecimal(cReel - cPrev).toString()); myForm.CEcartP.value = checkFloat(roundDecimal(((cReel - cPrev) / cPrev)*100).toString()); } else { myForm.CEcartN.value = ""; myForm.CEcartP.value = ""; } if ((myForm.CpgIndicEst5.value != "") && (myForm.CpgIndicReal5.value != "")) { caReel = parseFloat(toSysNum(myForm.CpgIndicReal5.value)); caPrev = parseFloat(toSysNum(myForm.CpgIndicEst5.value)); myForm.CaEcartN.value = checkFloat(roundDecimal(caReel - caPrev).toString()); myForm.CaEcartP.value = checkFloat(roundDecimal(((caReel - caPrev) / caPrev)*100).toString()); } else { myForm.CaEcartN.value = ""; myForm.CaEcartP.value = ""; } } function calcDiff() { doCalculResultat(document.forms[0].CpgIndicEst1); } function doCompareDate(){ mf = document.forms[0]; if (mf.CpgDateBeg.value!="" && mf.CpgDateEnd.value!="" && compareDate(mf.CpgDateBeg.value,'',mf.CpgDateEnd.value,'') > 0) { window.alert("<fl:getMessage code="M0021" alt="La date de début doit être inférieure à la date de fin." js="true"/>"); mf.CpgDateEnd.focus(); } }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de