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) {
121
                $('#sdk_version').off();
122
                $('#sdk_version').empty();
123
                $('#sdk_version').load(url, data);
124
 
125
                //  Reflect the current page load in the URL
126
                //      Shows what we are doing
127
                //      Allows page reload to
128
 
129
                var newdata = {};
130
                newdata['url'] = url;
131
                if ( typeof(data) !== 'undefined' ){
132
                    for (var key in data) {
133
                        newdata[key] = (data[key]);
134
                    }
135
                }
136
                window.location.hash = jQuery.param(newdata);
137
            }
138
 
139
                    // Process click on the table row
140
                    // Display versions available for this SDK
141
                    //      this - a DOM node
142
                    //      $(this) - The jquery wrapped node
143
                    //
144
            tableEl.on( 'click', 'tbody tr', function () {
145
                    var sdk_id = table.row( this ).data()[0];
146
                    load_page_body('sdk_versions.asp', {sdk_id: sdk_id});
147
                    });
148
 
149
 
5080 dpurdie 150
<%If canActionControl("AdminSdk") Then %>
5058 dpurdie 151
            //  Wire up an 'Add New SDK' button
152
            $( '#addSdkName' ).click(function() {
153
                load_page_body('sdk_names_body.asp');
154
                });
155
<%End If%>
156
 
157
        //  Listen for any trigger to force the table to be refreshed
158
        //  Listen on 'document' as the event will trickle up
159
        $(document).on("sdkNameEdited", function(){
160
            table.ajax.reload();
161
            });
162
 
163
        // Listen for new page body reload requests
164
        $(document).on("newPageBody", function(e, args){
165
            load_page_body(args.url, args.data);
166
 
167
            });
168
        });
169
        </script>
170
      <!-- DROPDOWN MENUS -->
171
   </head>
172
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
173
 
174
      <!-- MENU LAYERS -------------------------------------->
175
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')"
176
         onmouseout="highlightmenu(event,'off');dynamichide(event)">
177
      </div>
178
      <!-- TIPS LAYERS -------------------------------------->
179
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
180
      <!----------------------------------------------------->
181
      <!-- HEADER -->
182
      <!--#include file="_header.asp"-->
183
      <!-- BODY ---->
184
      <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEFEF">
185
         <tr>
186
            <td width="10%" background="images/bg_home_orange.gif" valign="top" class=side_panel>
187
                <!-- Side panel -->
188
               <table id=sdk_names class="full_table side_panel_table">
189
                <thead>
190
                    <tr class="body_col form_align">
191
                        <th>
192
                        <th>SDK Names
193
                        <th>
194
                        <th>
195
                </thead>
196
               </table>
197
            </td>
198
            <td width="5%"  rowspan="2" valign="top"></td>
199
            <td width="80%" rowspan="2" align="center" valign="top">
200
               <!-- Main display panel -->
201
               <div id=sdk_version></div>
202
               <!-- End Main display panel -->
203
            <td width="5%"  rowspan="2" valign="top"></td>
204
         </tr>
205
         <tr>
206
            <!-- Side panel Bottom-->
207
            <td valign="bottom" align="center" background="images/bg_home_orange.gif">
5080 dpurdie 208
<%If canActionControl("AdminSdk") Then %>
5058 dpurdie 209
                <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">
210
<%End If%>
211
            </td>
212
            <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
213
        </tr>
214
      </table>
215
<!-- FOOTER -->
216
<!--#include file="_footer.asp"-->
217
</body>
218
</html>
219
<%
220
Call Destroy_All_Objects
221
%>