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({
5102 dpurdie 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
                columns: [ { data: 1, className: 'dt-nowrap side_panel_data'  } ],
71
            });
5058 dpurdie 72
            //
73
            //  jQuery function to deserialise an encoded parameter list
74
            //  The opposite of $.param()
75
            (function ($) {
76
                $.deserialize = function (str, options) {
77
                    var pairs = str.split(/&amp;|&/i),
78
                        h = {},
79
                        options = options || {};
80
                    for(var i = 0; i < pairs.length; i++) {
81
                        var kv = pairs[i].split('=');
82
                        kv[0] = decodeURIComponent(kv[0]);
83
                        if(!options.except || options.except.indexOf(kv[0]) == -1) {
84
                            if((/^\w+\[\w+\]$/).test(kv[0])) {
85
                                var matches = kv[0].match(/^(\w+)\[(\w+)\]$/);
86
                                if(typeof h[matches[1]] === 'undefined') {
87
                                    h[matches[1]] = {};
88
                                }
89
                                h[matches[1]][matches[2]] = decodeURIComponent(kv[1]);
90
                            } else {
91
                                h[kv[0]] = decodeURIComponent(kv[1]);
92
                            }
93
                        }
94
                    }
95
                    return h;
96
                };
97
 
98
                $.fn.deserialize = function (options) {
99
                    return $.deserialize($(this).serialize(), options);
100
                };
101
            })(jQuery);
102
 
103
            //
104
            //  If this is a page refresh, then pick up the #, decode it
105
            //  and navigate to the required location
106
            var hash = window.location.hash;
107
            if (hash.charAt(0) == '#')
108
            {
109
                hash = hash.substr(1) ;
110
                var locationData = $.deserialize(hash);
111
                load_page_body(locationData.url, locationData );
112
            }
113
 
114
 
115
 
5097 dpurdie 116
            // Process click on the table row
117
            // Display versions available for this SDK
118
            //      this - a DOM node
119
            //      $(this) - The jquery wrapped node
120
            //
5058 dpurdie 121
            tableEl.on( 'click', 'tbody tr', function () {
122
                    var sdk_id = table.row( this ).data()[0];
123
                    load_page_body('sdk_versions.asp', {sdk_id: sdk_id});
124
                    });
125
 
126
 
5080 dpurdie 127
<%If canActionControl("AdminSdk") Then %>
5058 dpurdie 128
            //  Wire up an 'Add New SDK' button
129
            $( '#addSdkName' ).click(function() {
130
                load_page_body('sdk_names_body.asp');
131
                });
132
<%End If%>
133
 
134
        //  Listen for any trigger to force the table to be refreshed
135
        //  Listen on 'document' as the event will trickle up
136
        $(document).on("sdkNameEdited", function(){
137
            table.ajax.reload();
138
            });
139
 
140
        // Listen for new page body reload requests
141
        $(document).on("newPageBody", function(e, args){
142
            load_page_body(args.url, args.data);
143
 
144
            });
145
        });
5103 dpurdie 146
 
147
//  Centralise the loading of the body of the page
148
//
149
function load_page_body(url, data) {
150
    //  Persist these values, but don't add to the stored URL
151
    var persist = {
152
        rtag_id : <%=DB_RTAG_ID%>,
153
        proj_id : <%=DB_PROJ_ID%>,
154
        pv_id : <%=DB_PV_ID%>,
155
    };
156
    $('#sdk_version').off();
157
    $('#sdk_version').empty();
158
    $('#sdk_version').load(url, $.extend({}, data, persist));
159
 
160
    //  Reflect the current page load in the URL
161
    //      Shows what we are doing
162
    //      Allows page reload to
163
 
164
    var newdata = {};
165
    newdata['url'] = url;
166
    if ( typeof(data) !== 'undefined' ){
167
        for (var key in data) {
168
            newdata[key] = (data[key]);
169
        }
170
    }
171
    window.location.hash = jQuery.param(newdata);
172
}
5058 dpurdie 173
        </script>
174
      <!-- DROPDOWN MENUS -->
175
   </head>
176
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
177
 
178
      <!-- MENU LAYERS -------------------------------------->
179
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')"
180
         onmouseout="highlightmenu(event,'off');dynamichide(event)">
181
      </div>
182
      <!-- TIPS LAYERS -------------------------------------->
183
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
184
      <!----------------------------------------------------->
185
      <!-- HEADER -->
186
      <!--#include file="_header.asp"-->
187
      <!-- BODY ---->
5102 dpurdie 188
      <table border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEFEF" style="min-height:500px;width:100%">
5058 dpurdie 189
         <tr>
5102 dpurdie 190
            <td valign="top" class=side_panel style="position:relative;height:100%;width:10%">
5058 dpurdie 191
                <!-- Side panel -->
192
               <table id=sdk_names class="full_table side_panel_table">
193
                <thead>
194
                    <tr class="body_col form_align">
5103 dpurdie 195
                        <th onclick="load_page_body('sdk_names_body.asp');">SDK Names
5058 dpurdie 196
                </thead>
197
               </table>
5102 dpurdie 198
 
199
            <!-- Side panel Bottom-->
200
<%If canActionControl("AdminSdk") Then %>
201
                <img id=addSdkName style="position:absolute;bottom:0;right:0;" 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">
202
<%End If%>
5058 dpurdie 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
      </table>
212
<!-- FOOTER -->
213
<!--#include file="_footer.asp"-->
214
</body>
215
</html>
216
<%
217
Call Destroy_All_Objects
218
%>