Subversion Repositories DevTools

Rev

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

Rev Author Line No. Line
119 ghuddy 1
<%
2
'=====================================================
5080 dpurdie 3
'   _environment.asp
4
'   Build Environment
5
'   Generate the left-hand panel for pages that show Release Content
119 ghuddy 6
'=====================================================
7
%>
8
<!--#include file="_tabs_definition_env.asp"-->
9
<!--#include file="common/_form_window_common.asp"-->
10
<%
11
'------------ Variable Definition -------------
123 ghuddy 12
Dim parOLshow     ' show/hide outer-latest
13
Dim parBshow      ' expand/collapse base views
14
Dim parPshow      ' expand/collapse personal views
15
Dim parPview      ' enable/disable all personal views
16
Dim parDview      ' enable/disable   deployment   view.
5167 dpurdie 17
Dim hasPview      ' Has Personal View
119 ghuddy 18
Dim IMG_locked
19
Dim rsEnvQry
20
Dim pvIdInList
21
Dim checked
22
Dim disabled
23
Dim pkgType
24
Dim SCRIPT_NAME 'Use this here only as the previous one ScriptName is Already Defined
25
'------------ Constants Declaration -----------
26
Const imgMaximise  = "<IMG src='images/i_maximise.gif' alt='Show view contents.' width=13 height=13 hspace='2' vspace='1' border='0'>"
27
Const imgMinimise  = "<IMG src='images/i_minimise.gif' alt='Hide view contents.' width=13 height=13 hspace='2' vspace='1' border='0'>"
28
Const imgForced    = "<img src='images/s_forced.gif' width='19' height='17' align='absmiddle'>"
29
Const imgLocked    = "<img src='images/i_locked.gif' width='7' height='10' border='0' hspace='2'>"
30
Const hlColor      = "#DDDDDD"
31
Const imgAdded     = "<img src='images/i_added.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Added'>"
32
Const imgRemoved   = "<img src='images/i_removed.gif' width='11' height='11' border='0' hspace='5' align='absmiddle' title='To Be Removed'>"
33
'------------ Variable Init -------------------
34
parOLshow = QStrPar("OLshow")
35
parBshow = QStrPar("Bshow")
36
parPshow = QStrPar("Pshow")
37
parPview = QStrPar("Pview")
38
parDview = QStrPar("Dview")
5167 dpurdie 39
hasPview = hasPersonalViews()
40
If NOT hasPview  Then parPview = "disable"
119 ghuddy 41
'----------------------------------------------
42
%>
43
<script language="JavaScript" type="text/javascript">
44
<!--
45
var is_ie = (navigator.userAgent.indexOf('MSIE') >= 0) ? 1 : 0;
46
var is_ie5 = (navigator.appVersion.indexOf("MSIE 5.5")!=-1) ? 1 : 0;
47
var is_opera = ((navigator.userAgent.indexOf("Opera6")!=-1)||(navigator.userAgent.indexOf("Opera/6")!=-1)) ? 1 : 0;
48
    //netscape, safari, mozilla behave the same???
49
var is_netscape = (navigator.userAgent.indexOf('Netscape') >= 0) ? 1 : 0;
50
 
4388 dpurdie 51
///////////////////////////////////////////////
52
//  Function:       toggletick    
53
//  Description:    This function will toggle all visible (pending) tick boxes 
54
//  Input:          te  - Controlling element
55
//
56
function toggletick(te)
57
{
58
    // Get the form containing all of the pending items
59
    var f = document.getElementById('pending_PVID_List');
5190 dpurdie 60
    if (f == null ) {
61
       vixAlert('Internal<p>Failed To Get pending_PVID_List');   // should never happen unless a coding/rendering mistake is made?
4388 dpurdie 62
    } else {
63
       if (f.pv_id_list != null) {
64
           if (f.length == 1 || typeof f.pv_id_list.length == "undefined") {
65
              if (false == f.pv_id_list.disabled) {
66
                 f.pv_id_list.checked = te.checked;
67
              }
68
           } else {
69
              for (n = 0; n < f.pv_id_list.length; n++) {
70
                 if (false == f.pv_id_list[n].disabled) {
71
                    f.pv_id_list[n].checked = te.checked;
72
                 }
73
              }
74
           }
75
       }
76
    }
77
}
119 ghuddy 78
 
4388 dpurdie 79
///////////////////////////////////////////////
80
//  Function:       countBulkItems
81
//  Description:    Determine the number of bulk ticked items
82
//                  These are suiable and enabled items
83
//  Input:          f - Form element to process
84
//
85
function countBulkItems(f)
86
{
87
    var n;
88
    var numCheckedAndEnabled = 0;
89
    var numUncheckedAndEnabled = 0;
90
 
91
    // Unbelievably, if the form has just one single PV_ID checkbox item, the syntax via which we access it
92
    // has to change. We cannot use array access syntax in such a case.
93
    if (f.length == 1 || typeof f.pv_id_list.length == "undefined")
94
    {
95
       if (f.pv_id_list.value != null)
96
       {
97
          if (false == f.pv_id_list.disabled)
98
          {
99
             if (true == f.pv_id_list.checked)
100
                numCheckedAndEnabled++;
101
             else
102
                numUncheckedAndEnabled++;
103
          }
104
       }
105
    }
106
    else
107
    {
108
       // Here we can and have to use array access syntax.
109
       for (n = 0; n < f.pv_id_list.length; n++)
110
       {
111
          if (false == f.pv_id_list[n].disabled)
112
          {
113
             if (true == f.pv_id_list[n].checked)
114
                numCheckedAndEnabled++;
115
             else
116
                numUncheckedAndEnabled++;
117
          }
118
       }
119
    }
120
    return numCheckedAndEnabled;
121
}
122
 
123 ghuddy 123
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
124
// This function is executed when the Bulk Release action button is pressed. It will do some local
125
// client side checks and then if all is well, it will use the make_bulk_release.asp to initiate
126
// the bulk release process on the server side.
127
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
128
function makeBulkRelease()
129
{
5190 dpurdie 130
    // Get the form containing all of the pending items
131
    var f = document.getElementById('pending_PVID_List');
132
    if (f == null)
133
    {
134
        vixAlert('Internal<p>Failed To Get pending_PVID_List');   // should never happen unless a coding/rendering mistake is made?
135
        return;
136
    }
137
    // When no items exist in the pending tab, the pending_PVID_List form will not contain any
138
    // element called pv_id_list, so it will be null. Check for that and issue an alert as appropriate.
139
    if (f.pv_id_list == null)
140
    {
141
        vixAlert('There are no items pending that can be considered for bulk release.' +
142
               '<p>Use the Bulk Release button when items with checkboxes are present in the Pending Tab.');
143
        return;
144
    }
119 ghuddy 145
 
5190 dpurdie 146
    var numCheckedAndEnabled = countBulkItems(f);
147
    if (numCheckedAndEnabled == 0)
148
    {
149
        vixAlert('Currently, there are no items that can be bulk released.' +
150
                   '<p>Select items to be released before using the Bulk Release button');
151
        return;
152
    }
153
 
154
     vixConfirm('Release all ('+numCheckedAndEnabled+') checked items from the Pending List.', {
155
        title : 'Confirm Bulk Release',
156
        button : 'Release',
157
        ok : function(){
123 ghuddy 158
            // Initiate the bulk release by redirecting the browser to the make_bulk_release.asp page
159
            // which holds the server side VBScript code that actually carries out the release operations.
160
            // Once complete, that code will redirect the browser back to the dependencies.asp page of which
161
            // this _environment.asp file is a part (by direct inclusion)
7001 dpurdie 162
            <%If Request("pv_id") <> "" Then%>
125 ghuddy 163
               f.action = "make_bulk_release.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>";
123 ghuddy 164
            <%Else%>
165
               f.action = "make_bulk_release.asp?rtag_id=<%=parRtag_id%>";
166
            <%End If%>
167
            f.submit();
168
            // TODO : I would like to show progress? Is that even possible? If so, how?
5190 dpurdie 169
        }
170
    });
123 ghuddy 171
}
119 ghuddy 172
 
