Edit C:\galaxie\deploy\Tomcat6\webapps\galaxie\admin\workflow\graph_initializer.jsp
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% /****************************************************************************** * 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" contentType="text/html; charset=UTF-8"%> <%@ 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="java.util.Date" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Hashtable" %> <%@ page import="java.util.LinkedHashMap" %> <%@ page import="java.util.Iterator" %> <%@ page import="java.util.Map" %> <%@ page import="java.util.Calendar" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.ActorBean" %> <%@ page import="com.edeal.frontline.FieldBean"%> <%@ page import="com.edeal.frontline.ObjectsBean"%> <jsp:useBean class="com.edeal.frontline.FieldBean" id="Field" 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(); String width = "750"; String obj = flRequest.getRequestParameterOrAttribute("obj"); ObjectsBean objBean = new ObjectsBean(obj, context); String objSqlName = ""; try{ objSqlName = objBean.getObjSql(); }catch(FieldNotInitializedException e){ objSqlName = ""; } String node =""; Vector<Hashtable> fldsVector = (Vector<Hashtable>)flRequest.getAttribute("refFldsVector"); %> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/checkFields.jsp"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/utils.js"></script> <script src="<fl:webapp/>/js/json-rpc/jsonrpc.js"></script> <script type="text/javascript" language="javascript" src="<fl:webapp/>/js/edeal/libraries/json.org/json2/json2.js"></script> <link rel="stylesheet" type="text/css" href="<fl:webapp/>/css/common_css.jsp"> <style type="text/css"> .button { border-style: solid; border-width: 1px; border-color: rgb(132, 166, 174); font-weight: bold; font-size: 11px; padding: 3px; } .popup-div { /*width: 800px;*/ } .popup-header { height : 25px; } .popup-title { float : left; font-family : Arial,Verdana,sans-serif; font-size : 12px; color : #000000; font-weight : bold; padding-left: 4px; padding-right: 4px; padding-top : 2px; vertical-align: middle; letter-spacing: 1px; } .popup-header .close-link { float : right; } .popup-body { height: 100%; margin-right:210px; } .popup-content { height: 99%; margin-top: 5px; margin-bottom: 5px; } </style> <script type="text/javascript" language="javascript"> function doClosePopUp(){ $.closePopupLayer('GraphPopup'); } var jsonService = new JsonRpc.ServiceProxy("<fl:webapp/>/workflowjsonrpc", { asynchronous: true, methods: ['wkf.initializeWorkflow'] }); //access it asynchronously JsonRpc.setAsynchronous(jsonService, true); var json; var jsonActions = $.parseJSON("[]"); var jsonField = $.parseJSON("{}"); var jsonStates = $.parseJSON("[]"); var jsonTransitions = $.parseJSON("[]"); function addTransition(){ id = $('#fromState').val()+$('#label').val()+$('#toState').val(); jsonStringValue = "{\"id\":\""+id+"\",\"fromState\":\""+$('#fromState').val()+"\",\"toState\":\""+$('#toState').val()+"\",\"label\":\""+$('#label').val()+"\",\"labelCode\":\"Fxxx\"}"; jsonValue = $.parseJSON(jsonStringValue); jsonTransitions[jsonTransitions.length] = jsonValue; $('#new_transition').append("<div id=\""+id+"\"><p><a href=\"#\" onclick=\"removeTransition('#"+id+"');$('#"+id+"').hide();\"><img src=\"<fl:webapp/>/icons/ico/supprimer.gif\" style=\"vertical-align:middle\"/></a> "+$('#fromState').val()+" <img src=\"<fl:webapp/>/icons/arrow-long.gif\" style=\"vertical-align:middle\"/> "+$('#label').val()+" <img src=\"<fl:webapp/>/icons/arrow-right-long.gif\" style=\"vertical-align:middle\"/> "+$('#toState').val()+"</p></div>"); } function removeTransition(i){ delete jsonTransitions[i]; } function addState(){ //{"fieldsValue":[{"field":{"name":"SolStsID","fieldValue":"WAITING"}}],"id":"WAITING"} id = $('#newState').val(); jsonStringValue = "{\"fieldsValue\":[{\"field\":{\"name\":\""+$('#FldSql').val()+"\",\"fieldValue\":\""+$('#newState').val()+"\"}}],\"id\":\""+id+"\"}"; jsonValue = $.parseJSON(jsonStringValue); jsonStates[jsonStates.length] = jsonValue; $('#new_status').append("<div id=\""+$('#newState').val()+"\"><p><a href=\"#\" onclick=\"removeState('#"+id+"');$('#"+id+"').hide();\"><img src=\"<fl:webapp/>/icons/ico/supprimer.gif\" style=\"vertical-align:middle\"/></a> "+$('#newState').val()+"</p></div>"); $('#fromState').append( $('<option></option>').val($('#newState').val()).html($('#newState').val()) ); $('#toState').append( $('<option></option>').val($('#newState').val()).html($('#newState').val()) ); } function removeState(id){ delete jsonState[id]; } function getListOfState(){ $.getJSON('<fl:webapp/>/workflow_initializer_list_of_status.fl?FldSql='+$('#FldSql').val(), function(data) { $('#newState').html($('<option></option>').val('').html('')); $.each(data.refCodes, function(i, item) { $('#newState').append( $('<option></option>').val(item.code).html(item.disp+' ('+item.code+')') ); }); }); } function addAction(name){ //{"value":"read_solicitation","type":"display"} jsonStringValue = "{\"value\":\""+$("#"+name+"_action").val()+"\",\"type\":\""+name+"\"}"; jsonValue = $.parseJSON(jsonStringValue); jsonActions[jsonActions.length] = jsonValue; } function initializeWorkflow(){ addAction("display"); addAction("edit"); addAction("save"); jsonService.wkf.initializeWorkflow({ params:[$("#context-variable").val(), JSON.stringify(jsonActions), $("#FldSql").val(), JSON.stringify(jsonStates), JSON.stringify(jsonTransitions)], onSuccess: function(result) { submitAndRefresh(1); doClosePopUp(); }, onException: function(e) { alert("Unable to compute because: " + e); return true; } }); } </script> <table cellspacing="0" border="0"> <tr class="tooltip" height="10px"> <td class="corner" id="topleft" width="19px"><img src="<fl:webapp/>/icons/tooltip/bubble-1.png"/></td> <td class="top" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-2.png'); align: center"></td> <td class="corner" id="topright"><img src="<fl:webapp/>/icons/tooltip/bubble-3.png"/></td> </tr> <tr class="tooltip"> <td class="left" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-4.png');"></td> <td style="vertical-align: top;"> <table class="data_column, innerPopup" cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td nowrap="nowrap"> <div class="popup-div"> <div class="popup-content"> <table cellspacing="0" cellpadding="0" border="0" style="width: 500px; height: 200px"> <tr style="height: 43px;"> <td><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="98%" valign="top" colspan="3"> <table cellpadding="0" class="container" id="BTabs"> <tr> <td style="text-align: right; width: 15px;"><img style="width: 15px; height: 43px;" src="<fl:webapp/>/icons/nav/principal_onglet/ong_blanc_pos_1.gif"></td> <td class="ongletblanc"> <fl:getMessage code="LXXX" alt="Initialisation"/> </td> <td class="actif-fin"></td> <td style="width: 90%; text-align: right; background: url("<fl:webapp/>/icons/nav/principal_onglet/fd_cell.gif") repeat scroll 0% 0% transparent;" class="tabRightSpace"></td> <td class="finTab"> </td> </tr> </table> </td> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> </tr> <tr style="height: 100%;"> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="15" background="<fl:webapp/>/icons/nav/principal_cadre/fd_cell_g.gif"><img width="15" height="42" src="<fl:webapp/>/icons/spacer.gif"></td> <td valign="top"> <table class="container" cellspacing="0" cellpadding="0" border="0"> <tr style="height: 100%;"> <td valign="top"> <div id="content_place" style="width: 550px;height:auto;overflow: hidden; text-align: left; white-space: nowrap;"> <table class="container" cellpadding="0"> <tr class="fieldLine"> <td class="dataLabel">context-variable</td> <td class="dataValue"> <input id="context-variable" name="context-variable" type="text" value=""/> </td> </tr> <tr> <td colspan="2"> <fieldset> <legend align=top>Actions</legend> <table class="container" cellpadding="0"> <tr class="fieldLine"> <td class="dataLabel">Display</td> <td class="dataValue"> <input id="display_action" name="display_action" type="text" value="read_<%=objSqlName.toLowerCase() %>"/> </td> </tr> <tr class="fieldLine"> <td class="dataLabel">Edit</td> <td class="dataValue"> <input id="edit_action" name="edit_action" type="text" value="edit_<%=objSqlName.toLowerCase() %>"/> </td> </tr> <tr class="fieldLine"> <td class="dataLabel">Save</td> <td class="dataValue"> <input id="save_action" name="save_action" type="text" value="save_<%=objSqlName.toLowerCase() %>"/> </td> </tr> </table> </fieldset> </td> </tr> <tr> <td colspan="2"> <fieldset> <legend align=top>Statuts</legend> <table class="container" cellpadding="0"> <tr class="fieldLine"> <td class="dataLabel">Champ</td> <td class="dataValue"> <div class="input select"> <select id="FldSql" name="FldSql" onchange="getListOfState();"> <option selected="selected" value=""></option> <%for(Hashtable<String,String> fld : fldsVector){ %> <option value="<%=fld.get("FldSql") %>"><%=fld.get("FldDisplay") %></option> <%} %> </select> <select id="newState" name="newState"> <option selected="selected" value=""></option> </select> <a href="#" onclick="addState();"><img src="<fl:webapp/>/icons/add.png"/></a> </div> </td> </tr> <tr class="fieldLine" valign="top"> <td class="dataLabel" valign="top">Status</td> <td class="dataValue"> <div id="new_status"></div> </td> </tr> </table> </fieldset> </td> </tr> <tr> <td colspan="2"> <fieldset> <legend align=top>Transitions</legend> <table class="container" cellpadding="0"> <tr class="fieldLine"> <td colspan="2"> <div id="new_transition"></div> </td> </tr> <tr class="fieldLine"> <td colspan="2"> <p> <a href="#" onclick="addTransition();"><img src="<fl:webapp/>/icons/add.png"/></a> <select id="fromState" name="fromState"> <option selected="selected" value=""></option> </select> <input id="label" name="label" type="text" value="<label>"/> <select id="toState" name="toState"> <option selected="selected" value=""></option> </select> </p> </td> </tr> </table> </fieldset> </td> </tr> </table> </div> </td> </tr> </table> </td> <td width="15" background="<fl:webapp/>/icons/nav/principal_cadre/fd_cell_d.gif"><img width="15" height="42" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> </tr> <tr style="height: 15px;"> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="15"><img width="15" height="15" src="<fl:webapp/>/icons/nav/principal_cadre/cell_bas_g.gif"></td> <td width="98%" background="<fl:webapp/>/icons/nav/principal_cadre/fd_cell_bas_m.gif"><img width="15" height="15" src="<fl:webapp/>/icons/spacer.gif"></td> <td width="15"><img width="15" height="15" src="<fl:webapp/>/icons/nav/principal_cadre/cell_bas_d.gif"></td> <td width="10"><img width="10" height="10" src="<fl:webapp/>/icons/spacer.gif"></td> </tr> <tr style="height: 20px;"> <td colspan="5" style="text-align: center;"> <div id="popup_closer"> <a href="javascript:initializeWorkflow()"><img src="<fl:webapp/>/icons/ico/valid_green_long.gif"></a> <a title="<fl:getMessage code="A3035" alt="Fermer"/>" href="javascript:doClosePopUp();"><img src="<fl:webapp/>/icons/ico/fermer_red_long.gif" /></a> </div> </td> </tr> </table> </div> </div> </td> </tr> </table> </td> <td class="right" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-5.png')" width="19px"></td> </tr> <tr class="tooltip"> <td class="corner" id="bottomleft" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-6.png')" ></td> <td class="bottom" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-7.png')" width="30" height="20"></td> <td class="corner" id="bottomright" style="background-image:url('<fl:webapp/>/icons/tooltip/bubble-8.png')"></td> </tr> </table>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de