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