Subversion Repositories DevTools

Rev

Rev 7022 | Rev 7235 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
129 ghuddy 1
<!-- #INCLUDE FILE="..\common\adovbs.inc" -->
119 ghuddy 2
<%
3
'=============================================================
4
'//
127 ghuddy 5
'//                  Action Button Control
119 ghuddy 6
'//
7
'=============================================================
8
%>
9
<%
10
'--------------- Global Constants ----------------
11
Const enumABTNCTRL_ON_READONLY_HIDE = 1
12
Const enumABTNCTRL_ON_READONLY_DISABLE = 2
13
'-------------------------------------------------
14
 
15
Class ActionButtonControl
127 ghuddy 16
 
17
   Private mArrAbtnDef()
18
   Private mobjNameDefMap        ' Item can be accesed by name. Must be unique within one page
19
   Private mobjIdDefMap          ' Item can be accesed by id. Must be unique within one page. If NULL, ubound is assigned to it
20
   Private mobjSeparator         ' Has a name of item after separator is applied
21
   Private mobjACActionsMap      ' Map of buttons to actions from access control
22
 
23
   Private mnButtonSpacer
24
   Private mnImageHspace
25
 
26
   Private mNumOfProperties
27
   Private mLastPropertyInx
28
 
29
   Private mbDisableAll
30
 
31
   Private mbIsReadonly
4083 dpurdie 32
   Private mbIsClosed
127 ghuddy 33
   Private mReadonlyActionBehaviour
34
 
35
   Private InxName
36
   Private InxTxt
37
   Private InxLink
38
   Private InxEventHandler
39
   Private InxImg
40
   Private InxImgOff
41
   Private InxHint
42
   Private InxVisible
43
   Private InxActive
44
   Private InxIsReadonlyAction
4083 dpurdie 45
   Private InxHideOnClosed
127 ghuddy 46
 
47
 
48
   Public Property Let AllActive ( cActive )
49
      If cActive = enumDB_NO Then
50
         mbDisableAll = TRUE
51
      Else
52
         mbDisableAll = FALSE
53
      End If
54
 
55
   End Property
56
 
57
   Public Property Let ButtonSpacer ( nWidth )
58
      mnButtonSpacer = nWidth
59
   End Property
60
 
61
   Public Property Let ImageHspace ( nWidth )
62
      mnImageHspace = nWidth
63
   End Property
64
 
65
   Public Property Let IsReadonlyAction ( IsReadonly )
66
      If IsReadonly = enumDB_YES Then
67
         mbIsReadonly = TRUE
68
 
69
      ElseIf IsReadonly = enumDB_NO Then
70
         mbIsReadonly = FALSE
71
      Else
72
         mbIsReadonly = IsReadonly
73
      End If
4083 dpurdie 74
   End Property
127 ghuddy 75
 
4083 dpurdie 76
   Public Property Let setClosed ( isClosed )
77
      mbIsClosed = isClosed
127 ghuddy 78
   End Property
4083 dpurdie 79
 
127 ghuddy 80
   Public Property Let ReadonlyActionBehaviour ( nEnum )
81
      mReadonlyActionBehaviour = nEnum
82
   End Property
83
 
84
   '-----------------------------------------------------------------------------------------------------------------
85
   Public Sub SetRelationship ( sButtonName, sActionName )
86
      Call mobjACActionsMap.Add ( sButtonName, sActionName )
87
   End Sub
88
   '-----------------------------------------------------------------------------------------------------------------
89
   Private Sub SetItemPropertyByIndex ( nInx, nProperty, Value )
90
      If nInx = "" Then Exit Sub   ' Exit sub if you don't find defined button
91
 
92
      If nProperty = ""  OR  Value = "" Then Err.Raise 8, "Method SetItemPropertyByIndex", "Empty parameters found. nInx="& nInx &", nProperty="& nProperty &", Value="& Value
93
 
94
      mArrAbtnDef ( nProperty, nInx ) = Value
95
 
96
      'Response.write "mArrAbtnDef ( "& nProperty &", "& nInx &" ) = "& Value &"<br>"
97
   End Sub
98
   '-----------------------------------------------------------------------------------------------------------------
143 ghuddy 99
   Private Function GetItemPropertyByIndex ( nInx, nProperty )
100
      GetItemPropertyByIndex = ""
101
      If nInx = "" Then Exit Function   ' Exit sub if you don't find defined button
102
 
103
      If nProperty = ""  Then Err.Raise 8, "Method GetItemPropertyByIndex", "Empty parameters found. nInx="& nInx &", nProperty="& nProperty
104
 
105
      GetItemPropertyByIndex = Cstr(mArrAbtnDef ( nProperty, nInx ))
106
   End Function
107
   '-----------------------------------------------------------------------------------------------------------------
127 ghuddy 108
   Private Function LastItemInx ()
109
       LastItemInx = UBound ( mArrAbtnDef, 2 )
110
   End Function
111
   '-----------------------------------------------------------------------------------------------------------------
112
   Public Sub Render ( aAbtnList, ByRef oAccessControl )
113
      Dim itemInx, itemName, nLastItemInx, btnImage, ButtonStr, ButtonStrDisabled, bIsVisibleAC, bIsActiveAC
6873 dpurdie 114
      Response.write "<table cellpadding='0' cellspacing='0' width='1' ><tr>"
127 ghuddy 115
 
116
      For Each itemName in aAbtnList
117
         itemInx = mobjNameDefMap.Item (Cstr(itemName))
118
 
119
         '-- Define Image
120
         btnImage = "<img src='images/spacer.gif' width='"& mnButtonSpacer &"' height='1' align='absmiddle' border='0'>"
121
         If (mArrAbtnDef( InxImg, itemInx ) <> "") Then
122
            btnImage = "<img src='"& mArrAbtnDef( InxImg, itemInx ) &"' hspace='"& mnImageHspace &"' border='0' align='absmiddle'>"
123
         End If
124
 
125
         '-- Define Button
5190 dpurdie 126
         '-- Two forms
127
         '--    Starts with "vixConfirm - Generate confirmation dialog with url
128
         '--    Else 'eval' and use in raw form
129
         Dim uhref,uevent
130
         uhref = Eval( mArrAbtnDef( InxLink, itemInx ) )
131
         uevent = Eval( mArrAbtnDef( InxEventHandler, itemInx ) )
132
         If InStr( uevent, "vixConfirm" ) = 1 Then
133
            uevent = Replace(uevent, "HREF", uhref )
