Subversion Repositories DevTools

Rev

Rev 5896 | Rev 5899 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5896 Rev 5897
Line 36... Line 36...
36
'------------ Variable Definition -------------
36
'------------ Variable Definition -------------
37
Dim parPv_id
37
Dim parPv_id
38
Dim rsPkgs
38
Dim rsPkgs
39
Dim HTML_pkg_list
39
Dim HTML_pkg_list
40
Dim DataFound
40
Dim DataFound
-
 
41
Dim recCnt
41
 
42
 
42
'------------ Constants Declaration -----------
43
'------------ Constants Declaration -----------
43
'------------ Variable Init -------------------
44
'------------ Variable Init -------------------
44
parPv_id = Request("pv_id")
45
parPv_id = Request("pv_id")
45
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
46
Set pkgInfoHash = CreateObject("Scripting.Dictionary")
-
 
47
recCnt = 0
46
'-------------------------------------------------
48
'-------------------------------------------------
47
' Function:     Populate_from_Import   
49
' Function:     Populate_from_Import   
48
' Description:  Generate the body of the display based on user imported data
50
' Description:  Generate the body of the display based on user imported data
49
Sub Populate_from_Import ( SSdep_import, SShtml_pkg_list, BBDataFound)
51
Sub Populate_from_Import ( SSdep_import, SShtml_pkg_list, BBDataFound)
50
   Dim recCnt, pkg_name, pkg_version, build_type, re, Matches, Match
52
   Dim pkg_name, pkg_version, build_type, re, Matches, Match
51
   Dim Query_String, rsDeps, PVID, PKGID, builtTypeEnum, LatestVisible
53
   Dim Query_String, rsDeps, PVID, PKGID, builtTypeEnum, LatestVisible
52
   Dim OraParameter
54
   Dim OraParameter
53
 
55
 
54
   DataFound = false
56
   DataFound = false
55
   If (SSdep_import = "") Then Exit Sub      ' exit if no dependencies are submited
57
   If (SSdep_import = "") Then Exit Sub      ' exit if no dependencies are submited
Line 137... Line 139...
137
'-------------------------------------------------
139
'-------------------------------------------------
138
' Function:     Populate_from_Package
140
' Function:     Populate_from_Package
139
' Description:  Generate the body of the display based on package-versions in the current package
141
' Description:  Generate the body of the display based on package-versions in the current package
140
'
142
'
141
Sub Populate_from_Package( NNpv_id, nRtag_id, SShtml_pkg_list, BBDataFound )
143
Sub Populate_from_Package( NNpv_id, nRtag_id, SShtml_pkg_list, BBDataFound )
142
	Dim rsDeps, Query_String, recCnt
144
	Dim rsDeps, Query_String
143
 
145
 
144
    BBDataFound = FALSE
146
    BBDataFound = FALSE
145
    recCnt = 0
147
    recCnt = 0
146
	Query_String = ReadFile( rootPath & "queries\edit_dependencies.sql" )
148
	Query_String = ReadFile( rootPath & "queries\edit_dependencies.sql" )
147
 
149
 
Line 203... Line 205...
203
            If ( pVersion = pLversion ) Then
205
            If ( pVersion = pLversion ) Then
204
                LatestVisible = "style='display:none;'"
206
                LatestVisible = "style='display:none;'"
205
            End If
207
            End If
206
 
208
 
207
            GenerateEntry = GenerateEntry &"  <DIV id='divLPV"& idx &"' "& LatestVisible &">"&_
209
            GenerateEntry = GenerateEntry &"  <DIV id='divLPV"& idx &"' "& LatestVisible &">"&_
