| Line 7... |
Line 7... |
| 7 |
<!--#include file="_tabs.asp"-->
|
7 |
<!--#include file="_tabs.asp"-->
|
| 8 |
<!--#include file="_drawExtensionSelectBox.asp"-->
|
8 |
<!--#include file="_drawExtensionSelectBox.asp"-->
|
| 9 |
<!--#include file="class/classSortHelper.asp"-->
|
9 |
<!--#include file="class/classSortHelper.asp"-->
|
| 10 |
<%
|
10 |
<%
|
| 11 |
'------------ Variable Definition -------------
|
11 |
'------------ Variable Definition -------------
|
| 12 |
Dim parAuto
|
- |
|
| 13 |
Dim parPv_id
|
12 |
Dim parPv_id
|
| 14 |
Dim rsLocRel
|
13 |
Dim rsLocRel
|
| 15 |
Dim parPage_title
|
14 |
Dim parPage_title
|
| 16 |
Dim objPkgInfo
|
15 |
Dim objPkgInfo
|
| 17 |
Dim rsTemp2
|
16 |
Dim rsTemp2
|
| 18 |
Dim rsLatest
|
17 |
Dim rsLatest
|
| 19 |
Dim aVersions
|
18 |
Dim aVersions
|
| 20 |
Dim lastRow, i
|
19 |
Dim lastRow, i
|
| 21 |
Dim objSortHelper
|
20 |
Dim objSortHelper
|
| - |
|
21 |
Dim newPackage
|
| - |
|
22 |
Dim majorState
|
| - |
|
23 |
Dim minorState
|
| - |
|
24 |
Dim patchState
|
| - |
|
25 |
Dim parBase_view_id
|
| - |
|
26 |
|
| 22 |
'------------ Constants Declaration -----------
|
27 |
'------------ Constants Declaration -----------
|
| 23 |
'------------ Variable Init -------------------
|
28 |
'------------ Variable Init -------------------
|
| 24 |
parPv_id = QStrPar("pv_id")
|
29 |
parPv_id = QStrPar("pv_id")
|
| 25 |
parAuto = QStrPar("auto")
|
30 |
parBase_view_id = Request("base_view_id")
|
| - |
|
31 |
|
| 26 |
parPage_title = "NEW VERSION"
|
32 |
parPage_title = "NEW VERSION"
|
| - |
|
33 |
|
| - |
|
34 |
If ( isempty(parPv_id) OR (NOT parPv_id <> "") ) Then
|
| - |
|
35 |
newPackage = TRUE
|
| - |
|
36 |
ElseIf IsNumeric(parPv_id) Then
|
| - |
|
37 |
If (parPv_id <= 0) Then
|
| - |
|
38 |
newPackage = TRUE
|
| - |
|
39 |
End if
|
| - |
|
40 |
End if
|
| - |
|
41 |
|
| - |
|
42 |
majorState = ""
|
| - |
|
43 |
minorState = ""
|
| - |
|
44 |
patchState = "checked"
|
| - |
|
45 |
|
| 27 |
Set objPkgInfo = CreateObject("Scripting.Dictionary")
|
46 |
Set objPkgInfo = CreateObject("Scripting.Dictionary")
|
| 28 |
'-----------------------------------------------------------------------------------------------------------------------------
|
- |
|
| 29 |
Function Get_Projects
|
- |
|
| 30 |
Get_Projects = _
|
- |
|
| 31 |
" SELECT * FROM projects ORDER BY proj_name ASC"
|
- |
|
| 32 |
End Function
|
47 |
|
| 33 |
'-----------------------------------------------------------------------------------------------------------------------------
|
48 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| 34 |
Sub GetPackageInfo( nPvId, outPkgInfo )
|
49 |
Sub GetPackageInfo( nPvId, outPkgInfo )
|
| 35 |
Dim rsTemp, Query_String
|
50 |
Dim rsTemp, Query_String
|
| 36 |
If IsEmpty(nPvId) Then Exit Sub
|
51 |
If (IsEmpty(nPvId) OR newPackage) Then Exit Sub
|
| 37 |
|
52 |
|
| 38 |
Query_String = _
|
53 |
Query_String = _
|
| 39 |
" SELECT pv.pv_id, pkg.pkg_id, pkg.pkg_name, pv.pkg_version, pv.v_ext"&_
|
54 |
" SELECT pv.pv_id, pkg.pkg_id, pkg.pkg_name, pv.pkg_version, pv.v_ext"&_
|
| 40 |
" FROM packages pkg, package_versions pv"&_
|
55 |
" FROM packages pkg, package_versions pv"&_
|
| 41 |
" WHERE pkg.pkg_id = pv.pkg_id AND pv.pv_id ="& nPvId
|
56 |
" WHERE pkg.pkg_id = pv.pkg_id AND pv.pv_id ="& nPvId
|
| Line 116... |
Line 131... |
| 116 |
re.Pattern = "^\d+\.\d+\.\d{4,}\.[^\.]+$"
|
131 |
re.Pattern = "^\d+\.\d+\.\d{4,}\.[^\.]+$"
|
| 117 |
HasWellFormedVersion = re.Test(aversion)
|
132 |
HasWellFormedVersion = re.Test(aversion)
|
| 118 |
Set re = Nothing
|
133 |
Set re = Nothing
|
| 119 |
End Function
|
134 |
End Function
|
| 120 |
|
135 |
|
| - |
|
136 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| - |
|
137 |
Sub Get_All_Base_Views ( NNnewgroup_id )
|
| - |
|
138 |
Dim rsTemp, Query_String
|
| - |
|
139 |
|
| - |
|
140 |
Query_String = _
|
| - |
|
141 |
" SELECT vi.view_id, vi.view_name "&_
|
| - |
|
142 |
" FROM views vi "&_
|
| - |
|
143 |
" WHERE UPPER(vi.base_view) = 'Y'"&_
|
| - |
|
144 |
" ORDER BY vi.view_name ASC"
|
| - |
|
145 |
|
| - |
|
146 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| - |
|
147 |
|
| - |
|
148 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
| - |
|
149 |
If NNnewgroup_id = Cstr( rsTemp.Fields("view_id")) Then
|
| - |
|
150 |
Response.write "<option value='"& rsTemp("view_id") &"' selected>"& rsTemp("view_name") &"</option>"
|
| - |
|
151 |
Else
|
| - |
|
152 |
Response.write "<option value='"& rsTemp("view_id") &"'>" & rsTemp("view_name") &"</option>"
|
| - |
|
153 |
End If
|
| 121 |
|
154 |
|
| - |
|
155 |
rsTemp.MoveNext
|
| - |
|
156 |
WEnd
|
| - |
|
157 |
|
| - |
|
158 |
rsTemp.Close
|
| - |
|
159 |
Set rsTemp = nothing
|
| - |
|
160 |
End Sub
|
| 122 |
'-----------------------------------------------------------------------------------------------------------------------------
|
161 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| - |
|
162 |
Sub Get_All_Personal_Views ( NNuser_id )
|
| - |
|
163 |
Dim rsTemp, Query_String
|
| - |
|
164 |
If NNuser_id = "" Then Exit Sub
|
| - |
|
165 |
|
| - |
|
166 |
Query_String = _
|
| - |
|
167 |
" SELECT vi.view_id, vi.view_name"&_
|
| - |
|
168 |
" FROM view_settings vs,"&_
|
| - |
|
169 |
" views vi"&_
|
| - |
|
170 |
" WHERE vs.view_id = vi.view_id"&_
|
| - |
|
171 |
" AND vs.user_id = vi.owner_id "&_
|
| - |
|
172 |
" AND vs.user_id = "& NNuser_id &_
|
| - |
|
173 |
" AND vi.base_view = 'N'"&_
|
| - |
|
174 |
" ORDER BY UPPER(vi.view_name)"
|
| - |
|
175 |
|
| - |
|
176 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
| - |
|
177 |
|
| - |
|
178 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
| - |
|
179 |
Response.write "<option value='"& rsTemp.Fields("view_id") &"'>"& rsTemp.Fields("view_name") &"</option>"
|
| - |
|
180 |
|
| - |
|
181 |
rsTemp.MoveNext
|
| - |
|
182 |
WEnd
|
| - |
|
183 |
|
| - |
|
184 |
rsTemp.Close
|
| - |
|
185 |
Set rsTemp = nothing
|
| - |
|
186 |
End Sub
|
| - |
|
187 |
'-----------------------------------------------------------------------------------------------------------------------------
|
| - |
|
188 |
|
| 123 |
%>
|
189 |
%>
|
| 124 |
<%
|
190 |
<%
|
| 125 |
'===================== MAIN LINE ============================
|
191 |
'===================== MAIN LINE ============================
|
| 126 |
Call GetPackageInfo( parPv_id, objPkgInfo )
|
- |
|
| 127 |
Dim bDisableAuto, bPatchOnly, bIsCots
|
192 |
Dim bDisableAuto, bPatchOnly, bIsCots, bIsAuto
|
| 128 |
|
193 |
|
| - |
|
194 |
If NOT newPackage Then
|
| 129 |
|
195 |
|
| - |
|
196 |
Call GetPackageInfo( parPv_id, objPkgInfo )
|
| - |
|
197 |
|
| 130 |
bIsCots = HasCotsExtension(objPkgInfo.Item("pkg_version"))
|
198 |
bIsCots = HasCotsExtension(objPkgInfo.Item("pkg_version"))
|
| 131 |
'Disable the "Auto" build option if the package is a COTS package and the version doesn't have a patch-build number.
|
199 |
'Disable the "Auto" build option if the package is a COTS package and the version doesn't have a patch-build number.
|
| 132 |
bDisableAuto = bIsCots and not HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
|
200 |
bDisableAuto = bIsCots and not HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
|
| 133 |
'Enable only the "Patch Change" option if the package is a COTS package and the version has a patch-build number.
|
201 |
'Enable only the "Patch Change" option if the package is a COTS package and the version has a patch-build number.
|
| 134 |
bPatchOnly = bIsCots and not HasWellFormedVersion(objPkgInfo.Item("pkg_version")) and HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
|
202 |
bPatchOnly = bIsCots and not HasWellFormedVersion(objPkgInfo.Item("pkg_version")) and HasPatchBuildNumber(objPkgInfo.Item("pkg_version"))
|
| 135 |
|
203 |
|
| 136 |
'if "Auto" build option is disabled then select the Manual option
|
204 |
'if "Auto" build option is disabled then select the Manual option
|
| 137 |
If bDisableAuto Then
|
205 |
If bDisableAuto Then
|
| 138 |
parAuto = "0"
|
206 |
bIsAuto = FALSE
|
| 139 |
'else default to Auto
|
207 |
'else default to Auto
|
| - |
|
208 |
Else
|
| - |
|
209 |
bIsAuto = TRUE
|
| - |
|
210 |
End If
|
| - |
|
211 |
End If
|
| - |
|
212 |
|
| 140 |
ElseIf IsNull(parAuto) OR parAuto = "" Then
|
213 |
' If New Package and First version
|
| - |
|
214 |
If newPackage Then
|
| - |
|
215 |
parPage_title = "NEW PACKAGE and FIRST VERSION"
|
| - |
|
216 |
bIsCots = FALSE
|
| - |
|
217 |
bDisableAuto = FALSE
|
| - |
|
218 |
bPatchOnly = FALSE
|
| 141 |
parAuto = "1"
|
219 |
bIsAuto = TRUE
|
| - |
|
220 |
majorState = "checked"
|
| - |
|
221 |
minorState = ""
|
| - |
|
222 |
patchState = ""
|
| 142 |
End If
|
223 |
End If
|
| - |
|
224 |
|
| 143 |
'============================================================
|
225 |
'============================================================
|
| 144 |
%>
|
226 |
%>
|
| 145 |
<script language="JavaScript" type="text/JavaScript">
|
227 |
<script language="JavaScript" type="text/JavaScript">
|
| 146 |
<!--
|
228 |
<!--
|
| - |
|
229 |
var savedVersion;
|
| 147 |
|
230 |
|
| 148 |
/*
|
- |
|
| 149 |
Summary of Javascript functionality implemented by Haydon Knight for DEVI-044075 and DEVI-043066:
|
- |
|
| 150 |
|
- |
|
| 151 |
The form 'NEWVersion' invokes _new_version.asp when submitted. The value of the FRnewver input box (which is hidden) is passed
|
- |
|
| 152 |
through to _new_version.asp. This value stores the full version number+extension.
|
- |
|
| 153 |
The full version (that displayed and that stored in FRnewver) is updated by updateFullVersion(), which is invoked whenever the user
|
- |
|
| 154 |
changes the version base-number or version extension via any of:
|
- |
|
| 155 |
|
- |
|
| 156 |
1. altering the value of the 'inputVersionNumber' text entry box
|
- |
|
| 157 |
2. changing the extension via the 'v_ext' select pull-down menu.
|
- |
|
| 158 |
|
- |
|
| 159 |
The radio button to select auto/manual is 'build_type', and a value of 'M' = manual and 'A' = auto. Changing what is selected
|
- |
|
| 160 |
invokes changeToAutoVersionNumberAssignment() or changeToManualVersionNumberAssignment(), which re-builds the form on the server
|
- |
|
| 161 |
with the appropriate query string value to indicate the build type.
|
- |
|
| 162 |
*/
|
- |
|
| 163 |
|
- |
|
| 164 |
window.onload = function()
|
231 |
window.onload = function(e)
|
| 165 |
{
|
232 |
{
|
| 166 |
var fullVersion = "<%=objPkgInfo.Item("pkg_version")%>";
|
- |
|
| 167 |
var versionExt = "<%=objPkgInfo.Item("v_ext")%>";
|
- |
|
| 168 |
|
- |
|
| 169 |
var isAutobuild = document.NEWversion.build_type[0].checked;
|
233 |
var isAutobuild = document.NEWversion.build_type[0].checked;
|
| 170 |
if (!isAutobuild)
|
234 |
if (!isAutobuild)
|
| 171 |
{
|
235 |
{
|
| 172 |
// We only update inputVersionNumber field on page load, for manual builds
|
- |
|
| 173 |
if (versionExt.length == 0)
|
- |
|
| 174 |
{
|
- |
|
| 175 |
// is probably an old package version that was made in the days before we enforced all package versions
|
- |
|
| 176 |
// to have an extension.
|
- |
|
| 177 |
document.all['inputVersionNumber'].value = fullVersion;
|
236 |
changeToManualVersionNumberAssignment();
|
| 178 |
}
|
237 |
}
|
| 179 |
else
|
238 |
else
|
| 180 |
{
|
239 |
{
|
| 181 |
// strip extension
|
240 |
changeToAutoVersionNumberAssignment();
|
| 182 |
document.all['inputVersionNumber'].value = fullVersion.replace( /(.*)\..*/, "$1");
|
- |
|
| 183 |
}
|
- |
|
| 184 |
}
|
241 |
}
|
| 185 |
|
- |
|
| 186 |
// update FRnewver field from inputVersionNumber and v_ext fields
|
- |
|
| 187 |
updateFullVersion();
|
- |
|
| 188 |
}
|
- |
|
| 189 |
|
- |
|
| 190 |
//////////////////////////////////////////////////////////////////
|
- |
|
| 191 |
// Function: updateFullVersion
|
- |
|
| 192 |
//
|
- |
|
| 193 |
// Purpose: Updates the version displayed at the bottom of the window, as well as the FRnewver field that is
|
- |
|
| 194 |
// passed through to the _new_version.asp script
|
- |
|
| 195 |
//
|
- |
|
| 196 |
// Arguments: none
|
- |
|
| 197 |
//
|
- |
|
| 198 |
// Returns: none
|
- |
|
| 199 |
//
|
- |
|
| 200 |
// Notes: When the user updates the "version base" text field this function is called
|
- |
|
| 201 |
//
|
- |
|
| 202 |
function updateFullVersion()
|
- |
|
| 203 |
{
|
- |
|
| 204 |
document.all['FRnewver'].value = getFullVersion();
|
- |
|
| 205 |
}
|
- |
|
| 206 |
|
- |
|
| 207 |
|
- |
|
| 208 |
//////////////////////////////////////////////////////////////////
|
- |
|
| 209 |
// Function: getVersionBase
|
- |
|
| 210 |
//
|
- |
|
| 211 |
// Purpose: Works out what the version base is based on user input
|
- |
|
| 212 |
//
|
- |
|
| 213 |
// Arguments: none
|
- |
|
| 214 |
//
|
- |
|
| 215 |
// Returns: versionBase - a number of the form n.n.n where 'n' is an integer (.e.g. 1.2.3000)
|
- |
|
| 216 |
//
|
- |
|
| 217 |
// Notes: If auto just returns ("auto")
|
- |
|
| 218 |
//
|
- |
|
| 219 |
function getVersionBase()
|
- |
|
| 220 |
{
|
- |
|
| 221 |
var isAutobuild = document.NEWversion.build_type[0].checked;
|
- |
|
| 222 |
|
- |
|
| 223 |
if( isAutobuild )
|
- |
|
| 224 |
return "(auto)";
|
- |
|
| 225 |
|
- |
|
| 226 |
return document.all['inputVersionNumber'].value;
|
- |
|
| 227 |
}
|
242 |
}
|
| 228 |
|
243 |
|
| 229 |
|
- |
|
| 230 |
//////////////////////////////////////////////////////////////////
|
- |
|
| 231 |
// Function: getFullVersion
|
- |
|
| 232 |
//
|
- |
|
| 233 |
// Purpose: Returns the full version based on the user input
|
- |
|
| 234 |
//
|
- |
|
| 235 |
// Arguments: none
|
- |
|
| 236 |
//
|
- |
|
| 237 |
// Returns: fullVersion - e.g. "1.2.3.cr"
|
- |
|
| 238 |
//
|
- |
|
| 239 |
// Notes:
|
- |
|
| 240 |
//
|
- |
|
| 241 |
function getFullVersion()
|
- |
|
| 242 |
{
|
- |
|
| 243 |
var versionBase = getVersionBase();
|
- |
|
| 244 |
var versionExt = document.all['v_ext'].value;
|
- |
|
| 245 |
return versionBase + versionExt;
|
- |
|
| 246 |
}
|
- |
|
| 247 |
|
- |
|
| 248 |
|
- |
|
| 249 |
//////////////////////////////////////////////////////////////////
|
244 |
//////////////////////////////////////////////////////////////////
|
| 250 |
// Function: changeToAutoVersionNumberAssignment
|
245 |
// Function: changeToAutoVersionNumberAssignment
|
| 251 |
//
|
246 |
//
|
| 252 |
// Purpose: Re-loads the form for use in auto version number assignment
|
247 |
// Purpose: Hide the relevent sections of the form
|
| 253 |
//
|
- |
|
| 254 |
// Arguments: None
|
- |
|
| 255 |
//
|
- |
|
| 256 |
// Returns: none
|
- |
|
| 257 |
//
|
248 |
//
|
| 258 |
function changeToAutoVersionNumberAssignment()
|
249 |
function changeToAutoVersionNumberAssignment()
|
| 259 |
{
|
250 |
{
|
| - |
|
251 |
document.getElementById('change_type').style.display = 'table-row';
|
| - |
|
252 |
//document.getElementById('pkgver').style.display = 'none';
|
| - |
|
253 |
savedVersion = document.getElementById('inputVersionNumber').value;
|
| - |
|
254 |
document.getElementById('inputVersionNumber').disabled = true;
|
| 260 |
window.location.href = 'form_new_version.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&auto=1';
|
255 |
document.getElementById('inputVersionNumber').value = '(auto)';
|
| 261 |
}
|
256 |
}
|
| 262 |
|
257 |
|
| 263 |
//////////////////////////////////////////////////////////////////
|
258 |
//////////////////////////////////////////////////////////////////
|
| 264 |
// Function: changeToManualVersionNumberAssignment
|
259 |
// Function: changeToManualVersionNumberAssignment
|
| 265 |
//
|
260 |
//
|
| 266 |
// Purpose: Re-loads the form for use in manual version number assignment
|
261 |
// Purpose: Show the relevent sections of the form
|
| 267 |
//
|
- |
|
| 268 |
// Arguments: None
|
- |
|
| 269 |
//
|
- |
|
| 270 |
// Returns: none
|
- |
|
| 271 |
//
|
262 |
//
|
| 272 |
function changeToManualVersionNumberAssignment()
|
263 |
function changeToManualVersionNumberAssignment()
|
| 273 |
{
|
264 |
{
|
| - |
|
265 |
var f;
|
| - |
|
266 |
document.getElementById('change_type').style.display = 'none';
|
| - |
|
267 |
document.getElementById('pkgver').style.display = 'table-row';
|
| - |
|
268 |
document.getElementById('inputVersionNumber').disabled = false;
|
| 274 |
window.location.href = 'form_new_version.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>&auto=0';
|
269 |
document.getElementById('inputVersionNumber').value = savedVersion;
|
| 275 |
}
|
270 |
}
|
| 276 |
|
271 |
|
| 277 |
|
272 |
|
| 278 |
// Do not remove these next few lines, otherwise the page does not load properly in Microsoft IE.
|
273 |
// Do not remove these next few lines, otherwise the page does not load properly in Microsoft IE.
|
| 279 |
//-->
|
274 |
//-->
|
| Line 286... |
Line 281... |
| 286 |
{
|
281 |
{
|
| 287 |
parent.window.location.href="dependencies.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>";
|
282 |
parent.window.location.href="dependencies.asp?rtag_id=<%=parRtag_id%>&pv_id=<%=parPv_id%>";
|
| 288 |
}
|
283 |
}
|
| 289 |
|
284 |
|
| 290 |
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
285 |
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 291 |
// This function returns true if version is ok, else false
|
- |
|
| 292 |
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
- |
|
| 293 |
function checkVersion()
|
- |
|
| 294 |
{
|
- |
|
| 295 |
var fullVersion = document.all['FRnewver'].value;
|
- |
|
| 296 |
|
- |
|
| 297 |
var versionBase = fullVersion.replace( /(.*)(\..*)/, "$1");
|
- |
|
| 298 |
var versionExt = fullVersion.replace( /(.*)(\..*)/, "$2");
|
- |
|
| 299 |
|
- |
|
| 300 |
var isAutobuild = document.NEWversion.build_type[0].checked;
|
- |
|
| 301 |
|
- |
|
| 302 |
return MM_ValidateVersion(null, versionBase, versionExt, isAutobuild, false);
|
- |
|
| 303 |
}
|
- |
|
| 304 |
|
- |
|
| 305 |
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
- |
|
| 306 |
// This function returns true if form validation passes, else false
|
286 |
// This function returns true if form validation passes, else false
|
| 307 |
// It is called when a user hits the submit button.
|
287 |
// It is called when a user hits the submit button.
|
| 308 |
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
288 |
////////////////////////////////////////////////////////////////////////////////////////////////////////
|
| 309 |
function validateFormNEWversion()
|
289 |
function validateFormNEWversion()
|
| 310 |
{
|
290 |
{
|
| Line 312... |
Line 292... |
| 312 |
|
292 |
|
| 313 |
if (f == null)
|
293 |
if (f == null)
|
| 314 |
alert('Failed To Get NEWversion'); // should never happen unless a coding/rendering mistake is made?
|
294 |
alert('Failed To Get NEWversion'); // should never happen unless a coding/rendering mistake is made?
|
| 315 |
else
|
295 |
else
|
| 316 |
{
|
296 |
{
|
| - |
|
297 |
// Check Package Name exists - only for new packages
|
| - |
|
298 |
if ( f.newPackage.value )
|
| - |
|
299 |
{
|
| - |
|
300 |
MM_validateForm('inputPackageName','Package Name','RisPackage');
|
| - |
|
301 |
if ( ! document.MM_returnValue )
|
| - |
|
302 |
{
|
| - |
|
303 |
return false;
|
| - |
|
304 |
}
|
| - |
|
305 |
// Ensure that a Base View has been selected
|
| - |
|
306 |
MM_validateForm('base_view_id','Base View','R');
|
| - |
|
307 |
if ( ! document.MM_returnValue )
|
| - |
|
308 |
{
|
| - |
|
309 |
return false;
|
| - |
|
310 |
}
|
| - |
|
311 |
}
|
| - |
|
312 |
|
| 317 |
// check the version number is good
|
313 |
// check the version number is good
|
| - |
|
314 |
|
| - |
|
315 |
// Get Full version - store into hidden field processing
|
| - |
|
316 |
var versionExt = document.all['v_ext'].value;
|
| - |
|
317 |
var versionBase = document.all['inputVersionNumber'].value;
|
| 318 |
document.MM_returnValue = checkVersion();
|
318 |
document.all['FRnewver'].value = versionBase + versionExt;
|
| - |
|
319 |
|
| - |
|
320 |
var isAutobuild = document.NEWversion.build_type[0].checked;
|
| - |
|
321 |
document.MM_returnValue = MM_ValidateVersion(null, versionBase, versionExt, isAutobuild, false);
|
| - |
|
322 |
|
| 319 |
if (document.MM_returnValue)
|
323 |
if (document.MM_returnValue)
|
| 320 |
{
|
324 |
{
|
| 321 |
// check the reason for change is good
|
325 |
// check the reason for change is good
|
| 322 |
// NOTE: MM_validateForm returns its result through MM_returnValue : true if validation passes, else false
|
326 |
// NOTE: MM_validateForm returns its result through MM_returnValue : true if validation passes, else false
|
| 323 |
MM_validateForm('FRreason','Reason for This Version','maxLength:4000');
|
327 |
MM_validateForm('FRreason','Reason for This Version','maxLength:4000');
|
| Line 377... |
Line 381... |
| 377 |
</tr>
|
381 |
</tr>
|
| 378 |
<tr>
|
382 |
<tr>
|
| 379 |
<td width="1%"> </td>
|
383 |
<td width="1%"> </td>
|
| 380 |
<td colspan="2" width="1%" nowrap class="form_field">
|
384 |
<td colspan="2" width="1%" nowrap class="form_field">
|
| 381 |
<table width="100%" border="0" cellspacing="1" cellpadding="5">
|
385 |
<table width="100%" border="0" cellspacing="1" cellpadding="5">
|
| - |
|
386 |
|
| - |
|
387 |
<!-- Package Name -->
|
| 382 |
<tr>
|
388 |
<tr>
|
| 383 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">Package Name</td>
|
389 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">Package Name</td>
|
| - |
|
390 |
<% if newPackage Then %>
|
| - |
|
391 |
<td background="images/bg_form_lightgray.gif" class="form_item">
|
| - |
|
392 |
<input type="text" id="inputPackageName" name="inputPackageName" class="form_item" size="40">
|
| - |
|
393 |
</td>
|
| - |
|
394 |
<% Else %>
|
| 384 |
<td background="images/bg_form_lightgray.gif" class="form_field"><%=objPkgInfo.Item("pkg_name")%></td>
|
395 |
<td background="images/bg_form_lightgray.gif" class="form_field"><%=objPkgInfo.Item("pkg_name")%></td>
|
| - |
|
396 |
<% End If %>
|
| 385 |
</tr>
|
397 |
</tr>
|
| - |
|
398 |
|
| - |
|
399 |
<!--Base View -------------->
|
| - |
|
400 |
<% if newPackage Then %>
|
| - |
|
401 |
<tr>
|
| - |
|
402 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">To Base View</td>
|
| - |
|
403 |
<td colspan="2" width="1%" nowrap background="images/bg_form_lightgray.gif">
|
| - |
|
404 |
<select name="base_view_id" id="base_view_id" class="form_item">
|
| - |
|
405 |
<option></option>
|
| - |
|
406 |
<%Call Get_All_Base_Views(parBase_view_id)%>
|
| - |
|
407 |
</select>
|
| - |
|
408 |
</td>
|
| - |
|
409 |
</tr>
|
| - |
|
410 |
|
| - |
|
411 |
<!--Personal View -------------->
|
| - |
|
412 |
<tr>
|
| - |
|
413 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">To Personal View</td>
|
| - |
|
414 |
<td colspan="2" width="1%" nowrap background="images/bg_form_lightgray.gif">
|
| - |
|
415 |
<select name="personal_view_id" class="form_item">
|
| - |
|
416 |
<option value="">None</option>
|
| - |
|
417 |
<%Call Get_All_Personal_Views(objAccessControl.UserId )%>
|
| - |
|
418 |
</select>
|
| - |
|
419 |
</td>
|
| - |
|
420 |
</tr>
|
| - |
|
421 |
|
| - |
|
422 |
<!--Dummy Line to highlight New Package Data -------------->
|
| - |
|
423 |
<tr>
|
| - |
|
424 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field"></td>
|
| - |
|
425 |
<td background="images/bg_form_lightbluedark.gif" class="form_field"></td>
|
| - |
|
426 |
</tr>
|
| - |
|
427 |
<% End If %>
|
| - |
|
428 |
|
| - |
|
429 |
<!--Version Number Assignment -------------->
|
| 386 |
<tr>
|
430 |
<tr>
|
| 387 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">Version Number Assignment</td>
|
431 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">Version Number Assignment</td>
|
| 388 |
<td background="images/bg_form_lightgray.gif" class="form_txt">
|
432 |
<td background="images/bg_form_lightgray.gif" class="form_txt">
|
| 389 |
|
- |
|
| - |
|
433 |
<%
|
| - |
|
434 |
Dim flagAuto, flagMan
|
| 390 |
<%If bDisableAuto Then%>
|
435 |
if bDisableAuto Then
|
| 391 |
<input name="build_type" id="build_type" type="radio" value="A" disabled onclick="changeToAutoVersionNumberAssignment();"> Auto
|
436 |
flagAuto = "disabled"
|
| 392 |
<input name="build_type" id="build_type" type="radio" value="M" checked onclick="changeToManualVersionNumberAssignment();"> Manual
|
437 |
flagMan = "checked"
|
| 393 |
<%Else%>
|
438 |
Else
|
| 394 |
<%If parAuto = "1" Then%>
|
439 |
If bIsAuto Then
|
| 395 |
<input name="build_type" id="build_type" type="radio" value="A" checked onclick="changeToAutoVersionNumberAssignment();"> Auto
|
440 |
flagAuto = "checked"
|
| - |
|
441 |
flagMan = ""
|
| - |
|
442 |
Else
|
| - |
|
443 |
flagAuto = ""
|
| - |
|
444 |
flagMan = "checked"
|
| - |
|
445 |
End if
|
| - |
|
446 |
End if
|
| - |
|
447 |
%>
|
| - |
|
448 |
<table>
|
| - |
|
449 |
<tr>
|
| 396 |
<input name="build_type" id="build_type" type="radio" value="M" onclick="changeToManualVersionNumberAssignment();"> Manual
|
450 |
<td background="images/bg_form_lightgray.gif" class="form_txt">
|
| 397 |
<%Else%>
|
451 |
|
| 398 |
<input name="build_type" id="build_type" type="radio" value="A" onclick="changeToAutoVersionNumberAssignment();"> Auto
|
452 |
<input name="build_type" id="build_type" type="radio" value="A" <%=flagAuto%> onclick="changeToAutoVersionNumberAssignment();"> Auto
|
| 399 |
<input name="build_type" id="build_type" type="radio" value="M" checked onclick="changeToManualVersionNumberAssignment();"> Manual
|
453 |
<input name="build_type" id="build_type" type="radio" value="M" <%=flagMan%> onclick="changeToManualVersionNumberAssignment();"> Manual
|
| 400 |
<%End If%>
|
454 |
</td>
|
| 401 |
<%End If%>
|
455 |
</table>
|
| 402 |
</td>
|
456 |
</td>
|
| 403 |
</tr>
|
457 |
</tr>
|
| 404 |
</table>
|
- |
|
| 405 |
|
458 |
|
| 406 |
<table width="100%" border="0" cellspacing="0" cellpadding="5">
|
459 |
<!-- New Version Number -->
|
| 407 |
<tr>
|
460 |
<tr>
|
| 408 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">New Version Number</td>
|
461 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">New Version Number</td>
|
| - |
|
462 |
<td>
|
| - |
|
463 |
<table>
|
| - |
|
464 |
<tr>
|
| 409 |
<td background="images/bg_form_lightgray.gif" class="form_item">
|
465 |
<td background="images/bg_form_lightgray.gif" class="form_item">
|
| - |
|
466 |
<input type="text" id="inputVersionNumber"
|
| - |
|
467 |
name="inputVersionNumber"
|
| - |
|
468 |
class="form_item" size="12">
|
| - |
|
469 |
</td>
|
| - |
|
470 |
<td id="pkgver" background="images/bg_form_lightgray.gif" class="form_item">
|
| 410 |
<%If parAuto = "0" Then%>
|
471 |
<%If NOT newPackage Then%>
|
| 411 |
<input type="text" id="inputVersionNumber" name="inputVersionNumber" class="form_item" size="12" onmouseout="updateFullVersion();" onblur="updateFullVersion();" onclick="updateFullVersion();" onmouseup="updateFullVersion();" onchange="updateFullVersion();" onkeyup="updateFullVersion();">
|
472 |
<select id="FRpkgver" name="FRpkgver" class="form_item">
|
| - |
|
473 |
<option value=""></option>
|
| 412 |
<%Else%>
|
474 |
<%
|
| - |
|
475 |
Set rsLatest = OraDatabase.DbCreateDynaset( Get_Latest_All_Ext( objPkgInfo.Item("pkg_id"), parPv_id ), cint(0))
|
| - |
|
476 |
|
| - |
|
477 |
If rsLatest.RecordCount > 0 Then
|
| - |
|
478 |
aVersions = rsLatest.GetRows()
|
| - |
|
479 |
lastRow = UBound( aVersions, 2 )
|
| - |
|
480 |
Set objSortHelper = New SortHelper
|
| - |
|
481 |
|
| - |
|
482 |
' Sort versions
|
| 413 |
<input type="text" id="inputVersionNumber" name="inputVersionNumber" class="form_item" size="12" value="(auto)" disabled>
|
483 |
Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsLatest.FieldIndex("pkg_version") )
|
| - |
|
484 |
|
| - |
|
485 |
' Descending order
|
| - |
|
486 |
For i = lastRow To 0 Step -1
|
| - |
|
487 |
%>
|
| - |
|
488 |
<option value="<%=aVersions( rsLatest.FieldIndex("pkg_version"), i )%>" <%=aVersions( rsLatest.FieldIndex("selected"), i )%>>
|
| - |
|
489 |
<%If aVersions( rsLatest.FieldIndex("dlocked"), i ) = "Y" Then%>
|
| - |
|
490 |
R
|
| - |
|
491 |
<%Else%>
|
| - |
|
492 |
|
| - |
|
493 |
<%End If%>
|
| - |
|
494 |
<%=aVersions( rsLatest.FieldIndex("pkg_version"), i )%>
|
| - |
|
495 |
</option>
|
| - |
|
496 |
<%
|
| - |
|
497 |
Next
|
| - |
|
498 |
Set objSortHelper = nothing
|
| - |
|
499 |
|
| - |
|
500 |
End If
|
| - |
|
501 |
%>
|
| - |
|
502 |
</select> Existing Versions (For Reference Only)
|
| 414 |
<%End If%>
|
503 |
<%End If%>
|
| - |
|
504 |
</td>
|
| - |
|
505 |
</tr>
|
| - |
|
506 |
</table>
|
| 415 |
</td>
|
507 |
</td>
|
| 416 |
<%If parAuto = "0" Then%>
|
- |
|
| 417 |
<td background="images/bg_form_lightgray.gif" class="form_item">
|
- |
|
| 418 |
<select id="FRpkgver" name="FRpkgver" class="form_item">
|
- |
|
| 419 |
<option value=""></option>
|
- |
|
| 420 |
<%
|
- |
|
| 421 |
Set rsLatest = OraDatabase.DbCreateDynaset( Get_Latest_All_Ext( objPkgInfo.Item("pkg_id"), parPv_id ), cint(0))
|
- |
|
| 422 |
|
- |
|
| 423 |
If rsLatest.RecordCount > 0 Then
|
- |
|
| 424 |
aVersions = rsLatest.GetRows()
|
- |
|
| 425 |
lastRow = UBound( aVersions, 2 )
|
- |
|
| 426 |
|
- |
|
| 427 |
Set objSortHelper = New SortHelper
|
- |
|
| 428 |
|
- |
|
| 429 |
' Sort versions
|
- |
|
| 430 |
Call objSortHelper.VersionSort( aVersions, 0, lastRow, rsLatest.FieldIndex("pkg_version") )
|
- |
|
| 431 |
|
- |
|
| 432 |
' Descending order
|
- |
|
| 433 |
For i = lastRow To 0 Step -1
|
- |
|
| 434 |
%>
|
- |
|
| 435 |
<option value="<%=aVersions( rsLatest.FieldIndex("pkg_version"), i )%>" <%=aVersions( rsLatest.FieldIndex("selected"), i )%>>
|
- |
|
| 436 |
<%If aVersions( rsLatest.FieldIndex("dlocked"), i ) = "Y" Then%>
|
- |
|
| 437 |
R
|
- |
|
| 438 |
<%Else%>
|
- |
|
| 439 |
|
- |
|
| 440 |
<%End If%>
|
- |
|
| 441 |
<%=aVersions( rsLatest.FieldIndex("pkg_version"), i )%>
|
- |
|
| 442 |
</option>
|
- |
|
| 443 |
<%
|
- |
|
| 444 |
Next
|
- |
|
| 445 |
|
- |
|
| 446 |
Set objSortHelper = nothing
|
- |
|
| 447 |
|
- |
|
| 448 |
End If
|
- |
|
| 449 |
%>
|
- |
|
| 450 |
</select> Existing Versions (For Reference Only)
|
- |
|
| 451 |
</td>
|
- |
|
| 452 |
<%End If%>
|
- |
|
| 453 |
</tr>
|
508 |
</tr>
|
| 454 |
</table>
|
- |
|
| 455 |
|
- |
|
| 456 |
<table width="100%" border="0" cellspacing="1" cellpadding="5">
|
- |
|
| 457 |
<tr>
|
509 |
<tr>
|
| 458 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">Version Extension</td>
|
510 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">Version Extension</td>
|
| 459 |
<td background="images/bg_form_lightgray.gif" class="form_item">
|
511 |
<td background="images/bg_form_lightgray.gif" class="form_item">
|
| 460 |
<DIV id="divVersionExt" name="divVersionExt">
|
512 |
<DIV id="divVersionExt" name="divVersionExt">
|
| 461 |
<select name="v_ext" id="v_ext" onchange="updateFullVersion();">
|
513 |
<select name="v_ext" id="v_ext">
|
| 462 |
<%
|
514 |
<%
|
| 463 |
Call drawExtensionSelectBox( objPkgInfo.Item("v_ext"), true )
|
515 |
Call drawExtensionSelectBox( objPkgInfo.Item("v_ext"), true )
|
| 464 |
%>
|
516 |
%>
|
| 465 |
</select>
|
517 |
</select>
|
| 466 |
</DIV>
|
518 |
</DIV>
|
| Line 471... |
Line 523... |
| 471 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">Reason For This Version</td>
|
523 |
<td background="images/bg_form_lightbluedark.gif" width="20%" class="form_field">Reason For This Version</td>
|
| 472 |
<td background="images/bg_form_lightgray.gif" nowrap width="100%" class="form_field">
|
524 |
<td background="images/bg_form_lightgray.gif" nowrap width="100%" class="form_field">
|
| 473 |
<textarea name="FRreason" class="form_item" style="width: 420px; height: 150px"></textarea>
|
525 |
<textarea name="FRreason" class="form_item" style="width: 420px; height: 150px"></textarea>
|
| 474 |
</td>
|
526 |
</td>
|
| 475 |
</tr>
|
527 |
</tr>
|
| 476 |
</table>
|
- |
|
| 477 |
|
528 |
|
| 478 |
<%If parAuto = "1" Then%>
|
- |
|
| 479 |
<table width="100%" border="0" cellspacing="0" cellpadding="5">
|
- |
|
| 480 |
<tr>
|
529 |
<tr id="change_type">
|
| 481 |
<td background="images/bg_form_lightbluedark.gif" nowrap width="20%" class="form_field">Change Type</td>
|
530 |
<td background="images/bg_form_lightbluedark.gif" nowrap width="20%" class="form_field">Change Type</td>
|
| 482 |
<td background="images/bg_form_lightgray.gif" >
|
531 |
<td background="images/bg_form_lightgray.gif" >
|
| 483 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
532 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
| 484 |
<tr>
|
533 |
<tr>
|
| 485 |
<td width="1%">
|
534 |
<td width="1%">
|
| 486 |
<%If bPatchOnly Then%>
|
535 |
<%If bPatchOnly Then majorState = "disabled" %>
|
| 487 |
<input name="change_type" type="radio" value="M" disabled>
|
536 |
<input name="change_type" type="radio" value="M" <%=majorState%>>
|
| 488 |
<%Else%>
|
- |
|
| 489 |
<input name="change_type" type="radio" value="M">
|
- |
|
| 490 |
<%End If%>
|
- |
|
| 491 |
</td>
|
537 |
</td>
|
| 492 |
<td nowrap>
|
538 |
<td nowrap>
|
| 493 |
<span class="form_field">Major Change</span>
|
539 |
<span class="form_field">Major Change</span>
|
| 494 |
</td>
|
540 |
</td>
|
| 495 |
<td> </td>
|
541 |
<td> </td>
|
| 496 |
<td>
|
542 |
<td>
|
| 497 |
<span class="form_txt">A major number change indicates the contract of the package has changed in a non-backwardly compatible manner.</span>
|
543 |
<span class="form_txt">A major number change indicates the contract of the package has changed in a non-backwardly compatible manner.</span>
|
| 498 |
</td>
|
544 |
</td>
|
| 499 |
</tr>
|
545 |
</tr>
|
| 500 |
<tr>
|
546 |
<tr>
|
| 501 |
<td colspan="4"><hr width="100%" size="1" noshade></td>
|
547 |
<td colspan="4"><hr width="100%" size="1" noshade></td>
|
| 502 |
</tr>
|
548 |
</tr>
|
| 503 |
<tr>
|
549 |
<tr>
|
| 504 |
<td width="1%">
|
550 |
<td width="1%">
|
| 505 |
<%If bPatchOnly Then%>
|
551 |
<%If bPatchOnly Then minorState = "disabled" %>
|
| 506 |
<input name="change_type" type="radio" value="N" disabled>
|
552 |
<input name="change_type" type="radio" value="N" <%=minorState%>>
|
| 507 |
<%Else%>
|
- |
|
| 508 |
<input name="change_type" type="radio" value="N">
|
- |
|
| 509 |
<%End If%>
|
- |
|
| 510 |
</td>
|
553 |
</td>
|
| 511 |
<td align="center" nowrap>
|
554 |
<td align="center" nowrap>
|
| 512 |
<span class="form_field">Minor Change</span>
|
555 |
<span class="form_field">Minor Change</span>
|
| 513 |
</td>
|
556 |
</td>
|
| 514 |
<td> </td>
|
557 |
<td> </td>
|
| 515 |
<td>
|
558 |
<td>
|
| 516 |
<span class="form_txt">A minor number change indicates the contract of the package has changed in a backwardly compatible manner.</span>
|
559 |
<span class="form_txt">A minor number change indicates the contract of the package has changed in a backwardly compatible manner.</span>
|
| 517 |
</td>
|
560 |
</td>
|
| 518 |
</tr>
|
561 |
</tr>
|
| 519 |
<tr>
|
562 |
<tr>
|
| 520 |
<td colspan="4"><hr width="100%" size="1" noshade></td>
|
563 |
<td colspan="4"><hr width="100%" size="1" noshade></td>
|
| 521 |
</tr>
|
564 |
</tr>
|
| 522 |
<tr>
|
565 |
<tr>
|
| 523 |
<td width="1%">
|
566 |
<td width="1%">
|
| 524 |
<input name="change_type" type="radio" value="P" checked>
|
567 |
<input name="change_type" type="radio" value="P" <%=patchState%>>
|
| 525 |
</td>
|
568 |
</td>
|
| 526 |
<td nowrap>
|
569 |
<td nowrap>
|
| 527 |
<span class="form_field">Patch Change</span>
|
570 |
<span class="form_field">Patch Change</span>
|
| 528 |
</td>
|
571 |
</td>
|
| 529 |
<td> </td>
|
572 |
<td> </td>
|
| 530 |
<td>
|
573 |
<td>
|
| 531 |
<span class="form_txt">A patch number change indicates the package has changed internally.</span>
|
574 |
<span class="form_txt">A patch number change indicates the package has changed internally.</span>
|
| 532 |
</td>
|
- |
|
| 533 |
</tr>
|
575 |
</td>
|
| 534 |
</table>
|
- |
|
| 535 |
|
- |
|
| 536 |
</td>
|
576 |
</tr>
|
| 537 |
</tr>
|
- |
|
| 538 |
</table>
|
577 |
</table>
|
| 539 |
<%End If%>
|
- |
|
| 540 |
|
578 |
|
| 541 |
<table width="100%" border="0" cellspacing="1" cellpadding="0">
|
579 |
</td>
|
| - |
|
580 |
</tr>
|
| 542 |
<tr>
|
581 |
<tr>
|
| 543 |
<td nowrap><img src="images/h_trsp_dot.gif" width="120" height="1"></td>
|
582 |
<td nowrap><img src="images/h_trsp_dot.gif" width="120" height="1"></td>
|
| 544 |
<td></td>
|
583 |
<td></td>
|
| 545 |
</tr>
|
584 |
</tr>
|
| 546 |
<input type="hidden" name="FRnewver" id="FRnewver" value="hello">
|
585 |
<input type="hidden" name="FRnewver" id="FRnewver" value="hello">
|
| 547 |
<input type="hidden" name="OLDpv_id" value="<%=parPv_id%>">
|
586 |
<input type="hidden" name="OLDpv_id" value="<%=parPv_id%>">
|
| 548 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
587 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
| 549 |
<input type="hidden" name="page_title" value="<%=parPage_title%>">
|
588 |
<input type="hidden" name="newPackage" value="<%=newPackage%>">
|
| 550 |
</table>
|
589 |
</table>
|
| 551 |
</td>
|
590 |
</td>
|
| 552 |
</tr>
|
591 |
</tr>
|
| 553 |
<tr>
|
592 |
<tr>
|
| 554 |
<td width="1%"> </td>
|
593 |
<td width="1%"> </td>
|