134
            uevent = "onclick=""" & uevent & """"
135
            uhref = "javascript:;"
136
         End If
6827 dpurdie 137
         Dim hint: hint = mArrAbtnDef( InxHint, itemInx )
138
         If uhref = "javascript:;" Then
139
             ButtonStr = _
140
                "<td nowrap>"&_
141
                "<span id='"& mArrAbtnDef( InxName, itemInx ) &"' "&_
142
                " "& uevent &" class='menu_link' title='"& hint &"'>" &_
143
                btnImage & mArrAbtnDef( InxTxt, itemInx ) &"<span>"&_
144
                "</td>"
145
         Else
146
             ButtonStr = _
147
                "<td nowrap>"&_
148
                "<a id='"& mArrAbtnDef( InxName, itemInx ) &"' "&_
149
                " name='"& mArrAbtnDef( InxName, itemInx ) &"' href='"& uhref &"' "&_
150
                " "& uevent &" class='menu_link' title='"& hint &"'>"&_
151
                btnImage & mArrAbtnDef( InxTxt, itemInx ) &"</a>"&_
152
                "</td>"
153
         End If
127 ghuddy 154
 
5814 dpurdie 155
			'-- Define Disabled Button
156
            '   A Null value of '' will use InxImg with the lessOpacity Class
6176 dpurdie 157
            hint = hint & " [Disabled]" 
5814 dpurdie 158
            If IsNull(mArrAbtnDef( InxImgOff, itemInx )) Then
159
                ButtonStrDisabled = _
160
                    "<td nowrap>"&_
6176 dpurdie 161
                    "<img src='"& mArrAbtnDef( InxImg, itemInx ) &"' hspace='2' border='0' align='absmiddle' class='lessOpacity' title='"&hint&"'>"&_
5814 dpurdie 162
                    "<label class='menu_txt'>"& mArrAbtnDef( InxTxt, itemInx ) &"</label>"&_
163
                    "</td>"
164
            Else
165
                ButtonStrDisabled = _
166
                    "<td nowrap>"&_
6176 dpurdie 167
                    "<img src='"& mArrAbtnDef( InxImgOff, itemInx ) &"' hspace='2' border='0' align='absmiddle' title='"&hint&"'>"&_
5814 dpurdie 168
                    "<label class='menu_txt'>"& mArrAbtnDef( InxTxt, itemInx ) &"</label>"&_
169
                    "</td>"
170
            End If
127 ghuddy 171
 
172
 
173
         '-- Get Access Control permissions --
174
         bIsVisibleAC = TRUE
175
         bIsActiveAC = TRUE
176
         If NOT IsNull( oAccessControl ) Then
177
            ' Access control object is supplied
178
 
179
            If mobjACActionsMap.Exists ( itemName ) Then
180
               ' Relationship supplied
181
               bIsVisibleAC = oAccessControl.IsVisible ( mobjACActionsMap.Item( itemName ) )
182
               bIsActiveAC = oAccessControl.IsActive ( mobjACActionsMap.Item( itemName ) )
143 ghuddy 183
               'Response.write "<br>" & itemName &":"& bIsVisibleAC &"-"& bIsActiveAC
127 ghuddy 184
            End If
185
 
186
         End If
187
 
4670 dpurdie 188
         ' Hide Buttons on closed (Release is closed, or archived)
4083 dpurdie 189
         If mbIsClosed AND (mArrAbtnDef( InxHideOnClosed, itemInx ) = enumDB_YES) Then
190
            bIsVisibleAC = FALSE
191
         End If
127 ghuddy 192
 
4670 dpurdie 193
         ' Debug
194
         'Response.write "<br>Render["&itemInx &"](V:"&itemName &","&_
195
         '   mArrAbtnDef( InxVisible, itemInx )&":" &bIsVisibleAC & ",A:"&_
196
         '   mArrAbtnDef( InxActive, itemInx ) &":" &bIsActiveAC  & ")"
197
 
198
         ' Button 
199
         '      is visible AND to be shown
200
         ' OR   isa width specification
201
         ' OR   isa height specification
202
         '
127 ghuddy 203
         If (  ( mArrAbtnDef( InxVisible, itemInx ) = enumDB_YES)   AND   bIsVisibleAC   ) _
204
            OR  (InStr( itemName, "width=" ) > 0)  _
205
            OR  (InStr( itemName, "height=" ) > 0) Then
206
            ' --- Display if Visible ---
207
 
208
            'AND  (NOT bIsActiveAC)
209
            '( mbDisableAll OR (  mArrAbtnDef( InxActive, itemInx ) = enumDB_NO )     )   AND ( itemInx <> "" )
210
            'Response.write itemName &":"& mbDisableAll &"-"& Eval( mArrAbtnDef( InxActive, itemInx ) = enumDB_NO ) &"-"& Eval( NOT bIsActiveAC ) &"-"& itemInx &"<br>"
211
            If  ( itemInx <> "" ) AND _
212
               ( mbDisableAll  OR _
213
                  (  ( mArrAbtnDef( InxActive, itemInx ) = enumDB_NO )  OR  (NOT bIsActiveAC)  ) _
214
               ) _
215
            Then
143 ghuddy 216
               'Response.Write "<br>"&itemName&" is disabled," & itemInx & "," & mbDisableAll & "," & mArrAbtnDef( InxActive, itemInx ) & "," & mArrAbtnDef( InxVisible, itemInx )
127 ghuddy 217
 
218
               ' --- Display DISABLED Button Item ---
219
               Response.write ButtonStrDisabled
220
 
221
               If mnButtonSpacer > 0 Then
222
                  Response.write "<td><img src='images/spacer.gif' width='"& mnButtonSpacer &"' height='1' align='absmiddle'></td>"
223
               End If
224
 
225
            Else
226
 
227
               ' --- Display Action Button Item ---
228
               If   ( NOT mbIsReadonly )  OR _
229
                     ( mbIsReadonly  AND  mArrAbtnDef( InxIsReadonlyAction, itemInx ) = enumDB_YES ) Then
230
 
231
                  If InStr( itemName, "width=" ) > 0 Then
232
                     Response.write "<td><img src='images/spacer.gif' "& itemName &" height='1' align='absmiddle'></td>"
233
 
234
                  ElseIf InStr( itemName, "height=" ) > 0 Then
235
                     Response.write "<td><img src='images/bg_bage_2.gif' width='1' "& itemName &" align='absmiddle' hspace='4'></td>"
236
 
237
                  Else
238
                     '/* It is a button, i.e. Display Button */
239
 
240
                     ' Check if button is loaded from Database
241
                     If itemInx = "" Then    Err.Raise 8, "Method Render", "Definition for item name '"& itemName &"' not found."
242
 
243
                     Response.write ButtonStr
143 ghuddy 244
                     'Response.Write "<br>"&itemName&" is enabled"
127 ghuddy 245
 
246
                     If mnButtonSpacer > 0 Then
247
                        Response.write "<td><img src='images/spacer.gif' width='"& mnButtonSpacer &"' height='1' align='absmiddle'></td>"
248
                     End If
249
 
250
                  End If
251
 
252
               ElseIf ( mbIsReadonly  AND  mArrAbtnDef( InxIsReadonlyAction, itemInx ) = enumDB_NO ) Then
253
 
254
                  If mReadonlyActionBehaviour = enumABTNCTRL_ON_READONLY_DISABLE Then
255
                     Response.write ButtonStrDisabled
256
                  End If
257
 
258
               End If
259
 
260
            End If
261
 
262
         End If
263
 
264
         ' --- Separators added manually using  method AddSeparator or AddSeparatorAfter ---
265
         If mobjSeparator.Exists ( Cstr(mArrAbtnDef( InxName, itemInx )) ) Then
266
            Response.write "<td><img src='images/spacer.gif' width='"& mobjSeparator.Item ( Cstr(mArrAbtnDef( InxName, itemInx )) ) &"' height='1'></td>"
267
         End If
268
 
269
 
270
      Next
271
 
272
      Response.write "</tr></table>"
273
   End Sub
143 ghuddy 274
   '-----------------------------------------------------------------------------------------------------------------
127 ghuddy 275
   ' Return true if required_abtnName is one of the strings in the aAbtnList string array, else return false
276
   Private Function isAbtnRequired (aAbtnList, required_abtnName)
277
      Dim this_abtnName
278
 
279
      isAbtnRequired = FALSE
280
 
281
      For Each this_abtnName in aAbtnList
282
         If 0 = StrComp(this_abtnName, required_abtnName) Then
283
            isAbtnRequired = TRUE
284
            Exit Function
285
         End If
286
      Next
287
   End Function
288
   '-----------------------------------------------------------------------------------------------------------------
289
   Public Sub LoadActionButtons ( aAbtnList, ByRef objOraDatabase )
290
 
291
      ' The following code is now used in place of the earlier code to acquire action button records.
292
      '
293
      ' This code exploits the fact that in ADO 2.8 onwards, you can create ADO DB record sets
294
      ' without a connection to an actual database. So, to rid ourselves of the need for a DEF_ACTION_BUTTONS
295
      ' table in the database, we can simply take all of the table's rows and reproduce them here in row
296
      ' creation and field assignment statements. The rest of the website code will be ignorant of the fact
297
      ' that the data has not come from the actual database.
298
      '
299
      ' Complicating factors:
300
      ' 1) Some action button fields (action_link and event_handler) are to be EVAL'ed later on when used
301
      '    to render the HTML page. This can lead to some very complex looking strings that are difficult to
302
      '    understand. EVAL allows things like parRtag_id used in a string to be converted to an actual
303
      '    number (in string form) at time of HTML rendering. We have to use EVAL. There is no other option.
304
      '
305
      ' 2) The strings from the database must also be represented as VBScript strings in the assignments
306
      '    below. This means that where a string needs to have an embedded " char, two such chars must be
307
      '    used, and remember about EVAL mentioned above, meaning that sometimes """" has to be used to
308
      '    give a single " to the resulting string that pops out from EVAL.
309
      '    Remember also that whilst HTML doesn't care whether you use single or double quotes, javascript
310
      '    does (it must use single quotes) and VBScript does (it must use double quotes)
311
      '
312
      ' Possible Future Roadmap
7003 dpurdie 313
      ' 1) Simplify the entier process
127 ghuddy 314
      '
315
      '
316
      Dim rsQry
317
      Dim varFields
318
      Dim varValues
319
 
320
      ' Create the object and configure some of its properties
321
      Set rsQry = Server.CreateObject("ADODB.Recordset")
322
      rsQry.CursorLocation = adUseClient
323
      rsQry.CursorType = adOpenKeyset
324
      rsQry.LockType = adLockOptimistic
325
 
326
      ' Based upon the original DEF_ACTION_BUTTONS table DDL, define the fields (ie. table columns) being simulated
327
      rsQry.Fields.Append "ABTN_NAME",             adVarChar,   64
328
      rsQry.Fields.Append "TEXT",                  adVarChar,  128, adFldIsNullable
329
      rsQry.Fields.Append "ACTION_LINK",           adVarChar,  512, adFldIsNullable
330
      rsQry.Fields.Append "EVENT_HANDLER",         adVarChar,  512, adFldIsNullable
331
      rsQry.Fields.Append "IMG_ENABLED",           adVarChar,  128, adFldIsNullable
332
      rsQry.Fields.Append "IMG_DISABLED",          adVarChar,  128, adFldIsNullable
333
      rsQry.Fields.Append "HINT",                  adVarChar,  256, adFldIsNullable
334
      rsQry.Fields.Append "VISIBLE",               adChar,       1
335
      rsQry.Fields.Append "ACTIVE",                adChar,       1
336
      rsQry.Fields.Append "IS_READONLY_ACTION",    adChar,       1
4083 dpurdie 337
      rsQry.Fields.Append "HIDE_ON_CLOSED",        adChar,       1
127 ghuddy 338
 
339
      ' open the record set for updating
340
      rsQry.Open
341
 
342
      ' Specify the field order that we are going to use in our row creation statements
7003 dpurdie 343
      varFields = Array("ABTN_NAME", "TEXT",_
127 ghuddy 344
                        "ACTION_LINK",_
345
                        "EVENT_HANDLER",_
346
                        "IMG_ENABLED",_
347
                        "IMG_DISABLED",_
348
                        "HINT",_
349
                        "VISIBLE",_
350
                        "ACTIVE",_
4083 dpurdie 351
                        "IS_READONLY_ACTION",_
352
                        "HIDE_ON_CLOSED")
