-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathdemo4.html
160 lines (140 loc) · 5.99 KB
/
demo4.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css"
href="lib/jquery-ui-1.8.4.custom/css/smoothness/jquery-ui-1.8.4.custom.css"
rel="stylesheet" />
<script type="text/javascript" src="lib/raphael.js"></script>
<script type="text/javascript"
src="lib/jquery-ui-1.8.4.custom/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript"
src="lib/jquery-ui-1.8.4.custom/js/jquery-ui-1.8.4.custom.min.js"></script>
<script type="text/javascript" src="myflow.js"></script>
<script type="text/javascript" src="myflow.jpdl4.js"></script>
<script type="text/javascript" src="myflow.editors.js"></script>
<script type="text/javascript">
$(function() {
$('#myflow')
.myflow(
{
basePath : "",
restore : eval("({states:{rect1:{type:'start',text:{text:'开始'}, attr:{ x:507, y:63, width:50, height:50}, props:{text:{value:'开始'},temp1:{value:''},temp2:{value:''}}},rect2:{type:'state',text:{text:'状态2'}, attr:{ x:489, y:286, width:100, height:50}, props:{text:{value:'状态2'},temp1:{value:''},temp2:{value:''}}},rect3:{type:'task',text:{text:'任务1'}, attr:{ x:311, y:284, width:100, height:50}, props:{text:{value:'任务1'},assignee:{value:''},form:{value:''},desc:{value:''},temp1:{value:''},temp2:{value:''}}},rect4:{type:'task',text:{text:'任务3'}, attr:{ x:675, y:287, width:100, height:50}, props:{text:{value:'任务3'},assignee:{value:''},form:{value:''},desc:{value:''},temp1:{value:''},temp2:{value:''}}},rect5:{type:'fork',text:{text:'分支'}, attr:{ x:509, y:176, width:50, height:50}, props:{text:{value:'分支'},temp1:{value:''},temp2:{value:''}}},rect6:{type:'join',text:{text:'合并'}, attr:{ x:517, y:398, width:50, height:50}, props:{text:{value:'合并'},temp1:{value:''},temp2:{value:''}}},rect7:{type:'end',text:{text:'结束'}, attr:{ x:519, y:517, width:50, height:50}, props:{text:{value:'结束'},temp1:{value:''},temp2:{value:''}}}},paths:{path8:{from:'rect1',to:'rect5', dots:[],text:{text:'TO 分支',textPos:{x:55,y:-8}}, props:{text:{value:'TO 分支'}}},path9:{from:'rect5',to:'rect2', dots:[],text:{text:'TO 状态2',textPos:{x:28,y:-4}}, props:{text:{value:'TO 状态2'}}},path10:{from:'rect2',to:'rect6', dots:[],text:{text:'TO 合并',textPos:{x:25,y:-10}}, props:{text:{value:'TO 合并'}}},path11:{from:'rect6',to:'rect7', dots:[],text:{text:'TO 结束',textPos:{x:31,y:-10}}, props:{text:{value:''}}},path12:{from:'rect5',to:'rect3', dots:[],text:{text:'TO 任务1',textPos:{x:-21,y:-10}}, props:{text:{value:'TO 任务1'}}},path13:{from:'rect3',to:'rect6', dots:[],text:{text:'TO 合并',textPos:{x:-34,y:21}}, props:{text:{value:'TO 合并'}}},path14:{from:'rect5',to:'rect4', dots:[],text:{text:'TO 任务3',textPos:{x:55,y:-17}}, props:{text:{value:'TO 任务3'}}},path15:{from:'rect4',to:'rect6', dots:[],text:{text:'TO 合并',textPos:{x:30,y:18}}, props:{text:{value:'TO 合并'}}}},props:{props:{name:{value:'新建流程'},key:{value:''},desc:{value:''}}}})"),
tools : {
save : {
onclick : function(data) {
alert('save:\n' + data);
}
}
}
});
});
</script>
<style type="text/css">
body {
margin: 0;
pading: 0;
text-align: left;
font-family: Arial, sans-serif, Helvetica, Tahoma;
font-size: 12px;
line-height: 1.5;
color: black;
background-image: url(img/bg.png);
}
.node {
width: 70px;
text-align: center;
vertical-align: middle;
border: 1px solid #fff;
}
.mover {
border: 1px solid #ddd;
background-color: #ddd;
}
.selected {
background-color: #ddd;
}
.state {
}
#myflow_props table {
}
#myflow_props th {
letter-spacing: 2px;
text-align: left;
padding: 6px;
background: #ddd;
}
#myflow_props td {
background: #fff;
padding: 6px;
}
#pointer {
background-repeat: no-repeat;
background-position: center;
}
#path {
background-repeat: no-repeat;
background-position: center;
}
#task {
background-repeat: no-repeat;
background-position: center;
}
#state {
background-repeat: no-repeat;
background-position: center;
}
</style>
</head>
<body>
<div id="myflow_tools"
style="position: absolute; top: 10; left: 10; background-color: #fff; width: 70px; cursor: default; padding: 3px;"
class="ui-widget-content">
<div id="myflow_tools_handle" style="text-align: center;"
class="ui-widget-header">工具集</div>
<div class="node" id="myflow_save"><img src="img/save.gif" /> 保存</div>
<div>
<hr />
</div>
<div class="node selectable" id="pointer"><img
src="img/select16.gif" /> 选择</div>
<div class="node selectable" id="path"><img
src="img/16/flow_sequence.png" /> 转换</div>
<div>
<hr />
</div>
<div class="node state" id="start" type="start"><img
src="img/16/start_event_empty.png" /> 开始</div>
<div class="node state" id="state" type="state"><img
src="img/16/task_empty.png" /> 状态</div>
<div class="node state" id="task" type="task"><img
src="img/16/task_empty.png" /> 任务</div>
<div class="node state" id="fork" type="fork"><img
src="img/16/gateway_parallel.png" /> 分支</div>
<div class="node state" id="join" type="join"><img
src="img/16/gateway_parallel.png" /> 合并</div>
<div class="node state" id="end" type="end"><img
src="img/16/end_event_terminate.png" /> 结束</div>
<div class="node state" id="end-cancel" type="end-cancel"><img
src="img/16/end_event_cancel.png" /> 取消</div>
<div class="node state" id="end-error" type="end-error"><img
src="img/16/end_event_error.png" /> 错误</div>
</div>
<div id="myflow_props"
style="position: absolute; top: 30; right: 50; background-color: #fff; width: 220px; padding: 3px;"
class="ui-widget-content">
<div id="myflow_props_handle" class="ui-widget-header">属性</div>
<table border="1" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td>aaa</td>
</tr>
<tr>
<td>aaa</td>
</tr>
</table>
<div> </div>
</div>
<div id="myflow"></div>
</body>
</html>