| Line 1... |
Line 1... |
| 1 |
<%@LANGUAGE="VBSCRIPT"%>
|
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
| 2 |
<%
|
2 |
<%
|
| 3 |
'=====================================================
|
3 |
'=====================================================
|
| 4 |
'| |
|
4 |
'| |
|
| 5 |
'| wSortNode |
|
5 |
'| wSortNode |
|
| 6 |
'| |
|
6 |
'| |
|
| 7 |
'=====================================================
|
7 |
'=====================================================
|
| 8 |
%>
|
8 |
%>
|
| 9 |
<%
|
9 |
<%
|
| 10 |
Option explicit
|
10 |
Option explicit
|
| 11 |
Response.Expires = 0
|
11 |
Response.Expires = 0
|
| 12 |
%>
|
12 |
%>
|
| 13 |
<!--#include file="common/globals.asp"-->
|
13 |
<!--#include file="common/globals.asp"-->
|
| 14 |
<!--#include file="common/config.asp"-->
|
14 |
<!--#include file="common/config.asp"-->
|
| 15 |
<!--#include file="common/common_subs.asp"-->
|
15 |
<!--#include file="common/common_subs.asp"-->
|
| 16 |
<!--#include file="common/_popup_window_common.asp"-->
|
16 |
<!--#include file="common/_popup_window_common.asp"-->
|
| 17 |
<%
|
17 |
<%
|
| 18 |
'------------ ACCESS CONTROL ------------------
|
18 |
'------------ ACCESS CONTROL ------------------
|
| 19 |
%>
|
19 |
%>
|
| 20 |
<!--#include file="_access_control_general.asp"-->
|
20 |
<!--#include file="_access_control_general.asp"-->
|
| 21 |
<%
|
21 |
<%
|
| 22 |
'------------ VARIABLE DEFINITION -------------
|
22 |
'------------ VARIABLE DEFINITION -------------
|
| 23 |
Dim rsQry
|
23 |
Dim rsQry
|
| 24 |
Dim objFormCollector
|
24 |
Dim objFormCollector
|
| 25 |
Dim sMessage
|
25 |
Dim sMessage
|
| 26 |
'------------ CONSTANTS DECLARATION -----------
|
26 |
'------------ CONSTANTS DECLARATION -----------
|
| 27 |
Const LIMG_PRODUCT = "<img src='icons/i_product.gif' width='19' height='19' hspace='2' align='absmiddle'>"
|
27 |
Const LIMG_PRODUCT = "<img src='icons/i_product.gif' width='19' height='19' hspace='2' align='absmiddle'>"
|
| 28 |
Const LIMG_PRODUCT_UNPACKAGED = "<img src='icons/i_product_unpackaged.gif' width='19' height='19' hspace='2' align='absmiddle' title='Product is unofficial'>"
|
28 |
Const LIMG_PRODUCT_UNPACKAGED = "<img src='icons/i_product_unpackaged.gif' width='19' height='19' hspace='2' align='absmiddle' title='Product is unofficial'>"
|
| 29 |
'------------ VARIABLE INIT -------------------
|
29 |
'------------ VARIABLE INIT -------------------
|
| 30 |
sMessage = NULL
|
30 |
sMessage = NULL
|
| 31 |
parBom_id = Request("bom_id")
|
31 |
parBom_id = Request("bom_id")
|
| 32 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
32 |
Set objFormCollector = CreateObject("Scripting.Dictionary")
|
| 33 |
'------------ CONDITIONS ----------------------
|
33 |
'------------ CONDITIONS ----------------------
|
| 34 |
'----------------------------------------------
|
34 |
'----------------------------------------------
|
| 35 |
%>
|
35 |
%>
|
| 36 |
<%
|
36 |
<%
|
| 37 |
'--------------------------------------------------------------------------------------------------------------------------
|
37 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 38 |
Sub SortNode ()
|
38 |
Sub SortNode ()
|
| 39 |
Dim sNodedOrderList
|
39 |
Dim sNodedOrderList
|
| 40 |
|
40 |
|
| 41 |
'-- Check cookie for new soring list
|
41 |
'-- Check cookie for new soring list
|
| 42 |
If Request.Cookies("sort-list") = "" Then Exit Sub
|
42 |
If Request.Cookies("sort-list") = "" Then Exit Sub
|
| 43 |
|
43 |
|
| 44 |
'-- Replace pipe separated values with comma for database use
|
44 |
'-- Replace pipe separated values with comma for database use
|
| 45 |
sNodedOrderList = Replace( Request.Cookies("sort-list") , "|", "," )
|
45 |
sNodedOrderList = Replace( Request.Cookies("sort-list") , "|", "," )
|
| 46 |
|
46 |
|
| 47 |
|
47 |
|
| 48 |
On Error Resume Next
|
48 |
On Error Resume Next
|
| 49 |
|
49 |
|
| 50 |
OraDatabase.Parameters.Add "NODE_ORDER", sNodedOrderList, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
50 |
OraDatabase.Parameters.Add "NODE_ORDER", sNodedOrderList, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
| 51 |
OraDatabase.Parameters.Add "BOM_ID", Request("bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
51 |
OraDatabase.Parameters.Add "BOM_ID", Request("bom_id"), ORAPARM_INPUT, ORATYPE_NUMBER
|
| 52 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
52 |
OraDatabase.Parameters.Add "USER_ID", objAccessControl.UserId, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 53 |
|
53 |
|
| 54 |
|
54 |
|
| 55 |
objEH.TryORA ( OraSession )
|
55 |
objEH.TryORA ( OraSession )
|
| 56 |
|
56 |
|
| 57 |
OraDatabase.ExecuteSQL _
|
57 |
OraDatabase.ExecuteSQL _
|
| 58 |
"BEGIN pk_Network_Node.Sort_Nodes ( :NODE_ORDER, :BOM_ID, :USER_ID ); END;"
|
58 |
"BEGIN pk_Network_Node.Sort_Nodes ( :NODE_ORDER, :BOM_ID, :USER_ID ); END;"
|
| 59 |
|
59 |
|
| 60 |
objEH.CatchORA ( OraSession )
|
60 |
objEH.CatchORA ( OraSession )
|
| 61 |
|
61 |
|
| 62 |
|
62 |
|
| 63 |
OraDatabase.Parameters.Remove "NODE_ORDER"
|
63 |
OraDatabase.Parameters.Remove "NODE_ORDER"
|
| 64 |
OraDatabase.Parameters.Remove "BOM_ID"
|
64 |
OraDatabase.Parameters.Remove "BOM_ID"
|
| 65 |
OraDatabase.Parameters.Remove "USER_ID"
|
65 |
OraDatabase.Parameters.Remove "USER_ID"
|
| 66 |
End Sub
|
66 |
End Sub
|
| 67 |
|
67 |
|
| 68 |
'--------------------------------------------------------------------------------------------------------------------------
|
68 |
'--------------------------------------------------------------------------------------------------------------------------
|
| 69 |
%>
|
69 |
%>
|
| 70 |
<%
|
70 |
<%
|
| 71 |
'------------ RUN BEFORE PAGE RENDER ----------------
|
71 |
'------------ RUN BEFORE PAGE RENDER ----------------
|
| 72 |
'----------------------------------------------------
|
72 |
'----------------------------------------------------
|
| 73 |
|
73 |
|
| 74 |
If CBool(Request("action")) Then
|
74 |
If CBool(Request("action")) Then
|
| 75 |
'-- Sort Nodes
|
75 |
'-- Sort Nodes
|
| 76 |
Call SortNode()
|
76 |
Call SortNode()
|
| 77 |
|
77 |
|
| 78 |
If objEH.Finally Then
|
78 |
If objEH.Finally Then
|
| 79 |
Call OpenInParentWindow ( Request("rfile") &"?SORTED=OK"& objPMod.ComposeURLWithout("rfile") )
|
79 |
Call OpenInParentWindow ( Request("rfile") &"?SORTED=OK"& objPMod.ComposeURLWithout("rfile") )
|
| 80 |
Call CloseWindow()
|
80 |
Call CloseWindow()
|
| 81 |
End If
|
81 |
End If
|
| 82 |
|
82 |
|
| 83 |
End If
|
83 |
End If
|
| 84 |
|
84 |
|
| 85 |
'----------------------------------------------
|
85 |
'----------------------------------------------
|
| 86 |
%>
|
86 |
%>
|
| 87 |
<html>
|
87 |
<html>
|
| 88 |
<head>
|
88 |
<head>
|
| 89 |
<title>Deployment Manager</title>
|
89 |
<title>Deployment Manager</title>
|
| 90 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
90 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
| 91 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
91 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
| 92 |
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
|
92 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 93 |
|
93 |
<link href="scripts/deployment_manager.css" rel="stylesheet" type="text/css">
|
| 94 |
<script language="JavaScript" src="scripts/common.js"></script>
|
94 |
|
| 95 |
|
95 |
<script language="JavaScript" src="scripts/common.js"></script>
|
| 96 |
<!-- Drag and Drop modules +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
96 |
|
| 97 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/core.js"></script>
|
97 |
<!-- Drag and Drop modules +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 98 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/events.js"></script>
|
98 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/core.js"></script>
|
| 99 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/css.js"></script>
|
99 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/events.js"></script>
|
| 100 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/coordinates.js"></script>
|
100 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/css.js"></script>
|
| 101 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/drag.js"></script>
|
101 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/coordinates.js"></script>
|
| 102 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/dragsort.js"></script>
|
102 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/drag.js"></script>
|
| 103 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/cookies.js"></script>
|
103 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/dragsort.js"></script>
|
| 104 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
104 |
<script language="JavaScript" type="text/javascript" src="scripts/dragdrop/tool-man/cookies.js"></script>
|
| 105 |
|
105 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 106 |
<script language="JavaScript" type="text/javascript"><!--
|
106 |
|
| 107 |
var dragsort = ToolMan.dragsort()
|
107 |
<script language="JavaScript" type="text/javascript"><!--
|
| 108 |
var junkdrawer = ToolMan.junkdrawer()
|
108 |
var dragsort = ToolMan.dragsort()
|
| 109 |
|
109 |
var junkdrawer = ToolMan.junkdrawer()
|
| 110 |
window.onload = function() {
|
110 |
|
| 111 |
self.focus();
|
111 |
window.onload = function() {
|
| 112 |
|
112 |
self.focus();
|
| 113 |
dragsort.makeListSortable(document.getElementById("list"),
|
113 |
|
| 114 |
verticalOnly, saveOrder);
|
114 |
dragsort.makeListSortable(document.getElementById("list"),
|
| 115 |
}
|
115 |
verticalOnly, saveOrder);
|
| 116 |
|
116 |
}
|
| 117 |
function verticalOnly(item) {
|
117 |
|
| 118 |
item.toolManDragGroup.verticalOnly()
|
118 |
function verticalOnly(item) {
|
| 119 |
}
|
119 |
item.toolManDragGroup.verticalOnly()
|
| 120 |
|
120 |
}
|
| 121 |
function saveOrder(item) {
|
121 |
|
| 122 |
var group = item.toolManDragGroup
|
122 |
function saveOrder(item) {
|
| 123 |
var list = group.element.parentNode
|
123 |
var group = item.toolManDragGroup
|
| 124 |
var id = list.getAttribute("id")
|
124 |
var list = group.element.parentNode
|
| 125 |
if (id == null) return
|
125 |
var id = list.getAttribute("id")
|
| 126 |
group.register('dragend', function() {
|
126 |
if (id == null) return
|
| 127 |
ToolMan.cookies().set("sort-" + id,
|
127 |
group.register('dragend', function() {
|
| 128 |
junkdrawer.serializeList(list), 365)
|
128 |
ToolMan.cookies().set("sort-" + id,
|
| 129 |
})
|
129 |
junkdrawer.serializeList(list), 365)
|
| 130 |
}
|
130 |
})
|
| 131 |
|
131 |
}
|
| 132 |
//-->
|
132 |
|
| 133 |
</script>
|
133 |
//-->
|
| 134 |
</head>
|
134 |
</script>
|
| 135 |
|
135 |
</head>
|
| 136 |
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0">
|
136 |
|
| 137 |
|
137 |
<body background="images/bg_bage_0.gif" leftmargin="0" topmargin="0">
|
| 138 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
138 |
|
| 139 |
<tr>
|
139 |
<table width="100%" border="0" cellspacing="0" cellpadding="10">
|
| 140 |
<td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> Sort Nodes </span> <br>
|
140 |
<tr>
|
| 141 |
Drag Nodes to Sort and then click Submit.
|
141 |
<td bgcolor="#FFFFFF" class="body_txt"><span class="body_h1"><img src="icons/i_linkarrow_black.gif" width="11" height="11" align="absmiddle"> Sort Nodes </span> <br>
|
| 142 |
</td>
|
142 |
Drag Nodes to Sort and then click Submit.
|
| 143 |
</tr>
|
143 |
</td>
|
| 144 |
<%
|
144 |
</tr>
|
| 145 |
'-- FROM START --------------------------------------------------------------------------------------------------------------
|
145 |
<%
|
| 146 |
objFormComponent.FormName = "FormName"
|
146 |
'-- FROM START --------------------------------------------------------------------------------------------------------------
|
| 147 |
objFormComponent.Action = SCRIPT_NAME
|
147 |
objFormComponent.FormName = "FormName"
|
| 148 |
objFormComponent.OnSubmit = "ShowProgress();"
|
148 |
objFormComponent.Action = SCRIPT_NAME
|
| 149 |
Call objFormComponent.FormStart()
|
149 |
objFormComponent.OnSubmit = "ShowProgress();"
|
| 150 |
%>
|
150 |
Call objFormComponent.FormStart()
|
| 151 |
<tr>
|
151 |
%>
|
| 152 |
<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
152 |
<tr>
|
| 153 |
<tr>
|
153 |
<td background="images/bg_login.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 154 |
<td><%=ProgressBar()%></td>
|
154 |
<tr>
|
| 155 |
<td align="right">
|
155 |
<td><%=ProgressBar()%></td>
|
| 156 |
<input name="btn" type="submit" class="form_btn" value="Submit">
|
156 |
<td align="right">
|
| 157 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td></tr>
|
157 |
<input name="btn" type="submit" class="form_btn" value="Submit">
|
| 158 |
</table></td>
|
158 |
<input name="btn" type="reset" class="form_btn" value="Cancel" onClick="self.close();"></td></tr>
|
| 159 |
</tr>
|
159 |
</table></td>
|
| 160 |
<tr>
|
160 |
</tr>
|
| 161 |
<td>
|
161 |
<tr>
|
| 162 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
162 |
<td>
|
| 163 |
<!--#include file="messages/_msg_inline.asp"-->
|
163 |
<!-- MESSAGE +++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 164 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
164 |
<!--#include file="messages/_msg_inline.asp"-->
|
| 165 |
<!-- SORT PRODUCT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
165 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 166 |
<ul id="list" class="boxy">
|
166 |
<!-- SORT PRODUCT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 167 |
<%
|
167 |
<ul id="list" class="boxy">
|
| 168 |
OraDatabase.Parameters.Add "BOM_ID", parBom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
168 |
<%
|
| 169 |
|
169 |
OraDatabase.Parameters.Add "BOM_ID", parBom_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
| 170 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("NodeList.sql"), ORADYN_DEFAULT )
|
170 |
|
| 171 |
|
171 |
Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("NodeList.sql"), ORADYN_DEFAULT )
|
| 172 |
OraDatabase.Parameters.Remove "BOM_ID"
|
172 |
|
| 173 |
|
173 |
OraDatabase.Parameters.Remove "BOM_ID"
|
| 174 |
|
174 |
|
| 175 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
175 |
|
| 176 |
%>
|
176 |
While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
|
| 177 |
|
177 |
%>
|
| 178 |
<li id="<%=rsQry("node_id")%>"><img src="icons/<%=rsQry("node_icon")%>" border="0" hspace="2"><%=rsQry("node_name")%></li>
|
178 |
|
| 179 |
|
179 |
<li id="<%=rsQry("node_id")%>"><img src="icons/<%=rsQry("node_icon")%>" border="0" hspace="2"><%=rsQry("node_name")%></li>
|
| 180 |
<%rsQry.MoveNext%>
|
180 |
|
| 181 |
<%
|
181 |
<%rsQry.MoveNext%>
|
| 182 |
WEnd
|
182 |
<%
|
| 183 |
|
183 |
WEnd
|
| 184 |
rsQry.Close()
|
184 |
|
| 185 |
Set rsQry = Nothing
|
185 |
rsQry.Close()
|
| 186 |
%>
|
186 |
Set rsQry = Nothing
|
| 187 |
</ul>
|
187 |
%>
|
| 188 |
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
188 |
</ul>
|
| 189 |
</td>
|
189 |
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
| 190 |
</tr>
|
190 |
</td>
|
| 191 |
<%=objPMod.ComposeHiddenTags()%>
|
191 |
</tr>
|
| 192 |
<input type="hidden" name="action" value="true">
|
192 |
<%=objPMod.ComposeHiddenTags()%>
|
| 193 |
<%
|
193 |
<input type="hidden" name="action" value="true">
|
| 194 |
Call objFormComponent.FormEnd()
|
194 |
<%
|
| 195 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
195 |
Call objFormComponent.FormEnd()
|
| 196 |
%>
|
196 |
'-- FROM END ----------------------------------------------------------------------------------------------------------------
|
| 197 |
</table>
|
197 |
%>
|
| 198 |
|
198 |
</table>
|
| 199 |
</body>
|
199 |
|
| 200 |
</html>
|
200 |
</body>
|
| 201 |
<%
|
201 |
</html>
|
| 202 |
'------------ RUN AFTER PAGE RENDER -----------
|
202 |
<%
|
| 203 |
Set objFormCollector = Nothing
|
203 |
'------------ RUN AFTER PAGE RENDER -----------
|
| 204 |
'----------------------------------------------
|
204 |
Set objFormCollector = Nothing
|
| 205 |
%><!--#include file="common/globals_destructor.asp"-->
|
205 |
'----------------------------------------------
|
| - |
|
206 |
%><!--#include file="common/globals_destructor.asp"-->
|