127 ghuddy 353
 
354
      ' Add the rows to the record set, but only for buttons specifed in the list supplied by the caller
355
 
7003 dpurdie 356
      ' Remember, Field Ordering is... name, text, link, event handler, en-img, dis-img, hint, visible, active, is readonly action
127 ghuddy 357
 
358
      If isAbtnRequired(aAbtnList, "btnNewVersion") Then
7003 dpurdie 359
         varValues = Array("btnNewVersion", null,_
127 ghuddy 360
                           """form_new_version.asp?""& objPMod.ComposeURL()",_
361
                           null,_
362
                           "images/abtn_new_version.gif",_
4671 dpurdie 363
                           "images/abtn_new_version_off.gif",_
127 ghuddy 364
                           "Create new version of this package.",_
365
                           "Y",_
366
                           "Y",_
4083 dpurdie 367
                           "N",_
127 ghuddy 368
                           "N")
369
         rsQry.AddNew varFields, varValues
370
      End If
371
 
372
      If isAbtnRequired(aAbtnList, "btnVersionHistory") Then
7003 dpurdie 373
         varValues = Array("btnVersionHistory", null,_
127 ghuddy 374
                           """javascript:;""",_
5933 dpurdie 375
                           """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() &""','History','resizable=yes,scrollbars=yes,width=1000,height='+ ( screen.height - 100 )  );""""""",_
127 ghuddy 376
                           "images/abtn_version_history.gif",_
377
                           null,_
378
                           "Show version history of this package.",_
379
                           "Y",_
380
                           "Y",_
4083 dpurdie 381
                           "Y",_
382
                           "N")
127 ghuddy 383
         rsQry.AddNew varFields, varValues
384
      End If
385
 
386
      If isAbtnRequired(aAbtnList, "btnRemovePackage") Then
