<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="workflowdetailjsmanager.aspx.cs" Inherits="Us.Web.Extend.admin.workflow.workflowdetailjsmanager" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <title>工作流流程绘制</title>

    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />
    <%=ImportScriptStr %>
    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>

    
<!--[if lt IE 9]>
<?import namespace="v" implementation="#default#VML" ?>
<![endif]-->
<!--<link rel="stylesheet" type="text/css" href="codebase/GooFlow2.css"/>-->
<link rel="stylesheet" type="text/css" href="careffFlow/GooFlow/codebase/GooFlow.css"/>
<script type="text/javascript" src="careffFlow/jquery.min.js"></script>
<script type="text/javascript" src="careffFlow/GooFunc.js"></script>
<script type="text/javascript" src="careffFlow/json2.js"></script>
<link rel="stylesheet" type="text/css" href="careffFlow/default.css"/>
<script type="text/javascript" src="careffFlow/GooFlow/codebase/GooFlow.js"></script>
<script type="text/javascript">
    var property = {
        width: 770,
        height: 400,
        toolBtns: ["start", "end", "task", "node", "chat", "state", "plug", "join", "fork", "complex mix"],
        haveHead: true,
        headBtns: ["new", "open", "save", "undo", "redo", "reload"],//如果haveHead=true，则定义HEAD区的按钮
        haveTool: true,
        haveGroup: true,
        useOperStack: true,
        isEdit: true
    };
    var remark = {
        cursor: "选择指针",
        direct: "转换连线",
        start: "开始结点",
        "end round": "结束结点",
        "task round": "任务结点",
        node: "自动结点",
        chat: "决策结点",
        state: "状态结点",
        plug: "附加插件",
        fork: "分支结点",
        "join": "联合结点",
        "complex mix": "复合结点",
        group: "组织划分框编辑开关"
    };
    var demo;
    $(document).ready(function () {
        demo = $.createGooFlow($("#demo"), property);
        demo.setNodeRemarks(remark);
        Import();
        
    });
    var out;
    function Export() {
        document.getElementById("txtResult").value = JSON.stringify(demo.exportData());
    }
    function Import() {
        var s = document.getElementById("txtResult").value;
        var jsondata = strToJson(s);
        //alert(jsondata);
        demo.loadData(jsondata);
    }

    function strToJson(str) {
        var json = eval('(' + str + ')');
        return json;
    }
</script>

</head>
<body onload="win_onLoad();">
    <form id="form1" runat="server">

        <div id="tbMain">
            <div class="divTbg">
                <div class="divTbgL">
                </div>
                <div class="divTbgInfo">
                    <div class="divTbgTitle">
                        工作流流程绘制管理
                    </div>
                </div>
            </div>
            <div class="divTbgF">
            </div>
            <div class="divTNavBG" id="topURL">
                <ul id="topURLul">
                    <li class="divURLed" id="div1">
                        <div>
                            <img src="../style/default/images/mini_icons_046.gif" width="10" height="10" />
                            基本信息
                        </div>
                    </li>
                </ul>
            </div>
            <div id="mypanel">
                <div class="divInfoContext">
                    <div class="divInfo">
                        <div class="divInfoblack">
                            <div class="divInfoTopList">
                                <div class="listLeft">
                                    <div class="navtitle">
                                        工作流流程绘制
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="divInfo">
                        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="mainlist" onmouseover="changeto()" onmouseout="changeback()">
                            <tr class="tablisttr">
                                <td class="tablisttitle">工作流编号<span class="fStar">*</span></td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtFlowID" runat="server" ToolTip="工作流编号" Text="" CssClass="1" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class="tablisttitle">工作流名称</td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtFlowName" runat="server" ToolTip="工作流编号" Text="" CssClass="1" ReadOnly="True"></asp:TextBox>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tabmanagertr" colspan="4"><div id="demo" style="margin:5px"></div></td>
                            </tr>
                            <tr class="tablisttr">
                                
                               <td class="tabmanagertr" colspan="4"><input id="exportdata" type="button" value='生成代码' onclick="Export()"  class="SkyButtonFocus"/>
                                    生成代码负责把工作流页面的数据生成代码显示到文本框内；
                                    <asp:TextBox ID="txtResult" runat="server"  TextMode="MultiLine" Width="98%" Height="30px" ToolTip="工作流代码"  CssClass="1"></asp:TextBox>
                                    
                                    <input id="importdata" type="button" value='加载代码' onclick="Import()" class="SkyButtonFocus"/>
                                    加载代码负责把代码文本框的内容加载到工作流页面；<br />
                                <asp:Button ID="btnCreate" runat="server" Text="生成代码" CssClass="SkyButtonFocus" OnClick="btnCreate_Click"  />
                                    生成代码负责从数据库读出数据并显示标准的流程代码以方便您后期进行编辑；
                                </td>
                            </tr>
                        </table>




                        <div class="divSave">
                            <asp:Button ID="btnSubmit" runat="server" Text="保存(S)"
                                CssClass="SkyButtonFocus" OnClick="btnSubmit_Click" />
                            <asp:Button ID="btnExit" runat="server" Text="取消(C)" CssClass="SkyButtonFocus"
                                OnClick="btnSubmit_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </form>
</body>
</html>
