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