7003 dpurdie 387
         varValues = Array("btnRemovePackage", null,_
127 ghuddy 388
                           """_remove_package.asp?pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
5190 dpurdie 389
                           """vixConfirm('Remove this package from this release.',{title:'Remove Package', button:'Remove', url: 'HREF'});""",_
127 ghuddy 390
                           "images/abtn_remove_pkg.gif",_
4670 dpurdie 391
                           "images/abtn_remove_pkg_off.gif",_
392
                           "Remove the package-version from this Release.",_
127 ghuddy 393
                           "Y",_
394
                           "Y",_
4083 dpurdie 395
                           "N",_
127 ghuddy 396
                           "N")
397
         rsQry.AddNew varFields, varValues
398
      End If
399
 
400
      If isAbtnRequired(aAbtnList, "btnMakeRelease") Then
7003 dpurdie 401
         varValues = Array("btnMakeRelease", null,_
127 ghuddy 402
                           """_make_released.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
5190 dpurdie 403
                           """vixConfirm('Making this package released will prevent any further changes',{title:'Make Release', button:'Release', url: 'HREF'});""""""",_
127 ghuddy 404
                           "icons/i_make_released.gif",_
405
                           "icons/i_make_released_off.gif",_
406
                           "Make this package released, so that other packages can use it.",_
407
                           "Y",_
408
                           "Y",_
4083 dpurdie 409
                           "N",_
127 ghuddy 410
                           "N")
411
         rsQry.AddNew varFields, varValues
412
      End If
413
 
414
      If isAbtnRequired(aAbtnList, "btnMakeUnrelease") Then
7003 dpurdie 415
         varValues = Array("btnMakeUnrelease", null,_
127 ghuddy 416
                           """_make_unreleased.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
5190 dpurdie 417
                           """vixConfirm('You are going to unrelease this package.',{title:'Make UnRelease', button:'UnRelease', url: 'HREF'});""""""",_
127 ghuddy 418
                           "icons/i_make_unreleased.gif",_
419
                           "icons/i_make_unreleased_off.gif",_
183 brianf 420
                           "Unrelease this package.",_
127 ghuddy 421
                           "Y",_
422
                           "Y",_
4083 dpurdie 423
                           "N",_
127 ghuddy 424
                           "N")
425
         rsQry.AddNew varFields, varValues
426
      End If
427
 
428
      If isAbtnRequired(aAbtnList, "btnMakePending") Then
7003 dpurdie 429
         varValues = Array("btnMakePending", null,_
127 ghuddy 430
                           """_make_pending.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
5190 dpurdie 431
                           """vixConfirm('Making this package pending will prevent any further changes.',{title:'Make Pending', button:'Pending', url: 'HREF'});""""""",_
127 ghuddy 432
                           "icons/i_make_pending.gif",_
433
                           "icons/i_make_pending_off.gif",_
434
                           "Make this package pending for build/release.",_
435
                           "Y",_
436
                           "Y",_
4083 dpurdie 437
                           "N",_
127 ghuddy 438
                           "N")
439
         rsQry.AddNew varFields, varValues
440
      End If
441
 
442
      If isAbtnRequired(aAbtnList, "btnRejectPackage") Then
7003 dpurdie 443
         varValues = Array("btnRejectPackage", null,_
127 ghuddy 444
                           """_make_rejected.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
5190 dpurdie 445
                           """vixConfirm('Rejecting a new package version will move it to Work-In-Progress.<br>Rejecting a merge package version will simply remove it from pending.',{title:'Reject Package', button:'Reject', url: 'HREF'});""""""",_
127 ghuddy 446
                           "icons/i_reject_pending.gif",_
7003 dpurdie 447
                           null,_
127 ghuddy 448
                           "Reject this package from Pending.",_
449
                           "Y",_
450
                           "Y",_
4083 dpurdie 451
                           "N",_
127 ghuddy 452
                           "N")
453
         rsQry.AddNew varFields, varValues
454
      End If
455
 
456
      If isAbtnRequired(aAbtnList, "btnMoveToView") Then
7003 dpurdie 457
         varValues = Array("btnMoveToView", null,_
127 ghuddy 458
                           """javascript:;""",_
6579 dpurdie 459
                           """onClick=""""MM_openVixIFrame('_wform_change_group.asp?""& objPMod.ComposeURL() &""','Set Package Base View');""""""",_
127 ghuddy 460
                           "images/abtn_move_package.gif",_
4670 dpurdie 461
                           "images/abtn_move_package_off.gif",_
127 ghuddy 462
                           "Move this package to different Base View (Group).",_
463
                           "Y",_
464
                           "Y",_
4083 dpurdie 465
                           "N",_
127 ghuddy 466
                           "N")
467
         rsQry.AddNew varFields, varValues
468
      End If
469
 
470
      If isAbtnRequired(aAbtnList, "btnReversionPackage") Then
7003 dpurdie 471
         varValues = Array("btnReversionPackage", null,_
127 ghuddy 472
                           """javascript:;""",_
5590 dpurdie 473
                           """onClick=""""MM_openVixIFrame('_wform_rename_version.asp?renameMode=1&rfile=""& ScriptName & objPMod.ComposeURLWithout(""rfile"") &""','Rename Version Number');""""""",_
127 ghuddy 474
                           "images/abtn_rename_version.gif",_
475
                           "images/abtn_rename_version_off.gif",_
476
                           "Reversion this package.",_
477
                           "Y",_
478
                           "Y",_
6176 dpurdie 479
                           "Y",_
4199 dpurdie 480
                           "N")
127 ghuddy 481
         rsQry.AddNew varFields, varValues
482
      End If
483
 
484
      If isAbtnRequired(aAbtnList, "btnStickyNotes") Then
7003 dpurdie 485
         varValues = Array("btnStickyNotes", null,_
127 ghuddy 486
                           """javascript:;""",_
487
                           """onClick=""""showHideNote();""""""",_
488
                           "notemanager/images/note.gif",_
489
                           null,_
490
                           "Sticky notes",_
491
                           "Y",_
492
                           "Y",_
4083 dpurdie 493
                           "N",_
127 ghuddy 494
                           "N")
495
         rsQry.AddNew varFields, varValues
496
      End If
497
 
498
      If isAbtnRequired(aAbtnList, "btnObsoletePatch") Then
7003 dpurdie 499
         varValues = Array("btnObsoletePatch", null,_
127 ghuddy 500
                           """javascript:;""",_
5590 dpurdie 501
                           """onClick=""""MM_openVixIFrame('_wform_obsolete_patch.asp?rfile=""& ScriptName &""&""& objPMod.ComposeURL() &""','Make Patch Obsolete');""""""",_
127 ghuddy 502
                           "images/abtn_obsolete_patch.gif",_
503
                           "images/abtn_obsolete_patch_off.gif",_
504
                           "Make this patch obsolete.",_
505
                           "Y",_
506
                           "Y",_
4083 dpurdie 507
                           "N",_
127 ghuddy 508
                           "N")
509
         rsQry.AddNew varFields, varValues
510
      End If
511
 
512
      If isAbtnRequired(aAbtnList, "btnUnobsoletePatch") Then
7003 dpurdie 513
         varValues = Array("btnUnobsoletePatch", null,_
127 ghuddy 514
                           """javascript:;""",_
5590 dpurdie 515
                           """onClick=""""MM_openVixIFrame('_wform_obsolete_patch.asp?action=true&unobsolete=true&rfile=""& ScriptName &""&""& objPMod.ComposeURL() &""','UnObsolete Patch');""""""",_
127 ghuddy 516
                           "images/abtn_unobsolete_patch.gif",_
517
                           null,_
518
                           "Undo patch obsolete.",_
519
                           "Y",_
520
                           "Y",_
4083 dpurdie 521
                           "N",_
127 ghuddy 522
                           "N")
523
         rsQry.AddNew varFields, varValues
524
      End If
525
 
7022 dpurdie 526
      If isAbtnRequired(aAbtnList, "btnApprovePackage") Then
7003 dpurdie 527
         varValues = Array("btnApprovePackage", null,_
528
                           """javascript:;""",_
7022 dpurdie 529
                           """onClick=""""vixDialog('_wform_build_package.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id &""',{title: 'Approve Package', onLoad: 'buildPkgInit'});""""""",_
7003 dpurdie 530
                           "icons/i_submit_build.gif",_
531
                           null,_
532
                           "Make this package released for automated build.",_
533
                           "Y",_
534
                           "Y",_
535
                           "N",_
536
                           "N")
537
         rsQry.AddNew varFields, varValues
538
      End If
539
 
127 ghuddy 540
      If isAbtnRequired(aAbtnList, "btnNewRelease") Then
7003 dpurdie 541
         varValues = Array("btnNewRelease", null,_
6508 dpurdie 542
                           """new_release.asp?" & objPMod.ComposeURL() &"""",_
127 ghuddy 543
                           null,_
544
                           "images/abtn_new_release.gif",_
545
                           "images/abtn_new_release_off.gif",_
546
                           "Create new release...",_
547
                           "Y",_
548
                           "Y",_
4083 dpurdie 549
                           "N",_
127 ghuddy 550
                           "N")
551
         rsQry.AddNew varFields, varValues
552
      End If
553
 
554
      If isAbtnRequired(aAbtnList, "btnEditRelease") Then
7003 dpurdie 555
         varValues = Array("btnEditRelease", null,_
127 ghuddy 556
                           """javascript:go_submit( document.FormName, """"btnEditRelease"""" );""",_
557
                           null,_
558
                           "images/abtn_edit.gif",_
559
                           "images/abtn_edit_off.gif",_
560
                           "Edit selected release details...",_
561
                           "Y",_
562
                           "Y",_
4083 dpurdie 563
                           "N",_
127 ghuddy 564
                           "N")
565
         rsQry.AddNew varFields, varValues
566
      End If
567
 
568
      If isAbtnRequired(aAbtnList, "btnMergeManager") Then
7003 dpurdie 569
         varValues = Array("btnMergeManager", null,_
6508 dpurdie 570
                           """diff.asp""",_
127 ghuddy 571
                           null,_
572
                           "images/abtn_merge_manager.gif",_
573
                           "images/abtn_merge_manager_off.gif",_
5177 dpurdie 574
                           "Run merge manager...",_
127 ghuddy 575
                           "Y",_
576
                           "Y",_
4083 dpurdie 577
                           "N",_
127 ghuddy 578
                           "N")
579
         rsQry.AddNew varFields, varValues
580
      End If
581
 
582
      If isAbtnRequired(aAbtnList, "btnMoveRelease") Then
7003 dpurdie 583
         varValues = Array("btnMoveRelease", null,_
127 ghuddy 584
                           """javascript:go_submit( document.FormName, """"btnMoveRelease"""" );""",_
585
                           null,_
586
                           "images/abtn_move_release.gif",_
587
                           "images/abtn_move_release_off.gif",_
588
                           "Move selected release vertically...",_
589
                           "Y",_
590
                           "Y",_
4083 dpurdie 591
                           "N",_
127 ghuddy 592
                           "N")
593
         rsQry.AddNew varFields, varValues
594
      End If
595
 
596
      If isAbtnRequired(aAbtnList, "btnNewVersion-MASSREF") Then
7003 dpurdie 597
         varValues = Array("btnNewVersion-MASSREF", null,_
127 ghuddy 598
                           """form_new_version.asp?rtag_id=""& AssocMASSREFValue &""&pv_id=""& Request(""pv_id"")",_
599
                           null,_
600
                           "images/abtn_new_version_MassRef.gif",_
601
                           null,_
602
                           "Create new version of this package in associated MASS REF.",_
603
                           "Y",_
604
                           "Y",_
4083 dpurdie 605
                           "N",_
127 ghuddy 606
                           "N")
607
         rsQry.AddNew varFields, varValues
608
      End If
609
 
5930 dpurdie 610
      If isAbtnRequired(aAbtnList, "btnDestroyWip") Then
7003 dpurdie 611
         varValues = Array("btnDestroyWip", null,_
5930 dpurdie 612
                           """javascript:;""",_
613
                           """onClick=""""MM_openVixIFrame('_destroy_package.asp?bfile=""& ScriptName &""&""& objPMod.ComposeURL() &""','Destroy WIP');""""""",_
614
                           "icons/i_destroy_package.gif",_
615
                           "icons/i_destroy_package_off.gif",_
616
                           "Destroy this WIP",_
617
                           "Y",_
618
                           "Y",_
619
                           "Y",_
620
                           "N")
621
         rsQry.AddNew varFields, varValues
622
      End If
623
 
127 ghuddy 624
      If isAbtnRequired(aAbtnList, "btnRecycleBin") Then
7003 dpurdie 625
         varValues = Array("btnRecycleBin", null,_
5930 dpurdie 626
                           """javascript:;""",_
627
                           """onClick=""""MM_openVixIFrame('_destroy_package.asp?&rfile=""& ScriptName &""&""& objPMod.ComposeURL() &""','Destroy Package Version');""""""",_
127 ghuddy 628
                           "icons/i_destroy_package.gif",_
5929 dpurdie 629
                           "icons/i_destroy_package_off.gif",_
630
                           "Destroy this package version",_
127 ghuddy 631
                           "Y",_
632
                           "Y",_
5929 dpurdie 633
                           "Y",_
127 ghuddy 634
                           "N")
635
         rsQry.AddNew varFields, varValues
636
      End If
637
 
638
      If isAbtnRequired(aAbtnList, "btnDeprecation") Then
7003 dpurdie 639
         varValues = Array("btnDeprecation", null,_
127 ghuddy 640
                           """javascript:;""",_
5590 dpurdie 641
                           """onClick='MM_openVixIFrame(""""_wform_deprecate_package.asp?rfile=""& scriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id &"""""",""""Deprecate Package"""")' class='body_txt' title='Deprecate the package.'""",_
127 ghuddy 642
                           "images/BombBorder.gif",_
5169 dpurdie 643
                           "images/BombBorder_off.gif",_
127 ghuddy 644
                           "Deprecate this package in this release.",_
645
                           "Y",_
646
                           "Y",_
4083 dpurdie 647
                           "N",_
127 ghuddy 648
                           "N")
649
         rsQry.AddNew varFields, varValues
650
      End If
651
 
652
      If isAbtnRequired(aAbtnList, "btnUnDeprecation") Then
7003 dpurdie 653
         varValues = Array("btnUnDeprecation", null,_
5190 dpurdie 654
                           """_wform_undeprecate_package.asp?rfile=""& scriptName &""&pkg_id=""& pkgInfoHash.Item(""pkg_id"") &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id &""""",_
655
                           """vixConfirm('You are about to undeprecate package: ""& pkgInfoHash.Item (""pkg_name"") &"".',{title:'Undeprecate Package', url: 'HREF'});""""""",_
127 ghuddy 656
                           "images/BombBorder.gif",_
657
                           null,_
5190 dpurdie 658
                           "Un Deprecate this package in this release",_
127 ghuddy 659
                           "Y",_
660
                           "Y",_
4083 dpurdie 661
                           "N",_
127 ghuddy 662
                           "N")
663
         rsQry.AddNew varFields, varValues
664
      End If
665
 
666
      If isAbtnRequired(aAbtnList, "btnAdminView") Then
7003 dpurdie 667
         varValues = Array("btnAdminView", null,_
6508 dpurdie 668
                           """form_edit_project_view.asp?proj_id=""& parProjId &""""",_
127 ghuddy 669
                           null,_
670
                           "images/view_admin.gif",_
671
                           null,_
672
                           "Administer the views in the project.",_
673
                           "Y",_
674
                           "Y",_
4083 dpurdie 675
                           "N",_
127 ghuddy 676
                           "N")
677
         rsQry.AddNew varFields, varValues
678
      End If
679
 
6508 dpurdie 680
      If isAbtnRequired(aAbtnList, "btnNotificationView") Then
7003 dpurdie 681
         varValues = Array("btnNotificationView", null,_
6508 dpurdie 682
                           """form_view_release_notifications.asp?proj_id=""& parProjId &""""",_
683
                           null,_
684
                           "images/view_notifications.gif",_
685
                           null,_
686
                           "Display the package notification information in this project .",_
687
                           "Y",_
688
                           "Y",_
689
                           "N",_
690
                           "N")
691
         rsQry.AddNew varFields, varValues
692
      End If
693
 
6770 dpurdie 694
      If isAbtnRequired(aAbtnList, "btnProjectReplication") Then
7003 dpurdie 695
         varValues = Array("btnProjectReplication", null,_
6770 dpurdie 696
                           """form_project_replication.asp?proj_id=""& parProjId &""""",_
697
                           null,_
698
                           "images/project_replication.gif",_
699
                           null,_
700
                           "Display the project replication information.",_
701
                           "Y",_
702
                           "Y",_
703
                           "N",_
704
                           "N")
705
         rsQry.AddNew varFields, varValues
706
      End If
6508 dpurdie 707
 
127 ghuddy 708
      ' NOTE: I do not think this one is ever used
709
      If isAbtnRequired(aAbtnList, "btnAddProc") Then
7003 dpurdie 710
         varValues = Array("btnAddProc", "Add Process",_
127 ghuddy 711
                           """javascript:;""",_
5590 dpurdie 712
                           """onClick=""""MM_openVixIFrame('wAddProc.asp?rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','Add Process');""""""",_
127 ghuddy 713
                           "icons/btn_add.gif",_
714
                           null,_
715
                           null,_
716
                           "Y",_
717
                           "Y",_
4083 dpurdie 718
                           "N",_
127 ghuddy 719
                           "N")
720
         rsQry.AddNew varFields, varValues
721
      End If
722
 
723
      If isAbtnRequired(aAbtnList, "btnEditGBE_Machtype") Then
7003 dpurdie 724
         varValues = Array("btnEditGBE_Machtype", null,_
127 ghuddy 725
                           """javascript:;""",_
5590 dpurdie 726
                           """onClick=""""MM_openVixIFrame('wAddMachtype.asp?type=edit&gbe_id=""& gbe_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','Edit Machine Type');""""""",_
127 ghuddy 727
                           "icons/i_edit.gif",_
5814 dpurdie 728
                           null,_
127 ghuddy 729
                           "Edit this GBE MachType value",_
730
                           "Y",_
731
                           "Y",_
4083 dpurdie 732
                           "N",_
127 ghuddy 733
                           "N")
734
         rsQry.AddNew varFields, varValues
735
      End If
736
 
737
      If isAbtnRequired(aAbtnList, "btnDeleteGBE_Machtype") Then
7003 dpurdie 738
         varValues = Array("btnDeleteGBE_Machtype", null,_
127 ghuddy 739
                           """_DeleteMachtype.asp?rfile=""& SCRIPT_NAME &""&gbe_id=""& gbe_id &""&""& objPMod.ComposeURL()",_
5190 dpurdie 740
                           """vixConfirm('Remove \'""& GBE_VALUE &""\' from this list?',{title:'Remove GBE_MACHTYPE', button:'Remove', url: 'HREF'});""""""",_
127 ghuddy 741
                           "icons/i_remove.gif",_
742
                           null,_
743
                           "Delete this GBE MachType value",_
744
                           "Y",_
745
                           "Y",_
4083 dpurdie 746
                           "N",_
127 ghuddy 747
                           "N")
748
         rsQry.AddNew varFields, varValues
749
      End If
750
 
751
      If isAbtnRequired(aAbtnList, "btnEditDaemon") Then
7003 dpurdie 752
         varValues = Array("btnEditDaemon", null,_
127 ghuddy 753
                           """javascript:;""",_
5590 dpurdie 754
                           """onClick=""""MM_openVixIFrame('wAddDaemon.asp?type=edit&rcon_id=""& rcon_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','Edit Build Daemon');""""""",_
127 ghuddy 755
                           "icons/i_edit.gif",_
5983 dpurdie 756
                           NULL,_
4295 dpurdie 757
                           "Edit Build Configuration",_
127 ghuddy 758
                           "Y",_
759
                           "Y",_
4083 dpurdie 760
                           "N",_
127 ghuddy 761
                           "N")
762
         rsQry.AddNew varFields, varValues
763
      End If
764
 
765
      If isAbtnRequired(aAbtnList, "btnDeleteDaemon") Then
7003 dpurdie 766
         varValues = Array("btnDeleteDaemon", null,_
4293 dpurdie 767
                           """_DeleteDaemon.asp?rcon_id=""& rcon_id & ""&action=Delete&"" & objPMod.ComposeURL()",_
5190 dpurdie 768
                           """vixConfirm('Delete the \'""& Daemon &""\' Daemon and associated information from this Release?',{title:'Remove Deamon', button:'Remove', url: 'HREF'});""""""",_
4295 dpurdie 769
                           "icons/i_remove.gif",_
4293 dpurdie 770
                           null,_
4295 dpurdie 771
                           "Delete Daemon",_
4293 dpurdie 772
                           "Y",_
773
                           "Y",_
774
                           "N",_
775
                           "N")
776
         rsQry.AddNew varFields, varValues
777
      End If
778
 
779
      If isAbtnRequired(aAbtnList, "btnRemoveDaemon") Then
7003 dpurdie 780
         varValues = Array("btnRemoveDaemon", null,_
4293 dpurdie 781
                           """_DeleteDaemon.asp?rcon_id=""& rcon_id & ""&action=Remove&""& objPMod.ComposeURL()",_
5190 dpurdie 782
                           """vixConfirm('Unlink the \'""& Daemon &""\' Daemon from this Release.<p>Configuration information will be maintained.',{title:'Unlink Deamon', button:'Unlink', url: 'HREF'});""""""",_
4295 dpurdie 783
                           "icons/break_link.gif",_
127 ghuddy 784
                           null,_
4295 dpurdie 785
                           "Unlink Daemon from entry",_
127 ghuddy 786
                           "Y",_
787
                           "Y",_
4083 dpurdie 788
                           "N",_
127 ghuddy 789
                           "N")
790
         rsQry.AddNew varFields, varValues
791
      End If
792
 
161 iaugusti 793
      If isAbtnRequired(aAbtnList, "btnEditBuildMachine") Then
7003 dpurdie 794
         varValues = Array("btnEditBuildMachine", null,_
161 iaugusti 795
                           """javascript:;""",_
5590 dpurdie 796
                           """onClick=""""MM_openVixIFrame('wAddBuildMachine.asp?type=edit&bmcon_id=""& bmcon_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','Edit Build Machine');""""""",_
161 iaugusti 797
                           "icons/i_edit.gif",_
5983 dpurdie 798
                           NULL,_
161 iaugusti 799
                           "Edit Build Machine",_
800
                           "Y",_
801
                           "Y",_
4083 dpurdie 802
                           "N",_
161 iaugusti 803
                           "N")
804
         rsQry.AddNew varFields, varValues
805
      End If
806
 
807
      If isAbtnRequired(aAbtnList, "btnDeleteBuildMachine") Then
7003 dpurdie 808
         varValues = Array("btnDeleteBuildMachine", null,_
161 iaugusti 809
                           """_DeleteBuildMachine.asp?rfile=""& SCRIPT_NAME &""&bmcon_id=""& bmcon_id &""&""& objPMod.ComposeURL()",_
5190 dpurdie 810
                           """vixConfirm('Remove Build Machine \'""& machine_hostname &""\' from this list?',{title:'Delete Build Machine', button:'Delete', url: 'HREF'});""""""",_
161 iaugusti 811
                           "icons/i_remove.gif",_
812
                           null,_
813
                           "Delete Build Machine",_
814
                           "Y",_
815
                           "Y",_
4083 dpurdie 816
                           "N",_
161 iaugusti 817
                           "N")
818
         rsQry.AddNew varFields, varValues
819
      End If
820
 
6770 dpurdie 821
      If isAbtnRequired(aAbtnList, "btnEditBlatMachine") Then
7003 dpurdie 822
         varValues = Array("btnEditBlatMachine", null,_
6770 dpurdie 823
                           """javascript:;""",_
824
                           """onClick=""""MM_openVixIFrame('wAddPkgReplica.asp?type=edit&server_id=""& server_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','Edit Package Replica');""""""",_
825
                           "icons/i_edit.gif",_
826
                           NULL,_
827
                           "Edit Package Replica",_
828
                           "Y",_
829
                           "Y",_
830
                           "N",_
831
                           "N")
832
         rsQry.AddNew varFields, varValues
833
      End If
834
 
835
      If isAbtnRequired(aAbtnList, "btnDeleteBlatMachine") Then
7003 dpurdie 836
         varValues = Array("btnDeleteBlatMachine", null,_
6770 dpurdie 837
                           """_DeletePkgReplica.asp?rfile=""& SCRIPT_NAME &""&server_id=""& server_id &""&""& objPMod.ComposeURL()",_
838
                           """vixConfirm('Remove Package Replica \'""& display_name &""\' from this list?',{title:'Delete Package Replica', button:'Delete', url: 'HREF'});""""""",_
839
                           "icons/i_remove.gif",_
840
                           null,_
841
                           "Delete Package Replica",_
842
                           "Y",_
843
                           "Y",_
844
                           "N",_
845
                           "N")
846
         rsQry.AddNew varFields, varValues
847
      End If
848
 
127 ghuddy 849
      If isAbtnRequired(aAbtnList, "btnPendingIntegration") Then
7003 dpurdie 850
         varValues = Array("btnPendingIntegration", null,_
127 ghuddy 851
                           """_modify_product_state.asp?state_id=1&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
5190 dpurdie 852
                           """vixConfirm('Do you want to proceed to make this product pending for INTEGRATION?',{title:'Make Pending', button:'Pending', url: 'HREF'});""""""",_
127 ghuddy 853
                           "icons/PendingIntegration.gif",_
854
                           null,_
855
                           "Make this product pending for Integration.",_
856
                           "Y",_
857
                           "Y",_
4083 dpurdie 858
                           "N",_
127 ghuddy 859
                           "N")
860
         rsQry.AddNew varFields, varValues
861
      End If
862
 
863
      If isAbtnRequired(aAbtnList, "btnPendingTest") Then
7003 dpurdie 864
         varValues = Array("btnPendingTest", null,_
127 ghuddy 865
                           """_modify_product_state.asp?state_id=2&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
5190 dpurdie 866
                           """vixConfirm('Do you want to proceed to make this product pending for Test?',{title:'Make Test', button:'Test', url: 'HREF'});""""""",_
127 ghuddy 867
                           "icons/PendingTest.gif",_
868
                           null,_
869
                           "Make this product pending for Test.",_
870
                           "Y",_
871
                           "Y",_
4083 dpurdie 872
                           "N",_
127 ghuddy 873
                           "N")
874
         rsQry.AddNew varFields, varValues
875
      End If
876
 
877
      If isAbtnRequired(aAbtnList, "btnPendingDeployment") Then
7003 dpurdie 878
         varValues = Array("btnPendingDeployment", null,_
127 ghuddy 879
                           """_modify_product_state.asp?state_id=3&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
5190 dpurdie 880
                           """vixConfirm('Do you want to proceed to make this product pending for DEPLOYMENT?',{title:'Make Deploy', button:'Deploy', url: 'HREF'});""""""",_
127 ghuddy 881
                           "icons/PendingDeployment.gif",_
882
                           null,_
883
                           "Make this product pending for Deployment.",_
884
                           "Y",_
885
                           "Y",_
4083 dpurdie 886
                           "N",_
127 ghuddy 887
                           "N")
888
         rsQry.AddNew varFields, varValues
889
      End If
890
 
891
      If isAbtnRequired(aAbtnList, "btnRejectProduct") Then
7003 dpurdie 892
         varValues = Array("btnRejectProduct", null,_
127 ghuddy 893
                           """_modify_product_state.asp?state_id=4&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
5190 dpurdie 894
                           """vixConfirm('Do you want to REJECT this product from DEPLOYMENT?',{title:'Reject Product', button:'Reject', url: 'HREF'});""""""",_
127 ghuddy 895
                           "icons/i_reject_pending.gif",_
896
                           null,_
897
                           "Reject this product from Deployment.",_
898
                           "Y",_
899
                           "Y",_
4083 dpurdie 900
                           "N",_
127 ghuddy 901
                           "N")
902
         rsQry.AddNew varFields, varValues
903
      End If
904
 
905
      If isAbtnRequired(aAbtnList, "btnPendingIntegrateAndDeploy") Then
7003 dpurdie 906
         varValues = Array("btnPendingIntegrateAndDeploy", null,_
127 ghuddy 907
                           """_modify_product_state.asp?state_id=5&rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
5190 dpurdie 908
                           """vixConfirm('Do you want to proceed to make this product pending for INTEGRATION and DEPLOYMENT?',{title:'Pending Product', button:'Confirm', url: 'HREF'});""""""",_
127 ghuddy 909
                           "icons/PendingDeployment.gif",_
910
                           null,_
911
                           "Make this product pending for Integration and Deployment.",_
912
                           "Y",_
913
                           "Y",_
4083 dpurdie 914
                           "N",_
127 ghuddy 915
                           "N")
916
         rsQry.AddNew varFields, varValues
917
      End If
918
 
919
      If isAbtnRequired(aAbtnList, "btnDeleteSchedule") Then
7003 dpurdie 920
         varValues = Array("btnDeleteSchedule", null,_
127 ghuddy 921
                           """_DeleteSchedule.asp?scheduled_id=""& scheduled_id &""&""& objPMod.ComposeURL()",_
5190 dpurdie 922
                           """vixConfirm('Remove Schedule from this list?',{title:'Remove Schedule', button:'Remove', url: 'HREF'});""""""",_
127 ghuddy 923
                           "icons/i_remove.gif",_
177 brianf 924
                           "icons/i_remove_dis.gif",_
127 ghuddy 925
                           "Delete Schedule",_
926
                           "Y",_
927
                           "Y",_
4083 dpurdie 928
                           "N",_
127 ghuddy 929
                           "N")
930
         rsQry.AddNew varFields, varValues
931
      End If
932
 
933
      If isAbtnRequired(aAbtnList, "btnApproveMerge") Then
7003 dpurdie 934
         varValues = Array("btnApproveMerge", null,_
127 ghuddy 935
                           """_approve_merge.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id",_
5190 dpurdie 936
                           """vixConfirm('The release will be updated by this merge operation',{title:'Approve Merge', button:'Merge', url: 'HREF'});""""""",_
127 ghuddy 937
                           "icons/i_make_released.gif",_
938
                           "icons/i_make_released_off.gif",_
939
                           "Approve and carry out the pending merge operation",_
940
                           "Y",_
941
                           "Y",_
4083 dpurdie 942
                           "N",_
127 ghuddy 943
                           "N")
944
         rsQry.AddNew varFields, varValues
945
      End If
946
 
143 ghuddy 947
      If isAbtnRequired(aAbtnList, "btnRejectAutobuildPackage") Then
7003 dpurdie 948
         varValues = Array("btnRejectAutobuildPackage", null,_
143 ghuddy 949
                           """_make_rejected.asp?rfile=""& ScriptName &""&pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
5190 dpurdie 950
                           """vixConfirm('Rejecting a package already approved for autobuild will set it back to Work-In-Progress',{title:'Reject Package', button:'Reject', url: 'HREF'});""""""",_
143 ghuddy 951
                           "icons/i_reject_pending.gif",_
952
                           "icons/i_reject_pending_off.gif",_
953
                           "Unapprove autobuild, move back to Work-In-Progress.",_
954
                           "Y",_
955
                           "Y",_
4083 dpurdie 956
                           "N",_
143 ghuddy 957
                           "N")
958
         rsQry.AddNew varFields, varValues
959
      End If
960
 
147 ghuddy 961
      If isAbtnRequired(aAbtnList, "btnDeleteDaemonInst") Then
7003 dpurdie 962
         varValues = Array("btnDeleteDaemonInst", null,_
147 ghuddy 963
                           """_DeleteDaemonInstruction.asp?rfile=""& ScriptName &""&inst_id=""& daemonInstId &""&""& objPMod.ComposeURL()",_
5190 dpurdie 964
                           """vixConfirm('Delete the Daemon Instruction from this list?',{title:'Delete Instruction', button:'Delete', url: 'HREF', width : 350, height : 150});""""""",_
147 ghuddy 965
                           "icons/i_remove.gif",_
966
                           null,_
967
                           "Delete this Daemon Instruction",_
968
                           "Y",_
969
                           "Y",_
4083 dpurdie 970
                           "N",_
147 ghuddy 971
                           "N")
972
         rsQry.AddNew varFields, varValues
973
      End If
974
 
975
      If isAbtnRequired(aAbtnList, "btnEditDaemonInst") Then
7003 dpurdie 976
         varValues = Array("btnEditDaemonInst", null,_
5590 dpurdie 977
                           """javascript:;""",_
978
                           """onClick=""""MM_openVixIFrame('wAddDaemonInstruction.asp?edit=true&inst_id=""& daemonInstId & ""&sort="" & parSortOrder & ""&rfile=""& ScriptName &""&""& objPMod.ComposeURL() &""','Edit Daemon Instruction');""""""",_
147 ghuddy 979
                           "icons/i_edit.gif",_
5983 dpurdie 980
                           NULL,_
147 ghuddy 981
                           "Edit this Daemon Instruction",_
982
                           "Y",_
983
                           "Y",_
4083 dpurdie 984
                           "N",_
147 ghuddy 985
                           "N")
986
         rsQry.AddNew varFields, varValues
987
      End If
988
 
989
      If isAbtnRequired(aAbtnList, "btnAddDaemonInstRipplePackage") Then
7003 dpurdie 990
         varValues = Array("btnAddDaemonInstRipplePackage", null,_
5590 dpurdie 991
                           """javascript:;""",_
992
                           """onClick=""""MM_openVixIFrame('wAddDaemonInstructionSimple.asp?op_code=0"" &""&rfile=""& ScriptName &""&""& objPMod.ComposeURL() &""','Ripple or Test Build Package');""""""",_
147 ghuddy 993
                           "images/ripplesquare.gif",_
6185 dpurdie 994
                           NULL,_
147 ghuddy 995
                           "Request the Build Daemon to ripple this package version",_
996
                           "Y",_
997
                           "Y",_
4083 dpurdie 998
                           "N",_
999
                           "Y")
147 ghuddy 1000
         rsQry.AddNew varFields, varValues
1001
      End If
1002
 
6185 dpurdie 1003
      If isAbtnRequired(aAbtnList, "btnDelDaemonInstRipplePackage") Then
7003 dpurdie 1004
         varValues = Array("btnDelDaemonInstRipplePackage", null,_
6185 dpurdie 1005
                           """_DeleteDaemonInstruction.asp?rfile=""& ScriptName &""&opCode="" & OP_CODE_0_RIPPLE_BUILD_PACKAGE & ""&""& objPMod.ComposeURL()",_
1006
                           """vixConfirm('Delete the Ripple Request?',{title:'Delete Ripple Request', button:'Delete', url: 'HREF', width : 350, height : 150});""""""",_
6187 dpurdie 1007
                           "images/CascadeSquareDel.gif",_
6185 dpurdie 1008
                           NULL,_
1009
                           "Delete the Ripple Request",_
1010
                           "Y",_
1011
                           "Y",_
1012
                           "N",_
1013
                           "Y")
1014
         rsQry.AddNew varFields, varValues
1015
      End If
1016
 
1017
      If isAbtnRequired(aAbtnList, "btnDelDaemonInstTestPackage") Then
7003 dpurdie 1018
         varValues = Array("btnDelDaemonInstTestPackage", null,_
6185 dpurdie 1019
                           """_DeleteDaemonInstruction.asp?rfile=""& ScriptName &""&opCode="" & OP_CODE_1_TEST_BUILD_PACKAGE & ""&""& objPMod.ComposeURL()",_
1020
                           """vixConfirm('Delete the Test Build Request?',{title:'Delete Test Build Request', button:'Delete', url: 'HREF', width : 350, height : 150});""""""",_
6187 dpurdie 1021
                           "images/testSquareDel.gif",_
6185 dpurdie 1022
                           NULL,_
1023
                           "Delete the Test Build Request",_
1024
                           "Y",_
1025
                           "Y",_
1026
                           "N",_
1027
                           "Y")
1028
         rsQry.AddNew varFields, varValues
1029
      End If
1030
 
1031
 
149 ghuddy 1032
      If isAbtnRequired(aAbtnList, "btnAddDaemonInstTestBuildPackage") Then
7003 dpurdie 1033
         varValues = Array("btnAddDaemonInstTestBuildPackage", null,_
5590 dpurdie 1034
                           """javascript:;""",_
1035
                           """onClick=""""MM_openVixIFrame('wAddDaemonInstruction.asp?op_code=1"" &""&rfile=""& ScriptName &""&""& objPMod.ComposeURL() &""','Add Daemon Instruction');""""""",_
149 ghuddy 1036
                           "images/abtn_test_build.gif",_
6188 dpurdie 1037
                           NULL,_
149 ghuddy 1038
                           "Request the Build Daemon to test build this WIP package version",_
1039
                           "Y",_
1040
                           "Y",_
4083 dpurdie 1041
                           "N",_
149 ghuddy 1042
                           "N")
1043
         rsQry.AddNew varFields, varValues
1044
      End If
1045
 
157 ghuddy 1046
      If isAbtnRequired(aAbtnList, "btnMoveWIPToRelease") Then
7003 dpurdie 1047
         varValues = Array("btnMoveWIPToRelease", null,_
157 ghuddy 1048
                           """javascript:;""",_
5590 dpurdie 1049
                           """onClick=""""MM_openVixIFrame('_wform_move_wip.asp"" &""?rfile=""& ScriptName &""&""&  objPMod.ComposeURL() &""','Move WIP');""""""",_
157 ghuddy 1050
                           "images/abtn_move_wip_to_release.gif",_
4670 dpurdie 1051
                           "images/abtn_move_wip_to_release_off.gif",_
157 ghuddy 1052
                           "Move this WIP to another release.",_
1053
                           "Y",_
1054
                           "Y",_
4083 dpurdie 1055
                           "N",_
157 ghuddy 1056
                           "N")
1057
         rsQry.AddNew varFields, varValues
1058
      End If
1059
 
183 brianf 1060
      If isAbtnRequired(aAbtnList, "btnLockPackage") Then
7003 dpurdie 1061
         varValues = Array("btnLockPackage", null,_
183 brianf 1062
                           """_s_lock_package.asp?pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
5190 dpurdie 1063
                           """vixConfirm('Lock Package.<p>This will prevent changes to the package.',{title:'Lock Package', button:'Lock', url: 'HREF'});""""""",_
183 brianf 1064
                           "icons/i_lock.gif",_
1065
                           "icons/i_lock_off.gif",_
1066
                           "Lock this package.",_
1067
                           "Y",_
1068
                           "Y",_
4083 dpurdie 1069
                           "N",_
183 brianf 1070
                           "N")
1071
         rsQry.AddNew varFields, varValues
1072
      End If
1073
 
1074
      If isAbtnRequired(aAbtnList, "btnUnLockPackage") Then
7003 dpurdie 1075
         varValues = Array("btnUnLockPackage", null,_
183 brianf 1076
                           """_s_unlock_package.asp?pv_id=""& parPv_id &""&rtag_id=""& parRtag_id ",_
5190 dpurdie 1077
                           """vixConfirm('Unlock Package.<p>This may have serious side effects.',{title:'Unlock Package', button:'Unlock', url: 'HREF'});""""""",_
183 brianf 1078
                           "icons/i_unlock.gif",_
1079
                           "icons/i_unlock_off.gif",_
1080
                           "Unlock this package.",_
1081
                           "Y",_
1082
                           "Y",_
4083 dpurdie 1083
                           "N",_
183 brianf 1084
                           "N")
1085
         rsQry.AddNew varFields, varValues
1086
      End If
1087
 
4293 dpurdie 1088
 
1089
 
3959 dpurdie 1090
      If isAbtnRequired(aAbtnList, "btnEditProjectExtensions") Then
7003 dpurdie 1091
         varValues = Array("btnEditProjectExtensions", null,_
3959 dpurdie 1092
                           """javascript:;""",_
5590 dpurdie 1093
                           """onClick=""""MM_openVixIFrame('wAddProjectExtension.asp?type=edit&ext=""& extName &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','Edit Project Extension');""""""",_
3959 dpurdie 1094
                           "icons/i_edit.gif",_
5983 dpurdie 1095
                           NULL,_
3959 dpurdie 1096
                           "Edit Project Extensions",_
1097
                           "Y",_
1098
                           "Y",_
4083 dpurdie 1099
                           "N",_
3959 dpurdie 1100
                           "N")
1101
         rsQry.AddNew varFields, varValues
1102
      End If
1103
 
1104
      If isAbtnRequired(aAbtnList, "btnDeleteProjectExtension") Then
7003 dpurdie 1105
         varValues = Array("btnDeleteProjectExtension", null,_
3959 dpurdie 1106
                           """_DeleteProjectExtension.asp?rfile=""& SCRIPT_NAME &""&ext=""& extName &""&""& objPMod.ComposeURL()",_
5190 dpurdie 1107
                           """vixConfirm('Remove Project Extension:  \'""& extName &""\' from this list?<p>This will prevent it from being used in new package versions.',{title:'Remove Project Extension', button:'Remove', url: 'HREF'});""""""",_
3959 dpurdie 1108
                           "icons/i_remove.gif",_
1109
                           null,_
1110
                           "Delete Project Extension",_
1111
                           "Y",_
1112
                           "Y",_
4083 dpurdie 1113
                           "N",_
3959 dpurdie 1114
                           "N")
1115
         rsQry.AddNew varFields, varValues
1116
      End If
4029 dpurdie 1117
 
1118
      If isAbtnRequired(aAbtnList, "btnEditGBE_Machclass") Then
7003 dpurdie 1119
         varValues = Array("btnEditGBE_Machclass", null,_
4029 dpurdie 1120
                           """javascript:;""",_
5590 dpurdie 1121
                           """onClick=""""MM_openVixIFrame('wAddMachclass.asp?type=edit&bm_id=""& bm_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','Edit Machine Class');""""""",_
4029 dpurdie 1122
                           "icons/i_edit.gif",_
5983 dpurdie 1123
                           NULL,_
4029 dpurdie 1124
                           "Edit this GBE MachClass value",_
1125
                           "Y",_
1126
                           "Y",_
4083 dpurdie 1127
                           "N",_
4029 dpurdie 1128
                           "N")
1129
         rsQry.AddNew varFields, varValues
1130
      End If
1131
 
1132
      If isAbtnRequired(aAbtnList, "btnDeleteGBE_Machclass") Then
7003 dpurdie 1133
         varValues = Array("btnDeleteGBE_Machclass", null,_
4040 dpurdie 1134
                           """wAddMachclass.asp?type=delete&bm_id=""& bm_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL()",_
5190 dpurdie 1135
                           """vixConfirm('Delete the \'""& GBE_VALUE &""\' Machine Class',{title:'Delete Machine Class', button:'Delete', url: 'HREF'});""""""",_
4029 dpurdie 1136
                           "icons/i_remove.gif",_
1137
                           null,_
1138
                           "Delete this GBE MachClass value",_
1139
                           "Y",_
1140
                           "Y",_
4083 dpurdie 1141
                           "N",_
4029 dpurdie 1142
                           "N")
1143
         rsQry.AddNew varFields, varValues
1144
      End If
4670 dpurdie 1145
 
5122 dpurdie 1146
      If isAbtnRequired(aAbtnList, "btnEditGBE_BuildStandard") Then
7003 dpurdie 1147
         varValues = Array("btnEditGBE_BuildStandard", null,_
5122 dpurdie 1148
                           """javascript:;""",_
5590 dpurdie 1149
                           """onClick=""""MM_openVixIFrame('wAddBuildStandard.asp?type=edit&bsa_id=""& bsa_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','Edit Build Standard');""""""",_
5122 dpurdie 1150
                           "icons/i_edit.gif",_
5983 dpurdie 1151
                           NULL,_
5122 dpurdie 1152
                           "Edit this Build Standard",_
1153
                           "Y",_
1154
                           "Y",_
1155
                           "N",_
1156
                           "N")
1157
         rsQry.AddNew varFields, varValues
1158
      End If
1159
 
1160
      If isAbtnRequired(aAbtnList, "btnDeleteGBE_BuildStandard") Then
7003 dpurdie 1161
         varValues = Array("btnDeleteGBE_BuildStandard", null,_
5122 dpurdie 1162
                           """_DeleteBuildStandard.asp?rfile=""& SCRIPT_NAME &""&bsa_id=""& bsa_id &""&""& objPMod.ComposeURL()",_
5190 dpurdie 1163
                           """vixConfirm('Delete the \'""& GBE_VALUE &""\' Build Standard',{title : 'Delete Build Standard', button:'Delete', url: 'HREF'});""""""",_
5122 dpurdie 1164
                           "icons/i_remove.gif",_
1165
                           null,_
1166
                           "Delete this Build Standard",_
1167
                           "Y",_
1168
                           "Y",_
1169
                           "N",_
1170
                           "N")
1171
         rsQry.AddNew varFields, varValues
1172
      End If
3959 dpurdie 1173
 
7225 dpurdie 1174
	 If isAbtnRequired(aAbtnList, "btnEditBuildPlatforms") Then
1175
         varValues = Array("btnEditBuildPlatforms", null,_
1176
                           """javascript:;""",_
1177
                           """onClick=""""MM_openVixIFrame('wAddBuildPlatform.asp?type=edit&bp_id=""& bp_id &""&rfile=""& SCRIPT_NAME &""&""& objPMod.ComposeURL() &""','Edit Build Platform');""""""",_
1178
                           "icons/i_edit.gif",_
1179
                           NULL,_
1180
                           "Edit Build Platform",_
1181
                           "Y",_
1182
                           "Y",_
1183
                           "N",_
1184
                           "N")
1185
         rsQry.AddNew varFields, varValues
1186
      End If
1187
 
1188
      If isAbtnRequired(aAbtnList, "btnDeleteBuildPlatforms") Then
1189
         varValues = Array("btnDeleteBuildPlatforms", null,_
1190
                           """_DeleteBuildPlatform.asp?rfile=""& SCRIPT_NAME &""&bp_id=""& bp_id &""&""& objPMod.ComposeURL()",_
1191
                           """vixConfirm('Remove Build Platform \'""& bp_name &""\' from this list?',{title:'Delete Build Platform', button:'Delete', url: 'HREF'});""""""",_
1192
                           "icons/i_remove.gif",_
1193
                           null,_
1194
                           "Delete Build Platform",_
1195
                           "Y",_
1196
                           "Y",_
1197
                           "N",_
1198
                           "N")
1199
         rsQry.AddNew varFields, varValues
1200
      End If
1201
 
127 ghuddy 1202
      ' Move cursor to the first record
1203
      rsQry.MoveFirst
1204
 
1205
      If ((NOT rsQry.BOF) AND (NOT rsQry.EOF)) Then
1206
         Call LoadButtons ( rsQry.GetRows() )
1207
      End If
1208
 
1209
      rsQry.Close
1210
      Set rsQry = Nothing
1211
   End Sub
1212
   '-----------------------------------------------------------------------------------------------------------------
1213
   Public Sub LoadButtons ( aRows )
1214
      Dim nProperty, newArrayDim, LastRow, rowNum
1215
 
1216
      LastRow = UBound( aRows, 2 )
1217
 
1218
      For rowNum = 0 To LastRow
1219
         ' Increase array by 1
1220
         newArrayDim = LastRowInx() + 1
1221
         ReDim Preserve mArrAbtnDef( mNumOfProperties, newArrayDim )
1222
 
1223
 
1224
         mobjNameDefMap.Item ( Cstr( aRows ( InxName, rowNum ) ) ) = newArrayDim
1225
 
1226
         For nProperty = 0 To mLastPropertyInx
1227
            mArrAbtnDef ( nProperty, newArrayDim ) = aRows ( nProperty, rowNum )
1228
 
1229
         Next
1230
 
1231
      Next
1232
 
1233
   End Sub
1234
   '-----------------------------------------------------------------------------------------------------------------
1235
   Private Function LastRowInx ()
1236
       LastRowInx = UBound ( mArrAbtnDef, 2 )
1237
   End Function
1238
   '-----------------------------------------------------------------------------------------------------------------
1239
   Public Sub AddSeparatorAfter ( sItemName, sSeparatorWidth )
1240
      If InStr( sItemName, " " ) > 0 Then   Err.Raise 8, "Method AddSeparatorAfter", "Item Name '"& sItemName &"' cannot have spaces."
1241
      mobjSeparator.Add (Cstr(sItemName)), CStr(sSeparatorWidth)
1242
   End Sub
1243
   '-----------------------------------------------------------------------------------------------------------------
1244
   Public Sub AddSeparator ( sSeparatorWidth )
1245
      mobjSeparator.Add ( Cstr(mArrAbtnDef(InxName, LastItemInx())) ), CStr(sSeparatorWidth)
1246
   End Sub
1247
   '-----------------------------------------------------------------------------------------------------------------
1248
   Private Sub SetItemDefaults ( sItemName )
1249
      ' Additional default setup
1250
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxActive, enumDB_YES )         ' Default Active = enumDB_YES
1251
   End Sub
