| Line -... |
Line 1... |
| - |
|
1 |
<!-- #INCLUDE FILE="..\notes\bugs\adovbs.inc" -->
|
| 1 |
<%
|
2 |
<%
|
| 2 |
'=============================================================
|
3 |
'=============================================================
|
| 3 |
'//
|
4 |
'//
|
| 4 |
'// Action Button Control
|
5 |
'// Action Button Control
|
| 5 |
'//
|
6 |
'//
|
| 6 |
'// version: 2.0
|
- |
|
| 7 |
'// last modified: 27-Jun-2005 10:49 by Sasha Vukovic
|
- |
|
| 8 |
'=============================================================
|
7 |
'=============================================================
|
| 9 |
%>
|
8 |
%>
|
| 10 |
<%
|
9 |
<%
|
| 11 |
'--------------- Global Constants ----------------
|
10 |
'--------------- Global Constants ----------------
|
| 12 |
Const enumABTNCTRL_ON_READONLY_HIDE = 1
|
11 |
Const enumABTNCTRL_ON_READONLY_HIDE = 1
|
| 13 |
Const enumABTNCTRL_ON_READONLY_DISABLE = 2
|
12 |
Const enumABTNCTRL_ON_READONLY_DISABLE = 2
|
| 14 |
'-------------------------------------------------
|
13 |
'-------------------------------------------------
|
| 15 |
|
14 |
|
| 16 |
Class ActionButtonControl
|
15 |
Class ActionButtonControl
|
| 17 |
|
16 |
|
| 18 |
Private mArrAbtnDef()
|
17 |
Private mArrAbtnDef()
|
| 19 |
Private mobjNameDefMap ' Item can be accesed by name. Must be unique within one page
|
18 |
Private mobjNameDefMap ' Item can be accesed by name. Must be unique within one page
|
| 20 |
Private mobjIdDefMap ' Item can be accesed by id. Must be unique within one page. If NULL, ubound is assigned to it
|
19 |
Private mobjIdDefMap ' Item can be accesed by id. Must be unique within one page. If NULL, ubound is assigned to it
|
| 21 |
Private mobjSeparator ' Has a name of item after separator is applied
|
20 |
Private mobjSeparator ' Has a name of item after separator is applied
|
| 22 |
Private mobjACActionsMap ' Map of buttons to actions from access control
|
21 |
Private mobjACActionsMap ' Map of buttons to actions from access control
|
| 23 |
|
22 |
|
| 24 |
Private mnButtonSpacer
|
23 |
Private mnButtonSpacer
|
| 25 |
Private mnImageHspace
|
24 |
Private mnImageHspace
|
| 26 |
|
25 |
|
| 27 |
Private mNumOfProperties
|
26 |
Private mNumOfProperties
|
| 28 |
Private mLastPropertyInx
|
27 |
Private mLastPropertyInx
|
| 29 |
|
28 |
|
| 30 |
Private mbDisableAll
|
29 |
Private mbDisableAll
|
| 31 |
|
30 |
|
| 32 |
Private mbIsReadonly
|
31 |
Private mbIsReadonly
|
| 33 |
Private mReadonlyActionBehaviour
|
32 |
Private mReadonlyActionBehaviour
|
| 34 |
|
33 |
|
| 35 |
Private InxID
|
34 |
Private InxID
|
| 36 |
Private InxName
|
35 |
Private InxName
|
| 37 |
Private InxTxt
|
36 |
Private InxTxt
|
| 38 |
Private InxLink
|
37 |
Private InxLink
|
| 39 |
Private InxEventHandler
|
38 |
Private InxEventHandler
|
| 40 |
Private InxImg
|
39 |
Private InxImg
|
| 41 |
Private InxImgOff
|
40 |
Private InxImgOff
|
| 42 |
Private InxHint
|
41 |
Private InxHint
|
| 43 |
Private InxVisible
|
42 |
Private InxVisible
|
| 44 |
Private InxActive
|
43 |
Private InxActive
|
| 45 |
Private InxIsReadonlyAction
|
44 |
Private InxIsReadonlyAction
|
| 46 |
|
45 |
|
| 47 |
|
46 |
|
| 48 |
|
47 |
Public Property Let AllActive ( cActive )
|
| 49 |
|
48 |
If cActive = enumDB_NO Then
|
| 50 |
Public Property Let AllActive ( cActive )
|
49 |
mbDisableAll = TRUE
|
| 51 |
If cActive = enumDB_NO Then
|
50 |
Else
|
| 52 |
mbDisableAll = TRUE
|
51 |
mbDisableAll = FALSE
|
| 53 |
Else
|
52 |
End If
|
| 54 |
mbDisableAll = FALSE
|
53 |
|
| 55 |
End If
|
54 |
End Property
|
| 56 |
|
55 |
|
| 57 |
End Property
|
56 |
Public Property Let ButtonSpacer ( nWidth )
|
| 58 |
|
57 |
mnButtonSpacer = nWidth
|
| 59 |
Public Property Let ButtonSpacer ( nWidth )
|
58 |
End Property
|
| 60 |
mnButtonSpacer = nWidth
|
59 |
|
| 61 |
End Property
|
60 |
Public Property Let ImageHspace ( nWidth )
|
| 62 |
|
61 |
mnImageHspace = nWidth
|
| 63 |
Public Property Let ImageHspace ( nWidth )
|
62 |
End Property
|
| 64 |
mnImageHspace = nWidth
|
63 |
|
| 65 |
End Property
|
64 |
Public Property Let IsReadonlyAction ( IsReadonly )
|
| 66 |
|
65 |
If IsReadonly = enumDB_YES Then
|
| 67 |
Public Property Let IsReadonlyAction ( IsReadonly )
|
66 |
mbIsReadonly = TRUE
|
| 68 |
If IsReadonly = enumDB_YES Then
|
67 |
|
| 69 |
mbIsReadonly = TRUE
|
68 |
ElseIf IsReadonly = enumDB_NO Then
|
| 70 |
|
69 |
mbIsReadonly = FALSE
|
| 71 |
ElseIf IsReadonly = enumDB_NO Then
|
70 |
Else
|
| 72 |
mbIsReadonly = FALSE
|
71 |
mbIsReadonly = IsReadonly
|
| 73 |
Else
|
72 |
|
| 74 |
mbIsReadonly = IsReadonly
|
73 |
End If
|
| 75 |
|
74 |
|
| 76 |
End If
|
75 |
End Property
|
| 77 |
|
76 |
|
| 78 |
End Property
|
77 |
Public Property Let ReadonlyActionBehaviour ( nEnum )
|
| 79 |
|
78 |
mReadonlyActionBehaviour = nEnum
|
| 80 |
Public Property Let ReadonlyActionBehaviour ( nEnum )
|
79 |
End Property
|
| 81 |
mReadonlyActionBehaviour = nEnum
|
80 |
|
| 82 |
End Property
|
81 |
'-----------------------------------------------------------------------------------------------------------------
|
| 83 |
|
82 |
Public Sub SetRelationship ( sButtonName, sActionName )
|
| 84 |
'-----------------------------------------------------------------------------------------------------------------
|
83 |
Call mobjACActionsMap.Add ( sButtonName, sActionName )
|
| 85 |
Public Sub SetRelationship ( sButtonName, sActionName )
|
84 |
End Sub
|
| 86 |
Call mobjACActionsMap.Add ( sButtonName, sActionName )
|
85 |
'-----------------------------------------------------------------------------------------------------------------
|
| 87 |
End Sub
|
86 |
Private Sub SetItemPropertyByIndex ( nInx, nProperty, Value )
|
| 88 |
'-----------------------------------------------------------------------------------------------------------------
|
87 |
If nInx = "" Then Exit Sub ' Exit sub if you don't find defined button
|
| 89 |
Private Sub SetItemPropertyByIndex ( nInx, nProperty, Value )
|
88 |
|
| 90 |
If nInx = "" Then Exit Sub ' Exit sub if you don't find defined button
|
89 |
If nProperty = "" OR Value = "" Then Err.Raise 8, "Method SetItemPropertyByIndex", "Empty parameters found. nInx="& nInx &", nProperty="& nProperty &", Value="& Value
|
| 91 |
|
90 |
|
| 92 |
If nProperty = "" OR Value = "" Then Err.Raise 8, "Method SetItemPropertyByIndex", "Empty parameters found. nInx="& nInx &", nProperty="& nProperty &", Value="& Value
|
91 |
mArrAbtnDef ( nProperty, nInx ) = Value
|
| 93 |
|
92 |
|
| 94 |
mArrAbtnDef ( nProperty, nInx ) = Value
|
93 |
'Response.write "mArrAbtnDef ( "& nProperty &", "& nInx &" ) = "& Value &"<br>"
|
| 95 |
|
94 |
End Sub
|
| 96 |
'Response.write "mArrAbtnDef ( "& nProperty &", "& nInx &" ) = "& Value &"<br>"
|
95 |
'-----------------------------------------------------------------------------------------------------------------
|
| 97 |
End Sub
|
96 |
Private Function LastItemInx ()
|
| 98 |
'-----------------------------------------------------------------------------------------------------------------
|
97 |
LastItemInx = UBound ( mArrAbtnDef, 2 )
|
| 99 |
Private Function LastItemInx ()
|
98 |
End Function
|
| 100 |
LastItemInx = UBound ( mArrAbtnDef, 2 )
|
99 |
'-----------------------------------------------------------------------------------------------------------------
|
| 101 |
End Function
|
100 |
Public Sub AddActionButton ( sItemName, nItemID )
|
| 102 |
'-----------------------------------------------------------------------------------------------------------------
|
101 |
Dim newArrayDim
|
| 103 |
Public Sub AddActionButton ( sItemName, nItemID )
|
102 |
|
| 104 |
Dim newArrayDim
|
103 |
If InStr( sItemName, " " ) > 0 Then Err.Raise 8, "Method AddActionButton", "Item Name '"& sItemName &"' cannot have spaces."
|
| 105 |
|
104 |
|
| 106 |
If InStr( sItemName, " " ) > 0 Then Err.Raise 8, "Method AddActionButton", "Item Name '"& sItemName &"' cannot have spaces."
|
105 |
|
| 107 |
|
106 |
|
| 108 |
|
107 |
If NOT mobjNameDefMap.Exists (CStr( sItemName )) Then
|
| 109 |
|
108 |
|
| 110 |
If NOT mobjNameDefMap.Exists (CStr( sItemName )) Then
|
109 |
newArrayDim = LastItemInx() + 1
|
| 111 |
|
110 |
|
| 112 |
newArrayDim = LastItemInx() + 1
|
111 |
ReDim Preserve mArrAbtnDef( mNumOfProperties, newArrayDim )
|
| 113 |
|
112 |
|
| 114 |
ReDim Preserve mArrAbtnDef( mNumOfProperties, newArrayDim )
|
113 |
' Store name
|
| 115 |
|
114 |
Call SetItemPropertyByIndex ( newArrayDim, InxName, sItemName )
|
| 116 |
' Store name
|
115 |
mobjNameDefMap.Add Cstr( sItemName ), CStr( newArrayDim )
|
| 117 |
Call SetItemPropertyByIndex ( newArrayDim, InxName, sItemName )
|
116 |
|
| 118 |
mobjNameDefMap.Add Cstr( sItemName ), CStr( newArrayDim )
|
117 |
If Not IsNull(nItemID) Then
|
| 119 |
|
118 |
' Store ID
|
| 120 |
If Not IsNull(nItemID) Then
|
119 |
Call SetItemPropertyByIndex ( newArrayDim, InxdbID, nItemID )
|
| 121 |
' Store ID
|
120 |
mobjIdDefMap.Add Cstr( nItemID ), CStr( newArrayDim )
|
| 122 |
Call SetItemPropertyByIndex ( newArrayDim, InxdbID, nItemID )
|
121 |
End If
|
| 123 |
mobjIdDefMap.Add Cstr( nItemID ), CStr( newArrayDim )
|
122 |
|
| 124 |
End If
|
123 |
' Set Defaults
|
| 125 |
|
124 |
Call SetItemDefaults ( sItemName )
|
| 126 |
' Set Defaults
|
125 |
Else
|
| 127 |
Call SetItemDefaults ( sItemName )
|
126 |
|
| 128 |
Else
|
127 |
Err.Raise 8, "Method AddActionButton", "Item Name '"& sItemName &"' has been already defined."
|
| 129 |
|
128 |
|
| 130 |
Err.Raise 8, "Method AddActionButton", "Item Name '"& sItemName &"' has been already defined."
|
129 |
End If
|
| 131 |
|
130 |
|
| 132 |
End If
|
131 |
End Sub
|
| 133 |
|
132 |
'-----------------------------------------------------------------------------------------------------------------
|
| 134 |
End Sub
|
133 |
Public Sub Render ( aAbtnList, ByRef oAccessControl )
|
| 135 |
'-----------------------------------------------------------------------------------------------------------------
|
134 |
Dim itemInx, itemName, nLastItemInx, btnImage, ButtonStr, ButtonStrDisabled, bIsVisibleAC, bIsActiveAC
|
| 136 |
Public Sub Render ( aAbtnList, ByRef oAccessControl )
|
135 |
Response.write "<table cellpadding='0' cellspacing='0' width='1'><tr>"
|
| 137 |
Dim itemInx, itemName, nLastItemInx, btnImage, ButtonStr, ButtonStrDisabled, bIsVisibleAC, bIsActiveAC
|
136 |
|
| 138 |
Response.write "<table cellpadding='0' cellspacing='0' width='1'><tr>"
|
137 |
For Each itemName in aAbtnList
|
| 139 |
|
138 |
|
| 140 |
For Each itemName in aAbtnList
|
139 |
itemInx = mobjNameDefMap.Item (Cstr(itemName))
|
| 141 |
|
140 |
|
| 142 |
itemInx = mobjNameDefMap.Item (Cstr(itemName))
|
141 |
|
| 143 |
|
142 |
'-- Define Image
|
| 144 |
|
143 |
btnImage = "<img src='images/spacer.gif' width='"& mnButtonSpacer &"' height='1' align='absmiddle' border='0'>"
|
| 145 |
'-- Define Image
|
144 |
If (mArrAbtnDef( InxImg, itemInx ) <> "") Then
|
| 146 |
btnImage = "<img src='images/spacer.gif' width='"& mnButtonSpacer &"' height='1' align='absmiddle' border='0'>"
|
145 |
btnImage = "<img src='"& mArrAbtnDef( InxImg, itemInx ) &"' hspace='"& mnImageHspace &"' border='0' align='absmiddle'>"
|
| 147 |
If (mArrAbtnDef( InxImg, itemInx ) <> "") Then
|
146 |
End If
|
| 148 |
btnImage = "<img src='"& mArrAbtnDef( InxImg, itemInx ) &"' hspace='"& mnImageHspace &"' border='0' align='absmiddle'>"
|
147 |
|
| 149 |
End If
|
148 |
'-- Define Button
|
| 150 |
|
149 |
ButtonStr = _
|
| 151 |
|
150 |
"<td nowrap>"&_
|
| 152 |
'-- Define Button
|
151 |
"<a id='"& mArrAbtnDef( InxName, itemInx ) &"' "&_
|
| 153 |
ButtonStr = _
|
152 |
" name='"& mArrAbtnDef( InxName, itemInx ) &"' href='"& Eval( mArrAbtnDef( InxLink, itemInx ) ) &"' "&_
|
| 154 |
"<td nowrap>"&_
|
153 |
" "& Eval( mArrAbtnDef( InxEventHandler, itemInx ) ) &" class='menu_link' title='"& mArrAbtnDef( InxHint, itemInx ) &"'>"&_
|
| 155 |
"<a id='"& mArrAbtnDef( InxName, itemInx ) &"' "&_
|
154 |
btnImage & mArrAbtnDef( InxTxt, itemInx ) &"</a>"&_
|
| 156 |
" name='"& mArrAbtnDef( InxName, itemInx ) &"' href='"& Eval( mArrAbtnDef( InxLink, itemInx ) ) &"' "&_
|
155 |
"</td>"
|
| 157 |
" "& Eval( mArrAbtnDef( InxEventHandler, itemInx ) ) &" class='menu_link' title='"& mArrAbtnDef( InxHint, itemInx ) &"'>"&_
|
156 |
|
| 158 |
btnImage & mArrAbtnDef( InxTxt, itemInx ) &"</a>"&_
|
157 |
|
| 159 |
"</td>"
|
158 |
'-- Define Disabled Button
|
| 160 |
|
159 |
ButtonStrDisabled = _
|
| 161 |
|
160 |
"<td nowrap>"&_
|
| 162 |
'-- Define Disabled Button
|
161 |
"<img src='"& mArrAbtnDef( InxImgOff, itemInx ) &"' hspace='"& mnImageHspace &"' border='0' align='absmiddle'>"&_
|
| 163 |
ButtonStrDisabled = _
|
162 |
"<label class='menu_txt'>"& mArrAbtnDef( InxTxt, itemInx ) &"</label>"&_
|
| 164 |
"<td nowrap>"&_
|
163 |
"</td>"
|
| 165 |
"<img src='"& mArrAbtnDef( InxImgOff, itemInx ) &"' hspace='"& mnImageHspace &"' border='0' align='absmiddle'>"&_
|
164 |
|
| 166 |
"<label class='menu_txt'>"& mArrAbtnDef( InxTxt, itemInx ) &"</label>"&_
|
165 |
|
| 167 |
"</td>"
|
166 |
'Response.write "HERE("&itemName & mArrAbtnDef( InxVisible, itemInx ) &")"
|
| 168 |
|
167 |
|
| 169 |
|
168 |
|
| 170 |
'Response.write "HERE("&itemName & mArrAbtnDef( InxVisible, itemInx ) &")"
|
169 |
'-- Get Access Control permissions --
|
| 171 |
|
170 |
bIsVisibleAC = TRUE
|
| 172 |
|
171 |
bIsActiveAC = TRUE
|
| 173 |
'-- Get Access Control permissions --
|
172 |
If NOT IsNull( oAccessControl ) Then
|
| 174 |
bIsVisibleAC = TRUE
|
173 |
' Access control object is supplied
|
| 175 |
bIsActiveAC = TRUE
|
174 |
|
| 176 |
If NOT IsNull( oAccessControl ) Then
|
175 |
If mobjACActionsMap.Exists ( itemName ) Then
|
| 177 |
' Access control object is supplied
|
176 |
' Relationship supplied
|
| 178 |
|
177 |
bIsVisibleAC = oAccessControl.IsVisible ( mobjACActionsMap.Item( itemName ) )
|
| 179 |
If mobjACActionsMap.Exists ( itemName ) Then
|
178 |
bIsActiveAC = oAccessControl.IsActive ( mobjACActionsMap.Item( itemName ) )
|
| 180 |
' Relationship supplied
|
179 |
'Response.write itemName &":"& oAccessControl.IsVisible ( mobjACActionsMap.Item( itemName ) ) &"-"& oAccessControl.IsActive ( mobjACActionsMap.Item( itemName ) )
|
| 181 |
bIsVisibleAC = oAccessControl.IsVisible ( mobjACActionsMap.Item( itemName ) )
|
180 |
End If
|
| 182 |
bIsActiveAC = oAccessControl.IsActive ( mobjACActionsMap.Item( itemName ) )
|
181 |
|
| 183 |
'Response.write itemName &":"& oAccessControl.IsVisible ( mobjACActionsMap.Item( itemName ) ) &"-"& oAccessControl.IsActive ( mobjACActionsMap.Item( itemName ) )
|
182 |
End If
|
| 184 |
End If
|
183 |
|
| 185 |
|
184 |
|
| 186 |
End If
|
185 |
If ( ( mArrAbtnDef( InxVisible, itemInx ) = enumDB_YES) AND bIsVisibleAC ) _
|
| 187 |
|
186 |
OR (InStr( itemName, "width=" ) > 0) _
|
| 188 |
|
187 |
OR (InStr( itemName, "height=" ) > 0) Then
|
| 189 |
If ( ( mArrAbtnDef( InxVisible, itemInx ) = enumDB_YES) AND bIsVisibleAC ) _
|
188 |
|
| 190 |
OR (InStr( itemName, "width=" ) > 0) _
|
189 |
' --- Display if Visible ---
|
| 191 |
OR (InStr( itemName, "height=" ) > 0) Then
|
190 |
|
| 192 |
|
191 |
'AND (NOT bIsActiveAC)
|
| 193 |
' --- Display if Visible ---
|
192 |
'( mbDisableAll OR ( mArrAbtnDef( InxActive, itemInx ) = enumDB_NO ) ) AND ( itemInx <> "" )
|
| 194 |
|
193 |
'Response.write itemName &":"& mbDisableAll &"-"& Eval( mArrAbtnDef( InxActive, itemInx ) = enumDB_NO ) &"-"& Eval( NOT bIsActiveAC ) &"-"& itemInx &"<br>"
|
| 195 |
'AND (NOT bIsActiveAC)
|
194 |
If ( itemInx <> "" ) AND _
|
| 196 |
'( mbDisableAll OR ( mArrAbtnDef( InxActive, itemInx ) = enumDB_NO ) ) AND ( itemInx <> "" )
|
195 |
( mbDisableAll OR _
|
| 197 |
'Response.write itemName &":"& mbDisableAll &"-"& Eval( mArrAbtnDef( InxActive, itemInx ) = enumDB_NO ) &"-"& Eval( NOT bIsActiveAC ) &"-"& itemInx &"<br>"
|
196 |
( ( mArrAbtnDef( InxActive, itemInx ) = enumDB_NO ) OR (NOT bIsActiveAC) ) _
|
| 198 |
If ( itemInx <> "" ) AND _
|
197 |
) _
|
| 199 |
( mbDisableAll OR _
|
198 |
Then
|
| 200 |
( ( mArrAbtnDef( InxActive, itemInx ) = enumDB_NO ) OR (NOT bIsActiveAC) ) _
|
199 |
|
| 201 |
) _
|
200 |
' --- Display DISABLED Button Item ---
|
| 202 |
Then
|
201 |
Response.write ButtonStrDisabled
|
| 203 |
|
202 |
|
| 204 |
' --- Display DISABLED Button Item ---
|
203 |
If mnButtonSpacer > 0 Then
|
| 205 |
Response.write ButtonStrDisabled
|
204 |
Response.write "<td><img src='images/spacer.gif' width='"& mnButtonSpacer &"' height='1' align='absmiddle'></td>"
|
| 206 |
|
205 |
End If
|
| 207 |
If mnButtonSpacer > 0 Then
|
206 |
|
| 208 |
Response.write "<td><img src='images/spacer.gif' width='"& mnButtonSpacer &"' height='1' align='absmiddle'></td>"
|
207 |
|
| 209 |
End If
|
208 |
Else
|
| 210 |
|
209 |
|
| 211 |
|
210 |
' --- Display Action Button Item ---
|
| 212 |
Else
|
211 |
If ( NOT mbIsReadonly ) OR _
|
| 213 |
|
212 |
( mbIsReadonly AND mArrAbtnDef( InxIsReadonlyAction, itemInx ) = enumDB_YES ) Then
|
| 214 |
' --- Display Action Button Item ---
|
213 |
|
| 215 |
If ( NOT mbIsReadonly ) OR _
|
214 |
If InStr( itemName, "width=" ) > 0 Then
|
| 216 |
( mbIsReadonly AND mArrAbtnDef( InxIsReadonlyAction, itemInx ) = enumDB_YES ) Then
|
215 |
|
| 217 |
|
216 |
Response.write "<td><img src='images/spacer.gif' "& itemName &" height='1' align='absmiddle'></td>"
|
| 218 |
If InStr( itemName, "width=" ) > 0 Then
|
217 |
|
| 219 |
|
218 |
ElseIf InStr( itemName, "height=" ) > 0 Then
|
| 220 |
Response.write "<td><img src='images/spacer.gif' "& itemName &" height='1' align='absmiddle'></td>"
|
219 |
Response.write "<td><img src='images/bg_bage_2.gif' width='1' "& itemName &" align='absmiddle' hspace='4'></td>"
|
| 221 |
|
220 |
|
| 222 |
ElseIf InStr( itemName, "height=" ) > 0 Then
|
221 |
Else
|
| 223 |
Response.write "<td><img src='images/bg_bage_2.gif' width='1' "& itemName &" align='absmiddle' hspace='4'></td>"
|
222 |
'/* It is a button, i.e. Display Button */
|
| 224 |
|
223 |
|
| 225 |
Else
|
224 |
' Check if button is loaded from Database
|
| 226 |
'/* It is a button, i.e. Display Button */
|
225 |
If itemInx = "" Then Err.Raise 8, "Method Render", "Definition for item name '"& itemName &"' not found."
|
| 227 |
|
226 |
|
| 228 |
' Check if button is loaded from Database
|
227 |
Response.write ButtonStr
|
| 229 |
If itemInx = "" Then Err.Raise 8, "Method Render", "Definition for item name '"& itemName &"' not found."
|
228 |
|
| 230 |
|
229 |
If mnButtonSpacer > 0 Then
|
| 231 |
Response.write ButtonStr
|
230 |
Response.write "<td><img src='images/spacer.gif' width='"& mnButtonSpacer &"' height='1' align='absmiddle'></td>"
|
| 232 |
|
231 |
End If
|
| 233 |
If mnButtonSpacer > 0 Then
|
232 |
|
| 234 |
Response.write "<td><img src='images/spacer.gif' width='"& mnButtonSpacer &"' height='1' align='absmiddle'></td>"
|
233 |
End If
|
| 235 |
End If
|
234 |
|
| 236 |
|
235 |
|
| 237 |
End If
|
236 |
ElseIf ( mbIsReadonly AND mArrAbtnDef( InxIsReadonlyAction, itemInx ) = enumDB_NO ) Then
|
| 238 |
|
237 |
|
| 239 |
|
238 |
If mReadonlyActionBehaviour = enumABTNCTRL_ON_READONLY_DISABLE Then
|
| 240 |
ElseIf ( mbIsReadonly AND mArrAbtnDef( InxIsReadonlyAction, itemInx ) = enumDB_NO ) Then
|
239 |
Response.write ButtonStrDisabled
|
| 241 |
|
240 |
End If
|
| 242 |
If mReadonlyActionBehaviour = enumABTNCTRL_ON_READONLY_DISABLE Then
|
241 |
|
| 243 |
Response.write ButtonStrDisabled
|
242 |
|
| 244 |
End If
|
243 |
End If
|
| 245 |
|
244 |
|
| 246 |
|
245 |
End If
|
| 247 |
End If
|
246 |
|
| 248 |
|
247 |
End If
|
| 249 |
End If
|
248 |
|
| 250 |
|
249 |
|
| 251 |
End If
|
250 |
|
| 252 |
|
251 |
|
| 253 |
|
252 |
' --- Separators added manually using method AddSeparator or AddSeparatorAfter ---
|
| 254 |
|
253 |
If mobjSeparator.Exists ( Cstr(mArrAbtnDef( InxName, itemInx )) ) Then
|
| 255 |
|
254 |
Response.write "<td><img src='images/spacer.gif' width='"& mobjSeparator.Item ( Cstr(mArrAbtnDef( InxName, itemInx )) ) &"' height='1'></td>"
|
| 256 |
' --- Separators added manually using method AddSeparator or AddSeparatorAfter ---
|
255 |
|
| 257 |
If mobjSeparator.Exists ( Cstr(mArrAbtnDef( InxName, itemInx )) ) Then
|
256 |
End If
|
| 258 |
Response.write "<td><img src='images/spacer.gif' width='"& mobjSeparator.Item ( Cstr(mArrAbtnDef( InxName, itemInx )) ) &"' height='1'></td>"
|
257 |
|
| 259 |
|
258 |
|
| 260 |
End If
|
259 |
Next
|
| 261 |
|
260 |
|
| 262 |
|
261 |
Response.write "</tr></table>"
|
| 263 |
Next
|
262 |
End Sub
|
| 264 |
|
- |
|
| 265 |
Response.write "</tr></table>"
|
- |
|
| 266 |
End Sub
|
- |
|
| 267 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 268 |
Public Sub LoadActionButtons ( aAbtnList, ByRef objOraDatabase )
|
- |
|
| 269 |
Dim rsQry, query
|
- |
|
| 270 |
|
- |
|
| 271 |
query = _
|
- |
|
| 272 |
" SELECT "&_
|
- |
|
| 273 |
" abd.abtn_id,"&_
|
- |
|
| 274 |
" abd.abtn_name,"&_
|
- |
|
| 275 |
" abd.text,"&_
|
- |
|
| 276 |
" abd.action_link,"&_
|
- |
|
| 277 |
" abd.event_handler,"&_
|
- |
|
| 278 |
" abd.img_enabled,"&_
|
- |
|
| 279 |
" abd.img_disabled,"&_
|
- |
|
| 280 |
" abd.hint,"&_
|
- |
|
| 281 |
" abd.visible,"&_
|
- |
|
| 282 |
" abd.active,"&_
|
- |
|
| 283 |
" abd.is_readonly_action "&_
|
- |
|
| 284 |
" FROM DEF_ACTION_BUTTONS abd WHERE abd.abtn_name IN ('"& Join ( aAbtnList, "','") &"')"
|
- |
|
| 285 |
|
- |
|
| 286 |
Set rsQry = OraDatabase.DbCreateDynaset( query , ORADYN_DEFAULT )
|
- |
|
| 287 |
|
- |
|
| 288 |
If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
|
- |
|
| 289 |
Call LoadButtons ( rsQry.GetRows() )
|
- |
|
| 290 |
|
- |
|
| 291 |
End If
|
- |
|
| 292 |
|
- |
|
| 293 |
rsQry.Close
|
- |
|
| 294 |
Set rsQry = Nothing
|
- |
|
| 295 |
End Sub
|
- |
|
| 296 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 297 |
Public Sub LoadButtons ( aRows )
|
- |
|
| 298 |
Dim nProperty, newArrayDim, LastRow, rowNum
|
- |
|
| 299 |
|
- |
|
| 300 |
LastRow = UBound( aRows, 2 )
|
- |
|
| 301 |
|
- |
|
| 302 |
For rowNum = 0 To LastRow
|
- |
|
| 303 |
' Increase array by 1
|
- |
|
| 304 |
newArrayDim = LastRowInx() + 1
|
- |
|
| 305 |
ReDim Preserve mArrAbtnDef( mNumOfProperties, newArrayDim )
|
- |
|
| 306 |
|
- |
|
| 307 |
|
- |
|
| 308 |
mobjNameDefMap.Item ( Cstr( aRows ( InxName, rowNum ) ) ) = newArrayDim
|
- |
|
| 309 |
|
- |
|
| 310 |
For nProperty = 0 To mLastPropertyInx
|
- |
|
| 311 |
mArrAbtnDef ( nProperty, newArrayDim ) = aRows ( nProperty, rowNum )
|
- |
|
| 312 |
|
- |
|
| 313 |
Next
|
- |
|
| 314 |
|
- |
|
| 315 |
Next
|
- |
|
| 316 |
|
- |
|
| 317 |
End Sub
|
- |
|
| 318 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 319 |
Private Function LastRowInx ()
|
- |
|
| 320 |
LastRowInx = UBound ( mArrAbtnDef, 2 )
|
- |
|
| 321 |
End Function
|
- |
|
| 322 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 323 |
Public Sub AddSeparatorAfter ( sItemName, sSeparatorWidth )
|
- |
|
| 324 |
If InStr( sItemName, " " ) > 0 Then Err.Raise 8, "Method AddSeparatorAfter", "Item Name '"& sItemName &"' cannot have spaces."
|
- |
|
| 325 |
mobjSeparator.Add (Cstr(sItemName)), CStr(sSeparatorWidth)
|
- |
|
| 326 |
End Sub
|
- |
|
| 327 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 328 |
Public Sub AddSeparator ( sSeparatorWidth )
|
- |
|
| 329 |
mobjSeparator.Add ( Cstr(mArrAbtnDef(InxName, LastItemInx())) ), CStr(sSeparatorWidth)
|
- |
|
| 330 |
End Sub
|
- |
|
| 331 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 332 |
Private Sub SetItemDefaults ( sItemName )
|
- |
|
| 333 |
' Additional default setup
|
- |
|
| 334 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxActive, enumDB_YES ) ' Default Active = enumDB_YES
|
- |
|
| 335 |
End Sub
|
- |
|
| 336 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 337 |
Public Sub Text ( sItemName, Value )
|
- |
|
| 338 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxTxt, Value )
|
- |
|
| 339 |
End Sub
|
- |
|
| 340 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 341 |
Public Sub ItemID ( sItemName, Value )
|
- |
|
| 342 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxID, Value )
|
- |
|
| 343 |
End Sub
|
- |
|
| 344 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 345 |
Public Sub Image ( sItemName, Value )
|
- |
|
| 346 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxImg, Value )
|
- |
|
| 347 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxImgOff, Value ) ' Default image disable to be the same as image
|
- |
|
| 348 |
End Sub
|
- |
|
| 349 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 350 |
Public Sub ImageOff ( sItemName, Value )
|
- |
|
| 351 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxImgOff, Value )
|
- |
|
| 352 |
End Sub
|
- |
|
| 353 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 354 |
Public Sub Link ( sItemName, Value )
|
- |
|
| 355 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxLink, Value )
|
- |
|
| 356 |
End Sub
|
- |
|
| 357 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 358 |
Public Sub EventHandler ( sItemName, Value )
|
- |
|
| 359 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxEventHandler, Value )
|
- |
|
| 360 |
End Sub
|
- |
|
| 361 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 362 |
Public Sub Hint ( sItemName, Value )
|
- |
|
| 363 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxHint, Value )
|
- |
|
| 364 |
End Sub
|
- |
|
| 365 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 366 |
Public Sub Visible ( sItemName, Value )
|
- |
|
| 367 |
'Response.write sItemName &"here"& mobjNameDefMap.Item (Cstr(sItemName))
|
- |
|
| 368 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxVisible, Value )
|
- |
|
| 369 |
End Sub
|
- |
|
| 370 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 371 |
Public Sub Active ( sItemName, Value )
|
- |
|
| 372 |
'Response.write sItemName &"here"& mobjNameDefMap.Item (Cstr(sItemName))
|
- |
|
| 373 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxActive, Value )
|
- |
|
| 374 |
End Sub
|
- |
|
| 375 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 376 |
Private Sub Class_Initialize()
|
- |
|
| 377 |
'// Perform action on creation of object. e.g. Set myObj = New ThisClassName
|
- |
|
| 378 |
Set mobjNameDefMap = CreateObject("Scripting.Dictionary")
|
- |
|
| 379 |
Set mobjIdDefMap = CreateObject("Scripting.Dictionary")
|
- |
|
| 380 |
Set mobjSeparator = CreateObject("Scripting.Dictionary")
|
- |
|
| 381 |
Set mobjACActionsMap = CreateObject("Scripting.Dictionary")
|
- |
|
| 382 |
|
- |
|
| 383 |
'mbIsReadonly = FALSE ' Tell control that it should use only readonly action buttons (i.e. actions which will not alter database )
|
- |
|
| 384 |
mReadonlyActionBehaviour = enumABTNCTRL_ON_READONLY_HIDE ' Tell control what to do by default if mbIsReadonly = TRUE
|
- |
|
| 385 |
|
- |
|
| 386 |
mnButtonSpacer = 0
|
- |
|
| 387 |
mnImageHspace = 4
|
- |
|
| 388 |
|
- |
|
| 389 |
mNumOfProperties = 11 ' Number of properties in array which define one menu item.
|
- |
|
| 390 |
mLastPropertyInx = mNumOfProperties - 1
|
- |
|
| 391 |
|
- |
|
| 392 |
mbDisableAll = FALSE
|
- |
|
| 393 |
|
- |
|
| 394 |
ReDim mArrAbtnDef ( mNumOfProperties, -1 )
|
- |
|
| 395 |
InxID = 0
|
- |
|
| 396 |
InxName = 1
|
- |
|
| 397 |
InxTxt = 2
|
- |
|
| 398 |
InxLink = 3
|
- |
|
| 399 |
InxEventHandler = 4
|
- |
|
| 400 |
InxImg = 5
|
- |
|
| 401 |
InxImgOff = 6
|
- |
|
| 402 |
InxHint = 7
|
- |
|
| 403 |
InxVisible = 8
|
- |
|
| 404 |
InxActive = 9
|
- |
|
| 405 |
InxIsReadonlyAction = 10
|
- |
|
| 406 |
|
- |
|
| 407 |
End Sub
|
- |
|
| 408 |
'-----------------------------------------------------------------------------------------------------------------
|
- |
|
| 409 |
Private Sub Class_Terminate()
|
- |
|
| 410 |
'// Perform action on object disposal. e.g. Set myObj = Nothing
|
- |
|
| 411 |
Set mobjNameDefMap = Nothing
|
- |
|
| 412 |
Set mobjIdDefMap = Nothing
|
- |
|
| 413 |
Set mobjSeparator = Nothing
|
- |
|
| 414 |
Set mobjACActionsMap = Nothing
|
- |
|
| 415 |
|
- |
|
| 416 |
|
- |
|
| 417 |
End Sub
|
- |
|
| 418 |
'-----------------------------------------------------------------------------------------------------------------
|
263 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
264 |
' Return true if required_abtnName is one of the strings in the aAbtnList string array, else return false
|
| - |
|
265 |
Private Function isAbtnRequired (aAbtnList, required_abtnName)
|
| - |
|
266 |
Dim this_abtnName
|
| - |
|
267 |
|
| - |
|
268 |
isAbtnRequired = FALSE
|
| - |
|
269 |
|
| - |
|
270 |
For Each this_abtnName in aAbtnList
|
| - |
|
271 |
If 0 = StrComp(this_abtnName, required_abtnName) Then
|
| - |
|
272 |
isAbtnRequired = TRUE
|
| - |
|
273 |
Exit Function
|
| - |
|
274 |
End If
|
| - |
|
275 |
Next
|
| - |
|
276 |
End Function
|
| - |
|
277 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
278 |
Public Sub LoadActionButtons ( aAbtnList, ByRef objOraDatabase )
|
| - |
|
279 |
|
| - |
|
280 |
' The following code is now used in place of the earlier code to acquire action button records.
|
| - |
|
281 |
'
|
| - |
|
282 |
' This code exploits the fact that in ADO 2.8 onwards, you can create ADO DB record sets
|
| - |
|
283 |
' without a connection to an actual database. So, to rid ourselves of the need for a DEF_ACTION_BUTTONS
|
| - |
|
284 |
' table in the database, we can simply take all of the table's rows and reproduce them here in row
|
| - |
|
285 |
' creation and field assignment statements. The rest of the website code will be ignorant of the fact
|
| - |
|
286 |
' that the data has not come from the actual database.
|
| - |
|
287 |
'
|
| - |
|
288 |
' Complicating factors:
|
| - |
|
289 |
' 1) Some action button fields (action_link and event_handler) are to be EVAL'ed later on when used
|
| - |
|
290 |
' to render the HTML page. This can lead to some very complex looking strings that are difficult to
|
| - |
|
291 |
' understand. EVAL allows things like parRtag_id used in a string to be converted to an actual
|
| - |
|
292 |
' number (in string form) at time of HTML rendering. We have to use EVAL. There is no other option.
|
| - |
|
293 |
'
|
| - |
|
294 |
' 2) The strings from the database must also be represented as VBScript strings in the assignments
|
| - |
|
295 |
' below. This means that where a string needs to have an embedded " char, two such chars must be
|
| - |
|
296 |
' used, and remember about EVAL mentioned above, meaning that sometimes """" has to be used to
|
| - |
|
297 |
' give a single " to the resulting string that pops out from EVAL.
|
| - |
|
298 |
' Remember also that whilst HTML doesn't care whether you use single or double quotes, javascript
|
| - |
|
299 |
' does (it must use single quotes) and VBScript does (it must use double quotes)
|
| - |
|
300 |
'
|
| - |
|
301 |
' Possible Future Roadmap
|
| - |
|
302 |
' 1) Rid the code of ABTN_ID - I dont think we need this field now that we are free of the database
|
| - |
|
303 |
'
|
| - |
|
304 |
'
|
| - |
|
305 |
Dim rsQry
|
| - |
|
306 |
Dim varFields
|
| - |
|
307 |
Dim varValues
|
| - |
|
308 |
|
| - |
|
309 |
' Create the object and configure some of its properties
|
| - |
|
310 |
Set rsQry = Server.CreateObject("ADODB.Recordset")
|
| - |
|
311 |
rsQry.CursorLocation = adUseClient
|
| - |
|
312 |
rsQry.CursorType = adOpenKeyset
|
| - |
|
313 |
rsQry.LockType = adLockOptimistic
|
| - |
|
314 |
|
| - |
|
315 |
' Based upon the original DEF_ACTION_BUTTONS table DDL, define the fields (ie. table columns) being simulated
|
| - |
|
316 |
rsQry.Fields.Append "ABTN_ID", adInteger
|
| - |
|
317 |
rsQry.Fields.Append "ABTN_NAME", adVarChar, 64
|
| - |
|
318 |
rsQry.Fields.Append "TEXT", adVarChar, 128, adFldIsNullable
|
| - |
|
319 |
rsQry.Fields.Append "ACTION_LINK", adVarChar, 512, adFldIsNullable
|
| - |
|
320 |
rsQry.Fields.Append "EVENT_HANDLER", adVarChar, 512, adFldIsNullable
|
| - |
|
321 |
rsQry.Fields.Append "IMG_ENABLED", adVarChar, 128, adFldIsNullable
|
| - |
|
322 |
rsQry.Fields.Append "IMG_DISABLED", adVarChar, 128, adFldIsNullable
|
| - |
|
323 |
rsQry.Fields.Append "HINT", adVarChar, 256, adFldIsNullable
|
| - |
|
324 |
rsQry.Fields.Append "VISIBLE", adChar, 1
|
| - |
|
325 |
rsQry.Fields.Append "ACTIVE", adChar, 1
|
| - |
|
326 |
rsQry.Fields.Append "IS_READONLY_ACTION", adChar, 1
|
| - |
|
327 |
|
| - |
|
328 |
' open the record set for updating
|
| - |
|
329 |
rsQry.Open
|
| - |
|
330 |
|
| - |
|
331 |
' Specify the field order that we are going to use in our row creation statements
|
| - |
|
332 |
varFields = Array("ABTN_ID", "ABTN_NAME", "TEXT",_
|
| - |
|
333 |
"ACTION_LINK",_
|
| - |
|
334 |
"EVENT_HANDLER",_
|
| - |
|
335 |
"IMG_ENABLED",_
|
| - |
|
336 |
"IMG_DISABLED",_
|
| - |
|
337 |
"HINT",_
|
| - |
|
338 |
"VISIBLE",_
|
| - |
|
339 |
"ACTIVE",_
|
| - |
|
340 |
"IS_READONLY_ACTION")
|
| - |
|
341 |
|
| - |
|
342 |
' Add the rows to the record set, but only for buttons specifed in the list supplied by the caller
|
| - |
|
343 |
|
| - |
|
344 |
' Remember, Field Ordering is... ID, name, text, link, event handler, en-img, dis-img, hint, visible, active, is readonly action
|
| - |
|
345 |
|
| - |
|
346 |
If isAbtnRequired(aAbtnList, "btnNewVersion") Then
|
| - |
|
347 |
varValues = Array( 1, "btnNewVersion", null,_
|
| - |
|
348 |
"""form_new_version.asp?""& objPMod.ComposeURL()",_
|
| - |
|
349 |
null,_
|
| - |
|
350 |
"images/abtn_new_version.gif",_
|
| - |
|
351 |
null,_
|
| - |
|
352 |
"Create new version of this package.",_
|
| - |
|
353 |
"Y",_
|
| - |
|
354 |
"Y",_
|
| - |
|
355 |
"N")
|
| - |
|
356 |
rsQry.AddNew varFields, varValues
|
| - |
|
357 |
End If
|
| - |
|
358 |
|
| - |
|
359 |
If isAbtnRequired(aAbtnList, "btnVersionHistory") Then
|
| - |
|
360 |
varValues = Array( 2, "btnVersionHistory", null,_
|
| - |
|
361 |
"""javascript:;""",_
|
| - |
|
362 |
"""onClick=""""MM_openBrWindow('_wform_versions_history_release_notes.asp?OLDpv_id=""& parPv_id &""&pkg_id=""& pkgInfoHash.Item (""pkg_id"") &""&FLpkg_version=*""& pkgInfoHash.Item(""v_ext"") &""&FLuser_name=*&rfile=""& scriptName &""&""& objPMod.ComposeURL() &""#ANC_""& parPv_id &""','History','resizable=yes,width=850,height='+ ( screen.height - 100 ) );""""""",_
|
| - |
|
363 |
"images/abtn_version_history.gif",_
|
| - |
|
364 |
null,_
|
| - |
|
365 |
"Show version history of this package.",_
|
| - |
|
366 |
"Y",_
|
| - |
|
367 |
"Y",_
|
| - |
|
368 |
"Y")
|
| - |
|
369 |
rsQry.AddNew varFields, varValues
|
| - |
|
370 |
End If
|
| - |
|
371 |
|
| - |
|
372 |
If isAbtnRequired(aAbtnList, "btnRemovePackage") Then
|
| - |
|
373 |
varValues = Array( 3, "btnRemovePackage", null,_
|
| - |
|
374 |
"""_remove_package.asp?pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
|
| - |
|
375 |
"""onClick=""""return confirmAction('Are you sure you want to remove this package?');""""""",_
|
| - |
|
376 |
"images/abtn_remove_pkg.gif",_
|
| - |
|
377 |
null,_
|
| - |
|
378 |
"Remove the package from this Release.",_
|
| - |
|
379 |
"Y",_
|
| - |
|
380 |
"Y",_
|
| - |
|
381 |
"N")
|
| - |
|
382 |
rsQry.AddNew varFields, varValues
|
| - |
|
383 |
End If
|
| - |
|
384 |
|
| - |
|
385 |
If isAbtnRequired(aAbtnList, "btnMakeRelease") Then
|
| - |
|
386 |
varValues = Array( 4, "btnMakeRelease", null,_
|
| - |
|
387 |
"""_make_released.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
|
| - |
|
388 |
"""onClick=""""return confirmAction('Making this package released will prevent any further changes. \nDo you want to proceed?');""""""",_
|
| - |
|
389 |
"icons/i_make_released.gif",_
|
| - |
|
390 |
"icons/i_make_released_off.gif",_
|
| - |
|
391 |
"Make this package released, so that other packages can use it.",_
|
| - |
|
392 |
"Y",_
|
| - |
|
393 |
"Y",_
|
| - |
|
394 |
"N")
|
| - |
|
395 |
rsQry.AddNew varFields, varValues
|
| - |
|
396 |
End If
|
| - |
|
397 |
|
| - |
|
398 |
If isAbtnRequired(aAbtnList, "btnMakeUnrelease") Then
|
| - |
|
399 |
varValues = Array( 5, "btnMakeUnrelease", null,_
|
| - |
|
400 |
"""_make_unreleased.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
|
| - |
|
401 |
"""onClick=""""return confirmAction('You are going to unrelease this package. \nDo you want to proceed?');""""""",_
|
| - |
|
402 |
"icons/i_make_unreleased.gif",_
|
| - |
|
403 |
"icons/i_make_unreleased_off.gif",_
|
| - |
|
404 |
"Unlock this package.",_
|
| - |
|
405 |
"Y",_
|
| - |
|
406 |
"Y",_
|
| - |
|
407 |
"N")
|
| - |
|
408 |
rsQry.AddNew varFields, varValues
|
| - |
|
409 |
End If
|
| - |
|
410 |
|
| - |
|
411 |
If isAbtnRequired(aAbtnList, "btnMakePending") Then
|
| - |
|
412 |
varValues = Array( 6, "btnMakePending", null,_
|
| - |
|
413 |
"""_make_pending.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
|
| - |
|
414 |
"""onClick=""""return confirmAction('Making this package pending for auto-build will prevent any further changes. \nDo you want to proceed?');""""""",_
|
| - |
|
415 |
"icons/i_make_pending.gif",_
|
| - |
|
416 |
"icons/i_make_pending_off.gif",_
|
| - |
|
417 |
"Make this package pending for build/release.",_
|
| - |
|
418 |
"Y",_
|
| - |
|
419 |
"Y",_
|
| - |
|
420 |
"N")
|
| - |
|
421 |
rsQry.AddNew varFields, varValues
|
| - |
|
422 |
End If
|
| - |
|
423 |
|
| - |
|
424 |
If isAbtnRequired(aAbtnList, "btnRejectPackage") Then
|
| - |
|
425 |
varValues = Array( 7, "btnRejectPackage", null,_
|
| - |
|
426 |
"""_make_rejected.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
|
| - |
|
427 |
"""onClick=""""return confirmAction('Rejecting a new package version will move it to Work-In-Progress. Rejecting a merge package version will simply remove it from pending. \nDo you want to proceed?');""""""",_
|
| - |
|
428 |
"icons/i_reject_pending.gif",_
|
| - |
|
429 |
"icons/i_reject_pending_off.gif",_
|
| - |
|
430 |
"Reject this package from Pending.",_
|
| - |
|
431 |
"Y",_
|
| - |
|
432 |
"Y",_
|
| - |
|
433 |
"N")
|
| - |
|
434 |
rsQry.AddNew varFields, varValues
|
| - |
|
435 |
End If
|
| - |
|
436 |
|
| - |
|
437 |
If isAbtnRequired(aAbtnList, "btnMoveToView") Then
|
| - |
|
438 |
varValues = Array( 8, "btnMoveToView", null,_
|
| - |
|
439 |
"""javascript:;""",_
|
| - |
|
440 |
"""onClick=""""MM_openBrWindow('_wform_change_group.asp?""& objPMod.ComposeURL() &""','MovePackage','resizable=yes,width=400,height=200');""""""",_
|
| - |
|
441 |
"images/abtn_move_package.gif",_
|
| - |
|
442 |
null,_
|
| - |
|
443 |
"Move this package to different Base View (Group).",_
|
| - |
|
444 |
"Y",_
|
| - |
|
445 |
"Y",_
|
| - |
|
446 |
"N")
|
| - |
|
447 |
rsQry.AddNew varFields, varValues
|
| - |
|
448 |
End If
|
| - |
|
449 |
|
| - |
|
450 |
If isAbtnRequired(aAbtnList, "btnReversionPackage") Then
|
| - |
|
451 |
varValues = Array( 9, "btnReversionPackage", null,_
|
| - |
|
452 |
"""javascript:;""",_
|
| - |
|
453 |
"""onClick=""""MM_openBrWindow('_wform_rename_version.asp?rfile=""& ScriptName & objPMod.ComposeURLWithout(""rfile"") &""','ReversionPackage','resizable=yes,width=600,height=200');""""""",_
|
| - |
|
454 |
"images/abtn_rename_version.gif",_
|
| - |
|
455 |
"images/abtn_rename_version_off.gif",_
|
| - |
|
456 |
"Reversion this package.",_
|
| - |
|
457 |
"Y",_
|
| - |
|
458 |
"Y",_
|
| - |
|
459 |
"N")
|
| - |
|
460 |
rsQry.AddNew varFields, varValues
|
| - |
|
461 |
End If
|
| - |
|
462 |
|
| - |
|
463 |
If isAbtnRequired(aAbtnList, "btnStickyNotes") Then
|
| - |
|
464 |
varValues = Array(10, "btnStickyNotes", null,_
|
| - |
|
465 |
"""javascript:;""",_
|
| - |
|
466 |
"""onClick=""""showHideNote();""""""",_
|
| - |
|
467 |
"notemanager/images/note.gif",_
|
| - |
|
468 |
null,_
|
| - |
|
469 |
"Sticky notes",_
|
| - |
|
470 |
"Y",_
|
| - |
|
471 |
"Y",_
|
| - |
|
472 |
"N")
|
| - |
|
473 |
rsQry.AddNew varFields, varValues
|
| - |
|
474 |
End If
|
| - |
|
475 |
|
| - |
|
476 |
If isAbtnRequired(aAbtnList, "btnObsoletePatch") Then
|
| - |
|
477 |
varValues = Array(11, "btnObsoletePatch", null,_
|
| - |
|
478 |
"""javascript:;""",_
|
| - |
|
479 |
"""onClick=""""MM_openBrWindow('_wform_obsolete_patch.asp?rfile=""& ScriptName &""&""& objPMod.ComposeURL() &""','ObsoletePatch','resizable=yes,width=400,height=250');""""""",_
|
| - |
|
480 |
"images/abtn_obsolete_patch.gif",_
|
| - |
|
481 |
"images/abtn_obsolete_patch_off.gif",_
|
| - |
|
482 |
"Make this patch obsolete.",_
|
| - |
|
483 |
"Y",_
|
| - |
|
484 |
"Y",_
|
| - |
|
485 |
"N")
|
| - |
|
486 |
rsQry.AddNew varFields, varValues
|
| - |
|
487 |
End If
|
| - |
|
488 |
|
| - |
|
489 |
If isAbtnRequired(aAbtnList, "btnUnobsoletePatch") Then
|
| - |
|
490 |
varValues = Array(12, "btnUnobsoletePatch", null,_
|
| - |
|
491 |
"""javascript:;""",_
|
| - |
|
492 |
"""onClick=""""MM_openBrWindow('_wform_obsolete_patch.asp?action=true&unobsolete=true&rfile=""& ScriptName &""&""& objPMod.ComposeURL() &""','ObsoletePatch','resizable=yes,width=400,height=250');""""""",_
|
| - |
|
493 |
"images/abtn_unobsolete_patch.gif",_
|
| - |
|
494 |
null,_
|
| - |
|
495 |
"Undo patch obsolete.",_
|
| - |
|
496 |
"Y",_
|
| - |
|
497 |
"Y",_
|
| - |
|
498 |
"N")
|
| - |
|
499 |
rsQry.AddNew varFields, varValues
|
| - |
|
500 |
End If
|
| - |
|
501 |
|
| - |
|
502 |
If isAbtnRequired(aAbtnList, "btnApprovePackage") Then
|
| - |
|
503 |
varValues = Array(13, "btnApprovePackage", null,_
|
| - |
|
504 |
"""_make_approved.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
|
| - |
|
505 |
"""onClick=""""return confirmAction('You are about to approve this package for auto-build. \nDo you want to proceed?');""""""",_
|
| - |
|
506 |
"icons/i_make_released.gif",_
|
| - |
|
507 |
"icons/i_make_released_off.gif",_
|
| - |
|
508 |
"Make this package released for automated build.",_
|
| - |
|
509 |
"Y",_
|
| - |
|
510 |
"Y",_
|
| - |
|
511 |
"N")
|
| - |
|
512 |
rsQry.AddNew varFields, varValues
|
| - |
|
513 |
End If
|
| - |
|
514 |
|
| - |
|
515 |
If isAbtnRequired(aAbtnList, "btnNewRelease") Then
|
| - |
|
516 |
varValues = Array(14, "btnNewRelease", null,_
|
| - |
|
517 |
"""javascript:go_submit( document.FormName, """"btnNewRelease"""" );""",_
|
| - |
|
518 |
null,_
|
| - |
|
519 |
"images/abtn_new_release.gif",_
|
| - |
|
520 |
"images/abtn_new_release_off.gif",_
|
| - |
|
521 |
"Create new release...",_
|
| - |
|
522 |
"Y",_
|
| - |
|
523 |
"Y",_
|
| - |
|
524 |
"N")
|
| - |
|
525 |
rsQry.AddNew varFields, varValues
|
| - |
|
526 |
End If
|
| - |
|
527 |
|
| - |
|
528 |
If isAbtnRequired(aAbtnList, "btnEditRelease") Then
|
| - |
|
529 |
varValues = Array(15, "btnEditRelease", null,_
|
| - |
|
530 |
"""javascript:go_submit( document.FormName, """"btnEditRelease"""" );""",_
|
| - |
|
531 |
null,_
|
| - |
|
532 |
"images/abtn_edit.gif",_
|
| - |
|
533 |
"images/abtn_edit_off.gif",_
|
| - |
|
534 |
"Edit selected release details...",_
|
| - |
|
535 |
"Y",_
|
| - |
|
536 |
"Y",_
|
| - |
|
537 |
"N")
|
| - |
|
538 |
rsQry.AddNew varFields, varValues
|
| - |
|
539 |
End If
|
| - |
|
540 |
|
| - |
|
541 |
If isAbtnRequired(aAbtnList, "btnDestroyRelease") Then
|
| - |
|
542 |
varValues = Array(16, "btnDestroyRelease", null,_
|
| - |
|
543 |
"""javascript:go_submit( document.FormName, """"btnDestroyRelease"""" );""",_
|
| - |
|
544 |
"""onClick=""""return confirmAction('You are about to destroy selected release.\nYou cannot undo this action.\nDo you want to proceed?');""""""",_
|
| - |
|
545 |
"images/abtn_destroy.gif",_
|
| - |
|
546 |
"images/abtn_destroy_off.gif",_
|
| - |
|
547 |
"Destroy selected release...",_
|
| - |
|
548 |
"Y",_
|
| - |
|
549 |
"Y",_
|
| - |
|
550 |
"N")
|
| - |
|
551 |
rsQry.AddNew varFields, varValues
|
| - |
|
552 |
End If
|
| - |
|
553 |
|
| - |
|
554 |
If isAbtnRequired(aAbtnList, "btnMergeManager") Then
|
| - |
|
555 |
varValues = Array(17, "btnMergeManager", null,_
|
| - |
|
556 |
"""javascript:go_submit( document.FormName, """"btnMergeManager"""" );""",_
|
| - |
|
557 |
null,_
|
| - |
|
558 |
"images/abtn_merge_manager.gif",_
|
| - |
|
559 |
"images/abtn_merge_manager_off.gif",_
|
| - |
|
560 |
"Select two releases to run merge manager...",_
|
| - |
|
561 |
"Y",_
|
| - |
|
562 |
"Y",_
|
| - |
|
563 |
"N")
|
| - |
|
564 |
rsQry.AddNew varFields, varValues
|
| - |
|
565 |
End If
|
| - |
|
566 |
|
| - |
|
567 |
If isAbtnRequired(aAbtnList, "btnMoveRelease") Then
|
| - |
|
568 |
varValues = Array(18, "btnMoveRelease", null,_
|
| - |
|
569 |
"""javascript:go_submit( document.FormName, """"btnMoveRelease"""" );""",_
|
| - |
|
570 |
null,_
|
| - |
|
571 |
"images/abtn_move_release.gif",_
|
| - |
|
572 |
"images/abtn_move_release_off.gif",_
|
| - |
|
573 |
"Move selected release vertically...",_
|
| - |
|
574 |
"Y",_
|
| - |
|
575 |
"Y",_
|
| - |
|
576 |
"N")
|
| - |
|
577 |
rsQry.AddNew varFields, varValues
|
| - |
|
578 |
End If
|
| - |
|
579 |
|
| - |
|
580 |
' NOTE: I do not think this one is ever used
|
| - |
|
581 |
If isAbtnRequired(aAbtnList, "btnPreviousVersions") Then
|
| - |
|
582 |
varValues = Array(19, "btnPreviousVersions", null,_
|
| - |
|
583 |
"""javascript:;""",_
|
| - |
|
584 |
"""onClick=""""MM_openBrWindow('_wform_previous_versions_history_release_notes.asp?OLDpv_id=""& parPv_id &""&pkg_id=""& pkgInfoHash.Item (""pkg_id"") &""&FLpkg_version=*""& pkgInfoHash.Item(""v_ext"") &""&FLuser_name=*&rfile=""& scriptName &""&""& objPMod.ComposeURL() &""#ANC_""& parPv_id &""','Previous Versions','resizable=yes,width=850,height='+ ( screen.height - 100 ) );""""""",_
|
| - |
|
585 |
"images/abtn_version_history.gif",_
|
| - |
|
586 |
null,_
|
| - |
|
587 |
null,_
|
| - |
|
588 |
"Y",_
|
| - |
|
589 |
"Y",_
|
| - |
|
590 |
"Y")
|
| - |
|
591 |
rsQry.AddNew varFields, varValues
|
| - |
|
592 |
End If
|
| - |
|
593 |
|
| - |
|
594 |
' NOTE: I do not think this one is ever used
|
| - |
|
595 |
If isAbtnRequired(aAbtnList, "btnObsoleteAll") Then
|
| - |
|
596 |
varValues = Array(20, "btnObsoleteAll", null,_
|
| - |
|
597 |
"""javascript:go_submit( document.FormName, """"btnObsoleteAll"""" );ShowProgress();""",_
|
| - |
|
598 |
null,_
|
| - |
|
599 |
null,_
|
| - |
|
600 |
null,_
|
| - |
|
601 |
null,_
|
| - |
|
602 |
"Y",_
|
| - |
|
603 |
"Y",_
|
| - |
|
604 |
"Y")
|
| - |
|
605 |
rsQry.AddNew varFields, varValues
|
| - |
|
606 |
End If
|
| - |
|
607 |
|
| - |
|
608 |
If isAbtnRequired(aAbtnList, "btnNewVersion-MASSREF") Then
|
| - |
|
609 |
varValues = Array(21, "btnNewVersion-MASSREF", null,_
|
| - |
|
610 |
"""form_new_version.asp?rtag_id=""& AssocMASSREFValue &""&pv_id=""& Request(""pv_id"")",_
|
| - |
|
611 |
null,_
|
| - |
|
612 |
"images/abtn_new_version_MassRef.gif",_
|
| - |
|
613 |
null,_
|
| - |
|
614 |
"Create new version of this package in associated MASS REF.",_
|
| - |
|
615 |
"Y",_
|
| - |
|
616 |
"Y",_
|
| - |
|
617 |
"N")
|
| - |
|
618 |
rsQry.AddNew varFields, varValues
|
| - |
|
619 |
End If
|
| - |
|
620 |
|
| - |
|
621 |
If isAbtnRequired(aAbtnList, "btnRecycleBin") Then
|
| - |
|
622 |
varValues = Array(22, "btnRecycleBin", null,_
|
| - |
|
623 |
"""_destroy_package.asp?pv_id=""& pkgInfoHash.Item(""pv_id"") &""&bfile=""& ScriptName &""&pkg_id=""& parPkgId &""&listby=""& parListBy &""""",_
|
| - |
|
624 |
"""onClick=""""return confirmAction('You are about to destroy ""& pkgInfoHash.Item (""pkg_name"") &"" ""& pkgInfoHash.Item (""pkg_version"") &"". You cannot undo this operation.\nDo you want to proceed?');""""""",_
|
| - |
|
625 |
"icons/i_destroy_package.gif",_
|
| - |
|
626 |
"i_destroy_package_off",_
|
| - |
|
627 |
null,_
|
| - |
|
628 |
"Y",_
|
| - |
|
629 |
"Y",_
|
| - |
|
630 |
"N")
|
| - |
|
631 |
rsQry.AddNew varFields, varValues
|
| - |
|
632 |
End If
|
| - |
|
633 |
|
| - |
|
634 |
If isAbtnRequired(aAbtnList, "btnDeprecation") Then
|
| - |
|
635 |
varValues = Array(23, "btnDeprecation", null,_
|
| - |
|
636 |
"""javascript:;""",_
|
| - |
|
637 |
"""onClick='MM_openBrWindow(""""_wform_deprecate_package.asp?rfile=""& scriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id &"""""",""""DeprecatePackage"""",""""resizable=yes,width=600,height=300"""")' class='body_txt' title='Deprecate the package.'""",_
|
| - |
|
638 |
"images/BombBorder.gif",_
|
| - |
|
639 |
null,_
|
| - |
|
640 |
"Deprecate this package in this release.",_
|
| - |
|
641 |
"Y",_
|
| - |
|
642 |
"Y",_
|
| - |
|
643 |
"N")
|
| - |
|
644 |
rsQry.AddNew varFields, varValues
|
| - |
|
645 |
End If
|
| - |
|
646 |
|
| - |
|
647 |
If isAbtnRequired(aAbtnList, "btnUnDeprecation") Then
|
| - |
|
648 |
varValues = Array(24, "btnUnDeprecation", null,_
|
| - |
|
649 |
"""_wform_undeprecate_package.asp?rfile=""& scriptName &""&pkg_id=""& pkgInfoHash.Item(""pkg_id"") &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id &""' class='body_txt' title='Undeprecate the package.""",_
|
| - |
|
650 |
"""onClick=""""return confirmAction('You are about to undeprecate package: ""& pkgInfoHash.Item (""pkg_name"") &"". \nDo you want to proceed?');""""""",_
|
| - |
|
651 |
"images/BombBorder.gif",_
|
| - |
|
652 |
null,_
|
| - |
|
653 |
null,_
|
| - |
|
654 |
"Y",_
|
| - |
|
655 |
"Y",_
|
| - |
|
656 |
"N")
|
| - |
|
657 |
rsQry.AddNew varFields, varValues
|
| - |
|
658 |
End If
|
| - |
|
659 |
|
| - |
|
660 |
If isAbtnRequired(aAbtnList, "btnAdminView") Then
|
| - |
|
661 |
varValues = Array(25, "btnAdminView", null,_
|
| - |
|
662 |
"""javascript:go_submit( document.FormName, """"btnAdminView"""" );""",_
|
| - |
|
663 |
null,_
|
| - |
|
664 |
"images/view_admin.gif",_
|
| - |
|
665 |
null,_
|
| - |
|
666 |
"Administer the views in the project.",_
|
| - |
|
667 |
"Y",_
|
| - |
|
668 |
"Y",_
|
| - |
|
669 |
"N")
|
| - |
|
670 |
rsQry.AddNew varFields, varValues
|
| - |
|
671 |
End If
|
| - |
|
672 |
|
| - |
|
673 |
' NOTE: I do not think this one is ever used
|
| - |
|
674 |
If isAbtnRequired(aAbtnList, "btnAddProc") Then
|
| - |
|
675 |
varValues = Array(26, "btnAddProc", "Add Process",_
|
| - |
|
676 |
"""javascript:;""",_
|
| - |
|
677 |
"""onClick=""""MM_openBrWindow('wAddProc.asp?rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','AddProd','scrollbars=yes,resizable=yes,width=800,height=500');""""""",_
|
| - |
|
678 |
"icons/btn_add.gif",_
|
| - |
|
679 |
null,_
|
| - |
|
680 |
null,_
|
| - |
|
681 |
"Y",_
|
| - |
|
682 |
"Y",_
|
| - |
|
683 |
"N")
|
| - |
|
684 |
rsQry.AddNew varFields, varValues
|
| - |
|
685 |
End If
|
| - |
|
686 |
|
| - |
|
687 |
If isAbtnRequired(aAbtnList, "btnEditGBE_Machtype") Then
|
| - |
|
688 |
varValues = Array(27, "btnEditGBE_Machtype", null,_
|
| - |
|
689 |
"""javascript:;""",_
|
| - |
|
690 |
"""onClick=""""MM_openBrWindow('wAddMachtype.asp?type=edit&gbe_id=""& gbe_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','EditProd','scrollbars=yes,resizable=yes,width=600,height=220');""""""",_
|
| - |
|
691 |
"icons/i_edit.gif",_
|
| - |
|
692 |
"icons/i_edit_off.gif",_
|
| - |
|
693 |
"Edit this GBE MachType value",_
|
| - |
|
694 |
"Y",_
|
| - |
|
695 |
"Y",_
|
| - |
|
696 |
"N")
|
| - |
|
697 |
rsQry.AddNew varFields, varValues
|
| - |
|
698 |
End If
|
| - |
|
699 |
|
| - |
|
700 |
If isAbtnRequired(aAbtnList, "btnDeleteGBE_Machtype") Then
|
| - |
|
701 |
varValues = Array(28, "btnDeleteGBE_Machtype", null,_
|
| - |
|
702 |
"""_DeleteMachtype.asp?rfile=""& SCRIPT_NAME &""&gbe_id=""& gbe_id &""&""& objPMod.ComposeURL()",_
|
| - |
|
703 |
"""onClick=""""return confirmAction('Remove \'""& GBE_VALUE &""\' from this list?');""""""",_
|
| - |
|
704 |
"icons/i_remove.gif",_
|
| - |
|
705 |
null,_
|
| - |
|
706 |
"Delete this GBE MachType value",_
|
| - |
|
707 |
"Y",_
|
| - |
|
708 |
"Y",_
|
| - |
|
709 |
"N")
|
| - |
|
710 |
rsQry.AddNew varFields, varValues
|
| - |
|
711 |
End If
|
| - |
|
712 |
|
| - |
|
713 |
If isAbtnRequired(aAbtnList, "btnEditDaemon") Then
|
| - |
|
714 |
varValues = Array(29, "btnEditDaemon", null,_
|
| - |
|
715 |
"""javascript:;""",_
|
| - |
|
716 |
"""onClick=""""MM_openBrWindow('wAddDaemon.asp?type=edit&rcon_id=""& rcon_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','EditProd','scrollbars=yes,resizable=yes,width=600,height=220');""""""",_
|
| - |
|
717 |
"icons/i_edit.gif",_
|
| - |
|
718 |
"icons/i_edit_off.gif",_
|
| - |
|
719 |
"Edit Daemon",_
|
| - |
|
720 |
"Y",_
|
| - |
|
721 |
"Y",_
|
| - |
|
722 |
"N")
|
| - |
|
723 |
rsQry.AddNew varFields, varValues
|
| - |
|
724 |
End If
|
| - |
|
725 |
|
| - |
|
726 |
If isAbtnRequired(aAbtnList, "btnDeleteDaemon") Then
|
| - |
|
727 |
varValues = Array(30, "btnDeleteDaemon", null,_
|
| - |
|
728 |
"""_DeleteDaemon.asp?rcon_id=""& rcon_id &""&""& objPMod.ComposeURL()",_
|
| - |
|
729 |
"""onClick=""""return confirmAction('Remove Daemon: \'""& Daemon &""\' from this list?');""""""",_
|
| - |
|
730 |
"icons/i_remove.gif",_
|
| - |
|
731 |
null,_
|
| - |
|
732 |
"Delete Daemon",_
|
| - |
|
733 |
"Y",_
|
| - |
|
734 |
"Y",_
|
| - |
|
735 |
"N")
|
| - |
|
736 |
rsQry.AddNew varFields, varValues
|
| - |
|
737 |
End If
|
| - |
|
738 |
|
| - |
|
739 |
If isAbtnRequired(aAbtnList, "btnArchivedVersionHistory") Then
|
| - |
|
740 |
varValues = Array(31, "btnArchivedVersionHistory", null,_
|
| - |
|
741 |
"""javascript:;""",_
|
| - |
|
742 |
"""onClick=""""MM_openBrWindow('_wform_archived_versions_history_release_notes.asp?OLDpv_id=""& parPv_id &""&pkg_id=""& pkgInfoHash.Item (""pkg_id"") &""&FLpkg_version=*""& pkgInfoHash.Item(""v_ext"") &""&FLuser_name=*&rfile=""& scriptName &""&""& objPMod.ComposeURL() &""#ANC_""& parPv_id &""','History','resizable=yes,width=850,height='+ ( screen.height - 100 ) );""""""",_
|
| - |
|
743 |
"images/abtn_version_archived_history.gif",_
|
| - |
|
744 |
null,_
|
| - |
|
745 |
"Show archived version history of this package.",_
|
| - |
|
746 |
"Y",_
|
| - |
|
747 |
"Y",_
|
| - |
|
748 |
"Y")
|
| - |
|
749 |
rsQry.AddNew varFields, varValues
|
| - |
|
750 |
End If
|
| - |
|
751 |
|
| - |
|
752 |
If isAbtnRequired(aAbtnList, "btnPendingIntegration") Then
|
| - |
|
753 |
varValues = Array(32, "btnPendingIntegration", null,_
|
| - |
|
754 |
"""_modify_product_state.asp?state_id=1&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
|
| - |
|
755 |
"""onClick=""""return confirmAction('Do you want to proceed to make this product pending for INTEGRATION?');""""""",_
|
| - |
|
756 |
"icons/PendingIntegration.gif",_
|
| - |
|
757 |
null,_
|
| - |
|
758 |
"Make this product pending for Integration.",_
|
| - |
|
759 |
"Y",_
|
| - |
|
760 |
"Y",_
|
| - |
|
761 |
"N")
|
| - |
|
762 |
rsQry.AddNew varFields, varValues
|
| - |
|
763 |
End If
|
| - |
|
764 |
|
| - |
|
765 |
If isAbtnRequired(aAbtnList, "btnPendingTest") Then
|
| - |
|
766 |
varValues = Array(33, "btnPendingTest", null,_
|
| - |
|
767 |
"""_modify_product_state.asp?state_id=2&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
|
| - |
|
768 |
"""onClick=""""return confirmAction('Do you want to proceed to make this product pending for TEST?');""""""",_
|
| - |
|
769 |
"icons/PendingTest.gif",_
|
| - |
|
770 |
null,_
|
| - |
|
771 |
"Make this product pending for Test.",_
|
| - |
|
772 |
"Y",_
|
| - |
|
773 |
"Y",_
|
| - |
|
774 |
"N")
|
| - |
|
775 |
rsQry.AddNew varFields, varValues
|
| - |
|
776 |
End If
|
| - |
|
777 |
|
| - |
|
778 |
If isAbtnRequired(aAbtnList, "btnPendingDeployment") Then
|
| - |
|
779 |
varValues = Array(34, "btnPendingDeployment", null,_
|
| - |
|
780 |
"""_modify_product_state.asp?state_id=3&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
|
| - |
|
781 |
"""onClick=""""return confirmAction('Do you want to proceed to make this product pending for DEPLOYMENT?');""""""",_
|
| - |
|
782 |
"icons/PendingDeployment.gif",_
|
| - |
|
783 |
null,_
|
| - |
|
784 |
"Make this product pending for Deployment.",_
|
| - |
|
785 |
"Y",_
|
| - |
|
786 |
"Y",_
|
| - |
|
787 |
"N")
|
| - |
|
788 |
rsQry.AddNew varFields, varValues
|
| - |
|
789 |
End If
|
| - |
|
790 |
|
| - |
|
791 |
If isAbtnRequired(aAbtnList, "btnRejectProduct") Then
|
| - |
|
792 |
varValues = Array(35, "btnRejectProduct", null,_
|
| - |
|
793 |
"""_modify_product_state.asp?state_id=4&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
|
| - |
|
794 |
"""onClick=""""return confirmAction('Do you want to REJECT this product from DEPLOYMENT?');""""""",_
|
| - |
|
795 |
"icons/i_reject_pending.gif",_
|
| - |
|
796 |
null,_
|
| - |
|
797 |
"Reject this product from Deployment.",_
|
| - |
|
798 |
"Y",_
|
| - |
|
799 |
"Y",_
|
| - |
|
800 |
"N")
|
| - |
|
801 |
rsQry.AddNew varFields, varValues
|
| - |
|
802 |
End If
|
| - |
|
803 |
|
| - |
|
804 |
If isAbtnRequired(aAbtnList, "btnPendingIntegrateAndDeploy") Then
|
| - |
|
805 |
varValues = Array(36, "btnPendingIntegrateAndDeploy", null,_
|
| - |
|
806 |
"""_modify_product_state.asp?state_id=5&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
|
| - |
|
807 |
"""onClick=""""return confirmAction('Do you want to proceed to make this product pending for INTEGRATION and DEPLOYMENT?');""""""",_
|
| - |
|
808 |
"icons/PendingDeployment.gif",_
|
| - |
|
809 |
null,_
|
| - |
|
810 |
"Make this product pending for Integration and Deployment.",_
|
| - |
|
811 |
"Y",_
|
| - |
|
812 |
"Y",_
|
| - |
|
813 |
"N")
|
| - |
|
814 |
rsQry.AddNew varFields, varValues
|
| - |
|
815 |
End If
|
| - |
|
816 |
|
| - |
|
817 |
If isAbtnRequired(aAbtnList, "btnDeleteSchedule") Then
|
| - |
|
818 |
varValues = Array(37, "btnDeleteSchedule", null,_
|
| - |
|
819 |
"""_DeleteSchedule.asp?scheduled_id=""& scheduled_id &""&""& objPMod.ComposeURL()",_
|
| - |
|
820 |
"""onClick=""""return confirmAction('Remove Schedule from this list?');""""""",_
|
| - |
|
821 |
"icons/i_remove.gif",_
|
| - |
|
822 |
null,_
|
| - |
|
823 |
"Delete Schedule",_
|
| - |
|
824 |
"Y",_
|
| - |
|
825 |
"Y",_
|
| - |
|
826 |
"N")
|
| - |
|
827 |
rsQry.AddNew varFields, varValues
|
| - |
|
828 |
End If
|
| - |
|
829 |
|
| - |
|
830 |
If isAbtnRequired(aAbtnList, "btnApproveMerge") Then
|
| - |
|
831 |
varValues = Array(38, "btnApproveMerge", null,_
|
| - |
|
832 |
"""_approve_merge.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
|
| - |
|
833 |
"""onClick=""""return confirmAction('The release will be updated by this merge operation. \nDo you want to proceed?');""""""",_
|
| - |
|
834 |
"icons/i_make_released.gif",_
|
| - |
|
835 |
"icons/i_make_released_off.gif",_
|
| - |
|
836 |
"Approve and carry out the pending merge operation",_
|
| - |
|
837 |
"Y",_
|
| - |
|
838 |
"Y",_
|
| - |
|
839 |
"N")
|
| - |
|
840 |
rsQry.AddNew varFields, varValues
|
| - |
|
841 |
End If
|
| - |
|
842 |
|
| - |
|
843 |
' Move cursor to the first record
|
| - |
|
844 |
rsQry.MoveFirst
|
| - |
|
845 |
|
| - |
|
846 |
If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
|
| - |
|
847 |
Call LoadButtons ( rsQry.GetRows() )
|
| - |
|
848 |
End If
|
| - |
|
849 |
|
| - |
|
850 |
rsQry.Close
|
| - |
|
851 |
Set rsQry = Nothing
|
| - |
|
852 |
End Sub
|
| - |
|
853 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
854 |
Public Sub LoadButtons ( aRows )
|
| - |
|
855 |
Dim nProperty, newArrayDim, LastRow, rowNum
|
| - |
|
856 |
|
| - |
|
857 |
LastRow = UBound( aRows, 2 )
|
| - |
|
858 |
|
| - |
|
859 |
For rowNum = 0 To LastRow
|
| - |
|
860 |
' Increase array by 1
|
| - |
|
861 |
newArrayDim = LastRowInx() + 1
|
| - |
|
862 |
ReDim Preserve mArrAbtnDef( mNumOfProperties, newArrayDim )
|
| - |
|
863 |
|
| - |
|
864 |
|
| - |
|
865 |
mobjNameDefMap.Item ( Cstr( aRows ( InxName, rowNum ) ) ) = newArrayDim
|
| - |
|
866 |
|
| - |
|
867 |
For nProperty = 0 To mLastPropertyInx
|
| - |
|
868 |
mArrAbtnDef ( nProperty, newArrayDim ) = aRows ( nProperty, rowNum )
|
| - |
|
869 |
|
| - |
|
870 |
Next
|
| - |
|
871 |
|
| - |
|
872 |
Next
|
| - |
|
873 |
|
| - |
|
874 |
End Sub
|
| - |
|
875 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
876 |
Private Function LastRowInx ()
|
| - |
|
877 |
LastRowInx = UBound ( mArrAbtnDef, 2 )
|
| - |
|
878 |
End Function
|
| - |
|
879 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
880 |
Public Sub AddSeparatorAfter ( sItemName, sSeparatorWidth )
|
| - |
|
881 |
If InStr( sItemName, " " ) > 0 Then Err.Raise 8, "Method AddSeparatorAfter", "Item Name '"& sItemName &"' cannot have spaces."
|
| - |
|
882 |
mobjSeparator.Add (Cstr(sItemName)), CStr(sSeparatorWidth)
|
| - |
|
883 |
End Sub
|
| - |
|
884 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
885 |
Public Sub AddSeparator ( sSeparatorWidth )
|
| - |
|
886 |
mobjSeparator.Add ( Cstr(mArrAbtnDef(InxName, LastItemInx())) ), CStr(sSeparatorWidth)
|
| - |
|
887 |
End Sub
|
| - |
|
888 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
889 |
Private Sub SetItemDefaults ( sItemName )
|
| - |
|
890 |
' Additional default setup
|
| - |
|
891 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxActive, enumDB_YES ) ' Default Active = enumDB_YES
|
| - |
|
892 |
End Sub
|
| - |
|
893 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
894 |
Public Sub Text ( sItemName, Value )
|
| - |
|
895 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxTxt, Value )
|
| - |
|
896 |
End Sub
|
| - |
|
897 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
898 |
Public Sub ItemID ( sItemName, Value )
|
| - |
|
899 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxID, Value )
|
| - |
|
900 |
End Sub
|
| - |
|
901 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
902 |
Public Sub Image ( sItemName, Value )
|
| - |
|
903 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxImg, Value )
|
| - |
|
904 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxImgOff, Value ) ' Default image disable to be the same as image
|
| - |
|
905 |
End Sub
|
| - |
|
906 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
907 |
Public Sub ImageOff ( sItemName, Value )
|
| - |
|
908 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxImgOff, Value )
|
| - |
|
909 |
End Sub
|
| - |
|
910 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
911 |
Public Sub Link ( sItemName, Value )
|
| - |
|
912 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxLink, Value )
|
| - |
|
913 |
End Sub
|
| - |
|
914 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
915 |
Public Sub EventHandler ( sItemName, Value )
|
| - |
|
916 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxEventHandler, Value )
|
| - |
|
917 |
End Sub
|
| - |
|
918 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
919 |
Public Sub Hint ( sItemName, Value )
|
| - |
|
920 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxHint, Value )
|
| - |
|
921 |
End Sub
|
| - |
|
922 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
923 |
Public Sub Visible ( sItemName, Value )
|
| - |
|
924 |
'Response.write sItemName &"here"& mobjNameDefMap.Item (Cstr(sItemName))
|
| - |
|
925 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxVisible, Value )
|
| - |
|
926 |
End Sub
|
| - |
|
927 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
928 |
Public Sub Active ( sItemName, Value )
|
| - |
|
929 |
'Response.write sItemName &"here"& mobjNameDefMap.Item (Cstr(sItemName))
|
| - |
|
930 |
Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxActive, Value )
|
| - |
|
931 |
End Sub
|
| - |
|
932 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
933 |
Private Sub Class_Initialize()
|
| - |
|
934 |
'// Perform action on creation of object. e.g. Set myObj = New ThisClassName
|
| - |
|
935 |
Set mobjNameDefMap = CreateObject("Scripting.Dictionary")
|
| - |
|
936 |
Set mobjIdDefMap = CreateObject("Scripting.Dictionary")
|
| - |
|
937 |
Set mobjSeparator = CreateObject("Scripting.Dictionary")
|
| - |
|
938 |
Set mobjACActionsMap = CreateObject("Scripting.Dictionary")
|
| - |
|
939 |
|
| - |
|
940 |
'mbIsReadonly = FALSE ' Tell control that it should use only readonly action buttons (i.e. actions which will not alter database )
|
| - |
|
941 |
mReadonlyActionBehaviour = enumABTNCTRL_ON_READONLY_HIDE ' Tell control what to do by default if mbIsReadonly = TRUE
|
| - |
|
942 |
|
| - |
|
943 |
mnButtonSpacer = 0
|
| - |
|
944 |
mnImageHspace = 4
|
| - |
|
945 |
|
| - |
|
946 |
mNumOfProperties = 11 ' Number of properties in array which define one menu item.
|
| - |
|
947 |
mLastPropertyInx = mNumOfProperties - 1
|
| - |
|
948 |
|
| - |
|
949 |
mbDisableAll = FALSE
|
| - |
|
950 |
|
| - |
|
951 |
ReDim mArrAbtnDef ( mNumOfProperties, -1 )
|
| - |
|
952 |
InxID = 0
|
| - |
|
953 |
InxName = 1
|
| - |
|
954 |
InxTxt = 2
|
| - |
|
955 |
InxLink = 3
|
| - |
|
956 |
InxEventHandler = 4
|
| - |
|
957 |
InxImg = 5
|
| - |
|
958 |
InxImgOff = 6
|
| - |
|
959 |
InxHint = 7
|
| - |
|
960 |
InxVisible = 8
|
| - |
|
961 |
InxActive = 9
|
| - |
|
962 |
InxIsReadonlyAction = 10
|
| - |
|
963 |
|
| - |
|
964 |
End Sub
|
| - |
|
965 |
'-----------------------------------------------------------------------------------------------------------------
|
| - |
|
966 |
Private Sub Class_Terminate()
|
| - |
|
967 |
'// Perform action on object disposal. e.g. Set myObj = Nothing
|
| - |
|
968 |
Set mobjNameDefMap = Nothing
|
| - |
|
969 |
Set mobjIdDefMap = Nothing
|
| - |
|
970 |
Set mobjSeparator = Nothing
|
| - |
|
971 |
Set mobjACActionsMap = Nothing
|
| - |
|
972 |
|
| - |
|
973 |
|
| - |
|
974 |
End Sub
|
| - |
|
975 |
'-----------------------------------------------------------------------------------------------------------------
|
| 419 |
End Class
|
976 |
End Class
|
| 420 |
%>
|
- |
|
| 421 |
|
977 |
%>
|
| - |
|
978 |
|