| Line 38... |
Line 38... |
| 38 |
Dim bCanMove
|
38 |
Dim bCanMove
|
| 39 |
Dim bCanDestroy
|
39 |
Dim bCanDestroy
|
| 40 |
Dim bCanClone
|
40 |
Dim bCanClone
|
| 41 |
Dim bCanUnarchive
|
41 |
Dim bCanUnarchive
|
| 42 |
Dim bCanCloseArchive
|
42 |
Dim bCanCloseArchive
|
| - |
|
43 |
|
| - |
|
44 |
Dim bCanOpenToClose
|
| - |
|
45 |
Dim bCanRestrictiveToClose
|
| - |
|
46 |
Dim bCanCloseToClose
|
| - |
|
47 |
Dim bCanPreserveToClose
|
| - |
|
48 |
Dim bCanArchiveToClose
|
| - |
|
49 |
|
| - |
|
50 |
Dim bCanOpenToPreserve
|
| - |
|
51 |
Dim bCanRestrictiveToPreserve
|
| - |
|
52 |
Dim bCanCloseToPreserve
|
| - |
|
53 |
Dim bCanPreserveToPreserve
|
| - |
|
54 |
Dim bCanArchiveToPreserve
|
| - |
|
55 |
|
| - |
|
56 |
Dim bCanOpenToArchive
|
| - |
|
57 |
Dim bCanRestrictiveToArchive
|
| - |
|
58 |
Dim bCanCloseToArchive
|
| - |
|
59 |
Dim bCanPreserveToArchive
|
| - |
|
60 |
Dim bCanArchiveToArchive
|
| - |
|
61 |
|
| - |
|
62 |
|
| 43 |
'------------ Constants Declaration -----------
|
63 |
'------------ Constants Declaration -----------
|
| 44 |
Const LIMG_TREE_I_HALF = "<img src='images/spacer.gif' width='20' height='1'>"
|
64 |
Const LIMG_TREE_I_HALF = "<img src='images/spacer.gif' width='20' height='1'>"
|
| 45 |
Const LIMG_TREE_I_NONE = "<img src='images/spacer.gif' width='30' height='15'>"
|
65 |
Const LIMG_TREE_I_NONE = "<img src='images/spacer.gif' width='30' height='15'>"
|
| 46 |
Const LIMG_TREE_I_FULL = "<img src='images/dot1h.gif' width='30' height='15'>"
|
66 |
Const LIMG_TREE_I_FULL = "<img src='images/dot1h.gif' width='30' height='15'>"
|
| 47 |
Const LIMG_TREE_T = "<img src='images/dot1.gif' width='30' height='15'>"
|
67 |
Const LIMG_TREE_T = "<img src='images/dot1.gif' width='30' height='15'>"
|
| Line 82... |
Line 102... |
| 82 |
|
102 |
|
| 83 |
' Init access control
|
103 |
' Init access control
|
| 84 |
bCanMove = canActionControlInProject("ConfigureRelease")
|
104 |
bCanMove = canActionControlInProject("ConfigureRelease")
|
| 85 |
bCanDestroy = canActionControlInProject("DestroyRelease")
|
105 |
bCanDestroy = canActionControlInProject("DestroyRelease")
|
| 86 |
bCanClone = canActionControlInProject("CreateNewRelease")
|
106 |
bCanClone = canActionControlInProject("CreateNewRelease")
|
| - |
|
107 |
|
| - |
|
108 |
bCanOpenToClose = ReleaseModeAccessCheck(enumDB_RELEASE_IN_OPEN_MODE,enumDB_RELEASE_IN_CLOSED_MODE)
|
| - |
|
109 |
bCanRestrictiveToClose = ReleaseModeAccessCheck(enumDB_RELEASE_IN_RESTRICTIVE_MODE,enumDB_RELEASE_IN_CLOSED_MODE)
|
| - |
|
110 |
bCanCloseToClose = FALSE
|
| - |
|
111 |
bCanPreserveToClose = ReleaseModeAccessCheck(enumDB_RELEASE_IN_PRESERVE_MODE,enumDB_RELEASE_IN_CLOSED_MODE)
|
| - |
|
112 |
bCanArchiveToClose = ReleaseModeAccessCheck(enumDB_RELEASE_IN_ARCHIVE_MODE,enumDB_RELEASE_IN_CLOSED_MODE)
|
| - |
|
113 |
|
| - |
|
114 |
bCanOpenToPreserve = ReleaseModeAccessCheck(enumDB_RELEASE_IN_OPEN_MODE,enumDB_RELEASE_IN_PRESERVE_MODE)
|
| - |
|
115 |
bCanRestrictiveToPreserve = ReleaseModeAccessCheck(enumDB_RELEASE_IN_RESTRICTIVE_MODE,enumDB_RELEASE_IN_PRESERVE_MODE)
|
| - |
|
116 |
bCanCloseToPreserve = ReleaseModeAccessCheck(enumDB_RELEASE_IN_CLOSED_MODE,enumDB_RELEASE_IN_PRESERVE_MODE)
|
| 87 |
bCanUnarchive = canActionControl("MSMaintainer")
|
117 |
bCanPreserveToPreserve = FALSE
|
| - |
|
118 |
bCanArchiveToPreserve = ReleaseModeAccessCheck(enumDB_RELEASE_IN_ARCHIVE_MODE,enumDB_RELEASE_IN_PRESERVE_MODE)
|
| - |
|
119 |
|
| - |
|
120 |
bCanOpenToArchive = ReleaseModeAccessCheck(enumDB_RELEASE_IN_OPEN_MODE,enumDB_RELEASE_IN_ARCHIVE_MODE)
|
| - |
|
121 |
bCanRestrictiveToArchive = ReleaseModeAccessCheck(enumDB_RELEASE_IN_RESTRICTIVE_MODE,enumDB_RELEASE_IN_ARCHIVE_MODE)
|
| - |
|
122 |
bCanCloseToArchive = ReleaseModeAccessCheck(enumDB_RELEASE_IN_CLOSED_MODE,enumDB_RELEASE_IN_ARCHIVE_MODE)
|
| - |
|
123 |
bCanPreserveToArchive = ReleaseModeAccessCheck(enumDB_RELEASE_IN_PRESERVE_MODE,enumDB_RELEASE_IN_ARCHIVE_MODE)
|
| 88 |
bCanCloseArchive = canActionInProject()
|
124 |
bCanArchiveToArchive = FALSE
|
| 89 |
|
125 |
|
| 90 |
'----------------------------------------------
|
126 |
'----------------------------------------------
|
| 91 |
%>
|
127 |
%>
|
| 92 |
<%
|
128 |
<%
|
| 93 |
'--------------------------------------------------------------------------------------------------------------------------
|
129 |
'--------------------------------------------------------------------------------------------------------------------------
|
| Line 124... |
Line 160... |
| 124 |
Sub RenderIndent ( nLastLevel, nCurrLevel )
|
160 |
Sub RenderIndent ( nLastLevel, nCurrLevel )
|
| 125 |
Dim i
|
161 |
Dim i
|
| 126 |
|
162 |
|
| 127 |
If nCurrLevel <= 1 Then Exit Sub
|
163 |
If nCurrLevel <= 1 Then Exit Sub
|
| 128 |
|
164 |
|
| 129 |
|
- |
|
| 130 |
'-- Render half lines
|
165 |
'-- Render half lines
|
| 131 |
If nCurrLevel > 2 Then
|
166 |
If nCurrLevel > 2 Then
|
| 132 |
For i = 1 To nCurrLevel - 2
|
167 |
For i = 1 To nCurrLevel - 2
|
| 133 |
Response.write LIMG_TREE_I_NONE
|
168 |
Response.write LIMG_TREE_I_NONE
|
| 134 |
Next
|
169 |
Next
|
| Line 350... |
Line 385... |
| 350 |
$(function() {
|
385 |
$(function() {
|
| 351 |
// Global menu data structure
|
386 |
// Global menu data structure
|
| 352 |
// Persist between invocations of the menu
|
387 |
// Persist between invocations of the menu
|
| 353 |
// Used to mergeLeft rtagid
|
388 |
// Used to mergeLeft rtagid
|
| 354 |
// Used to store current menu info
|
389 |
// Used to store current menu info
|
| 355 |
$.miniMenu = {
|
390 |
$.acData = {
|
| 356 |
|
- |
|
| 357 |
// Data
|
391 |
// Data
|
| - |
|
392 |
bCanOpenToClose : <%=iif(bCanOpenToClose , "true", "false")%> ,
|
| - |
|
393 |
bCanRestrictiveToClose : <%=iif(bCanRestrictiveToClose , "true", "false")%> ,
|
| - |
|
394 |
bCanCloseToClose : <%=iif(bCanCloseToClose , "true", "false")%> ,
|
| - |
|
395 |
bCanPreserveToClose : <%=iif(bCanPreserveToClose , "true", "false")%> ,
|
| - |
|
396 |
bCanArchiveToClose : <%=iif(bCanArchiveToClose , "true", "false")%> ,
|
| - |
|
397 |
|
| - |
|
398 |
bCanOpenToPreserve : <%=iif(bCanOpenToPreserve , "true", "false")%> ,
|
| - |
|
399 |
bCanRestrictiveToPreserve : <%=iif(bCanRestrictiveToPreserve, "true", "false")%> ,
|
| - |
|
400 |
bCanCloseToPreserve : <%=iif(bCanCloseToPreserve , "true", "false")%> ,
|
| - |
|
401 |
bCanPreserveToPreserve : <%=iif(bCanPreserveToPreserve , "true", "false")%> ,
|
| - |
|
402 |
bCanArchiveToPreserve : <%=iif(bCanArchiveToPreserve , "true", "false")%> ,
|
| - |
|
403 |
|
| 358 |
bCanUnarchive : <%=iif(bCanUnarchive, "true", "false")%> ,
|
404 |
bCanOpenToArchive : <%=iif(bCanOpenToArchive , "true", "false")%> ,
|
| - |
|
405 |
bCanRestrictiveToArchive : <%=iif(bCanRestrictiveToArchive , "true", "false")%> ,
|
| 359 |
bCanCloseArchive : <%=iif(bCanCloseArchive, "true", "false")%> ,
|
406 |
bCanCloseToArchive : <%=iif(bCanCloseToArchive , "true", "false")%> ,
|
| - |
|
407 |
bCanPreserveToArchive : <%=iif(bCanPreserveToArchive , "true", "false")%> ,
|
| - |
|
408 |
bCanArchiveToArchive : <%=iif(bCanArchiveToArchive , "true", "false")%> ,
|
| - |
|
409 |
};
|
| - |
|
410 |
|
| - |
|
411 |
// Convert from Release Mode to [canClose, canPreserve, canArchive]
|
| - |
|
412 |
$.mode2access = {
|
| - |
|
413 |
|
| - |
|
414 |
N: [$.acData.bCanOpenToClose,$.acData.bCanOpenToPreserve,$.acData.bCanOpenToArchive],
|
| - |
|
415 |
R: [$.acData.bCanRestrictiveToClose,$.acData.bCanRestrictiveToPreserve,$.acData.bCanRestrictiveToArchive],
|
| - |
|
416 |
C: [$.acData.bCanRestrictiveToClose,$.acData.bCanRestrictiveToPreserve,$.acData.bCanRestrictiveToArchive],
|
| - |
|
417 |
Y: [$.acData.bCanCloseToClose,$.acData.bCanCloseToPreserve,$.acData.bCanCloseToArchive],
|
| - |
|
418 |
O: [$.acData.bCanCloseToClose,$.acData.bCanCloseToPreserve,$.acData.bCanCloseToArchive],
|
| - |
|
419 |
P: [$.acData.bCanPreserveToClose,$.acData.bCanPreserveToPreserve,$.acData.bCanPreserveToArchive],
|
| - |
|
420 |
A: [$.acData.bCanArchiveToClose,$.acData.bCanArchiveToPreserve,$.acData.bCanArchiveToArchive],
|
| - |
|
421 |
|
| - |
|
422 |
canAccess : function(state, index) {
|
| - |
|
423 |
if ( this.hasOwnProperty(state)) {
|
| - |
|
424 |
return this[state][index];
|
| - |
|
425 |
} else {
|
| - |
|
426 |
return false;
|
| - |
|
427 |
}
|
| - |
|
428 |
},
|
| - |
|
429 |
};
|
| 360 |
|
430 |
|
| - |
|
431 |
$.miniMenu = {
|
| 361 |
// Menu operations
|
432 |
// Menu operations
|
| 362 |
open : function (data, event) {
|
433 |
open : function (data, event) {
|
| 363 |
console.log("Opening:", data.rtagid);
|
434 |
console.log("Opening:", data.rtagid);
|
| 364 |
this.gotoUrl("dependencies.asp", {rtag_id : data.rtagid});
|
435 |
this.gotoUrl("dependencies.asp", {rtag_id : data.rtagid});
|
| 365 |
},
|
436 |
},
|
| Line 521... |
Line 592... |
| 521 |
$('#select-menu-merge').toggleClass('ui-state-disabled',!('mergeLeft' in $.miniMenu ));
|
592 |
$('#select-menu-merge').toggleClass('ui-state-disabled',!('mergeLeft' in $.miniMenu ));
|
| 522 |
|
593 |
|
| 523 |
// Set initial state close/archive
|
594 |
// Set initial state close/archive
|
| 524 |
//
|
595 |
//
|
| 525 |
var official = $(this).data('official');
|
596 |
var official = $(this).data('official');
|
| 526 |
$('#select-menu-close').toggleClass('ui-state-disabled',!($.miniMenu.bCanCloseArchive && ((official == 'A' && $.miniMenu.bCanUnarchive)|| (official != 'A' && official != 'Y' && official != 'O' && official != 'P'))));
|
597 |
$('#select-menu-close').toggleClass('ui-state-disabled',! $.mode2access.canAccess(official,0));
|
| 527 |
$('#select-menu-preserve').toggleClass('ui-state-disabled',!($.miniMenu.bCanCloseArchive && official != 'P'));
|
598 |
$('#select-menu-preserve').toggleClass('ui-state-disabled',!$.mode2access.canAccess(official,1));
|
| 528 |
$('#select-menu-archive').toggleClass('ui-state-disabled',!($.miniMenu.bCanCloseArchive && official != 'A'));
|
599 |
$('#select-menu-archive').toggleClass('ui-state-disabled',! $.mode2access.canAccess(official,2));
|
| 529 |
|
600 |
|
| 530 |
// Prevent propagation of event
|
601 |
// Prevent propagation of event
|
| 531 |
return false;
|
602 |
return false;
|
| 532 |
});
|
603 |
});
|
| 533 |
});
|
604 |
});
|
| Line 794... |
Line 865... |
| 794 |
<ul id="select-menu" style="display:none;">
|
865 |
<ul id="select-menu" style="display:none;">
|
| 795 |
<li data-opr="open" title="Goto this Release">Open ...</li>
|
866 |
<li data-opr="open" title="Goto this Release">Open ...</li>
|
| 796 |
<li data-opr="edit" title="Edit the properties of the Release">Edit Properties</li>
|
867 |
<li data-opr="edit" title="Edit the properties of the Release">Edit Properties</li>
|
| 797 |
<li <%=iif(bCanMove,"data-opr=move","class=ui-state-disabled")%> title="Change the order in which releases are displayed">Change display order</li>
|
868 |
<li <%=iif(bCanMove,"data-opr=move","class=ui-state-disabled")%> title="Change the order in which releases are displayed">Change display order</li>
|
| 798 |
<li>-</li>
|
869 |
<li>-</li>
|
| 799 |
<li data-opr="mergeSelect" title="Select as the source (left side) of a merge or comparison">Select for Merge</li>
|
870 |
<li data-opr="mergeSelect" title="Select as the source (left side) of a merge or comparison">Select for Merge/Diff</li>
|
| 800 |
<li id="select-menu-merge" data-opr="merge" title="Merge from selected release to this release">Merge from selected</li>
|
871 |
<li id="select-menu-merge" data-opr="merge" title="Merge or Compare from selected release to this release">Merge/Diff from selected</li>
|
| 801 |
<li>-</li>
|
872 |
<li>-</li>
|
| 802 |
<li id="select-menu-close" data-opr="close">Close Release</li>
|
873 |
<li id="select-menu-close" data-opr="close">Close Release</li>
|
| 803 |
<li id="select-menu-preserve" data-opr="preserve" >Preserve Release</li>
|
874 |
<li id="select-menu-preserve" data-opr="preserve" >Preserve Release</li>
|
| 804 |
<li id="select-menu-archive" data-opr="archive" >Archive Release</li>
|
875 |
<li id="select-menu-archive" data-opr="archive" >Archive Release</li>
|
| 805 |
<li>-</li>
|
876 |
<li>-</li>
|