1252
   '-----------------------------------------------------------------------------------------------------------------
1253
   Public Sub Text ( sItemName, Value )
1254
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxTxt, Value )
1255
   End Sub
1256
   '-----------------------------------------------------------------------------------------------------------------
1257
   Public Sub Image ( sItemName, Value )
1258
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxImg, Value )
1259
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxImgOff, Value )         ' Default image disable to be the same as image
1260
   End Sub
1261
   '-----------------------------------------------------------------------------------------------------------------
1262
   Public Sub ImageOff ( sItemName, Value )
1263
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxImgOff, Value )
1264
   End Sub
1265
   '-----------------------------------------------------------------------------------------------------------------
1266
   Public Sub Link ( sItemName, Value )
1267
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxLink, Value )
1268
   End Sub
1269
   '-----------------------------------------------------------------------------------------------------------------
1270
   Public Sub EventHandler ( sItemName, Value )
1271
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxEventHandler, Value )
1272
   End Sub
1273
   '-----------------------------------------------------------------------------------------------------------------
1274
   Public Sub Hint ( sItemName, Value )
1275
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxHint, Value )
1276
   End Sub
1277
   '-----------------------------------------------------------------------------------------------------------------
1278
   Public Sub Visible ( sItemName, Value )
1279
      'Response.write sItemName &"here"& mobjNameDefMap.Item (Cstr(sItemName))
