Edit C:\Users\Administrator\Desktop\Back\galaxie - Copy\kbase\frontoffice\kb_cart_detail.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="java.util.List" %> <%@ page import="java.util.Map" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Hashtable" %> <%@ page import="java.util.Iterator" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.navigation.WebUtils"%> <%@ page import="com.edeal.frontline.DataDictionary"%> <jsp:useBean class="com.edeal.frontline.MessagesBean" id="Messages" scope="request"/> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% 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 query = flRequest.getParameter("query"); String lngCode = flRequest.getParameter("lngCode"); if(Utils.isEmpty(lngCode)) lngCode = "fr_FR"; String solID = flRequest.getRequestParameterOrAttribute("SolID"); String solTitle = flRequest.getRequestParameterOrAttribute("solToken"); solTitle += " " + flRequest.getRequestParameterOrAttribute("solSubject"); Vector<Hashtable> faqData = new Vector<Hashtable>(); faqData = (Vector<Hashtable>)flRequest.getAttribute("CrtFaqData"); String crtID = flRequest.getRequestParameterOrAttribute("CrtID"); String destMail = flRequest.getRequestParameterOrAttribute("DestMail"); if(Utils.isEmpty(destMail)) destMail = ""; Boolean success = true; String sfwID = flRequest.getRequestParameterOrAttribute("SfwID"); %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script type="text/javascript" src="<fl:webapp/>/js/ajax/ajax.js"></script> <script type="text/javascript" src="<fl:webapp/>/js/edit_js.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/json.org/json2/json2.js"></script> <script type="text/javascript"> function showFaq(id){ $.ajax({ url: "<fl:webapp/>/get_faq_score.fl?FaqID="+id, success:function(score){ $.openPopupLayer({ name: "FaqPopup", width: "auto", height: "auto", url: "<fl:webapp/>/faq_popup.fl?id=" + id+"&deleteMode=true", cache: false, success: function (data) { $('#popupLayerScreenLocker').height($(document).height() + "px"); $('#rating').ratings(5,score).bind('ratingchanged', function(event, data) { $.ajax({ url:"<fl:webapp/>/set_faq_score.fl?FaqID="+id+"&score="+data.rating, success:function(result) { $(".score_"+id).each(function(index){ $(this).html(result + " <fl:getMessage code="L70F0" alt="avis"/>"); }); } }); }); }, error: function () { alert("Erreur lors de l'ouverture de la popup !"); } }); } }); } function appendComment(){ old_comment = $("#new_comment").html(); $("#new_comment").html("<b><p>" + $("#CmtTitle").val() + "</p></b>" + "<p>" + $("#CmtContent").val() + "</p><p class=\"dataLabel\">Ecrit par Léa M. SAURIAT le 30/03/2011 à 10:04</p><hr />" + old_comment); $('#popupLayerScreenLocker').height($(document).height() + "px"); $("#CmtTitle").val(""); $("#CmtContent").val(""); } function showComments(){ $("#comments").attr("style","display:block;"); $('#popupLayerScreenLocker').height($(document).height() + "px"); } function generatePDF(id){ document.location="<fl:webapp/>/generate_pdf.fl?id="+id; } function doEdit(id) { if(id == '' || id == null){ alert('<fl:getMessage code="M9005" alt="Veuillez choisir un modèle" js="true"/>'); return; } var url = "<fl:webapp/>/edit_kb_message.fl?id="+id+"&SolID=<%=solID%>"; $.getJSON(url, function(data) { if(data.Status == "OK"){ $("#MsgSubject").val(decodeURIComponent(data.MsgSubject)); insertContents(decodeURIComponent(data.MsgBody)); $("#ModelMsgAttID").val(data.MsgAttID); $("#ModelMsgDocID").val(data.MsgDocID); } }); } function doSend() { var f = document.forms[0]; if (f.MsgTo.value == ''){ document.getElementById('MsgTo_msg').style.display = "inline"; alert('<fl:getMessage code="L810C" alt="Veuillez saisir un destinataire" js="true"/>'); f.MsgTo.focus(); }else if (f.MsgSubject.value == ''){ document.getElementById('MsgSubject_msg').style.display = "inline"; alert('<fl:getMessage code="M6033" alt="Veuillez saisir un sujet" js="true"/>'); f.MsgSubject.focus(); }else if (isEmptyContents()){ alert('<fl:getMessage code="M9029" alt="Veuillez saisir un contenu pour le message" js="true"/>'); }else{ sendMessage(); } } function doOnLoad(){ load_ckeditor(); } function back_to_kbase(){ <%String param = !Utils.isEmpty(solID)? "&SolID="+solID : (!Utils.isEmpty(crtID)? "&CrtID="+crtID : "");%> document.location="<fl:link url="/knowledge_base.fl"/><%=param%>"; } function removeFaq(id){ $.getJSON("<fl:webapp/>/remove_faq_from_cart.fl?CrtID=<%=crtID%>&FaqID="+id, function(data) { if(data.Status == "OK"){ $("#faq_" + id + "").remove(); if(data.IsEmpty == "true"){ $("#cart_empty").html( "<table>"+ "<tr>"+ "<td>"+ "<div>"+ "<label class=\"dataLabel\"><fl:getMessage code="L70F1" alt="Aucune fiche séléctionnée"/></label>"+ "</div>"+ "</td>"+ "</tr>"+ "</table>"); $("#cart_empty").show(); $("#cart_actions").hide(); } $.closePopupLayer('FaqPopup'); } }); } function sendMessage() { var f = document.forms[0]; var msgBody = encodeURI(getContents()); var msgContent = getContents(); var msgSubject = encodeURI(f.MsgSubject.value); var file = $("#ModelMsgAttID").val(); file += (file != "" ? "|" : "") + $("input[name='MsgAttID']").val(); var doc = $("#ModelMsgDocID").val(); doc += (doc != "" ? "|" : "") + $("input[name='MsgDocID']").val(); var fields = {"MsgSubject":msgSubject,"MsgBody":msgBody,"MsgAttID":file,"MsgDocID":doc}; var jsondata = JSON.stringify(fields); $.openPopupLayer({ name: "WaitingPopup", width: "auto", height: "auto", url: "<fl:webapp/>/waiting_popup.fl", cache: false, success : function(result){ $.ajax({ data: jsondata, type: "POST", url: '<fl:webapp/>/send_kb_mail.fl?MsgTo='+f.MsgTo.value+'&CrtID=<%=crtID%><%=(!Utils.isEmpty(solID))? "&SolID="+solID : ""%>', timeout: 20000, contentType: "application/json;charset=utf-8", dataType: 'json', async: true, success: analyseResponse }); } }); } function analyseResponse(data) { if (data != null){ if (data.Status == "OK"){ $("#waiting_popup").attr("src", "<fl:webapp/>/js/progressbar/images/success.png"); <%if (!Utils.isEmpty(solID)){%> $("#detail_popup").html("<span class=\"grid-action\"><a class=\"action-item\" href=\"javascript:goToSolicitation();\" ><fl:getMessage code="L8103" alt="Revenir à la sollicitation"/></a></span>"); <%}%> }else{ $("#waiting_popup").attr("src", "<fl:webapp/>/js/progressbar/images/failure.png"); $("#detail_popup").html(decodeURIComponent(data.Detail)); } $("#msg_popup").html(decodeURIComponent(data.Msg)); }else{ $("#waiting_popup").attr("src", "<fl:webapp/>/js/progressbar/images/failure.png"); $("#detail_popup").html(decodeURIComponent(data.Detail)); } } function goToSolicitation(){ window.opener.location="<fl:link url="/edit_solicitation.fl"/>&id=<%=solID%>&loadCart=1"; window.close(); } </script> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/frontoffice/rating_css.jsp" /> <fl:bigTabs listTitle="<%= Utils.getMessage(session, \"L6104\", false, true, \"K. Base\") %>" objectTitle="Envoi" ou=""> <div style="text-align: left"> <fieldset> <legend align=top> Demande </legend> <%String label = Utils.getMessage(session, "L8101", false, true, "Aucune demande sélectionnée");%> <%=((!Utils.isEmpty(solID))? solTitle : "<span class=\"dataLabel\">" + label + "</span>")%> </fieldset> <br/> <fieldset> <legend align=top> <fl:getMessage code="L8102" alt="Fiche(s) sélectionnée(s) dans le panier"/> </legend> <div id="cart"> <div id="cart_data"> <%if(faqData != null && !faqData.isEmpty()) { for(Hashtable faq : faqData){ %> <div id="faq_<%=faq.get("FaqID") %>"> <table> <tr> <td> <div> <a href="#" onclick="javascript:showFaq('<%=faq.get("FaqID") %>')"><%= faq.get("FaqTitle") %></a> <%=faq.get("FaqHasAttachment") %> <%=faq.get("FaqStatus") %> <a href="#" onclick="javascript:removeFaq('<%=faq.get("FaqID") %>')"><img border="0" style="vertical-align: middle" src="<fl:webapp/>/icons/frontoffice/cart-delete-icon.png"/></a> </div> </td> </tr> <tr> <td><%=faq.get("FaqPreview")%></td> </tr> </table> <table> <tr valign="top" class="dataLabel"> <td> <div> <span class="score_<%=faq.get("FaqID") %>"><%= faq.get("FaqScore") %><%if(!Utils.isEmpty((String)faq.get("FaqScore"))){%> <fl:getMessage code="L70F0" alt="avis"/><%}%></span> <span class="dataLabel"><%=faq.get("FaqHasComment") %></span> </div> <div><%if(!Utils.isEmpty((String)faq.get("FaqTags"))){%><fl:getMessage code="F70AC" alt="Mot(s) clé(s)"/>: <%=faq.get("FaqTags")%></div><%}%> </td> </tr> </table> <br/> </div> <%} %> </div> <div id="cart_empty"> </div> <%} else{%> </div> <div id="cart_empty"> <table> <tr> <td> <div> <label class="dataLabel"><fl:getMessage code="L70F1" alt="Aucune fiche séléctionnée"/></label> </div> </td> </tr> </table> </div> <%} %> </div> </fieldset> <br/> <fl:form action="" bean="Messages" method="POST"> <input type="hidden" name="ModelMsgAttID" id="ModelMsgAttID" value=""/> <input type="hidden" name="ModelMsgDocID" id="ModelMsgDocID" value=""/> <fieldset> <legend align=top> Message </legend> <br/> <div id="message_modele" style="width:500px; padding-left:5px"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="dataLabel" id="MsgID_label"> <div style="padding-right: 10px"> <label title="<fl:getMessage code="L6352" alt="Modèle"/>" for="MsgID"><fl:getMessage code="L6352" alt="Modèle" /></label> </div> </td> <td class="dataValue" id="MsgID_value"> <div class="input fieldTable"> <table cellspacing="0" cellpadding="0" class="fieldTable"> <tr valign="top"> <td class="principalText bigFieldPart"> <div class="fobLeftDiv"> <input type="hidden" value="" class="input" name="MsgID" id="MsgID"/> <input type="text" class="input fob" onfocus="displayOnFocus(this);acResizeDisplayDiv(this);" autocomplete="off" value="" name="lblMsgID" id="lblMsgID" style="width: 150px;"/> </div> </td> <td class="smallFieldPart"> <span id="MsgID_icons"> <table style="height: 100%; width: 100%"> <tr> <td> <a href="javascript:var langCurrent = $('#langageID').val(); var win = window.open('<fl:webapp/>/select.fl?type=Messages&field=MsgID&formIndex=0&query=MsgObjID:ObjSql=\'Solicitation\'\||MsgType:RefVal=\'KBMODELE\'', 'SelectActor', 'menubar=no,status=no,toolbar=no,scrollbars=yes,resizable=yes,width=800,height=400')"> <img title="<fl:getMessage code="A2003" alt="Sélectionner"/>" alt="<fl:getMessage code="A2003" alt="Sélectionner"/>" class="icon" src="<fl:webapp/>/icons/ico/rechercher.gif"/> </a> </td> <td> <a href="javascript:var f = window.document.forms[0]; f.MsgID.value = f.lblMsgID.value = ''; acLastCompleteValues['lblMsgID'] = '';acLastCompleteValues['MsgID'] = ''; void('')" class="fob"> <img title="<fl:getMessage code="A3005" alt="Vider le champ"/>" alt="<fl:getMessage code="A3005" alt="Vider le champ"/>" class="icon" src="<fl:webapp/>/icons/ico/supprimer.gif"/> </a> </td> <td> <a href="javascript: doEdit($('#MsgID').val());"> <img title="<fl:getMessage code="L7033" alt="Charger le modèle"/>" alt="<fl:getMessage code="L7033" alt="Charger le modèle"/>" class="icon" src="<fl:webapp/>/icons/ico/importer.gif"/> </a> </td> </tr> </table> </span> <script language="javascript"> var _MsgID_query = "MsgObjID:ObjSql='Solicitation'||MsgType:RefVal='KBMODELE'";runOnTime("installFobAC(document.forms[0].lblMsgID);", 1000); </script> </td> </tr> </table> </div> </td> </tr> </table> </div> <div id="message_place" style="width: 99%;padding-left: 5px"> <table class="container" cellpadding="0"> <tr> <td colspan="5" class="titreFiche"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td> <div><label title="À" for="MsgTo" class="titreFiche">À</label></div> </td> </tr> <tr class="fieldline"> <td> <div class="input text"><input type="hidden" value="MsgTo" name="mandatory"/><input type="hidden" value="Veuillez spécifier le destinataire du message." name="mandatory.MsgTo" id="mandatory.MsgTo"/><input type="text" class="input text chpsTextObligatoire" maxlength="255" value="<%=destMail %>" name="MsgTo" id="MsgTo"/><span style="display: none" class="mandatory_alert" id="MsgTo_msg">!</span></div> </td> </tr> <tr class="fieldline"> <td> <fl:label field="MsgSubject" labelClassName="titreFiche"/> </td> </tr> <tr class="fieldline"> <td> <fl:input property="MsgSubject" mandatoryMsgCode="M000C" /> </td> </tr> </table> </td> </tr> <tr class="ligne_separation"><td colspan="5"></td></tr> <tr> <td class="titrePartie" colspan="5"><fl:label field="MsgBody"/></td> </tr> <tr> <td class="dataValue noPaddingLeft" colspan="5"><fl:input height="340px" property="MsgBody" nodiv="true"/></td> </tr> <tr class="ligne_separation"><td></td></tr> </table> <link href="<fl:webapp/>/css/smalltabs_css.jsp" rel="stylesheet" type="text/css"> <fl:smallTabs name="AttachmentsTabs"> <fl:sTab id="files" title="<%= Utils.getMessage(session, \"L201C\", false, true, \"Documents joints\") %>"> <fl:attach name="Messages" colID="MsgAttID" edit="true"/> </fl:sTab> <fl:sTab id="docs" title="<%= Utils.getMessage(session, \"L813E\", false, true, \"Références documentaire\") %>"> <table class="container" cellpadding="0"> <tr> <td class="column2"> <table class="container" cellpadding="0"> <tr class="fieldline"> <td class="column2"> <table class="container" cellpadding="0"> <fl:fieldEdit property="MsgDocID" name="Messages"/> </table> </td> </tr> <tr class="fieldline"><td></td></tr> </table> </td> <td style="width:20px"></td> <td class="column2"></td> </tr> </table> </fl:sTab> </fl:smallTabs> </div> </fieldset> </fl:form> </div> </div> </fl:bigTabs> <script type="text/javascript" src="<fl:webapp/>/js/frontoffice/jquery.ratings.js"></script> <!-- CKEditor --> <script type="text/javascript" src="<fl:webapp/>/js/wysiwyg/ckeditor/ckeditor.js"></script> <script type="text/javascript" src="<fl:webapp/>/js/wysiwyg/ckeditor/adapters/jquery.js"></script> <script type="text/javascript"> var simpleLinkURL = ''; var simpleLinkText = ''; var desType = 'Solicitation'; var CKEditor_loaded = false; var editor; <% boolean hasFileStorageService = false; boolean hasUrlTrackingService = false; %> function load_ckeditor(){ var instance = CKEDITOR.instances['MsgBody']; if(instance) { CKEDITOR.remove(instance); } editor = CKEDITOR.replace('MsgBody', { <%if(hasFileStorageService){%> filebrowserImageBrowseUrl : '<fl:webapp/>/js/wysiwyg/filemanager/index.jsp', filebrowserWindowWidth : 1024, filebrowserWindowHeight : 400, <%}%> height : "330", resize_enabled : false, toolbar : [ ['Format','Font','FontSize','-','Bold','Italic','Underline','StrikeThrough','-','Undo','Redo','-','Cut','Copy','Paste','Find','Replace','-','Outdent','Indent','-','Print'], '/', ['NumberedList','BulletedList','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], [<%if(hasFileStorageService){%>'Image',<%}%>'Table','-','Link','Flash','Smiley','TextColor','BGColor','Source','-','FusionButton','SimpleLinkButton'<%if(hasUrlTrackingService){%>,'TrackingLinkButton','SnippetButton'<%}%>] ] }); CKEditor_loaded = true; CKEDITOR.on( 'dialogDefinition', function( ev ){ var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'image' ){ dialogDefinition.removeContents('advanced'); // Get a reference to the 'Image Info' tab. var infoTab = dialogDefinition.getContents('info'); // Remove unnecessary widgets from the 'Image Info' tab. infoTab.remove('txtHeight'); infoTab.remove('txtWidth'); infoTab.remove('txtBorder'); infoTab.remove('txtHSpace'); infoTab.remove('txtVSpace'); infoTab.remove('cmbAlign'); infoTab.remove('btnLockSizes');// infoTab.remove('btnResetSize'); infoTab.remove('previewImage'); infoTab.remove('ImagePreviewLoader'); infoTab.remove('ImagePreviewBox'); infoTab.remove('previewImage'); } }); CKEDITOR.on('pluginsLoaded', function( ev ){ //Fusion button editor.addCommand('fusionCommand', { exec : function(editor) { getFusionField(); } }); editor.ui.addButton('FusionButton', { label : '<fl:getMessage code="F7066" alt="Fusion" js="true"/>', command : 'fusionCommand', icon: '<fl:webapp/>/icons/fusion.gif' }); }); } function insertFusionField(sqlName, lbl, id){ var value = '<span id="' + id + '" title="' + sqlName + '" ed:fusionfield="' + sqlName + '">$$' + lbl + '$$</span> '; if ( editor.mode == 'wysiwyg' ){ editor.insertHtml(value); } if (fusionFieldPopUp != null) { window.setTimeout("fusionFieldPopUp.focus()",400); } } function insertContents(value){ editor.setData(value); } function getContents(){ return editor.getData(); } function isEmptyContents(){ var editor_val = editor.document.getBody().getText(); if (editor_val != '') { return false ; } return true ; //return ( ("" == getContents()) || ('<br />\n' == getContents()) || ('<br />' == getContents())); } var fusionFieldPopUp; var snippetPopUp; function getFusionField(){ if (desType != '') { fusionFieldPopUp = window.open('<fl:link list="false" url="/fusion_popup.fl"/>?destype='+desType, '<fl:getMessage code="F7066" alt="Fusion"/>', 'toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no, width=500, height=200'); }else{ alert("Veuillez sélectionner un objet concerné."); } } function search_by_keyword(keyword){ url = "<fl:webapp/>/knowledge_base.fl?CrtID=<%=crtID%>&core=knowledgebase&lngCode=fr_FR&query="+keyword; window.location.href=url; } </script> <script type="text/javascript" src="<fl:webapp/>/js/jquery-url-params.js"></script> <script language="javascript" src="<fl:webapp/>/js/frontoffice/knowledge_base_js.jsp?deleteMode=true"></script>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de