| Line 171... |
Line 171... |
| 171 |
}
|
171 |
}
|
| 172 |
}
|
172 |
}
|
| 173 |
}
|
173 |
}
|
| 174 |
}
|
174 |
}
|
| 175 |
|
175 |
|
| - |
|
176 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| - |
|
177 |
// This function is executed when the Bulk Remove action button is pressed. It will do some local
|
| - |
|
178 |
// client side checks and then if all is well, it will use the make_bulk_remove.asp to initiate
|
| - |
|
179 |
// the bulk remove process on the server side.
|
| - |
|
180 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| - |
|
181 |
function makeBulkReject()
|
| - |
|
182 |
{
|
| - |
|
183 |
// Get the form containing all of the pending items
|
| - |
|
184 |
var f = document.getElementById('pending_PVID_List');
|
| - |
|
185 |
if (f == null)
|
| - |
|
186 |
alert('Failed To Get pending_PVID_List'); // should never happen unless a coding/rendering mistake is made?
|
| - |
|
187 |
else
|
| - |
|
188 |
{
|
| - |
|
189 |
// When no items exist in the pending tab, the pending_PVID_List form will not contain any
|
| - |
|
190 |
// element called pv_id_list, so it will be null. Check for that and issue an alert as appropriate.
|
| - |
|
191 |
if (f.pv_id_list == null)
|
| - |
|
192 |
{
|
| - |
|
193 |
alert('There are no items pending that can be considered for bulk rejection.\n\n' +
|
| - |
|
194 |
'Use the Bulk Reject button when items with checkboxes are present in the\n' +
|
| - |
|
195 |
'Pending Tab.');
|
| - |
|
196 |
}
|
| - |
|
197 |
else
|
| - |
|
198 |
{
|
| - |
|
199 |
var doBulkReject = true;
|
| - |
|
200 |
|
| - |
|
201 |
// Count the number of checked and enabled items to see if there is actually any work to
|
| - |
|
202 |
// do and if not issue an alert to the user. The pending_PVID_List form contains checkbox
|
| - |
|
203 |
// items representing the pending versions, and the user may have checked any number of them
|
| - |
|
204 |
// or none.
|
| - |
|
205 |
//
|
| - |
|
206 |
// NOTE, disabled items are indicative of pending autobuild versions that have already
|
| - |
|
207 |
// been approved and are just awaiting processing by the build daemon that will make
|
| - |
|
208 |
// them removed once they have built successfully. We must not count those in our total.
|
| - |
|
209 |
var n;
|
| - |
|
210 |
var numCheckedAndEnabled = 0;
|
| - |
|
211 |
var numUncheckedAndEnabled = 0;
|
| - |
|
212 |
|
| - |
|
213 |
// Unbelievably, if the form has just one single PV_ID checkbox item, the syntax via which we access it
|
| - |
|
214 |
// has to change. We cannot use array access syntax in such a case.
|
| - |
|
215 |
if (f.length == 1 )
|
| - |
|
216 |
{
|
| - |
|
217 |
if (f.pv_id_list.value != null)
|
| - |
|
218 |
{
|
| - |
|
219 |
if (false == f.pv_id_list.disabled)
|
| - |
|
220 |
{
|
| - |
|
221 |
if (true == f.pv_id_list.checked)
|
| - |
|
222 |
numCheckedAndEnabled++;
|
| - |
|
223 |
else
|
| - |
|
224 |
numUncheckedAndEnabled++;
|
| - |
|
225 |
}
|
| - |
|
226 |
}
|
| - |
|
227 |
}
|
| - |
|
228 |
else
|
| - |
|
229 |
{
|
| - |
|
230 |
// Here we can and have to use array access syntax.
|
| - |
|
231 |
for (n = 0; n < f.pv_id_list.length; n++)
|
| - |
|
232 |
{
|
| - |
|
233 |
if (false == f.pv_id_list[n].disabled)
|
| - |
|
234 |
{
|
| - |
|
235 |
if (true == f.pv_id_list[n].checked)
|
| - |
|
236 |
numCheckedAndEnabled++;
|
| - |
|
237 |
else
|
| - |
|
238 |
numUncheckedAndEnabled++;
|
| - |
|
239 |
}
|
| - |
|
240 |
}
|
| - |
|
241 |
}
|
| - |
|
242 |
|
| - |
|
243 |
if (numCheckedAndEnabled == 0)
|
| - |
|
244 |
{
|
| - |
|
245 |
if (numUncheckedAndEnabled == 0)
|
| - |
|
246 |
{
|
| - |
|
247 |
alert('Currently, there are no items that can be bulk removed');
|
| - |
|
248 |
doBulkReject = false;
|
| - |
|
249 |
}
|
| - |
|
250 |
else
|
| - |
|
251 |
{
|
| - |
|
252 |
// No enabled items have their checkboxes checked. Offer the user an easy way to
|
| - |
|
253 |
// bulk remove the entire set, or to abort
|
| - |
|
254 |
doBulkReject = confirm('No (enabled) items in the Pending Tab have been checked.\n' +
|
| - |
|
255 |
'This may mean you wish to bulk remove ALL items without\n' +
|
| - |
|
256 |
'having to check every single one of them individually.\n\n' +
|
| - |
|
257 |
'\tPress OK to bulk reject all outstanding items.\n' +
|
| - |
|
258 |
'\tPress CANCEL to abort bulk reject.\n\n' );
|
| - |
|
259 |
if (doBulkReject == true)
|
| - |
|
260 |
{
|
| - |
|
261 |
// Programmatically check all the enabled items. The user will see this happening on their browser
|
| - |
|
262 |
// and may be able to uncheck a few items before the submit() action further down in this
|
| - |
|
263 |
// function is called. However, the worst that can happen is that a few items will not get
|
| - |
|
264 |
// bulk removed and the user has to do another bulk remove operation.
|
| - |
|
265 |
if (f.length == 1 )
|
| - |
|
266 |
{
|
| - |
|
267 |
if (false == f.pv_id_list.checked && false == f.pv_id_list.disabled)
|
| - |
|
268 |
{
|
| - |
|
269 |
f.pv_id_list.checked = true;
|
| - |
|
270 |
}
|
| - |
|
271 |
}
|
| - |
|
272 |
else
|
| - |
|
273 |
{
|
| - |
|
274 |
for (n = 0; n < f.pv_id_list.length; n++)
|
| - |
|
275 |
{
|
| - |
|
276 |
if (false == f.pv_id_list[n].checked && false == f.pv_id_list[n].disabled)
|
| - |
|
277 |
{
|
| - |
|
278 |
f.pv_id_list[n].checked = true;
|
| - |
|
279 |
}
|
| - |
|
280 |
}
|
| - |
|
281 |
}
|
| - |
|
282 |
}
|
| - |
|
283 |
}
|
| - |
|
284 |
}
|
| - |
|
285 |
else
|
| - |
|
286 |
{
|
| - |
|
287 |
doBulkReject = confirm('Reject all checked items from the Pending List.\n\n' +
|
| - |
|
288 |
'\tPress OK to bulk reject all outstanding items.\n' +
|
| - |
|
289 |
'\tPress CANCEL to abort bulk reject.\n\n' );
|
| - |
|
290 |
|
| - |
|
291 |
}
|
| - |
|
292 |
|
| - |
|
293 |
if (doBulkReject == true)
|
| - |
|
294 |
{
|
| - |
|
295 |
// Initiate the bulk remove by redirecting the browser to the make_bulk_remove.asp page
|
| - |
|
296 |
// which holds the server side VBScript code that actually carries out the remove operations.
|
| - |
|
297 |
// Once complete, that code will redirect the browser back to the dependencies.asp page of which
|
| - |
|
298 |
// this _environment.asp file is a part (by direct inclusion)
|
| - |
|
299 |
<%If Request("pv_id") Then%>
|
| - |
|
300 |
f.action = "make_bulk_reject.asp?pv_id=<%=Request("pv_id")%>&rtag_id=<%=parRtag_id%>";
|
| - |
|
301 |
<%Else%>
|
| - |
|
302 |
f.action = "make_bulk_reject.asp?rtag_id=<%=parRtag_id%>";
|
| - |
|
303 |
<%End If%>
|
| - |
|
304 |
f.submit();
|
| - |
|
305 |
// TODO : I would like to show progress? Is that even possible? If so, how?
|
| - |
|
306 |
}
|
| - |
|
307 |
}
|
| - |
|
308 |
}
|
| - |
|
309 |
}
|
| - |
|
310 |
|
| - |
|
311 |
|
| 176 |
function RequestViewContent( paramString, rowId ){
|
312 |
function RequestViewContent( paramString, rowId ){
|
| 177 |
var requestURL = 'RequestViewContent.asp';
|
313 |
var requestURL = 'RequestViewContent.asp';
|
| 178 |
|
314 |
|
| 179 |
// Toggle div
|
315 |
// Toggle div
|
| 180 |
ToggleDisplay( 'ENVDIV'+ rowId );
|
316 |
ToggleDisplay( 'ENVDIV'+ rowId );
|
| Line 749... |
Line 885... |
| 749 |
Else
|
885 |
Else
|
| 750 |
Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
|
886 |
Response.write "<td width='1'><a href='#' onClick='makeBulkRelease();'><img src='images/abtn_make_release_bulk.gif' title='Make Bulk Release...'></td>"
|
| 751 |
End If
|
887 |
End If
|
| 752 |
End If
|
888 |
End If
|
| 753 |
End If
|
889 |
End If
|
| - |
|
890 |
Response.write "<td width='1'><img src='images/spacer.gif' width='1' height='25'></td>"
|
| - |
|
891 |
If ( (QStrPar("Dview") <> "enable") AND ( (CInt(nEnvTab) = enumENVTAB_PLANNED) OR (Request("envtab") = enumENVTAB_PLANNED) ) ) Then
|
| - |
|
892 |
If objAccessControl.UserLogedIn Then
|
| - |
|
893 |
If ( ReleaseMode <> enumDB_RELEASE_IN_OPEN_MODE ) Then
|
| - |
|
894 |
If objAccessControl.IsActive("ApproveForAutoBuild") OR objAccessControl.IsActive("ApproveForManualBuild") Then
|
| - |
|
895 |
Response.write "<td width='1'><a href='#' onClick='makeBulkReject();'><img src='images/abtn_make_bulk_remove.gif' title='Bulk Reject...'></td>"
|
| - |
|
896 |
End If
|
| - |
|
897 |
Else
|
| - |
|
898 |
Response.write "<td width='1'><a href='#' onClick='makeBulkReject();'><img src='images/abtn_make_bulk_remove.gif' title='Bulk Reject...'></td>"
|
| - |
|
899 |
End If
|
| - |
|
900 |
End If
|
| - |
|
901 |
End If
|
| 754 |
rsTest.Close()
|
902 |
rsTest.Close()
|
| 755 |
Set rsTest = nothing
|
903 |
Set rsTest = nothing
|
| 756 |
%>
|
904 |
%>
|
| 757 |
<td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
|
905 |
<td width="100%"><img src="images/spacer.gif" width="1" height="1"></td>
|
| 758 |
</tr>
|
906 |
</tr>
|