4358 dpurdie 173
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
174
// This function is executed when the Bulk Remove action button is pressed. It will do some local
175
// client side checks and then if all is well, it will use the make_bulk_remove.asp to initiate
176
// the bulk remove process on the server side.
177
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
178
function makeBulkReject()
179
{
180
   // Get the form containing all of the pending items
181
   var f = document.getElementById('pending_PVID_List');
182
   if (f == null)
183
   {
5190 dpurdie 184
       vixAlert('Internal<p>Failed To Get pending_PVID_List');   // should never happen unless a coding/rendering mistake is made?
185
       return;
186
   }
187
    // When no items exist in the pending tab, the pending_PVID_List form will not contain any
188
    // element called pv_id_list, so it will be null. Check for that and issue an alert as appropriate.
189
    if (f.pv_id_list == null)
190
    {
191
        vixAlert('There are no items pending that can be considered for Bulk Rejection.' +
192
                   '<p>Use the Bulk Reject button when items with checkboxes are present in the Pending Tab.');
193
        return;
194
    }
195
     var numCheckedAndEnabled = countBulkItems(f);
196
     if (numCheckedAndEnabled == 0)
197
     {
198
         vixAlert('Currently, there are no items that can be Bulk Rejected.' +
199
               '<p>Select items to be released before using the Bulk Reject button');
200
         return;
201
     }
4358 dpurdie 202
 
5190 dpurdie 203
     vixConfirm('Reject all ('+numCheckedAndEnabled+') checked items from the Pending List.',{
204
        title : 'Confirm Bulk Reject',
205
        button : 'Reject',
206
        ok : function(){
207
                // Initiate the bulk remove by redirecting the browser to the make_bulk_remove.asp page
208
                // which holds the server side VBScript code that actually carries out the remove operations.
209
                // Once complete, that code will redirect the browser back to the dependencies.asp page of which
210
                // this _environment.asp file is a part (by direct inclusion)
7001 dpurdie 211
                <%If Request("pv_id") <> "" Then%>
5190 dpurdie 212
                   f.action = "make_bulk_reject.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>";
213
                <%Else%>
214
                   f.action = "make_bulk_reject.asp?rtag_id=<%=parRtag_id%>";
215
                <%End If%>
216
                f.submit();
217
                // TODO : I would like to show progress? Is that even possible? If so, how?
218
            }
219
        });
4358 dpurdie 220
}
221
 
4388 dpurdie 222
///////////////////////////////////////////////
4395 dpurdie 223
//  Function:    openAllViews
224
//  Description: Open and Populate all Views
225
//               Views are populated via AJAX
226
//               Current scheme allows for one AJAX request to be outstanding
227
//               Have AJAX callback determine if there is more work to be done
228
//
229
var openingAllViews = 0;
230
function openAllViews()
231
{
232
    openingAllViews = 0;
233
    toggleAllViewsIcon(0);
234
 
235
    //if (event.shiftKey==1)
236
    //
237
    //  Locate first/next view to be expanded
238
    var divs = document.getElementsByTagName("div");
239
    for (var i=0;i<divs.length;i++) {
240
        var el = divs[i]; 
241
        var id = el.id;
242
        if (id.indexOf("ENVDIV") == 0)
243
        {
244
            var rowId = id.substr(6);
245
            if (el.innerHTML.indexOf('<%=enumLOADING%>') != -1)
246
            {
247
                openingAllViews = 1;
4398 dpurdie 248
                RequestViewContent(rowId);
4395 dpurdie 249
                return;
250
            } else if (el.style.display == 'none') {
251
               UpdateViewHeader(rowId, 0);
252
            }
253
        }
254
    }
255
}
256
 
257
///////////////////////////////////////////////
4388 dpurdie 258
//  Function:       closeAllViews
4395 dpurdie 259
//  Description:    Close and forget about All Populated Views
4388 dpurdie 260
//
261
function closeAllViews()
262
{
4395 dpurdie 263
    openingAllViews = 0;
264
    toggleAllViewsIcon(0);
265
 
4396 dpurdie 266
    //  Get the View cookie and convert it into a hash
267
    var vhash = new Object();
4388 dpurdie 268
    var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
269
    if (us) {
270
        var aViewList = us.split(',');
271
        for (index=0; index < aViewList.length;++index) {
4396 dpurdie 272
            vhash[aViewList[index]] = 1;
273
        }
274
    }
275
 
276
    //  Locate first/next view to be closed
277
    var divs = document.getElementsByTagName("div");
278
    for (var i=0;i<divs.length;i++) {
279
        var el = divs[i]; 
280
        var id = el.id;
281
        if (id.indexOf("ENVDIV") == 0)
282
        {
283
            var rowId = id.substr(6);
284
            if (el.innerHTML.indexOf('<%=enumLOADING%>') == -1)
285
            {
286
                UpdateViewHeader(rowId, 1);
287
                el.innerHTML = '<%=enumLOADING%>';
288
 
289
                // Delete from cookie too
290
                delete vhash[rowId];
4388 dpurdie 291
            }
292
        }
4396 dpurdie 293
    }
294
 
295
    //  Reform the cookie
296
    if (us)
297
    {
298
        us = Object.keys(vhash).join(',');
4388 dpurdie 299
        // Store to cookie
300
        document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
4396 dpurdie 301
    }
4388 dpurdie 302
}
4358 dpurdie 303
 
4388 dpurdie 304
///////////////////////////////////////////////
4395 dpurdie 305
//  Function:    toggleAllViewsIcon
306
//  Description: Update the toogleAllViews Icon
307
//  arg        : mode - 0 min, else max
308
//
309
function toggleAllViewsIcon(mode)
310
{
311
    //  Update image
312
    //      images/btn_min.gif 
313
    var f = document.getElementById('cb_minall');
314
    if (mode ) {
315
        f.src = 'images/btn_max.gif';
316
    } else {
317
        f.src = 'images/btn_min.gif';
318
    }
319
}
320
 
321
 
322
///////////////////////////////////////////////
4388 dpurdie 323
//  Function:    toggleAllViews
324
//  Description: Hide/Show all the expanded views
325
//               Will not change the saved list, just the current display
326
//
327
function toggleAllViews()
328
{
4396 dpurdie 329
    var dmatch, dset;
4395 dpurdie 330
    openingAllViews = 0;
331
 
332
    //  Update the icon image
4388 dpurdie 333
    var f = document.getElementById('cb_minall');
334
    if (f.src.indexOf('min.gif') >= 0) {
335
        f.src = 'images/btn_max.gif';
336
        dmatch = 'block';
337
        dset = 'none';
338
    } else {
339
        f.src = 'images/btn_min.gif';
340
        dmatch = 'none';
341
        dset = 'block';
342
    }
343
 
4396 dpurdie 344
    //  Locate first/next view to be toggled
345
    var divs = document.getElementsByTagName("div");
346
    for (var i=0;i<divs.length;i++) {
347
        var el = divs[i]; 
348
        var id = el.id;
349
        if (id.indexOf("ENVDIV") == 0)
350
        {
351
            if (el.innerHTML.indexOf('<%=enumLOADING%>') == -1) {
352
                var rowId = id.substr(6);
353
                if (el && el.style.display == dmatch ) {
354
                    el.style.display = dset;
355
                }
4388 dpurdie 356
            }
357
        }
358
    }
359
}
360
 
361
function UpdateViewHeader(rowId, show)
362
{
363
    if ( show )
364
    {
365
       // View is currently minimised
366
       MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_max.gif';
367
       MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#808080';
4397 dpurdie 368
       MM_findObj( 'ENVDIV'+ rowId ).style.display = 'none';
4388 dpurdie 369
    }
370
    else
371
    {
372
       // View is currently maximised
373
       MM_findObj( 'ENVIMG'+ rowId ).src = 'images/btn_min.gif';
374
       MM_findObj( 'SPANVIEW'+ rowId ).style.color = '#000000';
4397 dpurdie 375
       MM_findObj( 'ENVDIV'+ rowId ).style.display = 'block';
4388 dpurdie 376
    }
377
}
378
 