1280
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxVisible, Value )
1281
   End Sub
1282
   '-----------------------------------------------------------------------------------------------------------------
5929 dpurdie 1283
   Public Sub ReadOnly ( sItemName, Value )
1284
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxIsReadonlyAction, Value )
1285
   End Sub
1286
   '-----------------------------------------------------------------------------------------------------------------
143 ghuddy 1287
   Public Function IsVisible ( sItemName )
1288
      'Response.write sItemName &"here"& mobjNameDefMap.Item (Cstr(sItemName))
1289
      IsVisible = GetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxVisible )
1290
   End Function
1291
   '-----------------------------------------------------------------------------------------------------------------
127 ghuddy 1292
   Public Sub Active ( sItemName, Value )
1293
      'Response.write sItemName &"here"& mobjNameDefMap.Item (Cstr(sItemName))
1294
      Call SetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxActive, Value )
1295
   End Sub
1296
   '-----------------------------------------------------------------------------------------------------------------
143 ghuddy 1297
   Public Function IsActive ( sItemName )
1298
      IsActive = GetItemPropertyByIndex ( mobjNameDefMap.Item (Cstr(sItemName)), InxActive )
1299
   End Function
1300
   '-----------------------------------------------------------------------------------------------------------------
127 ghuddy 1301
   Private Sub Class_Initialize()
