Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\netbusiness\publication\result.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. ******************************************************************************/ %> <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"> <%@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 json = (String)flRequest.getAttribute("json"); String id = null; try { id = Publication.getPubID(); } catch (FieldNotInitializedException fnie) { id = flRequest.getRequestParameterOrAttribute("id"); } String actualDate = (String)flRequest.getAttribute("actualDate"); %> <script type="text/javascript"> <%if(outlets != null) {%> var outletsNb = <%=outlets.size()%>; var outlets; <%String outletIDs[] = new String[outlets.size()]; for(int o=0; o<outlets.size(); o++){ Hashtable outlet = (Hashtable)outlets.get(o); outletIDs[o] = (String)outlet.get("PboID"); } if(outletIDs.length>0){%> outlets = "<%=Utils.implodeList(outletIDs, ",", "'")%>"; <%} %> <%}else{%> var outletsNb = 0; <%}%> var endedWithError = false; function republish(){ window.location = "<fl:link list="true" url="<%= \"/do_publication.fl\" + ( id != null ? \"?id=\" + id : \"\") %>"/>" + "&outletIDs=" + outlets; } </script> <style type="text/css"> #container { width: 80%; margin-left: 0%; margin-top: 0px;} </style> <fl:bigTabs objectTitle="<%= Utils.getMessage(session, \"L704A\", \"Etape 2/2 \") %>" listTitle="<%= Utils.getMessage(session, \"L30A2\", false, true, \"Liste des publications\") %>" ou="<%= \"/read_publication.fl\" + (id != null ? \"?id=\" + id : \"\") %>"> <div id="container"> </div> </fl:bigTabs> <script type="text/javascript" src="<fl:webapp/>/js/edeal/libraries/jquery/jquery.js"></script> <script type="text/javascript" src="<fl:webapp/>/js/progressbar/jquery.progressbar.min.js"></script> <script> var progress = 0; function doOnLoad(){ $('#Republish').hide(); $('#RepublishSeparator').hide(); $('#Return').hide(); $.ajax({ url: '<fl:webapp/>/execute_publication_data.fl?id=<%=id%>&json=<%=json%>', success: function(data) { $('#container').html(data); <%for(int j=1; j<=outlets.size(); j++){%> $("#pb<%=j%>").progressBar(progress, { showText: true, boxImage : '<fl:webapp/>/js/progressbar/images/progressbar.gif', barImage: '<fl:webapp/>/js/progressbar/images/progressbg_blue.gif'} ); <%}%> } }); } <%for(int j=0; j<outlets.size(); j++){ Hashtable outlet = (Hashtable)outlets.get(j); String pboID = (String)outlet.get("PboID"); %> setTimeout("doAjax('<fl:webapp/>/get_publication_status.fl?id=<%=id%>&pboid=<%=pboID%>&date=<%=actualDate%>',callback_<%=j+1%>)",1000); function callback_<%=j+1%>(arrIndex){ if (eDealXmlhttpArr[arrIndex].readyState == 4) { hideWaiting(); text = eDealXmlhttpArr[arrIndex].responseText; try { var result = eval('(' + text + ')'); } catch(err) { setTimeout("finish_failure('pb<%=j+1%>', 'Unknown error');",3000);return false; } } if(typeof(result) == "undefined"){ if(progress < 80){ progress += 10; $('#pb<%=j+1%>').progressBar(progress); } }else if (result.STATUS == 'OK'){ outletsNb --; setTimeout("finish_success('pb<%=j+1%>');",3000);return false; }else if (result.STATUS == 'KO') { outletsNb --; setTimeout("finish_failure('pb<%=j+1%>', '"+result.MESSAGE+"');",3000);return false; endedWithError = true; }else if (result.STATUS == 'UNKNOWN') { if(progress < 80){ progress += 10; $('#pb<%=j+1%>').progressBar(progress); } setTimeout("doAjax('<fl:webapp/>/get_publication_status.fl?id=<%=id%>&pboid=<%=pboID%>&date=<%=actualDate%>',callback_<%=j+1%>)",1000);return false; } } <%}%> function finish_failure(id, error){ setTimeout(function() { $('#'+id).progressBar(100); ;},1); setTimeout(function() { $('#'+id).hide(); $('#'+id+'container').append(' <img src="<fl:webapp/>/js/progressbar/images/failure.png" title="'+error+'"/>'); if(outletsNb == 0){ $('#Cancel').hide(); $('#Republish').show(); $('#RepublishSeparator').show(); $('#Return').show(); } ;},1000); } function finish_success(id){ setTimeout(function() { $('#'+id).progressBar(100); ;},1); setTimeout(function() { $('#'+id).hide(); $('#'+id+'container').append(' <img src=<fl:webapp/>/js/progressbar/images/success.png title="Success"/>'); if(outletsNb == 0){ $('#Cancel').hide(); if(endedWithError){ $('#Republish').show(); $('#RepublishSeparator').show(); } else $('#Return').show(); } ;},1000); } </script>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de