| Line 15... |
Line 15... |
| 15 |
<!--#include file="common/conf.asp"-->
|
15 |
<!--#include file="common/conf.asp"-->
|
| 16 |
<!--#include file="common/globals.asp"-->
|
16 |
<!--#include file="common/globals.asp"-->
|
| 17 |
<!--#include file="common/formating.asp"-->
|
17 |
<!--#include file="common/formating.asp"-->
|
| 18 |
<!--#include file="common/qstr.asp"-->
|
18 |
<!--#include file="common/qstr.asp"-->
|
| 19 |
<!--#include file="common/common_subs.asp"-->
|
19 |
<!--#include file="common/common_subs.asp"-->
|
| - |
|
20 |
<script language="JavaScript" src="scripts/remote_scripting.js"></script>
|
| - |
|
21 |
<script type="text/javascript" src="scripts/json2.js"></script>
|
| 20 |
|
22 |
|
| 21 |
<%
|
23 |
<%
|
| 22 |
' Make sure rtag_id is always present
|
24 |
' Make sure rtag_id is always present
|
| 23 |
If Request("pv_id") = "" Then
|
25 |
If Request("pv_id") = "" Then
|
| 24 |
Response.Redirect("index.asp")
|
26 |
Response.Redirect("index.asp")
|
| Line 57... |
Line 59... |
| 57 |
'End If
|
59 |
'End If
|
| 58 |
|
60 |
|
| 59 |
If NOT disabled Then
|
61 |
If NOT disabled Then
|
| 60 |
SShtml_pkg_list = SShtml_pkg_list &"<tr> "
|
62 |
SShtml_pkg_list = SShtml_pkg_list &"<tr> "
|
| 61 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>"& rsDeps("pkg_name") &"<input name='bt"& rsDeps("pv_id") &"' type='hidden' value='"& rsDeps("build_type") &"'></td>"
|
63 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>"& rsDeps("pkg_name") &"<input name='bt"& rsDeps("pv_id") &"' type='hidden' value='"& rsDeps("build_type") &"'></td>"
|
| - |
|
64 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif'><select disabled='disabled' style='width:10em' id='pkgn"& rsDeps("pv_id") &"' name='pkgn"& rsDeps("pv_id") &"' class='form_item' onBlur='Compare_Version ( """& rsDeps("pv_id") &""" );' onchange='Compare_Version ( """& rsDeps("pv_id") &""" );' value='"&rsDeps("pkg_version")&"'><option>"& rsDeps("pkg_version") &"</option></select> "
|
| 62 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif'><input type='text' id='pkgn"& rsDeps("pv_id") &"' name='pkgn"& rsDeps("pv_id") &"' class='form_item' size='12' value='"& rsDeps("pkg_version") &"' onBlur='Compare_Version ( """& rsDeps("pv_id") &""" );' onFocus='Compare_Version ( """& rsDeps("pv_id") &""" );'> "
|
65 |
'SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif'><input type='text' id='pkgn"& rsDeps("pv_id") &"' name='pkgn"& rsDeps("pv_id") &"' class='form_item' size='12' value='"& rsDeps("pkg_version") &"' onBlur='Compare_Version ( """& rsDeps("pv_id") &""" );' onFocus='Compare_Version ( """& rsDeps("pv_id") &""" );'> "
|
| 63 |
SShtml_pkg_list = SShtml_pkg_list &" <a href='javascript:;' onClick='MM_openBrWindow(""_wform_get_version.asp?pkg_id="& rsDeps("pkg_id") &"&pkg_name="& rsDeps("pkg_name") &"&pv_id="& rsDeps("pv_id") &""",""GetVersion"",""resizable=yes,width=350,height=150"")'><img src='images/i_get.gif' width='16' height='16' align='absmiddle' hspace='5' border='0' alt='Get package version from the list' title='Get package version from the list'></a> "
|
66 |
SShtml_pkg_list = SShtml_pkg_list &" <a href='javascript:;' onClick='getVersions("& rsDeps("pkg_id") &","& rsDeps("pv_id") & ")'><img src='images/i_get.gif' width='16' height='16' align='absmiddle' hspace='5' border='0' alt='Get package version from the list' title='Get package version from the list'></a> "
|
| 64 |
SShtml_pkg_list = SShtml_pkg_list &" </td>"
|
67 |
SShtml_pkg_list = SShtml_pkg_list &" </td>"
|
| 65 |
Else
|
68 |
Else
|
| 66 |
SShtml_pkg_list = SShtml_pkg_list &"<tr> "
|
69 |
SShtml_pkg_list = SShtml_pkg_list &"<tr> "
|
| 67 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>"& rsDeps("pkg_name") &"<input name='bt"& rsDeps("pv_id") &"' type='hidden' value='"& rsDeps("build_type") &"'></td>"
|
70 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif' nowrap class='form_item'>"& rsDeps("pkg_name") &"<input name='bt"& rsDeps("pv_id") &"' type='hidden' value='"& rsDeps("build_type") &"'></td>"
|
| 68 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif'><input disabled type='text' class='form_item' size='12' value='"& rsDeps("pkg_version") &"'>"
|
71 |
SShtml_pkg_list = SShtml_pkg_list &" <td background='images/bg_form_lightgray.gif'><input disabled type='text' class='form_item' size='12' value='"& rsDeps("pkg_version") &"'>"
|
| Line 123... |
Line 126... |
| 123 |
<!-- DROPDOWN MENUS -->
|
126 |
<!-- DROPDOWN MENUS -->
|
| 124 |
<!--#include file="_menu_def.asp"-->
|
127 |
<!--#include file="_menu_def.asp"-->
|
| 125 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
128 |
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
|
| 126 |
<script language="JavaScript" type="text/JavaScript">
|
129 |
<script language="JavaScript" type="text/JavaScript">
|
| 127 |
<!--
|
130 |
<!--
|
| - |
|
131 |
|
| - |
|
132 |
// Restore original value
|
| 128 |
function Merge_Version ( pkgtxt_name, lpkg_version, lpkg_div ) {
|
133 |
function Merge_Version ( pkgtxt_name, lpkg_version, lpkg_div ) {
|
| 129 |
MM_findObj( pkgtxt_name ).value = lpkg_version;
|
134 |
var elem = MM_findObj( pkgtxt_name )
|
| - |
|
135 |
if (elem) {
|
| - |
|
136 |
elem.disabled = false;
|
| - |
|
137 |
elem.innerHTML = '<option>'+lpkg_version+'</option>';
|
| - |
|
138 |
}
|
| 130 |
MM_findObj( lpkg_div ).style.display = "none";
|
139 |
MM_findObj(lpkg_div).style.display = "none";
|
| 131 |
}
|
140 |
}
|
| 132 |
|
141 |
|
| - |
|
142 |
// Highlight diff between release and user selection
|
| 133 |
function Compare_Version ( pv_id ) {
|
143 |
function Compare_Version ( pv_id ) {
|
| 134 |
var cv, lv;
|
144 |
var cv, lv;
|
| 135 |
cv = MM_findObj( "pkgn" + pv_id ).value;
|
145 |
cv = MM_findObj( "pkgn" + pv_id ).value;
|
| 136 |
lv = MM_findObj( "lp" + pv_id ).value;
|
146 |
lv = MM_findObj( "lp" + pv_id ).value;
|
| 137 |
|
147 |
|
| Line 141... |
Line 151... |
| 141 |
MM_findObj( "divLPV"+ pv_id ).style.display = "none";
|
151 |
MM_findObj( "divLPV"+ pv_id ).style.display = "none";
|
| 142 |
}
|
152 |
}
|
| 143 |
|
153 |
|
| 144 |
}
|
154 |
}
|
| 145 |
|
155 |
|
| 146 |
//-----------------------------------------------------------------------------------------------------------------------------
|
- |
|
| 147 |
// Javascript Function: updateFields
|
- |
|
| 148 |
//
|
- |
|
| 149 |
// Purpose: This is a function that is called by external javascript to update fields in form
|
- |
|
| 150 |
//
|
- |
|
| 151 |
// Arguments: myPv_id (integer) - Package version number
|
156 |
// Allow the user to populate the version selector box
|
| 152 |
// myPkgId (integer) - Package number (not used in form_edit_deps.asp implementation of this function)
|
- |
|
| 153 |
// newVersion (string) - output value of the external javascript. This is the new version
|
- |
|
| 154 |
// cancelled (boolean) - true if user cancelled popup, else false
|
157 |
// Enables the selector once its been populated
|
| 155 |
//
|
- |
|
| 156 |
// Returns: nothing
|
158 |
// Uses AJAX to populate the item on demand
|
| 157 |
//
|
- |
|
| 158 |
// Notes: this is called by the popup window coded in _wform_get_version.asp when the user clicks 'submit' in that popup window. An equivalent function also
|
- |
|
| 159 |
// exists in form_add_pkg_versions.asp for when it activates the code in _wform_get_version.asp.
|
- |
|
| 160 |
function updateFields( myPv_id, myPkgId, newVersion, cancelled )
|
159 |
function getVersions(NNpkg_id, NN_pv_id)
|
| 161 |
{
|
160 |
{
|
| 162 |
// if user is cancelling the popup, or if the version we have got from the popup is empty...
|
161 |
xmlHttp=GetXmlHttpObject(getVersionsDone);
|
| 163 |
if (cancelled || newVersion == "")
|
162 |
if (xmlHttp==null)
|
| 164 |
{
|
163 |
{
|
| - |
|
164 |
alert ("Your browser does not support AJAX!");
|
| 165 |
// do nothing
|
165 |
return;
|
| 166 |
}
|
- |
|
| 167 |
else
|
166 |
}
|
| 168 |
{
|
167 |
|
| - |
|
168 |
var url = "_json_checkPackage.asp?"
|
| 169 |
// Note here we use myPv_id as the pkgn input field of the 'editdep' form is associated with a pv_id rather than a pkg_id
|
169 |
+ "pkg_id=" + NNpkg_id
|
| - |
|
170 |
+ "&ref=" + NN_pv_id
|
| - |
|
171 |
+ "&Opr=getVerList";
|
| - |
|
172 |
MM_showProgressBar();
|
| 170 |
document.getElementById("pkgn" + myPv_id).value = newVersion;
|
173 |
xmlHttp.open("GET",url,true); // `false` makes the request synchronous
|
| 171 |
document.getElementById("pkgn" + myPv_id).focus();
|
174 |
xmlHttp.send(null);
|
| 172 |
}
|
- |
|
| 173 |
}
|
175 |
}
|
| - |
|
176 |
|
| - |
|
177 |
// Call back for getVersions
|
| - |
|
178 |
function getVersionsDone()
|
| - |
|
179 |
{
|
| - |
|
180 |
//readyState of 4 or 'complete' represents that data has been returned
|
| - |
|
181 |
if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete'){
|
| - |
|
182 |
MM_hideProgressBar();
|
| - |
|
183 |
|
| - |
|
184 |
//Gather the results from the callback
|
| - |
|
185 |
var str = xmlHttp.responseText;
|
| - |
|
186 |
//alert("JSON:" + str);
|
| - |
|
187 |
var myJson = JSON.parse(str);
|
| - |
|
188 |
if(myJson.error)
|
| - |
|
189 |
{
|
| - |
|
190 |
alert("Invalid respoce from Release Manager");
|
| - |
|
191 |
return;
|
| - |
|
192 |
}
|
| - |
|
193 |
|
| - |
|
194 |
var ref = myJson.VersionRef;
|
| - |
|
195 |
var sver = MM_findObj( "lp" + ref ).value;
|
| - |
|
196 |
var select = document.getElementById("pkgn" + ref);
|
| - |
|
197 |
var prefix;
|
| - |
|
198 |
select.innerHTML = '';
|
| - |
|
199 |
select.disabled = false;
|
| - |
|
200 |
for( var ii=0; ii< myJson.Versions.length; ii++)
|
| - |
|
201 |
{
|
| - |
|
202 |
var el = document.createElement("option");
|
| - |
|
203 |
var vname = myJson.Versions[ii].vname;
|
| - |
|
204 |
if ( myJson.Versions[ii].dlocked == "Y" )
|
| - |
|
205 |
prefix = 'R ';
|
| - |
|
206 |
else
|
| - |
|
207 |
prefix = ' ';
|
| - |
|
208 |
|
| - |
|
209 |
el.textContent = prefix + vname;
|
| - |
|
210 |
el.value = vname;
|
| - |
|
211 |
if ( vname == sver )
|
| - |
|
212 |
el.selected = true;
|
| - |
|
213 |
select.appendChild(el);
|
| - |
|
214 |
}
|
| - |
|
215 |
}
|
| - |
|
216 |
}
|
| - |
|
217 |
|
| 174 |
// -->
|
218 |
// -->
|
| 175 |
</script>
|
219 |
</script>
|
| 176 |
|
220 |
|
| 177 |
</head>
|
221 |
</head>
|
| 178 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
|
222 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
|