1302
      '// Perform action on creation of object. e.g. Set myObj = New ThisClassName
1303
      Set mobjNameDefMap = CreateObject("Scripting.Dictionary")
1304
      Set mobjIdDefMap = CreateObject("Scripting.Dictionary")
1305
      Set mobjSeparator = CreateObject("Scripting.Dictionary")
1306
      Set mobjACActionsMap = CreateObject("Scripting.Dictionary")
1307
 
1308
      'mbIsReadonly = FALSE   ' Tell control that it should use only readonly action buttons (i.e. actions which will not alter database )
1309
      mReadonlyActionBehaviour = enumABTNCTRL_ON_READONLY_HIDE      ' Tell control what to do by default if mbIsReadonly = TRUE
1310
 
1311
      mnButtonSpacer = 0
1312
      mnImageHspace = 4
1313
 
7003 dpurdie 1314
      mNumOfProperties = 11     ' Number of properties in array which define one menu item.
127 ghuddy 1315
      mLastPropertyInx = mNumOfProperties - 1
1316
 
1317
      mbDisableAll = FALSE
1318
 
1319
      ReDim mArrAbtnDef ( mNumOfProperties, -1 )
7003 dpurdie 1320
      InxName               = 0
1321
      InxTxt                = 1 
1322
      InxLink               = 2 
1323
      InxEventHandler       = 3 
1324
      InxImg                = 4 
1325
      InxImgOff             = 5 
1326
      InxHint               = 6 
1327
      InxVisible            = 7 
1328
      InxActive             = 8 
1329
      InxIsReadonlyAction   = 9 
1330
      InxHideOnClosed       = 10
127 ghuddy 1331
   End Sub
1332
   '-----------------------------------------------------------------------------------------------------------------
1333
   Private Sub Class_Terminate()
1334
      '// Perform action on object disposal. e.g. Set myObj = Nothing
1335
      Set mobjNameDefMap = Nothing
1336
      Set mobjIdDefMap = Nothing
1337
      Set mobjSeparator = Nothing
1338
      Set mobjACActionsMap = Nothing
1339
 
1340
 
1341
   End Sub
1342
   '-----------------------------------------------------------------------------------------------------------------
119 ghuddy 1343
End Class
127 ghuddy 1344
%>