4396 dpurdie 379
///////////////////////////////////////////////
380
//  Function:       RequestViewContent    
381
//  Description:    Maintain view content
382
//                  If View Tab is unpopulated - then populate it
383
//                  if View Tab is populated - then Minimise it
4398 dpurdie 384
//  Arguments:      rowId   - Id if Row to Fetch
7054 dpurdie 385
//                  ev      - Current event
4396 dpurdie 386
//
7054 dpurdie 387
function RequestViewContent( rowId, ev ){
123 ghuddy 388
   var requestURL = 'RequestViewContent.asp';
4398 dpurdie 389
   var paramString = '?envtab=<%=nEnvTab%>&rtag_id=<%=parRtag_id%>&script_name=<%=ScriptName%>&view_id=' + rowId;
7054 dpurdie 390
   var forceLoad = ev ? ev.shiftKey : false;
119 ghuddy 391
 
123 ghuddy 392
   // Change display states
393
   if ( (MM_findObj( 'ENVIMG'+ rowId ).src).indexOf('btn_max.gif') == -1 )
394
   {
395
      // View is currently minimised
4388 dpurdie 396
      UpdateViewHeader(rowId, 1);    
119 ghuddy 397
 
123 ghuddy 398
      // Remove from SHow View List
399
      RemoveFromShowView ( rowId );
400
   }
401
   else
402
   {
403
      // View is currently maximised
4388 dpurdie 404
      UpdateViewHeader(rowId, 0);
405
 
123 ghuddy 406
      // Add it to Show view id
407
      AddToShowView ( rowId );
408
   }
119 ghuddy 409
 
123 ghuddy 410
   // Fix div width for ie so it does not overflow
411
   if (is_ie)
412
   {
413
      MM_findObj( 'ENVDIV'+ rowId ).style.width = '100%';
414
   }
119 ghuddy 415
 
123 ghuddy 416
   // Set ajax divname
417
   ajaxdivname = 'ENVDIV'+ rowId;
119 ghuddy 418
 
123 ghuddy 419
   // Request data from server
7054 dpurdie 420
   if ( forceLoad || ((MM_findObj( ajaxdivname ).innerHTML).indexOf('<%=enumLOADING%>') != -1 ))
123 ghuddy 421
   {
7054 dpurdie 422
       MM_findObj( ajaxdivname ).innerHTML = '<%=enumLOADING%>';
423
 
123 ghuddy 424
      //Append the name to search for to the requestURL
425
      var url = requestURL + paramString;
119 ghuddy 426
 
123 ghuddy 427
      //Create the xmlHttp object to use in the request
428
      //stateChangeHandler will fire when the state has changed, i.e. data is received back
429
      // This is non-blocking (asynchronous)
430
      xmlHttp = GetXmlHttpObject(stateChangeHandler);
119 ghuddy 431
 
123 ghuddy 432
      //Send the xmlHttp get to the specified url
433
      xmlHttp_Get(xmlHttp, url);
434
   }
435
}
119 ghuddy 436
 
123 ghuddy 437
function GetXmlHttpObject(handler) {
438
   var objXmlHttp = null;    //Holds the local xmlHTTP object instance
119 ghuddy 439
 
123 ghuddy 440
   //Depending on the browser, try to create the xmlHttp object
441
   if (is_ie){
442
      //The object to create depends on version of IE
443
      //If it isn't ie5, then default to the Msxml2.XMLHTTP object
444
      var strObjName = (is_ie5) ? 'Microsoft.XMLHTTP' : 'Msxml2.XMLHTTP';
119 ghuddy 445
 
123 ghuddy 446
      //Attempt to create the object
447
      try{
448
         objXmlHttp = new ActiveXObject(strObjName);
449
         objXmlHttp.onreadystatechange = handler;
450
      }
451
      catch(e){
452
      //Object creation errored
453
         alert('IE detected, but object could not be created. Verify that active scripting and activeX controls are enabled');
454
         return;
455
      }
456
   }
457
   else if (is_opera){
458
      //Opera has some issues with xmlHttp object functionality
459
      alert('Opera detected. The page may not behave as expected.');
460
      return;
461
   }
462
   else{
463
      // Mozilla | Netscape | Safari
464
      objXmlHttp = new XMLHttpRequest();
465
      objXmlHttp.onload = handler;
466
      objXmlHttp.onerror = handler;
467
   }
119 ghuddy 468
 
123 ghuddy 469
   //Return the instantiated object
470
   return objXmlHttp;
119 ghuddy 471
}
472
 
123 ghuddy 473
//stateChangeHandler will fire when the state has changed, i.e. data is received back
474
// This is non-blocking (asynchronous)
475
function stateChangeHandler()
476
{
477
   //readyState of 4 or 'complete' represents that data has been returned
478
   if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete'){
479
      //Gather the results from the callback
480
      var str = xmlHttp.responseText;
119 ghuddy 481
 
123 ghuddy 482
      //Populate the innerHTML of the div with the results
483
      document.getElementById(ajaxdivname).innerHTML = str;
484
   }
4395 dpurdie 485
 
486
   //Cascade view opening
487
   if (openingAllViews) {
488
       openAllViews();
489
   }
123 ghuddy 490
}
119 ghuddy 491
 
123 ghuddy 492
// XMLHttp send GET request
493
function xmlHttp_Get(xmlhttp, url) {
494
   //Getting a permissions error here? Check the url string to
495
   // ensure it is accurate (defined above)
496
   xmlhttp.open('GET', url, true);
497
   xmlhttp.send(null);
498
}
119 ghuddy 499
 
500
 
501
 
502
function RemoveFromShowView ( ViewId )
503
{
123 ghuddy 504
   // Get current cookie settings
505
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
506
   var aShowViews = new Array();
119 ghuddy 507
 
123 ghuddy 508
   if (us)
509
   {
510
      // Cookie is not empty, hence just append new value
511
      var aViews = us.split(',');
119 ghuddy 512
 
123 ghuddy 513
      // Make sure that view is not already on the list
514
      for (i=0; i<aViews.length; i++)
515
      {
516
         if (aViews[i] != ViewId)
517
         {
518
            aShowViews.push(aViews[i]);
519
         }
520
      }
119 ghuddy 521
 
123 ghuddy 522
      // Make a new view list to be stored in cookie
523
      us = aShowViews.join(',');
524
   }
525
   else
526
   {
527
      us = '';
528
   }
119 ghuddy 529
 
123 ghuddy 530
   // Store to cookie
531
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 532
}
533
 
534
function AddToShowView ( ViewId )
535
{
123 ghuddy 536
   // Get current cookie settings
537
   var us = GetCookie('<%=COOKIE_RELMGR_SHOW_VIEW%>');
538
   var aShowViews = new Array();
119 ghuddy 539
 
123 ghuddy 540
   //Release Manager Cookie Available on Show View
541
   if ( us )
542
   {
543
      // Cookie is not empty, hence just append new value
544
      var aViews = us.split(',');
119 ghuddy 545
 
123 ghuddy 546
      // Make sure that view is not already on the list
547
      for (i=0; i<aViews.length; i++)
548
      {
549
         if (aViews[i] != ViewId)
550
         {
551
            aShowViews.push(aViews[i]);
552
         }
553
      }
119 ghuddy 554
 
123 ghuddy 555
      // Make a new view list to be stored in cookie
556
      us = aShowViews.join(',') + ',' + ViewId;
557
   }
558
   else//Release Manager Cookie Not Available on Show View
559
   {
560
      // Cookie is empty, just add this value
561
      us = ViewId;
119 ghuddy 562
 
123 ghuddy 563
   }
119 ghuddy 564
 
123 ghuddy 565
   // Store to cookie
566
   document.cookie = '<%=COOKIE_RELMGR_SHOW_VIEW%>' + '=' + us;
119 ghuddy 567
}
5190 dpurdie 568
<%If parRtag_id <> "" Then %>
5087 dpurdie 569
//  Load dialog to add an SDK to the Release
5071 dpurdie 570
function addSdk()
571
{
5087 dpurdie 572
    $('#popmenu').load('_wform_reference_sdk.asp', {rtag_id : <%=parRtag_id%>});
5071 dpurdie 573
}
5190 dpurdie 574
<%End If %>
5071 dpurdie 575
 
