Edit C:\Users\Administrator\Desktop\Back\Livraison EVQG22\sales\enterprise\read_tabtimetables.jsp
<%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.helper.ContextHelper" %> <%@page import="com.edeal.frontline.helper.custom.EnterpriseHelper"%> <%@ page import="com.edeal.frontline.*" %> <%@ page import="java.util.*" %> <%@ page import="com.edeal.frontline.grid.GridData" %> <%@taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <!-- http://u-project2.umanis.com/view.php?id=48902 | Ajout de l'onglet : Textes | Hamza L --> <%-- Taux de générosité --%> <% FlRequest flRequest=new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = flRequest.getContext().getDataDictionary(); String id = flRequest.getParameter("id"); String annuelTimCategorieID = dico.getRefIdByCode("TimCategorieID", "ANNU"); String entTye = (String)EnterpriseBean.lookup(context, "EntTyeID:Val", id); String timEtabCategorieID = null; if(!Utils.isNullEmptyString(entTye) && entTye.startsWith("R")) timEtabCategorieID = dico.getRefIdByCode("TimEtabCategorieID", "RESTO"); else timEtabCategorieID = dico.getRefIdByCode("TimEtabCategorieID", "HOTEL"); %> <table class="container" cellpadding="0" > <tr><td class="dataLabel"> </td></tr> <tr><td class="ligne_separation_couleur"></td></tr> <tr><td class="dataLabel"> </td></tr> <tr><td class="titreInterneSmalltabs"><fl:getMessage code="MF1F9" alt="Ouvertures annuelles"/></td></tr> <tr><td class="dataLabel"> </td></tr> </table> <fl:access name="Timetables_" operation="create"> <form name="timetables" class="fieldTable" id="timetables"> <table class="container" cellpadding="0"> <tr> <td > <span class="criteriaLabel"> <fl:getMessage code="FF1A2" alt="Millésime"/> </span> <% try { Vector<Vector<String>> values = dico.getRefList(session, "Mil", "Te1"); %> <select name="TimMillesime" id="TimMillesime" style="background-color: #FDCBCC"> <% if (values != null) { for (Vector<String> row : values) { String refID = row.firstElement(); String refDisp = row.elementAt(1); %> <option value="<%= Utils.formatToWeb(refID, true) %>"><%= Utils.formatToWeb(refDisp, false) %></option> <% } } %> </select> <% } catch (FrontlineException fle) { } %> </td> <td > <span class="criteriaLabel"> <fl:getMessage code="F6021" alt="Jour"/> </span> <% try { Vector<Vector<String>> values = dico.getRefList(session, "Dow", "Te1"); %> <select name="TimDayID" id="TimDayID" style="background-color: #FDCBCC"> <option value=""></option> <% if (values != null) { for (Vector<String> row : values) { String refID = row.firstElement(); String refDisp = row.elementAt(1); %> <option value="<%= Utils.formatToWeb(refID, true) %>"><%= Utils.formatToWeb(refDisp, false) %></option> <% } } %> </select> <% } catch (FrontlineException fle) { } %> </td> <td> <span class="criteriaLabel"> <fl:getMessage code="F2029" alt="Catégorie"/> </span> <% try { Vector<Vector<String>> values = dico.getRefList(session, "Ho_", "Te1"); String onChangeFunc = entTye == null || !entTye.startsWith("R") ? "manageDisplayField(this)" : ""; %> <select name="TimCategorieID" onchange="<%= onChangeFunc %>" <%= entTye.startsWith("R") ? "disabled" : "" %> id="TimCategorieID" style="background-color: #FDCBCC"> <% if (values != null) { for (Vector<String> row : values) { String refID = row.firstElement(); String refDisp = row.elementAt(1); boolean selected = entTye != null && entTye.startsWith("R") && refID.equals(annuelTimCategorieID); %> <option value="<%= Utils.formatToWeb(refID, true)%>" ><%= Utils.formatToWeb(refDisp, false) %></option> <% } } %> </select> <% } catch (FrontlineException fle) { } %> </td> </tr> <tr><td colspan="4" class="dataLabel"> </td></tr> <tr> <td> <span class="criteriaLabel"> <fl:getMessage code="FF36F" alt="Ouvert 24h/24h"/> </span> <input id="TimIsOpen24h" name="TimIsOpen24h" class="input" type="checkbox" onclick="disableTimes(this);"> </td> <td> <span class="criteriaLabel"> <fl:getMessage code="FF370" alt="Fermé"/> </span> <input id="TimIsClosed" name="TimIsClosed" class="input" type="checkbox" onclick="disableTimes(this);"> </td> </tr> <tr><td colspan="4" class="dataLabel"> </td></tr> <tr> <td > <span class="titreInterneSmalltabs"> <fl:getMessage code="FF371" alt="Midi :"/> </span> </td> <td class="dataLabel"> <span class="criteriaLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </span> <input id="TimPlageBgTime" name="TimPlageBgTime" value="" class="input" type="time"> </td> <td > <span class="criteriaLabel"> <fl:getMessage code="F6040" alt="Heure de fin"/> </span> <input id="TimPlageEndTime" name="TimPlageEndTime" value="" class="input" type="time"> </td> </tr> <tr><td colspan="4" class="dataLabel"> </td></tr> <tr> <td > <span class="titreInterneSmalltabs"> <fl:getMessage code="FF372" alt="Soir :"/> </span> </td> <td class="dataLabel"> <span class="criteriaLabel"> <fl:getMessage code="F601A" alt="Heure de début"/> </span> <input id="TimSecPlageBgTime" name="TimSecPlageBgTime" value="" class="input" type="time"> </td> <td > <span class="criteriaLabel"> <fl:getMessage code="F6040" alt="Heure de fin"/> </span> <input id="TimSecPlageEndTime" name="TimSecPlageEndTime" value="" class="input" type="time"> </td> </tr> <tr><td colspan="4" class="dataLabel"> </td></tr> <tr> <td colspan="3" class="dataLabel"> </td> <td class="smallFieldPart"><a href="javascript:addTimeTable()"> <img src="<fl:webapp/>/icons/ico/save_all_long.gif" id="bt_add" title="<fl:getMessage code="A000F" alt="Ajouter"/>"></a> </td> </tr> <tr><td colspan="4" class="dataLabel"> </td></tr> </table> </form> </fl:access> <fl:grid name="TIM_EMB" ajaxUrl="<%= \"/embedded_list_ajax.fl?code=TIM_EMB&TimTiersID=\" + id %>"/> <script type="text/javascript"> function addTimeTable() { var f = window.document.timetables; var args = '&TimTiersID=<%=id%>'; args += '&TimEtabCategorieID=<%=timEtabCategorieID%>'; args += '&Type=Timetables_'; if(f.TimIsClosed.checked){ args += '&TimIsClosed=true'; f.TimPlageBgTime.value = ''; f.TimPlageEndTime.value = ''; f.TimSecPlageBgTime.value = ''; f.TimSecPlageEndTime.value = ''; }else { args += '&TimIsClosed=false'; } if(f.TimIsOpen24h.checked){ args += '&TimIsOpen24h=true'; f.TimPlageBgTime.value = '00:01'; f.TimPlageEndTime.value = '23:59'; f.TimSecPlageBgTime.value = ''; f.TimSecPlageEndTime.value = ''; }else{ args += '&TimIsOpen24h=false'; } if (f.TimMillesime.value != '') { args += '&TimMillesime=' + encodeURIComponent(f.TimMillesime.value); } if (f.TimCategorieID.value != '') { args += '&TimCategorieID=' + encodeURIComponent(f.TimCategorieID.value); } if (f.TimDayID.value != '') { args += '&TimDayID=' + encodeURIComponent(f.TimDayID.value); } if (f.TimPlageBgTime.value != '') { args += '&TimPlageBgTime=' + encodeURIComponent(f.TimPlageBgTime.value); } if (f.TimPlageEndTime.value != '') { args += '&TimPlageEndTime=' + encodeURIComponent(f.TimPlageEndTime.value); } if (f.TimSecPlageBgTime.value != '') { args += '&TimSecPlageBgTime=' + encodeURIComponent(f.TimSecPlageBgTime.value); } if (f.TimSecPlageEndTime.value != '') { args += '&TimSecPlageEndTime=' + encodeURIComponent(f.TimSecPlageEndTime.value); } var ajaxURL = '<fl:link url="/save_timetables_ajax.fl?"/>' + args; doAjax(ajaxURL, waitNrefreshTimetables); } function deleteMarkedTimeTables(timID) { if (confirm('<fl:getMessage code="MF09B" alt="Etes-vous sűr de vouloir supprimer cette Période de fermeture ?" js="true"/>')) { doAjax('<fl:webapp/>/delete_object_ajax.fl?type=Timetables_&id=' + timID , waitNrefreshTimetables); } } function refreshTimetables(){ _grid__TIM_EMB_js_.render(); } function waitNrefreshTimetables(arrIndex) { if(eDealXmlhttpArr[arrIndex].readyState == 4) { var rtrn = trimStr(eDealXmlhttpArr[arrIndex].responseText); var f = window.document.timetables; if (rtrn == '') { f.TimPlageBgTime.value = ''; f.TimPlageEndTime.value = ''; f.TimSecPlageBgTime.value = ''; f.TimSecPlageEndTime.value = ''; refreshTimetables(); window.scrollTo(0,1000); hideWaiting(); } else { hideWaiting(); } } } function manageDisplayField(elt){ var annuelTimCategorieID = '<%=annuelTimCategorieID%>'; var f = window.document.timetables; if(elt.value != annuelTimCategorieID){ f.TimPlageEndTime.setAttribute('disabled' , ''); f.TimPlageEndTime.style.backgroundColor = '#A3A6AB'; f.TimSecPlageBgTime.setAttribute('disabled' , ''); f.TimSecPlageBgTime.style.backgroundColor = '#A3A6AB'; f.TimSecPlageEndTime.setAttribute('disabled' , ''); f.TimSecPlageEndTime.style.backgroundColor = '#A3A6AB'; f.TimDayID.childNodes[1].setAttribute('selected' , 'true'); f.TimDayID.setAttribute('disabled' , ''); } else { f.TimPlageEndTime.removeAttribute('disabled'); f.TimPlageEndTime.style.backgroundColor = 'white'; f.TimSecPlageBgTime.removeAttribute('disabled'); f.TimSecPlageBgTime.style.backgroundColor = 'white'; f.TimSecPlageEndTime.removeAttribute('disabled'); f.TimSecPlageEndTime.style.backgroundColor = 'white'; f.TimDayID.removeAttribute('disabled'); } } function disableTimes(elt){ var f = window.document.timetables; if(elt != null && elt.undefined && elt.checked){ f.TimPlageBgTime.setAttribute('disabled' , ''); f.TimPlageBgTime.style.backgroundColor = '#A3A6AB' f.TimPlageEndTime.setAttribute('disabled' , ''); f.TimPlageEndTime.style.backgroundColor = '#A3A6AB'; f.TimSecPlageBgTime.setAttribute('disabled' , ''); f.TimSecPlageBgTime.style.backgroundColor = '#A3A6AB'; f.TimSecPlageEndTime.setAttribute('disabled' , ''); f.TimSecPlageEndTime.style.backgroundColor = '#A3A6AB'; }else{ f.TimPlageBgTime.removeAttribute('disabled'); f.TimPlageBgTime.style.backgroundColor = 'white'; f.TimPlageEndTime.removeAttribute('disabled'); f.TimPlageEndTime.style.backgroundColor = 'white'; f.TimSecPlageBgTime.removeAttribute('disabled'); f.TimSecPlageBgTime.style.backgroundColor = 'white'; f.TimSecPlageEndTime.removeAttribute('disabled'); f.TimSecPlageEndTime.style.backgroundColor = 'white'; } } </script>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de