Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5058 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|  sdk_main_page.asp
5
'|  Create a new version of an SDK
6
'|
7
'=====================================================
8
%>
9
<%
10
Option explicit
11
' Good idea to set when using redirect
12
Response.Expires = 0   ' always load the page, dont store
13
%>
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<%
20
'------------ ACCESS CONTROL ------------------
21
%>
22
<!--#include file="_access_control_general.asp"-->
23
<%
24
'------------ Variable Definition -------------
25
Dim parSdkTag_id
26
 
27
'------------ Constants Declaration -----------
28
'------------ Variable Init -------------------
29
parSdkTag_id = Request("sdktag_id")
5071 dpurdie 30
If parSdkTag_id = "" Then parSdkTag_id = 0
5058 dpurdie 31
%>
32
<html>
33
   <head>
34
        <title>Release Manager</title>
35
        <meta http-equiv="Pragma" content="no-cache">
36
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
37
        <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
38
        <link rel="stylesheet" href="images/navigation.css" type="text/css">
39
        <script language="JavaScript" src="images/common.js"></script>
5085 dpurdie 40
        <%bJqueryDataTables = TRUE%>
41
        <%bJqueryForms = TRUE%>
42
        <!--#include file="_jquery_includes.asp"-->
5058 dpurdie 43
        <!-- TIPS -->
5098 dpurdie 44
        <script language="JavaScript" src="images/tipster.js"></script>
45
        <script language="JavaScript" src="images/_help_tips.js"></script>
5058 dpurdie 46
        <!-- DROPDOWN MENUS -->
47
        <!--#include file="_menu_def.asp"-->
48
        <script language="JavaScript1.2" src="images/popup_menu.js"></script>
49
        <!-- Script associated with the display of the SDK Names side panel -->
50
        <script type="text/javascript" charset="utf-8">
51
        $(document).ready(function() {
52
            var tableEl = $('#sdk_names');
53
 
54
            // Disable caching of AJAX responses
55
            $.ajaxSetup ({
56
                cache: false 
57
            });
58
 
59
            //  Configure the Summary Table
60
            var table = tableEl.DataTable({
61
                    deferRender:    true,
62
                    dom:            "t",
63
                    sScrollY: $( document ).height() - 200,
64
                    scrollCollapse: true,
65
                    processing: true,
66
                    retrieve:true,
67
                    serverSide: true,
68
                    ajaxSource: "sdk_names_json.asp",
69
                    "ordering": false,
70
                    "columnDefs" : [ 
71
                        {"visible" : false, "targets" : [0]},
72
                        {"visible" : false, "targets" : [2]},
73
                        {"visible" : false, "targets" : [3]},
74
                        ],
75
                    });
76
 
77
            //
78
            //  jQuery function to deserialise an encoded parameter list
79
            //  The opposite of $.param()
80
            (function ($) {
81
                $.deserialize = function (str, options) {
82
                    var pairs = str.split(/&amp;|&/i),
83
                        h = {},
84
                        options = options || {};
85
                    for(var i = 0; i < pairs.length; i++) {
86
                        var kv = pairs[i].split('=');
87
                        kv[0] = decodeURIComponent(kv[0]);
88
                        if(!options.except || options.except.indexOf(kv[0]) == -1) {
89
                            if((/^\w+\[\w+\]$/).test(kv[0])) {
90
                                var matches = kv[0].match(/^(\w+)\[(\w+)\]$/);
91
                                if(typeof h[matches[1]] === 'undefined') {
92
                                    h[matches[1]] = {};
93
                                }
94
                                h[matches[1]][matches[2]] = decodeURIComponent(kv[1]);
95
                            } else {
96
                                h[kv[0]] = decodeURIComponent(kv[1]);
97
                            }
98
                        }
99
                    }
100
                    return h;
101
                };
102
 
103
                $.fn.deserialize = function (options) {
104
                    return $.deserialize($(this).serialize(), options);
105
                };
106
            })(jQuery);
107
 
108
            //
109
            //  If this is a page refresh, then pick up the #, decode it
110
            //  and navigate to the required location
111
            var hash = window.location.hash;
112
            if (hash.charAt(0) == '#')
113
            {
114
                hash = hash.substr(1) ;
115
                var locationData = $.deserialize(hash);
116
                load_page_body(locationData.url, locationData );
117
            }
118
 
119
 
120
            //  Centralise the loading of the body of the page
121
            //
122
            function load_page_body(url, data) {
5097 dpurdie 123
                //  Persist these values, but don't add to the stored URL
124
                var persist = {
125
                    rtag_id : <%=DB_RTAG_ID%>,
126
                    proj_id : <%=DB_PROJ_ID%>,
127
                    pv_id : <%=DB_PV_ID%>,
128
                };
5058 dpurdie 129
                $('#sdk_version').off();
130
                $('#sdk_version').empty();
5097 dpurdie 131
                $('#sdk_version').load(url, $.extend({}, data, persist));
5058 dpurdie 132
 
133
                //  Reflect the current page load in the URL
134
                //      Shows what we are doing
135
                //      Allows page reload to
136
 
137
                var newdata = {};
138
                newdata['url'] = url;
139
                if ( typeof(data) !== 'undefined' ){
140
                    for (var key in data) {
141
                        newdata[key] = (data[key]);
142
                    }
143
                }
144
                window.location.hash = jQuery.param(newdata);
145
            }
146
 
5097 dpurdie 147
            // Process click on the table row
148
            // Display versions available for this SDK
149
            //      this - a DOM node
150
            //      $(this) - The jquery wrapped node
151
            //
5058 dpurdie 152
            tableEl.on( 'click', 'tbody tr', function () {
153
                    var sdk_id = table.row( this ).data()[0];
154
                    load_page_body('sdk_versions.asp', {sdk_id: sdk_id});
155
                    });
156
 
157
 
5080 dpurdie 158
<%If canActionControl("AdminSdk") Then %>
5058 dpurdie 159
            //  Wire up an 'Add New SDK' button
160
            $( '#addSdkName' ).click(function() {
161
                load_page_body('sdk_names_body.asp');
162
                });
163
<%End If%>
164
 
165
        //  Listen for any trigger to force the table to be refreshed
166
        //  Listen on 'document' as the event will trickle up
167
        $(document).on("sdkNameEdited", function(){
168
            table.ajax.reload();
169
            });
170
 
171
        // Listen for new page body reload requests
172
        $(document).on("newPageBody", function(e, args){
173
            load_page_body(args.url, args.data);
174
 
175
            });
176
        });
