Subversion Repositories DevTools

Rev

Go to most recent revision | 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
%>
5114 dpurdie 32
<!DOCTYPE html>
5058 dpurdie 33
<html>
34
   <head>
35
        <title>Release Manager</title>
36
        <meta http-equiv="Pragma" content="no-cache">
37
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
38
        <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
39
        <link rel="stylesheet" href="images/navigation.css" type="text/css">
40
        <script language="JavaScript" src="images/common.js"></script>
5085 dpurdie 41
        <%bJqueryDataTables = TRUE%>
42
        <%bJqueryForms = TRUE%>
43
        <!--#include file="_jquery_includes.asp"-->
5058 dpurdie 44
        <!-- TIPS -->
5098 dpurdie 45
        <script language="JavaScript" src="images/tipster.js"></script>
46
        <script language="JavaScript" src="images/_help_tips.js"></script>
5058 dpurdie 47
        <!-- DROPDOWN MENUS -->
48
        <!--#include file="_menu_def.asp"-->
49
        <script language="JavaScript1.2" src="images/popup_menu.js"></script>
50
        <!-- Script associated with the display of the SDK Names side panel -->
51
        <script type="text/javascript" charset="utf-8">
52
        $(document).ready(function() {
53
            var tableEl = $('#sdk_names');
54
 
55
            // Disable caching of AJAX responses
56
            $.ajaxSetup ({
57
                cache: false 
58
            });
59
 
60
            //  Configure the Summary Table
61
            var table = tableEl.DataTable({
5102 dpurdie 62
                deferRender:    true,
63
                dom:            "t",
64
                sScrollY: $( document ).height() - 200,
65
                scrollCollapse: true,
66
                processing: true,
5114 dpurdie 67
                'retrieve': true,
68
                'serverSide': true,
69
                'ajaxSource': 'sdk_names_json.asp',
70
                'ordering': false,
71
                'columns': [ { data: 1, className: 'dt-nowrap side_panel_data'  } ]
5102 dpurdie 72
            });
5058 dpurdie 73
            //
74
            //  jQuery function to deserialise an encoded parameter list
75
            //  The opposite of $.param()
76
            (function ($) {
77
                $.deserialize = function (str, options) {
78
                    var pairs = str.split(/&amp;|&/i),
79
                        h = {},
80
                        options = options || {};
81
                    for(var i = 0; i < pairs.length; i++) {
82
                        var kv = pairs[i].split('=');
83
                        kv[0] = decodeURIComponent(kv[0]);
84
                        if(!options.except || options.except.indexOf(kv[0]) == -1) {
85
                            if((/^\w+\[\w+\]$/).test(kv[0])) {
86
                                var matches = kv[0].match(/^(\w+)\[(\w+)\]$/);
87
                                if(typeof h[matches[1]] === 'undefined') {
88
                                    h[matches[1]] = {};
89
                                }
90
                                h[matches[1]][matches[2]] = decodeURIComponent(kv[1]);
91
                            } else {
92
                                h[kv[0]] = decodeURIComponent(kv[1]);
93
                            }
94
                        }
95
                    }
96
                    return h;
97
                };
98
 
99
                $.fn.deserialize = function (options) {
100
                    return $.deserialize($(this).serialize(), options);
101
                };
102
            })(jQuery);
103
 
104
            //
105
            //  If this is a page refresh, then pick up the #, decode it
106
            //  and navigate to the required location
107
            var hash = window.location.hash;
108
            if (hash.charAt(0) == '#')
109
            {
110
                hash = hash.substr(1) ;
111
                var locationData = $.deserialize(hash);
112
                load_page_body(locationData.url, locationData );
113
            }
114
 
115
 
116
 
5097 dpurdie 117
            // Process click on the table row
118
            // Display versions available for this SDK
119
            //      this - a DOM node
120
            //      $(this) - The jquery wrapped node
121
            //
5058 dpurdie 122
            tableEl.on( 'click', 'tbody tr', function () {
123
                    var sdk_id = table.row( this ).data()[0];
124
                    load_page_body('sdk_versions.asp', {sdk_id: sdk_id});
125
                    });
126
 
127
 
5080 dpurdie 128
<%If canActionControl("AdminSdk") Then %>
5058 dpurdie 129
            //  Wire up an 'Add New SDK' button
130
            $( '#addSdkName' ).click(function() {
131
                load_page_body('sdk_names_body.asp');
132
                });
133
<%End If%>
134
 
135
        //  Listen for any trigger to force the table to be refreshed
136
        //  Listen on 'document' as the event will trickle up
137
        $(document).on("sdkNameEdited", function(){
138
            table.ajax.reload();
139
            });
140
 
141
        // Listen for new page body reload requests
142
        $(document).on("newPageBody", function(e, args){
143
            load_page_body(args.url, args.data);
144
 
145
            });
146
        });
5103 dpurdie 147
 
148
//  Centralise the loading of the body of the page
149
//
150
function load_page_body(url, data) {
151
    //  Persist these values, but don't add to the stored URL
152
    var persist = {
153
        rtag_id : <%=DB_RTAG_ID%>,
154
        proj_id : <%=DB_PROJ_ID%>,
5114 dpurdie 155
        pv_id : <%=DB_PV_ID%>
5103 dpurdie 156
    };
157
    $('#sdk_version').off();
158
    $('#sdk_version').empty();
159
    $('#sdk_version').load(url, $.extend({}, data, persist));
160
 
161
    //  Reflect the current page load in the URL
162
    //      Shows what we are doing
163
    //      Allows page reload to
164
 
165
    var newdata = {};
166
    newdata['url'] = url;
167
    if ( typeof(data) !== 'undefined' ){
168
        for (var key in data) {
169
            newdata[key] = (data[key]);
170
        }
171
    }
172
    window.location.hash = jQuery.param(newdata);
173
}
5058 dpurdie 174
        </script>
175
      <!-- DROPDOWN MENUS -->
176
   </head>
5114 dpurdie 177
   <body>
5058 dpurdie 178
 
5114 dpurdie 179
      <!-- MENU LAYERS -->
5058 dpurdie 180
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')"
181
         onmouseout="highlightmenu(event,'off');dynamichide(event)">
182
      </div>
5114 dpurdie 183
      <!-- TIPS LAYERS -->
5058 dpurdie 184
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
185
      <!-- HEADER -->
186
      <!--#include file="_header.asp"-->
5114 dpurdie 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
%>