Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\netbusiness\publication\do.jsp
<% /****************************************************************************** * Copyright (c) 2000-2010 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.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.BasicBean" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="java.util.*" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <jsp:useBean class="com.edeal.frontline.PublicationBean" id="Publication" scope="request"/> <% 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(); Vector outlets = (Vector)flRequest.getAttribute("outlets"); String id = flRequest.getRequestParameterOrAttribute("id"); String outletIDs = flRequest.getRequestParameterOrAttribute("outletIDs"); outletIDs = (outletIDs == null)? "" : outletIDs; String photoID = null; try { photoID = Publication.getPubPhotoID(); } catch (FieldNotInitializedException e) { } String message = Utils.getMessage(session, "M900A", "Veuillez saisir le(s) champ(s) obligatoire(s)."); %> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/calendar.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script type="text/javascript"> var questionCodes = new Array(); var checked = 0; <%if(outlets != null) { for(int i=0; i<outlets.size(); i++){ Hashtable outlet = (Hashtable)outlets.get(i); String pboID = (String)outlet.get("PboID"); %> questionCodes["<%=pboID%>"] = "<%=(flRequest.getAttribute(pboID) != null)? flRequest.getAttribute(pboID):"" %>"; <%}%> <%}%> function doOnLoad(){ $('#publish').hide(); $('#publishSeparator').hide(); $.ajax({ url: "<fl:webapp/>/do_publication_data.fl?id=<%=id%>&outletIDs=<%=outletIDs%>", success: function(data) { $('#result').html(data); } }); } function execute_publication(){ json = "{"; outletNb = 0; for(i=1; i<=<%=outlets.size()%>; i++){ if($("#id"+i).get(0).checked == true){ if(outletNb > 0) json += ", "; outletNb++; id = $("input[name='id"+i+"']:checked").val(); json += "\"id"+outletNb+"\" : \""+id+"\""; json += ", \"id"+outletNb+"_codes\" : \""+questionCodes[id]+"\""; if(questionCodes[id] != ""){ codes = questionCodes[id].split("|"); for(j = 0; j<codes.length; j++){ if($("input[name='"+codes[j]+"_"+id+"']").attr("type") == "radio"){ val = $("input[name='"+codes[j]+"_"+id+"']:checked").val(); } else{ val = $("input[name='"+codes[j]+"_"+id+"']").val(); if(val == '' && $("input[name='"+codes[j]+"_"+id+"']").attr("ed:ismandatory") == 'true' && $("input[name='"+codes[j]+"_"+id+"']").attr("ed:isvisible") == 'true'){ alert("<%=message%>"); $("input[name='"+codes[j]+"_"+id+"']").attr("style","border-color: red;"); return; } } json += ", \""+codes[j]+"_"+id+"\" : \""+val+"\""; } } } } json += "}"; //alert(json); window.location="<fl:link list='true' url='<%= \"/execute_publication.fl?id=\" + id %>'/>&json="+json; } function do_when_checked(obj, id){ if($(obj).get(0).checked == true){ $('#publish').show(); $('#publishSeparator').show(); $("#div_"+id).show("slow"); checked ++; } else if($(obj).get(0).checked == false){ $("#div_"+id).hide("fast"); checked --; if(checked == 0){ $('#publish').hide(); $('#publishSeparator').hide(); } } } function show(val, id){ codes = val.split("|"); for (i = 0; i<codes.length; i++){ $("#label_"+codes[i]+"_"+id).show("fast"); $("#value_"+codes[i]+"_"+id).show("fast"); $("#value_"+codes[i]+"_"+id).find("input").attr("ed:isvisible", true); } } function hide(val, id){ codes = val.split("|"); for (i = 0; i<codes.length; i++){ $("#label_"+codes[i]+"_"+id).hide("fast"); $("#value_"+codes[i]+"_"+id).hide("fast"); $("#value_"+codes[i]+"_"+id).find("input").attr("ed:isvisible", false); } } function addDateToFinalDate(date, field){ val = field.value.split(" "); if (val.length > 1){ field.value = date + " " + val[1]; }else{ field.value = date; } } function addTimeToFinalDate(time, field){ val = field.value.split(" "); field.value = val[0] + " " + time; } </script> <fl:form action="" bean="Publication"> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L7049\", \"Etape 1/2 \") %>" listTitle="<%= Utils.getMessage(session, \"L30A2\", false, true, \"Liste des publications\") %>" ou="<%= \"/read_publication.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <div id="result"> </div> </fl:bigTabs> </fl:form>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de