| 6624 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
' View Package Owner Information
|
|
|
5 |
' form_view_package_owners.asp
|
|
|
6 |
'=====================================================
|
|
|
7 |
%>
|
|
|
8 |
<%
|
|
|
9 |
Option explicit
|
|
|
10 |
' Good idea to set when using redirect
|
|
|
11 |
Response.Expires = 0 ' always load the page, dont store
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/conf.asp"-->
|
|
|
14 |
<!--#include file="common/globals.asp"-->
|
|
|
15 |
<!--#include file="common/formating.asp"-->
|
|
|
16 |
<!--#include file="common/qstr.asp"-->
|
|
|
17 |
<!--#include file="common/common_subs.asp"-->
|
|
|
18 |
<!--#include file="common/_form_window_common.asp"-->
|
|
|
19 |
<!--#include file="_action_buttons.asp"-->
|
|
|
20 |
|
|
|
21 |
<!--#include file="class/classActionButtonControl.asp"-->
|
|
|
22 |
<%
|
|
|
23 |
'------------ ACCESS CONTROL ------------------
|
|
|
24 |
%>
|
|
|
25 |
<!--#include file="_access_control_login_optional.asp"-->
|
|
|
26 |
<!--#include file="_access_control_general.asp"-->
|
|
|
27 |
<%
|
|
|
28 |
'------------ Variable Definition -------------
|
|
|
29 |
Dim parRtagId
|
|
|
30 |
Dim modifyState
|
|
|
31 |
'------------ Constants Declaration -----------
|
|
|
32 |
'------------ Variable Init -------------------
|
|
|
33 |
parRtagId = Request("rtag_id")
|
|
|
34 |
objPMod.PersistInQryString("rtag_id")
|
|
|
35 |
ReleaseMode = GetReleaseMode( Request("rtag_id") )
|
|
|
36 |
|
|
|
37 |
modifyState = "disabled"
|
|
|
38 |
If canActionControl("BulkChangePackageOwner") Then modifyState = ""
|
|
|
39 |
'----------------------------------------------
|
|
|
40 |
Sub ShowSidePanel
|
|
|
41 |
End Sub
|
|
|
42 |
'----------------------------------------------
|
|
|
43 |
Sub ShowMainPanel
|
|
|
44 |
%>
|
|
|
45 |
<table class="embedded_table" style="margin-bottom:10px; width:50%">
|
|
|
46 |
<tr>
|
|
|
47 |
<td>
|
|
|
48 |
<span nowrap class="form_ttl">VIEW PACKAGE OWNER</span>
|
|
|
49 |
<!-- Section Top Border ---->
|
|
|
50 |
<div class="rounded_box" style="background: white;">
|
|
|
51 |
<!-- Section Body Header ---->
|
|
|
52 |
<!-- Main Pane -->
|
|
|
53 |
<table id="deploymentstatetable" width="100%" class="stripe">
|
|
|
54 |
<thead class="body_col">
|
|
|
55 |
<tr>
|
|
|
56 |
<th>PV_ID
|
|
|
57 |
<th>Package Name
|
|
|
58 |
<th>Package Version
|
|
|
59 |
<th>Base View
|
|
|
60 |
<th>Short Description
|
|
|
61 |
<th>Package Owner
|
|
|
62 |
<th>Select
|
| 6625 |
dpurdie |
63 |
<th>SdkId
|
| 6624 |
dpurdie |
64 |
</tr>
|
|
|
65 |
</thead>
|
|
|
66 |
<tbody>
|
|
|
67 |
</tbody>
|
|
|
68 |
</table>
|
| 6625 |
dpurdie |
69 |
<div id='iframeTxData' style='visibility:hidden;display:none'></div>
|
| 6624 |
dpurdie |
70 |
<!-- Info / Ajax Progress bar -->
|
|
|
71 |
<div class='bg_dialog body_txt' style='position:relative;min-height:19px;' >
|
|
|
72 |
<img id='ds_progressBar' style='visibility:hidden;position: absolute;display: block' src='icons/i_processing.gif' width='79' height='14'>
|
|
|
73 |
<div id='ds_info' style='position: absolute;'></div>
|
|
|
74 |
<div>
|
|
|
75 |
<button id='ds_refresh' class='rmbutton' style="display:inline; float:right;">Refresh</button>
|
|
|
76 |
<button id='ds_setOwner' class='rmbutton' style="display:inline; float:right;" <%=modifyState%>>Set Owner</button>
|
| 6625 |
dpurdie |
77 |
<button id='ds_clearAll' class='rmbutton' style="display:inline; float:right;" <%=modifyState%>>Clear All</button>
|
|
|
78 |
<button id='ds_clearVis' class='rmbutton' style="display:inline; float:right;" <%=modifyState%>>Clear Visible</button>
|
|
|
79 |
<button id='ds_setVis' class='rmbutton' style="display:inline; float:right;" <%=modifyState%>>Set Visible</button>
|
| 6624 |
dpurdie |
80 |
</div>
|
|
|
81 |
</div>
|
|
|
82 |
</div>
|
|
|
83 |
</td>
|
|
|
84 |
</tr>
|
|
|
85 |
</table>
|
|
|
86 |
<%
|
|
|
87 |
End Sub
|
|
|
88 |
'----------------------------------------------
|
|
|
89 |
%>
|
|
|
90 |
<html>
|
|
|
91 |
<head>
|
|
|
92 |
<title>Release Manager</title>
|
|
|
93 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
94 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
95 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
96 |
<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
97 |
<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
|
|
|
98 |
<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
|
|
|
99 |
<%bJqueryDataTables = TRUE%>
|
|
|
100 |
<!--#include file="_jquery_includes.asp"-->
|
|
|
101 |
<!-- TIPS -->
|
|
|
102 |
<script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
|
|
|
103 |
<script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
|
|
|
104 |
<script language="JavaScript" type="text/javascript">
|
|
|
105 |
formTips.tips.h = stdTip(300, 'Title', 'Text');
|
|
|
106 |
</script>
|
|
|
107 |
<script type="text/javascript" charset="utf-8">
|
|
|
108 |
var table;
|
|
|
109 |
|
|
|
110 |
// Suppress errros about badly formatted data
|
|
|
111 |
$.fn.dataTable.ext.errMode = 'none';
|
|
|
112 |
|
|
|
113 |
/* Create an array with the values of all the checkboxes in a column */
|
|
|
114 |
$.fn.dataTable.ext.order['dom-checkbox'] = function ( settings, col )
|
|
|
115 |
{
|
|
|
116 |
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
|
|
117 |
return $('input', td).prop('checked') ? '1' : '0';
|
|
|
118 |
} );
|
|
|
119 |
}
|
|
|
120 |
|
| 6625 |
dpurdie |
121 |
/* Create an array with the values of all the innerText in a column */
|
|
|
122 |
$.fn.dataTable.ext.order['dom-innerText'] = function ( settings, col )
|
|
|
123 |
{
|
|
|
124 |
return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
|
|
|
125 |
return $(td).text();
|
|
|
126 |
} );
|
|
|
127 |
}
|
|
|
128 |
|
| 6624 |
dpurdie |
129 |
$(document).ready(function() {
|
|
|
130 |
/* Init DataTables */
|
|
|
131 |
table = $("#deploymentstatetable").DataTable({
|
|
|
132 |
dom: "frtiS",
|
| 7250 |
dpurdie |
133 |
paging: true,
|
|
|
134 |
scrollY: $( document ).height() - 45 - 200 - 15,
|
| 6624 |
dpurdie |
135 |
scrollCollapse: true,
|
| 7250 |
dpurdie |
136 |
scroller : {
|
|
|
137 |
loadingIndicator : true,
|
|
|
138 |
displayBuffer: 3,
|
|
|
139 |
},
|
| 6624 |
dpurdie |
140 |
ajax : {
|
|
|
141 |
url : "view_package_owner_json.asp",
|
|
|
142 |
data : function (o){
|
|
|
143 |
o.rtag_id = <%=parRtagId%>;
|
|
|
144 |
},
|
|
|
145 |
dataSrc : function (json){
|
|
|
146 |
// Detect errors
|
|
|
147 |
if (json.result != 0) {
|
|
|
148 |
$('#ds_info').text("Error:" + ((json.error != 0) ? json.emsgSummary : "Reason not given"));
|
|
|
149 |
return { data: {}};
|
|
|
150 |
}
|
|
|
151 |
|
|
|
152 |
// Process the raw Ajax data
|
|
|
153 |
$.each(json.data, function(idx,row){
|
|
|
154 |
// Create nice email fields
|
|
|
155 |
row[5] = "<span title='Select Email Options' class='mailto txt_linked' data-email='" + row[7] + "' data-uname='" + row[6] + "'>" + row[5] + "</span>"
|
|
|
156 |
|
|
|
157 |
// Create a check box
|
|
|
158 |
// Not for packages imported via SDK
|
| 6625 |
dpurdie |
159 |
var cbClass = row[8] ? '' : 'clickable';
|
|
|
160 |
var cbDis = (row[8] || "<%=modifyState%>") ? ' disabled ' : '';
|
| 6624 |
dpurdie |
161 |
row[6] = '<div><input type="checkbox" class='+cbClass+' data-pvid=' + row[0] + ' '+ cbDis + '></div>'
|
|
|
162 |
|
|
|
163 |
});
|
|
|
164 |
return json.data;
|
|
|
165 |
},
|
|
|
166 |
beforeSend: function (){
|
|
|
167 |
$("#ds_progressBar").css('visibility', 'visible');
|
|
|
168 |
$(document.body).css({ 'cursor': 'progress' });
|
|
|
169 |
$('#ds_info').empty();
|
|
|
170 |
},
|
|
|
171 |
complete: function (){
|
|
|
172 |
$("#ds_progressBar").css('visibility', 'hidden');
|
|
|
173 |
$(document.body).css({ 'cursor': 'auto' });
|
|
|
174 |
},
|
|
|
175 |
error: function(jqXHR, textStatus, errorThrown) {
|
|
|
176 |
$('#ds_info').text("Error:" + errorThrown);
|
|
|
177 |
//if fails
|
|
|
178 |
},
|
|
|
179 |
},
|
|
|
180 |
ordering: true,
|
|
|
181 |
order: [[ 1, "asc" ]],
|
|
|
182 |
lengthChange : false,
|
|
|
183 |
|
|
|
184 |
columns: [
|
|
|
185 |
{ visible : false },
|
| 6625 |
dpurdie |
186 |
{ width: "20%", className: "dt-nowrap", orderDataType : 'dom-innerText'},
|
|
|
187 |
{ width: "20%", className: "dt-nowrap", orderDataType : 'dom-innerText'},
|
| 6624 |
dpurdie |
188 |
{ width: "1%", className: "dt-nowrap" },
|
| 6625 |
dpurdie |
189 |
{ orderable: false, searchable: false },
|
| 6624 |
dpurdie |
190 |
{ className: "dt-nowrap" },
|
|
|
191 |
{ width: "1%", orderable: true, className: "dt-nowrap", orderDataType : 'dom-checkbox' },
|
|
|
192 |
{ visible: false },
|
|
|
193 |
],
|
|
|
194 |
});
|
|
|
195 |
|
|
|
196 |
// Wire Up buttons
|
|
|
197 |
$('#ds_refresh').on("click", function(){
|
|
|
198 |
table.ajax.reload(null, false);
|
|
|
199 |
});
|
|
|
200 |
|
|
|
201 |
$('#ds_clearAll').on("click", function(){
|
| 6625 |
dpurdie |
202 |
$(table.column(6).nodes()).find('.clickable').removeAttr('checked');
|
| 6624 |
dpurdie |
203 |
updateCounts();
|
|
|
204 |
});
|
|
|
205 |
|
| 6625 |
dpurdie |
206 |
$('#ds_clearVis').on("click", function(){
|
|
|
207 |
$(table.column(6,{filter:'applied'}).nodes()).find('.clickable').removeAttr('checked');
|
| 6624 |
dpurdie |
208 |
updateCounts();
|
|
|
209 |
});
|
|
|
210 |
|
| 6625 |
dpurdie |
211 |
$('#ds_setVis').on("click", function(){
|
|
|
212 |
$(table.column(6,{filter:'applied'}).nodes()).find('.clickable').prop('checked', true);
|
|
|
213 |
updateCounts();
|
|
|
214 |
});
|
|
|
215 |
|
| 6624 |
dpurdie |
216 |
$('#ds_setOwner').on("click", function(){
|
|
|
217 |
var selList = new Array();
|
| 6625 |
dpurdie |
218 |
$(table.column(6).nodes()).find('.clickable:checked').each(function(){
|
| 6624 |
dpurdie |
219 |
var pvid = $(this).data("pvid");
|
|
|
220 |
selList.push(pvid);
|
|
|
221 |
});
|
|
|
222 |
|
|
|
223 |
//console.log('Data', selList);
|
| 6625 |
dpurdie |
224 |
// Save the pv_id list in a hidden element so that the iFrame can extract it
|
|
|
225 |
// Overcome url length issues
|
| 6624 |
dpurdie |
226 |
if ( selList.length > 0 ) {
|
| 6625 |
dpurdie |
227 |
$('#iframeTxData').text(selList.join(','));
|
|
|
228 |
MM_openVixIFrame('_wform_change_owner_bulk.asp','Bulk Change Owner');
|
| 6624 |
dpurdie |
229 |
}
|
|
|
230 |
});
|
|
|
231 |
|
| 6625 |
dpurdie |
232 |
$('#deploymentstatetable').on('click', '.clickable', updateCounts);
|
| 6624 |
dpurdie |
233 |
|
|
|
234 |
function updateCounts() {
|
| 6625 |
dpurdie |
235 |
var checkCount = $(table.column(6).nodes()).find('.clickable:checked').length;
|
| 6624 |
dpurdie |
236 |
$('#ds_info').text(checkCount + " packages selected");
|
|
|
237 |
}
|
|
|
238 |
});
|
|
|
239 |
</script>
|
|
|
240 |
|
|
|
241 |
<!-- DROPDOWN MENUS -->
|
|
|
242 |
<!--#include file="_menu_def.asp"-->
|
|
|
243 |
<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
|
|
|
244 |
</head>
|
|
|
245 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
|
|
|
246 |
<!-- HEADER -->
|
|
|
247 |
<!--#include file="_header.asp"-->
|
|
|
248 |
<!-- BODY ---->
|
|
|
249 |
<table class="full_table">
|
|
|
250 |
<tr>
|
| 6876 |
dpurdie |
251 |
<td class="bg_panel" valign="top" style="min-width:146px">
|
| 6624 |
dpurdie |
252 |
<%Call ShowSidePanel%>
|
|
|
253 |
</td>
|
|
|
254 |
<td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
|
|
|
255 |
<%Call ShowMainPanel%>
|
|
|
256 |
</td>
|
|
|
257 |
</tr>
|
|
|
258 |
<tr>
|
| 6877 |
dpurdie |
259 |
<td class="bg_panel_btm" height="350"></td>
|
| 6624 |
dpurdie |
260 |
</tr>
|
|
|
261 |
</table>
|
|
|
262 |
<!-- FOOTER -->
|
|
|
263 |
<!--#include file="_footer.asp"-->
|
|
|
264 |
</body>
|
|
|
265 |
</html>
|