119 ghuddy 576
//-->
577
</script>
578
 
579
<%
580
'------------------------------------------------------------------------------------------------------------------------------------------------
581
Function GetEnvTab ( sEnvTab )
5061 dpurdie 582
'   rmDebug = rmDebug & "Cookie[" & Request.Cookies(COOKIE_RELEASEMANAGER_MEMORY) &"] "
583
'   rmDebug = rmDebug & ", Arg[" & sEnvTab & "] "
123 ghuddy 584
   If sEnvTab <> "" Then
585
      GetEnvTab = sEnvTab
5020 dpurdie 586
      Response.Cookies(COOKIE_RELEASEMANAGER_MEMORY)("envtab") = sEnvTab
123 ghuddy 587
   Else
5020 dpurdie 588
      If Request.Cookies(COOKIE_RELEASEMANAGER_MEMORY)("envtab") <> "" Then
589
         GetEnvTab = Request.Cookies(COOKIE_RELEASEMANAGER_MEMORY)("envtab")
123 ghuddy 590
      Else
591
         GetEnvTab = enumENVTAB_WORK_IN_PROGRESS
5020 dpurdie 592
         Response.Cookies(COOKIE_RELEASEMANAGER_MEMORY)("envtab") = enumENVTAB_WORK_IN_PROGRESS
123 ghuddy 593
      End If
594
   End If
5061 dpurdie 595
'   rmDebug = rmDebug & ", GetEnvTab:" & GetEnvTab
119 ghuddy 596
End Function
597
'------------------------------------------------------------------------------------------------------------------------------------------------
598
Sub Display_Env_BaseView ( NNbase_view_id, SSbase_view, BBviewCollapsed, SScontents )
599
%>
6827 dpurdie 600
<table width="100%"  border="0" cellspacing="0" cellpadding="0" style="border-radius: 3px;border-style: solid;border-top-width: 3px;border-color: #dad7c8;">
6878 dpurdie 601
   <tr class='bg_dialog'>
602
      <td width="1%" align="left" valign="top">&nbsp;</td>
603
      <td width="100%"><SPAN id="SPANVIEW<%=NNbase_view_id%>" <%If BBviewCollapsed Then%>class="body_scol_thin"<%Else%>class="body_txt"<%End If%>>&nbsp;<b><%=SSbase_view%></b></SPAN></td>
7054 dpurdie 604
      <td width="1%" align="right"><span title="Expand/Collapse View" onClick="RequestViewContent('<%=NNbase_view_id%>', event);"><img id="ENVIMG<%=NNbase_view_id%>" src="images/<%If BBviewCollapsed Then %>btn_max.gif<%Else%>btn_min.gif<%End If%>" border="0"></span></td>
6878 dpurdie 605
      <td width="1%" align="right" valign="top">&nbsp;</td>
123 ghuddy 606
   </tr>
119 ghuddy 607
</table>
608
<DIV id="ENVDIV<%=NNbase_view_id%>" class="envContent" <%If BBviewCollapsed Then %>style="display:none;"<%Else%>style="display:block;"<%End If%>>
123 ghuddy 609
   <%If NOT BBviewCollapsed Then %>
610
      <%=SScontents%>
611
   <%Else%>
612
      <%=enumLOADING%>
613
   <%End If%>
614
</DIV>
119 ghuddy 615
<br>
616
<%
617
End Sub
618
'------------------------------------------------------------------------------------------------------------------------------------------------
5080 dpurdie 619
' Name: Print_View
620
' Desc: Generate the Grouped Package list
119 ghuddy 621
Sub Print_View( NNEnvTab, SSviewtype, NNrtag_id, SSshowviews, NNuser_id )
123 ghuddy 622
   Dim rsView, Query_String
623
   'Dim btn1
624
   Dim tmpURL
625
   Dim SSscript
626
   Dim qstrPar
627
   Dim nViewType
628
   Dim nTrueRecordCount
629
   Dim nOperation
630
   Dim relContentsSTR, viewCollapsed, curr_view_id, view_name
5167 dpurdie 631
   Dim canBeEmpty
119 ghuddy 632
 
5098 dpurdie 633
   If isDefined("allowNoPackage") Then
123 ghuddy 634
      SSscript = "dependencies.asp"
635
   Else
636
      SSscript = scriptName
637
   End If
119 ghuddy 638
 
123 ghuddy 639
   If SSviewtype = "guest" Then
640
      nViewType = 1
641
      qstrPar = "Bshow"
642
   ElseIf SSviewtype = "personal" Then
643
      nViewType = 2
644
      qstrPar = "Pshow"
645
   End If
5167 dpurdie 646
   canBeEmpty = false
647
 
5061 dpurdie 648
'rmDebug = rmDebug & " ,NNEnvTab[" & NNEnvTab & "," & CInt(NNEnvTab) & "]"
123 ghuddy 649
   OraDatabase.Parameters.Add "VIEW_TYPE",           nViewType, ORAPARM_INPUT, ORATYPE_NUMBER
650
   'OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   ShowView( Pipes2Commas( SSshowviews ), SSviewtype ), ORAPARM_INPUT, ORATYPE_VARCHAR2
651
   OraDatabase.Parameters.Add "VIEW_ID_SHOW_LIST",   GetShowViewList(), ORAPARM_INPUT, ORATYPE_VARCHAR2
652
   OraDatabase.Parameters.Add "RTAG_ID",             NNrtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
653
   OraDatabase.Parameters.Add "USER_ID",             NNuser_id, ORAPARM_INPUT, ORATYPE_NUMBER
654
   OraDatabase.Parameters.Add "TRUE_RECORD_COUNT",   NULL, ORAPARM_OUTPUT, ORATYPE_NUMBER
655
   OraDatabase.Parameters.Add "RECORD_SET",          NULL, ORAPARM_OUTPUT, ORATYPE_CURSOR
119 ghuddy 656
 
123 ghuddy 657
   'If it's a Deployment View
658
   If parDview = "enable" Then
659
      ' Decide which environment list is to be displayed to the Integrators/Testers
660
      Select Case CInt( NNEnvTab )
661
         Case enumENVTAB_PRODRELEASE
662
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_PRODRELEASE_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 663
 
123 ghuddy 664
         Case enumENVTAB_INTEGRATE
665
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_INTEGRATION_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 666
 
123 ghuddy 667
         Case enumENVTAB_TEST
668
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_TEST_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 669
 
123 ghuddy 670
         Case enumENVTAB_DEPLOY
671
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_DEPLOY_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 672
 
123 ghuddy 673
         Case enumENVTAB_REJECT
