| Line 2... |
Line 2... |
| 2 |
<%
|
2 |
<%
|
| 3 |
'=====================================================
|
3 |
'=====================================================
|
| 4 |
' Reference SDK
|
4 |
' Reference SDK
|
| 5 |
' _wform_reference_sdk.asp
|
5 |
' _wform_reference_sdk.asp
|
| 6 |
'
|
6 |
'
|
| 7 |
' This page is designed to be loaded into an iframe as a form of popup
|
7 |
' This page is designed to be loaded into a <div>
|
| 8 |
' The page expects a function closeIFrame() in the parent form to handle closing
|
8 |
' It will create a modal dialog ansd do all of its work within that
|
| 9 |
'=====================================================
|
9 |
'=====================================================
|
| 10 |
%>
|
10 |
%>
|
| 11 |
<%
|
11 |
<%
|
| 12 |
Option explicit
|
12 |
Option explicit
|
| 13 |
Response.Expires = 0 ' always load the page, dont store
|
13 |
Response.Expires = 0 ' always load the page, dont store
|
| Line 17... |
Line 17... |
| 17 |
<!--#include file="common/qstr.asp"-->
|
17 |
<!--#include file="common/qstr.asp"-->
|
| 18 |
<!--#include file="common/common_subs.asp"-->
|
18 |
<!--#include file="common/common_subs.asp"-->
|
| 19 |
<!--#include file="common/common_dbedit.asp"-->
|
19 |
<!--#include file="common/common_dbedit.asp"-->
|
| 20 |
<%
|
20 |
<%
|
| 21 |
'------------ ACCESS CONTROL ------------------
|
21 |
'------------ ACCESS CONTROL ------------------
|
| 22 |
isPopupWindow = TRUE
|
- |
|
| 23 |
%>
|
22 |
%>
|
| 24 |
<!--#include file="_access_control_general.asp"-->
|
23 |
<!--#include file="_access_control_general.asp"-->
|
| 25 |
<%
|
24 |
<%
|
| 26 |
'------------ Variable Definition -------------
|
25 |
'------------ Variable Definition -------------
|
| 27 |
Dim parFRsdk_id
|
- |
|
| 28 |
Dim parFRsdktag_id
|
- |
|
| 29 |
Dim bLoggedIn, bAuthorised
|
26 |
Dim bLoggedIn, bAuthorised
|
| 30 |
|
27 |
|
| 31 |
'------------ Constants Declaration -----------
|
28 |
'------------ Constants Declaration -----------
|
| 32 |
'------------ Variable Init -------------------
|
29 |
'------------ Variable Init -------------------
|
| 33 |
parFRsdk_id = QStrPar("FRsdk_id")
|
- |
|
| 34 |
parFRsdktag_id = QStrPar("FRsdktag_id")
|
- |
|
| 35 |
If parFRsdk_id = "" Then parFRsdk_id = "-1"
|
- |
|
| 36 |
If parFRsdktag_id = "" Then parFRsdktag_id = "-1"
|
- |
|
| 37 |
bLoggedIn = objAccessControl.UserLogedIn
|
30 |
bLoggedIn = objAccessControl.UserLogedIn
|
| 38 |
bAuthorised = canActionControlInProject("CreateSdk")
|
31 |
bAuthorised = canActionControlInProject("CreateSdk")
|
| 39 |
'----------------------------------------------
|
32 |
'----------------------------------------------
|
| 40 |
%>
|
33 |
%>
|
| 41 |
<%
|
34 |
<script>
|
| 42 |
Sub Get_Projects ( NNsdk_id )
|
35 |
//# sourceURL=_wform_reference_sdk.asp
|
| 43 |
Dim rsTemp, Query_String, tempLINK, selStr
|
36 |
$( "#refSdk" ).dialog({
|
| 44 |
Query_String = "SELECT * FROM SDK_NAMES ORDER BY UPPER( SDK_NAME )"
|
- |
|
| 45 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
- |
|
| 46 |
|
- |
|
| 47 |
Response.write "<select name='FRsdk_id' onChange=""MM_jumpMenu('window',this,0)"" class='form_item'>"
|
- |
|
| 48 |
Response.write "<option disabled selected value=''>Select SDK Family</option>"
|
- |
|
| 49 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
- |
|
| 50 |
tempLINK = scriptName &"?FRsdk_id="& rsTemp.Fields("SDK_ID") &"&FRsdktag_id=&rtag_id="& parRtag_id &"&"& objPMod.ComposeURL()
|
- |
|
| 51 |
|
- |
|
| 52 |
selStr = ""
|
37 |
modal : true,
|
| 53 |
If NNsdk_id = Cstr(rsTemp.Fields("SDK_ID")) Then selStr = " selected"
|
- |
|
| 54 |
Response.write "<option value='"& tempLINK &"'" & selStr & ">"& UCase(rsTemp.Fields("SDK_NAME")) &"</option>"
|
- |
|
| 55 |
rsTemp.MoveNext
|
38 |
autoOpen : true,
|
| 56 |
WEnd
|
- |
|
| 57 |
Response.write "</select>"
|
- |
|
| 58 |
|
- |
|
| 59 |
rsTemp.Close
|
39 |
width : 450,
|
| 60 |
Set rsTemp = nothing
|
40 |
height : 250,
|
| 61 |
End Sub
|
- |
|
| 62 |
|
- |
|
| 63 |
Sub Get_Release_Labels ( NNsdk_id, NNsdktag_id )
|
41 |
position: { my: "top", at: "top+100", of: window },
|
| 64 |
Dim rsTemp, Query_String, tempLINK, selStr
|
42 |
dialogClass: "rounded_box",
|
| 65 |
Query_String = "SELECT SDKTAG_ID,SDKTAG_NAME FROM SDK_TAGS WHERE sdk_id = "& NNsdk_id &" AND SDK_STATE='R' ORDER BY UPPER(SDKTAG_NAME)"
|
- |
|
| 66 |
Set rsTemp = OraDatabase.DbCreateDynaset( Query_String, cint(0))
|
43 |
title : "Add SDK to Release",
|
| 67 |
|
- |
|
| 68 |
Response.write "<select name='FRsdktag_id' onChange=""MM_jumpMenu('window',this,0)"" class='form_item'>"
|
44 |
close: function( event, ui ) { $(this).dialog('destroy').remove();},
|
| 69 |
If NNsdk_id <> "-1" Then
|
45 |
buttons: [
|
| 70 |
Response.write "<option disabled selected value=''>Select SDK Version</option>"
|
- |
|
| 71 |
While ((NOT rsTemp.BOF) AND (NOT rsTemp.EOF))
|
46 |
<%If bLoggedIn AND bAuthorised Then%>
|
| 72 |
tempLINK = scriptName &"?FRsdktag_id="& rsTemp.Fields("sdktag_id") &"&FRsdk_id="& NNsdk_id &"&rtag_id="& parRtag_id &"&"& objPMod.ComposeURL()
|
- |
|
| 73 |
|
47 |
{
|
| 74 |
selStr = ""
|
48 |
text : 'Add',
|
| 75 |
If NNsdktag_id = Cstr(rsTemp.Fields("sdktag_id")) Then selStr = " selected"
|
49 |
click : function(){$( "#refSdk" ).submit();},
|
| 76 |
Response.write "<option value='"& tempLINK &"'" & selStr & ">"& (rsTemp.Fields("sdktag_name")) &"</option>"
|
- |
|
| 77 |
rsTemp.MoveNext
|
50 |
},
|
| 78 |
WEnd
|
51 |
<%End If%>
|
| 79 |
End If
|
52 |
{
|
| 80 |
Response.write "</select>"
|
53 |
text : 'Cancel',
|
| 81 |
|
- |
|
| 82 |
rsTemp.Close
|
54 |
click : function(){ $(this).dialog('close');},
|
| 83 |
Set rsTemp = nothing
|
55 |
},
|
| 84 |
End Sub
|
56 |
],
|
| 85 |
|
57 |
|
| - |
|
58 |
});
|
| - |
|
59 |
|
| - |
|
60 |
// Initial population of the Ref SDK Names
|
| - |
|
61 |
populateSdkNames();
|
| - |
|
62 |
$("#sel_sdkname").change(function(){
|
| - |
|
63 |
populateSdkVersions( $("#sel_sdkname").val());
|
| 86 |
%>
|
64 |
});
|
| - |
|
65 |
|
| - |
|
66 |
// Form Validation processing
|
| - |
|
67 |
$.validate({
|
| - |
|
68 |
form: '#refSdk',
|
| - |
|
69 |
validateOnBlur : false,
|
| - |
|
70 |
onValidate : function() {
|
| - |
|
71 |
clearInfo();
|
| - |
|
72 |
$("#sdkv_progressBar").css('visibility', 'visible');
|
| 87 |
<html>
|
73 |
},
|
| - |
|
74 |
onError: function(){
|
| - |
|
75 |
$("#sdkv_progressBar").css('visibility', 'hidden');
|
| 88 |
<head>
|
76 |
},
|
| 89 |
<title>Release Manager</title>
|
77 |
onSuccess : function(f) {
|
| - |
|
78 |
var p = $.param({
|
| 90 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
79 |
rtag_id : '<%=parRtag_id%>',
|
| - |
|
80 |
sdk_id : $('#sel_sdkname').val(),
|
| - |
|
81 |
sdktag_id : $('#sel_sdkversion').val(),
|
| - |
|
82 |
});
|
| 91 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
83 |
window.location = 'sdk_add_release.asp?' + p;
|
| - |
|
84 |
f.dialog( "close" );
|
| - |
|
85 |
return false;
|
| - |
|
86 |
},
|
| - |
|
87 |
});
|
| - |
|
88 |
|
| - |
|
89 |
// Populate the Reference Project
|
| - |
|
90 |
function populateSdkNames() {
|
| - |
|
91 |
getAjaxData (
|
| - |
|
92 |
"sdk_opr_json.asp",
|
| - |
|
93 |
{ action: "getSdkNames" },
|
| - |
|
94 |
function(data){
|
| - |
|
95 |
// Populate selection
|
| - |
|
96 |
var $options = $("#sel_sdkname").empty();
|
| - |
|
97 |
var name
|
| 92 |
<link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
|
98 |
$options.append($("<option selected disabled />").val(null).text('Select One'));
|
| 93 |
<link rel="stylesheet" href="images/navigation.css" type="text/css">
|
99 |
$.each(data.aaData, function (index, value) {
|
| - |
|
100 |
$options.append($("<option />").val(value.SDK_ID).text(value.SDK_NAME));
|
| - |
|
101 |
});
|
| - |
|
102 |
});
|
| - |
|
103 |
}
|
| - |
|
104 |
|
| - |
|
105 |
// Populate the SDK Versions selection drop down
|
| - |
|
106 |
// sdk_id - Identify the family to select
|
| - |
|
107 |
//
|
| - |
|
108 |
function populateSdkVersions(sdk_id){
|
| - |
|
109 |
getAjaxData (
|
| - |
|
110 |
"sdk_opr_json.asp",
|
| 94 |
<script language="JavaScript" src="images/common.js"></script>
|
111 |
{ action: "getSdkVersions", sdk_id : sdk_id, active: true },
|
| - |
|
112 |
function(data){
|
| 95 |
<script language="JavaScript">
|
113 |
// Populate selection
|
| - |
|
114 |
var $options = $("#sel_sdkversion").empty();
|
| - |
|
115 |
$options.append($("<option selected disabled />").val(null).text('Select One'));
|
| - |
|
116 |
$.each(data.aaData, function (index, value) {
|
| - |
|
117 |
$options.append($("<option />").val(value.SDKTAG_ID).text(value.SDKTAG_NAME));
|
| - |
|
118 |
});
|
| - |
|
119 |
});
|
| - |
|
120 |
}
|
| - |
|
121 |
|
| - |
|
122 |
|
| 96 |
function actionForm()
|
123 |
function setInfo(txt) {
|
| - |
|
124 |
$("#sdkv_info").text( txt).addClass("error");
|
| - |
|
125 |
}
|
| - |
|
126 |
|
| - |
|
127 |
function clearInfo(txt) {
|
| - |
|
128 |
$("#sdkv_info").text(" ").removeClass("error");
|
| - |
|
129 |
}
|
| - |
|
130 |
|
| - |
|
131 |
// getAjaxData - with error processing
|
| - |
|
132 |
// url - url to fetch
|
| - |
|
133 |
// data - additional data to pass to ajax request
|
| - |
|
134 |
// success - function to call on success
|
| - |
|
135 |
function getAjaxData( url, data, success )
|
| 97 |
{
|
136 |
{
|
| - |
|
137 |
clearInfo();
|
| 98 |
MM_validateForm('FRsdk_id','SDK','R','FRsdktag_id','Version','R');
|
138 |
$("#sdkv_progressBar").css('visibility', 'visible');
|
| 99 |
if( document.MM_returnValue )
|
139 |
$.ajax(
|
| 100 |
{
|
140 |
{
|
| - |
|
141 |
url : url,
|
| - |
|
142 |
type: "POST",
|
| - |
|
143 |
data : data,
|
| - |
|
144 |
dataType : "json",
|
| - |
|
145 |
cache: false,
|
| - |
|
146 |
success:function(data, textStatus, jqXHR)
|
| - |
|
147 |
{
|
| - |
|
148 |
//data: return data from server
|
| - |
|
149 |
//console.log ("UpdateData", data);
|
| - |
|
150 |
if (data.result != 0)
|
| - |
|
151 |
{
|
| 101 |
parent.closeIFrame('sdk_add_release.asp?rtag_id='+ <%=parRtag_id%> + "&sdk_id=" + <%=parFRsdk_id%> + "&sdktag_id=" + <%=parFRsdktag_id%> );
|
152 |
setInfo("Error:" + ((data.error != 0) ? data.emsgSummary : "Reason not given"));
|
| - |
|
153 |
if (data.error >= 0) disableForm();
|
| - |
|
154 |
return;
|
| - |
|
155 |
}
|
| - |
|
156 |
// call user success function
|
| - |
|
157 |
success(data);
|
| - |
|
158 |
},
|
| - |
|
159 |
error: function(jqXHR, textStatus, errorThrown)
|
| - |
|
160 |
{
|
| - |
|
161 |
setInfo("Error:" + errorThrown);
|
| - |
|
162 |
disableForm();
|
| - |
|
163 |
//if fails
|
| - |
|
164 |
},
|
| - |
|
165 |
complete : function()
|
| - |
|
166 |
{
|
| - |
|
167 |
$("#sdkv_progressBar").css('visibility', 'hidden');
|
| - |
|
168 |
}
|
| 102 |
}
|
169 |
});
|
| 103 |
}
|
170 |
}
|
| 104 |
</script>
|
171 |
</script>
|
| 105 |
</head>
|
- |
|
| 106 |
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
|
- |
|
| 107 |
<form name="refSdk">
|
172 |
<form name="refSdk" id=refSdk>
|
| 108 |
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
|
173 |
<table width="100%" border="0" cellspacing="0" cellpadding="2" height="100%">
|
| 109 |
<tr class="wform_ttl_bg">
|
- |
|
| 110 |
<td class="panel_bg" width="1%" height="1%">
|
- |
|
| 111 |
<img src="images/i_change_group_off.gif" width="22" height="25" hspace="5">
|
- |
|
| 112 |
</td>
|
- |
|
| 113 |
<td nowrap width="50%">Reference an SDK</td>
|
- |
|
| 114 |
<td align="right" width="50%">
|
- |
|
| 115 |
<%If bLoggedIn AND bAuthorised Then%>
|
- |
|
| 116 |
<input type="submit" name="btn" value="Add" class="form_btn_comp" onClick="actionForm();return false">
|
- |
|
| 117 |
<%End If%>
|
- |
|
| 118 |
<input type="reset" name="btn" value="Cancel" class="form_btn_comp" onclick="parent.closeIFrame();">
|
- |
|
| 119 |
</td>
|
- |
|
| 120 |
<td align="right" width="5px" nowrap></td>
|
- |
|
| 121 |
</tr>
|
- |
|
| 122 |
<tr>
|
174 |
<tr>
|
| 123 |
<td height="100%" width="1%"> </td>
|
175 |
<td height="100%" width="1%"> </td>
|
| 124 |
<td valign="top" nowrap colspan="3">
|
176 |
<td valign="top" nowrap colspan="3">
|
| 125 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
177 |
<table width="100%" border="0" cellspacing="1" cellpadding="2" class="form_txt">
|
| 126 |
<tr>
|
178 |
<tr>
|
| 127 |
<%If NOT bLoggedIn Then%>
|
179 |
<%If NOT bLoggedIn Then%>
|
| 128 |
<td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><img src="images/s_critical.gif"></img>You are not logged in</td>
|
180 |
<td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><img src="images/s_critical.gif"></img>You are not logged in</td>
|
| 129 |
<%ElseIf NOT bAuthorised Then %>
|
181 |
<%ElseIf NOT bAuthorised Then %>
|
| 130 |
<td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><img src="images/s_critical.gif"></img>You are not Authorized to perform this action</td>
|
182 |
<td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><img src="images/s_critical.gif"></img>You are not Authorized to perform this action</td>
|
| Line 132... |
Line 184... |
| 132 |
<td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><strong>NOTE:</strong> You can only reference a released SDK.</td>
|
184 |
<td colspan="2" valign="middle" nowrap class="form_group" style="height:30px"><strong>NOTE:</strong> You can only reference a released SDK.</td>
|
| 133 |
<%End If%>
|
185 |
<%End If%>
|
| 134 |
</tr>
|
186 |
</tr>
|
| 135 |
<tr class="form_field_bg">
|
187 |
<tr class="form_field_bg">
|
| 136 |
<td width="1%" nowrap class="form_field">SDK</td>
|
188 |
<td width="1%" nowrap class="form_field">SDK</td>
|
| 137 |
<td nowrap width="100%" class="form_text">
|
189 |
<td nowrap width="100%">
|
| 138 |
<%Call Get_Projects (parFRsdk_id)%>
|
190 |
<select id="sel_sdkname" class=form_item>
|
| 139 |
</td>
|
191 |
</td>
|
| 140 |
</tr>
|
192 |
</tr>
|
| 141 |
<tr class="form_field_bg">
|
193 |
<tr class="form_field_bg">
|
| 142 |
<td width="1%" nowrap class="form_field">Version</td>
|
194 |
<td width="1%" nowrap class="form_field">Version</td>
|
| 143 |
<td nowrap width="100%" class="form_text">
|
195 |
<td nowrap width="100%">
|
| 144 |
<%Call Get_Release_Labels ( parFRsdk_id, parFRsdktag_id )%>
|
- |
|
| 145 |
<input type="hidden" name="RefSdk_id" value="<%=parFRsdk_id%>">
|
- |
|
| 146 |
<input type="hidden" name="RefSdkTag_id" value="<%=parFRsdktag_id%>">
|
- |
|
| 147 |
<input type="hidden" name="rtag_id" value="<%=parRtag_id%>">
|
- |
|
| 148 |
<input type="hidden" name="action" value="true">
|
196 |
<select id="sel_sdkversion" data-validation="required">
|
| 149 |
</td>
|
197 |
</td>
|
| 150 |
</tr>
|
198 |
</tr>
|
| - |
|
199 |
<div style='min-height:25px;position:relative;'>
|
| - |
|
200 |
<img id='sdkv_progressBar' src='icons/i_processing.gif' width='79' height='14'style='visibility:hidden;position:absolute;'>
|
| - |
|
201 |
<div id='sdkv_info' style='position:absolute;'></div>
|
| - |
|
202 |
</div>
|
| - |
|
203 |
|
| 151 |
</table>
|
204 |
</table>
|
| 152 |
</td>
|
205 |
</td>
|
| 153 |
</tr>
|
206 |
</tr>
|
| 154 |
</table>
|
207 |
</table>
|
| 155 |
</form>
|
208 |
</form>
|
| 156 |
</body>
|
- |
|
| 157 |
</html>
|
- |
|
| 158 |
|
- |
|
| 159 |
|
- |
|
| 160 |
<!-- DESTRUCTOR ------->
|
- |
|
| 161 |
<!--#include file="common/destructor.asp"-->
|
- |
|