177
        </script>
178
      <!-- DROPDOWN MENUS -->
179
   </head>
180
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
181
 
182
      <!-- MENU LAYERS -------------------------------------->
183
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')"
184
         onmouseout="highlightmenu(event,'off');dynamichide(event)">
185
      </div>
186
      <!-- TIPS LAYERS -------------------------------------->
187
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
188
      <!----------------------------------------------------->
189
      <!-- HEADER -->
190
      <!--#include file="_header.asp"-->
191
      <!-- BODY ---->
192
      <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEFEF">
193
         <tr>
194
            <td width="10%" background="images/bg_home_orange.gif" valign="top" class=side_panel>
195
                <!-- Side panel -->
196
               <table id=sdk_names class="full_table side_panel_table">
197
                <thead>
198
                    <tr class="body_col form_align">
199
                        <th>
200
                        <th>SDK Names
201
                        <th>
202
                        <th>
203
                </thead>
204
               </table>
205
            </td>
206
            <td width="5%"  rowspan="2" valign="top"></td>
207
            <td width="80%" rowspan="2" align="center" valign="top">
208
               <!-- Main display panel -->
209
               <div id=sdk_version></div>
210
               <!-- End Main display panel -->
211
            <td width="5%"  rowspan="2" valign="top"></td>
212
         </tr>
213
         <tr>
214
            <!-- Side panel Bottom-->
215
            <td valign="bottom" align="center" background="images/bg_home_orange.gif">
5080 dpurdie 216
<%If canActionControl("AdminSdk") Then %>
5058 dpurdie 217
                <img id=addSdkName src="images/bt_new_project.gif" width="16" height="16" border="0" vspace="5" hspace="5" align="right" alt="Create new SDK Family" title="Create new SDK Family">
218
<%End If%>
219
            </td>
220
            <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
221
        </tr>
222
      </table>
223
<!-- FOOTER -->
224
<!--#include file="_footer.asp"-->
225
</body>
226
</html>
227
<%
228
Call Destroy_All_Objects
229
%>