Subversion Repositories DevTools

Rev

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