674
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_REJECT_ITEMS ( :RTAG_ID, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 675
 
123 ghuddy 676
      End Select
119 ghuddy 677
 
123 ghuddy 678
   Else
679
      ' Decide which environment list is to be displayed
680
      Select Case CInt( NNEnvTab )
681
         Case enumENVTAB_WORK_IN_PROGRESS
682
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_WORK_IN_PROGRESS_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
5167 dpurdie 683
            canBeEmpty = true
119 ghuddy 684
 
123 ghuddy 685
         Case enumENVTAB_PLANNED
686
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_PENDING_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
5167 dpurdie 687
            canBeEmpty = true
119 ghuddy 688
 
123 ghuddy 689
         Case enumENVTAB_RELEASED
690
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_RELEASED_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 691
 
123 ghuddy 692
         Case Else
693
            OraDatabase.ExecuteSQL "BEGIN  PK_ENVIRONMENT.GET_ENVIRONMENT_ITEMS ( :VIEW_TYPE, :USER_ID, :RTAG_ID, :VIEW_ID_SHOW_LIST, :TRUE_RECORD_COUNT, :RECORD_SET );  END;"
119 ghuddy 694
 
123 ghuddy 695
      End Select
119 ghuddy 696
 
123 ghuddy 697
   End If
119 ghuddy 698
 
123 ghuddy 699
   ' Get Record set from database
700
   Set rsView = OraDatabase.Parameters("RECORD_SET").Value
701
   nTrueRecordCount = OraDatabase.Parameters("TRUE_RECORD_COUNT").Value
119 ghuddy 702
 
123 ghuddy 703
   OraDatabase.Parameters.Remove "RTAG_ID"
704
   OraDatabase.Parameters.Remove "USER_ID"
705
   OraDatabase.Parameters.Remove "VIEW_TYPE"
706
   OraDatabase.Parameters.Remove "VIEW_ID_SHOW_LIST"
707
   OraDatabase.Parameters.Remove "RECORD_SET"
708
   OraDatabase.Parameters.Remove "TRUE_RECORD_COUNT"
119 ghuddy 709
 
123 ghuddy 710
   ' Initialise variables
711
   If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
712
      relContentsSTR = ""
713
      viewCollapsed = FALSE
714
      curr_view_id = rsView("view_id")      ' Set current view
715
      view_name = rsView("view_name")
716
   End If
119 ghuddy 717
 
123 ghuddy 718
   While ((NOT rsView.BOF) AND (NOT rsView.EOF))
719
      '==== Get View Contents ====
720
      If NOT IsNull(rsView.Fields("pv_id")) Then
721
         tmpURL = SSscript &"?pv_id="& rsView.Fields("pv_id") &"&rtag_id="& parRtag_id
722
         IMG_locked = ""
723
         If rsView.Fields("dlocked") = "Y" Then IMG_locked = imgLocked
119 ghuddy 724
 
123 ghuddy 725
         ' DEVI-45275 - Normally, dlocked=Y items are denoted with a padlock icon on the web page. Since we can now merge
726
         ' into the pending tab, the dlocked=Y items that end up there would not give any visual indication to the user
727
         ' as to why they are present. So, instead of the padlock icon, display the added or removed icon to indicate
728
         ' what the intended action is to be, once the pending item is approved.
729
         ' Obviously, this functionality does not apply if we are in the deployment view, and only applies if viewing
730
         ' the PENDING or ALL environment tabs.
731
         ' With regard to the operation value, A = Added, S = Subtracted
732
         nOperation = " "
733
         If parDview <> "enable" AND (CInt( NNEnvTab ) = enumENVTAB_PLANNED OR CInt( NNEnvTab ) = enumENVTAB_ALL) Then
734
            nOperation = rsView.Fields("operation")   ' NB. this field is only availble if earlier query was GET_PENDING_ITEMS or GET_ENVIRONMENT_ITEMS
735
            If nOperation = "A" Then
736
               IMG_locked = imgAdded
737
            ElseIf nOperation = "S" Then
738
               IMG_locked = imgRemoved
739
            End If
740
         End If
119 ghuddy 741
 
123 ghuddy 742
         relContentsSTR = relContentsSTR & "<tr>" & VBNewLine
119 ghuddy 743
 
123 ghuddy 744
         If rsView("pkg_state") = 0 And rsView.Fields("deprecated_state") <> "" Then
745
            relContentsSTR = relContentsSTR & "  <td width='1%'>"& DefineStateIcon ( rsView.Fields("deprecated_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
746
         Else
747
            If (parDview <> "enable") AND ( ( CInt(NNEnvTab) = enumENVTAB_PLANNED ) OR ( Request("envtab") = enumENVTAB_PLANNED ) ) Then
119 ghuddy 748
 
123 ghuddy 749
               ' if package version is unlocked, rejected, or pending approval, or is to be added/subtracted to/from the release (DEVI-45275), then
750
               If (rsView("dlocked") = "N") OR (rsView("dlocked") = "R") OR (rsView("dlocked") = "P") OR (nOperation = "A") OR (nOperation = "S") Then
751
                  checked = NULL
752
                  disabled = NULL
753
                  ' disable check box if not logged in, or if not in open mode and user has no permission to approve pending
754
                  If objAccessControl.UserLogedIn Then
755
                     If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
5061 dpurdie 756
                        If NOT canActionControlInProject("ApproveForAutoBuild") Then
123 ghuddy 757
                           disabled = "disabled"
758
                        End If
759
                     End If
760
                  Else
761
                     disabled = "disabled"
762
                  End If
119 ghuddy 763
 
7030 dpurdie 764
               relContentsSTR = relContentsSTR & " <td class=tcenter width='1%'><input name='pv_id_list' id='pv_id_list' type=checkbox value="&rsView.Fields("pv_id")&" "&checked&" "&disabled&"></td>"& VBNewLine
123 ghuddy 765
               Else ' always check and disable the checkbox
766
                  checked = "checked"
767
                  disabled = "disabled"
7030 dpurdie 768
               relContentsSTR = relContentsSTR & " <td class=tcenter width='1%'>" & DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
123 ghuddy 769
               End If
119 ghuddy 770
 
123 ghuddy 771
            Else
7030 dpurdie 772
               relContentsSTR = relContentsSTR & " <td class=tcenter width='1%'>" & DefineStateIcon ( rsView("pkg_state"), rsView("dlocked"), NULL, NULL, pkgInfoHash.Item("build_type"), TRUE ) &"</td>"& VBNewLine
123 ghuddy 773
            End If
774
         End If
119 ghuddy 775
 
123 ghuddy 776
         relContentsSTR = relContentsSTR & "  <td width='100%' nowrap><a href='"& tmpURL &"' class='body_txt_drk' title="""& HTMLEncode( rsView("pv_description") ) &""">"& rsView.Fields("pkg_name") &"</a></td>" & VBNewLine
777
         relContentsSTR = relContentsSTR & "  <td width='1%' nowrap class='envPkg'>"& rsView.Fields("pkg_version") &"</td>" & VBNewLine
7030 dpurdie 778
         relContentsSTR = relContentsSTR & "  <td class=tcenter width='1%'>"& IMG_locked & "</td>"
123 ghuddy 779
         relContentsSTR = relContentsSTR & "</tr>" & VBNewLine
780
      Else
781
         'relContentsSTR = relContentsSTR & "<tr><td><label class='form_txt' disabled>...</label></td></tr>"      ' Collapsed view displays dots
119 ghuddy 782
 
123 ghuddy 783
         viewCollapsed = TRUE
784
      End If
119 ghuddy 785
 
123 ghuddy 786
      rsView.MoveNext
119 ghuddy 787
 
123 ghuddy 788
      If ((NOT rsView.BOF) AND (NOT rsView.EOF)) Then
789
         ' NOT end of the record set
790
         If curr_view_id <> rsView("view_id") Then
791
            '====== Draw buttons =================================
792
            'If InStrPipes( SSshowviews, curr_view_id ) Then
793
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
794
            'Else
795
            '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
796
            'End If
119 ghuddy 797
 
123 ghuddy 798
            '====== Print contents ===============================
799
            relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
800
            Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 801
 
123 ghuddy 802
            curr_view_id = rsView("view_id")
803
            view_name = rsView("view_name")
804
            relContentsSTR = ""      ' Empty the contents string
805
            viewCollapsed = FALSE
806
         End If
119 ghuddy 807
 
123 ghuddy 808
      Else
809
         ' End of the record set
119 ghuddy 810
 
123 ghuddy 811
         '====== Draw buttons =================================
812
         'If InStrPipes( SSshowviews, curr_view_id ) Then
813
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"="& RemoveFromStrPipes( SSshowviews, curr_view_id ) &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"' >"& imgMinimise &"</a>"
814
         'Else
815
         '   btn1 = "<a href='"& SSscript &"?"& qstrPar &"=|"& curr_view_id &"|"& SSshowviews &"&pv_id="& Request("pv_id") &"&rtag_id="& NNrtag_id &"'>"& imgMaximise &"</a>"
816
         'End If
119 ghuddy 817
 
123 ghuddy 818
         '====== Print contents ===============================
819
         relContentsSTR = "<table width='100%' border='0' cellspacing='0' cellpadding='1'>" & relContentsSTR & "</table>"
820
         Call Display_Env_BaseView ( curr_view_id, view_name, viewCollapsed, relContentsSTR )
119 ghuddy 821
 
123 ghuddy 822
      End If
119 ghuddy 823
 
123 ghuddy 824
   WEnd
119 ghuddy 825
 
123 ghuddy 826
   If relContentsSTR <> "" Then
827
      Response.write "<a href='help/icons_F017.asp' target='_blank' class='body_scol'>Icon Legend...</a><br>"
828
   End If
119 ghuddy 829
 
123 ghuddy 830
   If nTrueRecordCount > 0 Then
831
      If rsView.RecordCount < 1 Then
832
         'If qstrPar = "Bshow" Then
833
         '   'Release is empty. Draw default box for Base view
834
         '   Call DisplayInfo ( "EMPTY_RELEASE_CONTENTS", "100%" )
835
         '
836
         'End If
119 ghuddy 837
 
5167 dpurdie 838
         If qstrPar = "Pshow" AND hasPview AND NOT canBeEmpty Then
123 ghuddy 839
            'Release is empty. Draw default box for Personal view
840
            Call DisplayInfo ( "PERSONAL_VIEW_NOT_SETUP", "100%" )
841
         End If
119 ghuddy 842
 
123 ghuddy 843
      End If
844
   End If
119 ghuddy 845
 
123 ghuddy 846
   ' Destroy
847
   rsView.Close
848
   Set rsView = nothing
119 ghuddy 849
End Sub
850
'------------------------------------------------------------------------------------------------------------------------------------------------
5167 dpurdie 851
' Detect the presence of a Personal View so that the controls can be disabled if the user does
852
' not have any.
853
'
854
Function hasPersonalViews ( )
855
   Dim rsTemp, Query_String
856
   hasPersonalViews = false
119 ghuddy 857
 
5167 dpurdie 858
   If objAccessControl.UserLogedIn Then
859
       Query_String = "select count(*) from views where owner_id = " & objAccessControl.UserId
119 ghuddy 860
 
5167 dpurdie 861
       Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
862
       If ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF)) Then
863
          If  rsTemp.Fields(0) > 0 Then
864
              hasPersonalViews = true
865
          End If
866
       End If
867
 
868
       rsTemp.Close
869
       Set rsTemp = nothing
123 ghuddy 870
   End If
5167 dpurdie 871
End Function
872
 
119 ghuddy 873
'------------------------------------------------------------------------------------------------------------------------------------------------
874
Function GetShowViewList ()
123 ghuddy 875
   'If SSparshow <> "" Then
876
   '   ' get list from query string
877
   '   ShowView = SSparshow
878
   'ElseIf Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype ) <> "" Then
879
   '   ' get list from cookie
880
   '   ShowView = Request.Cookies("RELEASEMANAGER_VIEW_SHOW")( SSviewtype )
881
   'Else
882
   '   ' no list i.e. collapse all views
883
   '   ShowView = -1
884
   'End If
119 ghuddy 885
 
123 ghuddy 886
   'If oShowView.Count = 0 Then
887
   '   GetShowViewList = -1
888
   'Else
889
   '   GetShowViewList = Join( oShowView.Keys, "," )
890
   'End If
119 ghuddy 891
 
123 ghuddy 892
   If Request.Cookies(COOKIE_RELMGR_SHOW_VIEW) = "" Then
893
      GetShowViewList = -1
894
   Else
895
      GetShowViewList = Request.Cookies(COOKIE_RELMGR_SHOW_VIEW)
896
   End If
119 ghuddy 897
 
898
End Function
125 ghuddy 899
 
119 ghuddy 900
'------------------------------------------------------------------------------------------------------------------------------------------------
125 ghuddy 901
' This function forms a URL to use for refreshing the current dependencies.asp based page using the settings that are in effect at the time.
902
' Most importantly, it filters out the pv_id parameter if it is null (which otherwise would cause the page to be rendered incorreclty for an
903
' as yet, unknown reason).
904
'
905
Function RefreshedURL(NNdview, NNpview, NNpv_id, NNrtag_id)
906
   Dim url
907
 
908
   url = scriptName & "?Dview=" & NNdview & "&Pview=" & NNpview
909
 
7001 dpurdie 910
   If NNpv_id <> "" Then
125 ghuddy 911
      url = url & "&pv_id=" & NNpv_id
912
   End If
913
 
914
   url = url & "&rtag_id=" & NNrtag_id
915
 
916
   RefreshedURL = url
917
End Function
918
 
919
 
920
'------------------------------------------------------------------------------------------------------------------------------------------------
119 ghuddy 921
%>
922
<%
923
 
924
'------------------------- MAIN LINE ---------------------------
925
%>
926
 
927
<%If parRtag_Id <> "" Then%>
928
<!-- RELEASE ACTION BUTTONS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
929
 
123 ghuddy 930
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
931
      <tr>
6877 dpurdie 932
         <td width="1" class='bg_dialog'><img src="images/spacer.gif" width="10" height="35"></td>
933
         <td width="100%" nowrap class='bg_dialog' >
123 ghuddy 934
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
935
               <tr>
936
                  <%
6881 dpurdie 937
                  Dim canAdd: canAdd = objAccessControl.UserLogedIn AND ((((ReleaseMode = enumDB_RELEASE_IN_CCB_MODE) OR (ReleaseMode = enumDB_RELEASE_IN_RESTRICTIVE_MODE)) AND canActionControlInProject("AddDeletePackageInRestrictiveMode")) OR (ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE ))
938
                  Call BuildActionButton(canAdd,"","Add a Package to this Release", "src=images/abtn_add_pkg.gif width='25' height='25' hspace='1' border='0'", "form_search_pkgs.asp?rtag_id="& Request("rtag_id") &"&add_type="& enum_ADD_PACKAGES )
119 ghuddy 939
 
4670 dpurdie 940
                  If (pkgInfoHash.Item("dlocked") <> "Y") AND (Request("pv_id") <> "") Then
5061 dpurdie 941
                     If  (objAccessControl.UserLogedIn) AND ( (objAccessControl.UserName = pkgInfoHash.Item("creator")) OR (canActionControlInProject("DestroyPackageFromRelease")) ) Then
6827 dpurdie 942
                        Response.write "<td width='1' title='Destroy the selected Package Version' onClick=""MM_openVixIFrame('_destroy_package.asp?rtag_id=" & Request("rtag_id") & "&bfile="&ScriptName & "&pkg_id=" & pkgInfoHash.Item("pkg_id") & "&pv_id=" & Request("pv_id") & "','Destroy Package Version');"">"
6878 dpurdie 943
                        Response.Write "<img src='icons/i_destroy_package.gif' width='25' height='25' hspace='1' border='0'></td>"
4670 dpurdie 944
                     Else
5929 dpurdie 945
                        Response.write "<td width='1'><img title='Destroy the selected Package Version' src='icons/i_destroy_package_off.gif' width='26' height='26' hspace='1' border='0'></td>"
123 ghuddy 946
                     End If
947
                  End If
119 ghuddy 948
 
5061 dpurdie 949
                   ' Anybody can view properties
6878 dpurdie 950
                   Response.write "<td width='1'><span class=pointer onClick='location.href=""form_edit_release.asp?rtag_id="&parRtag_id&"""' title='Release properties'><img src='images/abtn_release_properties.gif'  width='25' height='25' hspace='1' border='0'></span></td>"
119 ghuddy 951
 
123 ghuddy 952
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
953
                  If objAccessControl.UserLogedIn Then
5167 dpurdie 954
                      If hasPview Then
955
                         If parPview = "disable" Then
956
                            Dim ref : ref = RefreshedURL(parDview, "", Request("pv_id"), Request("rtag_id"))
6878 dpurdie 957
                            Response.write "<td width='1'><span class=pointer onClick='location.href="""&ref&"""' title='Personal view disabled. Click to enable.'><img src='images/abtn_base_view.gif'  width='25' height='25' hspace='1' border='0'></span></td>"
5167 dpurdie 958
                         Else
959
                            ref = RefreshedURL(parDview, "disable", Request("pv_id"), Request("rtag_id")) 
6878 dpurdie 960
                            Response.write "<td width='1'><span class=pointer onClick='location.href="""&ref&"""' title='Personal view enabled. Click for full view.'><img src='images/abtn_personal_view.gif'  width='25' height='25' hspace='1' border='0'></span></td>"
5167 dpurdie 961
                         End If
962
                      Else
963
                            Response.write "<td width='1'><span title='No Personal View configured.'><img src='images/abtn_personal_view_off.gif'  width='26' height='26' hspace='1' border='0'></span></td>"
964
                      End If
123 ghuddy 965
                  Else
966
                     Response.write "<td width='1'><img src='images/abtn_personal_view_off.gif' width='26' height='26' hspace='1' border='0'></td>"
967
                  End If
119 ghuddy 968
 
5167 dpurdie 969
                  If parDview = "enable" Then
6878 dpurdie 970
                     Response.write "<td width='1'><span class=pointer onClick='location.href="""& RefreshedURL("", parPview, Request("pv_id"), Request("rtag_id")) &""";' title='Click to switch to Release View'><img src='icons/ReleaseView.gif'  width='25' height='25' hspace='1' border='0'></span></td>"
123 ghuddy 971
                  Else
6878 dpurdie 972
                     Response.write "<td width='1'><span class=pointer onClick='location.href="""& RefreshedURL("enable", parPview, Request("pv_id"), Request("rtag_id")) &""";' title='Click to switch to Deployment View'><img src='icons/DeploymentView.gif'  width='25' height='25' hspace='1' border='0'></span></td>"
123 ghuddy 973
                  End If
119 ghuddy 974
 
123 ghuddy 975
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 976
 
6878 dpurdie 977
                  Response.write "<td width='1' class='pointer' title='SDK Managment' onClick='ToggleDisplay(""DIV_RELEASE_SDK"",""SPAN_RELEASE_SDK"",""SPAN_RELEASE_SDK_ON""); ' ><SPAN name='SPAN_RELEASE_SDK' id='SPAN_RELEASE_SDK' style='display:block;'><img src='images/abtn_link_release.gif' width='25' height='25' border='0' hspace='1' ></SPAN><SPAN name='SPAN_RELEASE_SDK_ON' id='SPAN_RELEASE_SDK_ON' style='display:none;'><img src='images/abtn_link_release_on.gif' width='25' height='25' border='0' hspace='1' ></SPAN></td>"
119 ghuddy 978
 
123 ghuddy 979
                  Response.write "<td width='1'><img src='images/spacer.gif' width='7' height='25'></td>"
119 ghuddy 980
 
6878 dpurdie 981
                  Response.write "<td width='1' class='pointer' title='Advanced Search...' onClick='ToggleAdvancedSearch(); ' ><SPAN name='SPAN_ADVANCED_SEARCH' id='SPAN_ADVANCED_SEARCH' style='display:block;'><img src='images/abtn_advanced_search.gif' width='25' height='25' border='0' hspace='1' ></SPAN><SPAN name='SPAN_ADVANCED_SEARCH_ON' id='SPAN_ADVANCED_SEARCH_ON' style='display:none;'><img src='images/abtn_advanced_search_on.gif' width='25' height='25' border='0' hspace='1' ></SPAN></td>"
119 ghuddy 982
 
5167 dpurdie 983
                  If ( (parDview <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
123 ghuddy 984
                     If objAccessControl.UserLogedIn Then
4687 dpurdie 985
                        If ( ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE ) OR _
5061 dpurdie 986
                                canActionControlInProject("ApproveForAutoBuild") OR _
987
                                canActionControlInProject("ApproveForManualBuild") Then
6878 dpurdie 988
                              Response.write "<td width='1'><span class='pointer' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></span></td>"
4687 dpurdie 989
                              Response.write "<td width='1'><img src='images/spacer.gif' width='1' height='25'></td>"
6878 dpurdie 990
                              Response.write "<td width='1'><span class='pointer' onClick='makeBulkReject();'><img src='images/abtn_make_bulk_remove.gif' title='Bulk Reject...'></span></td>"
4358 dpurdie 991
                        End If
992
                     End If
993
                  End If
123 ghuddy 994
                  %>
995
                  <td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
996
               </tr>
997
            </table>
998
         </td>
6877 dpurdie 999
         <td width="1" class='bg_dialog'><img src="images/spacer.gif" width="10" height="8"></td>
123 ghuddy 1000
      </tr>
1001
   </table>
119 ghuddy 1002
 
1003
<!-- ADVANCED SEARCH ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
123 ghuddy 1004
   <DIV name="DIV_ADVANCED_SEARCH" id="DIV_ADVANCED_SEARCH" style="display:none;">
1005
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
1006
            <tr>
1007
               <td nowrap  class="form_txt" valign="middle">
1008
                  <%
1009
                  Dim FindPackageCheck, FindFileCheck
119 ghuddy 1010
 
123 ghuddy 1011
                  FindPackageCheck = ""
1012
                  FindFileCheck = ""
119 ghuddy 1013
 
123 ghuddy 1014
                  If Request("searchtype") = "2" Then
1015
                     FindFileCheck = "checked"
1016
                  Else
1017
                     FindPackageCheck = "checked"
1018
                  End If
119 ghuddy 1019
 
123 ghuddy 1020
                  %>
1021
                  <fieldset>
1022
                     <legend class="body_colb"><img src="images/i_mglass.gif" width="17" height="17" border="0" align="absmiddle">&nbsp;Advanced Search</legend>
7291 dpurdie 1023
					 <form name="advancedsearch" method="get" action="find.asp">
123 ghuddy 1024
                     <input name="searchtype" id="searchtype1" type="radio" value="1" <%=FindPackageCheck%>>
6827 dpurdie 1025
                     <span onClick="MM_findObj('searchtype1').checked=true;" class="body_txt">Find a Package</span><br>
123 ghuddy 1026
                     <input name="searchtype" id="searchtype2" type="radio" value="2" <%=FindFileCheck%>>
6827 dpurdie 1027
                     <span onClick="MM_findObj('searchtype2').checked=true;" class="body_txt">Find a File</span><br><br>
123 ghuddy 1028
                     <%If CInt(nEnvTab) = enumENVTAB_WORK_IN_PROGRESS Then%>
1029
                        Find in Work In Progress<br>
1030
                     <%ElseIf CInt(nEnvTab) = enumENVTAB_PLANNED Then%>
1031
                        Find in Pending<br>
1032
                     <%ElseIf  CInt(nEnvTab) = enumENVTAB_RELEASED Then%>
1033
                        Find in Released<br>
1034
                     <%End If%>
7291 dpurdie 1035
                     <input type="search" name="keyword" size="25" class="formBtnEnable form_ivaluew" value="<%=Request("keyword")%>" placeholder="Enter search string">
1036
                     <input type="submit" name="btn" value="Find" class="form_btn_comp">
119 ghuddy 1037
 
123 ghuddy 1038
                     <input type="hidden" name="envtab" value="<%=nEnvTab%>">
1039
                     <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
7291 dpurdie 1040
					</form>
123 ghuddy 1041
                  </fieldset>
1042
                  <br>
1043
               </td>
1044
            </tr>
1045
      </table>
1046
   </DIV>
119 ghuddy 1047
 
123 ghuddy 1048
   <script language="JavaScript" type="text/javascript">
1049
      <!--
1050
      function ToggleAdvancedSearch( )
1051
      {
1052
         if ( MM_findObj("DIV_ADVANCED_SEARCH").style.display == 'none')
1053
         {
1054
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'block';
1055
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'none';
1056
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'block';
1057
         }
1058
         else
1059
         {
1060
            MM_findObj("DIV_ADVANCED_SEARCH").style.display = 'none';
1061
            MM_findObj("SPAN_ADVANCED_SEARCH").style.display = 'block';
1062
            MM_findObj("SPAN_ADVANCED_SEARCH_ON").style.display = 'none';
1063
         }
119 ghuddy 1064
 
123 ghuddy 1065
         document.cookie = 'RELMGR_DIV_ADVANCED_SEARCH' + '=' + MM_findObj("DIV_ADVANCED_SEARCH").style.display;
1066
      }
119 ghuddy 1067
 
123 ghuddy 1068
      // Run this on page render for default setting
1069
      if (GetCookie('RELMGR_DIV_ADVANCED_SEARCH') == 'block')
1070
      {
1071
         ToggleAdvancedSearch();
1072
      }
119 ghuddy 1073
 
123 ghuddy 1074
   //-->
1075
   </script>
5071 dpurdie 1076
<!-- RELEASE SDK  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
5098 dpurdie 1077
   <DIV name="DIV_RELEASE_SDK" id="DIV_RELEASE_SDK" <%=iif(isDefined("showReleaseSdk"),"","style='display:none;'")%>>
5071 dpurdie 1078
      <table width="100%" border="0" cellspacing="0" cellpadding="10">
7292 dpurdie 1079
         <form name="RelSdk" method="get" action="sdk_remove_release.asp" onSubmit="showGlobalProgress();">
5071 dpurdie 1080
            <tr>
1081
               <td width="100%" nowrap class="form_txt">
1082
                  <fieldset>
1083
                     <legend class="body_colb"><img src="images/i_releaseref.gif" border="0" align="absmiddle">&nbsp;Release SDK</legend>
5097 dpurdie 1084
                     <div>
1085
                         <%If (ReleaseMode = enumDB_RELEASE_IN_OPEN_MODE) Then%>
1086
                            <button <%=controlDisabledInProject("AddSdk")%> onClick="addSdk(); return false;" class="rmbutton">Add ...</button>
1087
                            &nbsp;<button  <%=controlDisabledInProject("RemoveSdk")%> class="rmbutton">Remove</button>
1088
                         <%End If%>
1089
                         <p>
1090
                         <input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
1091
                     </div>
5071 dpurdie 1092
 
1093
                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
1094
                        <tr>
1095
                           <td bgcolor="#999999">
1096
 
1097
                              <table width="100%" border="0" cellspacing="0" cellpadding="1">
1098
                                 <%
1099
                                 OraDatabase.Parameters.Add "RTAG_ID", parRtag_id, ORAPARM_INPUT, ORATYPE_NUMBER
1100
                                 Set rsEnvQry = OraDatabase.DbCreateDynaset( GetQuery("ReleaseSdks.sql"), 0 )
1101
                                 OraDatabase.Parameters.Remove "RTAG_ID"
1102
                                 %>
1103
                                 <%If rsEnvQry.RecordCount = 0 Then%>
1104
                                 <tr>
1105
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1106
                                       No SDKs used.
1107
                                    </td>
1108
                                 </tr>
1109
                                 <%End If%>
1110
 
1111
                                 <%While (NOT rsEnvQry.EOF) AND (NOT rsEnvQry.BOF)%>
1112
                                    <tr>
5080 dpurdie 1113
                                       <td bgcolor="#FFFFFF" class="body_txt" width="1%"><input type="checkbox" name="sdktag_id" value="<%=rsEnvQry("SDKTAG_ID")%>"></td>
5098 dpurdie 1114
                                       <td bgcolor="#FFFFFF" class="body_txt" nowrap>
1115
                                        <span title="<%=HTMLEncode(rsEnvQry("SDK_COMMENT"))%>">
1116
                                            <%=rsEnvQry("SDK_NAME")%>
1117
                                        </span>
1118
                                        &nbsp;&gt;&nbsp;
1119
                                        <span title="<%=HTMLEncode(rsEnvQry("DESCRIPTION"))%>">
1120
                                            <%=rsEnvQry("SDKTAG_NAME")%>
1121
                                        </span>
1122
                                        </td>
5071 dpurdie 1123
                                    </tr>
1124
                                    <%rsEnvQry.MoveNext()
1125
                                 WEnd%>
1126
                                 <tr>
1127
                                    <td colspan="2" bgcolor="#FFFFFF" class="body_txt_gray">
1128
                                       <br><br><br>
1129
                                    </td>
1130
                                 </tr>
1131
                              </table>
1132
                           </td>
1133
                        </tr>
1134
                     </table>
1135
                  </fieldset>
1136
                  <br>
1137
               </td>
1138
            </tr>
1139
         </form>
1140
      </table>
1141
   </DIV>
1142
<!-- END OF RELEASE SDK  ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
1143
 
119 ghuddy 1144
<!-- PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
4389 dpurdie 1145
   <form id="pending_PVID_List" name="pending_PVID_List" method="post" action="make_bulk_release.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>", onSubmit="makeBulkRelease();">
123 ghuddy 1146
   <table width="100%" border="0" cellspacing="0" cellpadding="0">
6879 dpurdie 1147
         <tr bgcolor="#999999">
1148
            <td style='min-width:10px;min-height:25px;height:25px;'></td>
1149
            <td width="100%" valign="bottom">
123 ghuddy 1150
               <!-- TAB CONTROLS ++++++++++++++++++++++ -->
1151
               <%
5167 dpurdie 1152
               If   parDview = "enable"   Then
6879 dpurdie 1153
                  Call Generate_Tab_Menu ( arrProductEnv, nEnvTab, "grey" )   '-   Integration/Test/Deploy
123 ghuddy 1154
               Else
6879 dpurdie 1155
                  Call Generate_Tab_Menu ( arrEnv, nEnvTab , "grey" )
123 ghuddy 1156
               End If
1157
               %>
1158
               <!-- END OF TAB CONTROLS +++++++++++++++ -->
1159
            </td>
6879 dpurdie 1160
            <td style='min-width:10px;min-height:25px;height:25px;'></td>
123 ghuddy 1161
         </tr>
6879 dpurdie 1162
 
123 ghuddy 1163
         <tr>
1164
            <td></td>
1165
            <td>
5080 dpurdie 1166
               <!-- BULK OPR CONTROLS ++++++++++++++++++++++ -->
4388 dpurdie 1167
                <%Dim cb_selectall_display, cb_disabled
1168
                  If nEnvTab <> 1 Then cb_selectall_display = " style=display:none"
1169
                  If NOT objAccessControl.UserLogedIn Then cb_disabled = " disabled"%>
1170
                <input id="cb_selectall" type="checkbox" title="Toggle all checkboxes" onclick="toggletick(this);"<%=cb_selectall_display%><%=cb_disabled%> style="position: relative;left: 5px;float: left;">
6827 dpurdie 1171
                <span title="Minimise/Restore all populated Views" onclick="toggleAllViews();"><img id="cb_minall" src="images/btn_min.gif" style="float: right;position: relative;left: -4;top: 3;"></span>
1172
                <span title="Close Populated Views" onclick="closeAllViews();"><img src="images/btn_remove.gif" style="float: right;position: relative;left: -4;"></span>
1173
                <span title="Open and Populate all Views" onclick="openAllViews();"><img src="images/btn_expand.gif" style="float: right;position: relative;left: -4; top:2;"></span>
5080 dpurdie 1174
               <!-- END BULK OPR CONTROLS ++++++++++++++++++++++ -->
123 ghuddy 1175
               <%
1176
               Dim tempTimer
1177
               tempTimer = Timer
1178
               %>
1179
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1180
               <%
119 ghuddy 1181
 
123 ghuddy 1182
               '--- Render Environment ---
1183
               If objAccessControl.UserLogedIn AND (parPview <> "disable") Then
1184
                  'Personal View
1185
                  Call Print_View( nEnvTab, "personal", parRtag_id, parPshow, objAccessControl.UserId )
1186
               Else
1187
                  ' Guest view
1188
                  Call Print_View( nEnvTab, "guest", parRtag_id, parBshow, empty )
1189
               End If
1190
               %>
119 ghuddy 1191
 
123 ghuddy 1192
               <%'Response.write "TOTAL TIME: "&  Timer - tempTimer%>
1193
               <br>
1194
            </td>
1195
            <td></td>
1196
         </tr>
4389 dpurdie 1197
       </table>
1198
   </form>
123 ghuddy 1199
   <!-- <input type="hidden" name="pv_id_list" value=<%=Request("pv_id_list")%>> -->
119 ghuddy 1200
<!--END OF PACKAGE LIST ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
1201
 
1202
<%End If%>