208
                                                  "<a href='javascript:;' onClick='Merge_Version ( """& pLversion & ""","& idx & " );'>"&_
210
                                                  "<a href='javascript:;' onClick='Merge_Version ( "& idx & " );'>"&_
209
                                                  "<img src='images/bt_move_left.gif' border='0' title='Bring over this latest version' hspace='2' align='absmiddle'>"&_
211
                                                  "<img src='images/bt_move_left.gif' border='0' title='Bring over this latest version' hspace='2' align='absmiddle'>"&_
210
                                                  "</a>"& pLversion &"<input name='lp"& idx &"' type='hidden' value='"& pLversion &"'></DIV>"
212
                                                  "</a>"& pLversion &"<input name='lp"& idx &"' type='hidden' value='"& pLversion &"'></DIV>"
211
        End If
213
        End If
212
        GenerateEntry = GenerateEntry &"  </td>"
214
        GenerateEntry = GenerateEntry &"  </td>"
213
    End If
215
    End If
Line 252... Line 254...
252
function ValidateForm(){
254
function ValidateForm(){
253
	return scanBadData();
255
	return scanBadData();
254
}
256
}
255
 
257
 
256
//	Scan the form for bad entries and update the 'Update' button accordingly
258
//	Scan the form for bad entries and update the 'Update' button accordingly
257
function scanBadData()
259
function scanBadData() {
258
{
-
 
259
	var elem = MM_findObj("btn_update")
260
	var elem = MM_findObj("btn_update")
260
	var rv = false;
261
	var rv = false;
261
	if (elem) {
262
	if (elem) {
262
		rv = document.getElementsByClassName("badPackage").length == 0;
263
		rv = document.getElementsByClassName("badPackage").length == 0;
263
		elem.disabled = !rv;
264
		elem.disabled = !rv;
264
	}
265
	}
265
}
266
}
266
 
267
 
-
 
268
//  Update all packages to latest version
-
 
269
function MergeAll() {
-
 
270
    var recId;
-
 
271
    for (recId=0; recId<<%=recCnt%>;recId++) {
-
 
272
		Merge_Version(recId);
-
 
273
	}
-
 
274
}
-
 
275
 
267
// Restore original value
276
// Restore original value
268
function Merge_Version (lpkg_version, recId) {
277
function Merge_Version (recId) {
269
    endEditVerNum(recId);
278
    endEditVerNum(recId);
270
    var ediv = MM_findObj("divLPV"+ recId.toString() );
279
    var ediv = MM_findObj("divLPV"+ recId.toString() );
271
    var epkg = MM_findObj("pkgn"+ recId.toString() );
280
    var epkg = MM_findObj("pkgn"+ recId.toString() );
272
 
281
 
-
 
282
	var lpkg_version;
-
 
283
	el = MM_findObj( "lp" + recId.toString() );
-
 
284
	if (el) {
-
 
285
		lpkg_version = el.value;
273
    if(epkg) epkg.value = lpkg_version;
286
		if(epkg) epkg.value = lpkg_version;
-
 
287
	}
274
    if(ediv) ediv.style.display = "none";
288
    if(ediv) ediv.style.display = "none";
275
 
289
 
276
    var ebad = MM_findObj("divBver"+ recId.toString() );
290
    var ebad = MM_findObj("divBver"+ recId.toString() );
277
    if(ebad) ebad.parentElement.removeChild(ebad);
291
    if(ebad) ebad.parentElement.removeChild(ebad);
278
	scanBadData();
292
	scanBadData();
Line 490... Line 504...
490
                        <td colspan="2" width="1%" nowrap class="form_field">
504
                        <td colspan="2" width="1%" nowrap class="form_field">
491
                          <table width="100%" border="0" cellspacing="1" cellpadding="2">
505
                          <table width="100%" border="0" cellspacing="1" cellpadding="2">
492
                            <tr>
506
                            <tr>
493
                              <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field">Package Name<img src="images/h_trsp_dot.gif" width="1" height="20" align="absmiddle"></td>
507
                              <td background="images/bg_form_lightbluedark.gif" nowrap width="1%" class="form_field">Package Name<img src="images/h_trsp_dot.gif" width="1" height="20" align="absmiddle"></td>
494
                              <td background="images/bg_form_lightbluedark.gif" nowrap width="50%" class="form_field">Version</td>
508
                              <td background="images/bg_form_lightbluedark.gif" nowrap width="50%" class="form_field">Version</td>
495
							  <td background="images/bg_form_lightbluedark.gif" nowrap width="50%" class="form_field">Released</td>
509
							  <td background="images/bg_form_lightbluedark.gif" nowrap width="50%" class="form_field">
-
 
510
                                <a href='javascript:;' onClick='MergeAll();'><img src='images/bt_move_left.gif' border='0' title='Update all to released version' hspace='2' align='absmiddle'></a>
-
 
511
								Released
-
 
512
                             </td>
496
                            </tr>
513
                            </tr>
497
                      		<%=HTML_pkg_list%>
514
                      		<%=HTML_pkg_list%>
498
                            <tr>
515
                            <tr>
499
                              <td nowrap><img src="images/h_trsp_dot.gif" width="120" height="1"></td>
516
                              <td nowrap><img src="images/h_trsp_dot.gif" width="120" height="1"></td>
500
                              <td></td>
517
                              <td></td>