Subversion Repositories DevTools

Rev

Rev 6181 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5357 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
%>
6181 dpurdie 22
<!--#include file="_access_control_login_optional.asp"-->
5357 dpurdie 23
<!--#include file="_access_control_general.asp"-->
24
<%
25
'------------ Variable Definition -------------
26
Dim parSdkTag_id
27
 
28
'------------ Constants Declaration -----------
29
'------------ Variable Init -------------------
30
parSdkTag_id = Request("sdktag_id")
31
If parSdkTag_id = "" Then parSdkTag_id = 0
32
%>
33
<!DOCTYPE html>
34
<html>
35
   <head>
36
        <title>Release Manager</title>
37
        <link rel="shortcut icon" href="<%=FavIcon%>"/>
38
        <meta http-equiv="Pragma" content="no-cache">
39
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6579 dpurdie 40
        <link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
41
        <link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
42
        <script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 43
        <%bJqueryDataTables = TRUE%>
44
        <%bJqueryForms = TRUE%>
45
        <!--#include file="_jquery_includes.asp"-->
46
        <!-- TIPS -->
6579 dpurdie 47
        <script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
48
        <script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 49
        <!-- DROPDOWN MENUS -->
50
        <!--#include file="_menu_def.asp"-->
6579 dpurdie 51
        <script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
5357 dpurdie 52
        <!-- Script associated with the display of the SDK Names side panel -->
53
        <script type="text/javascript" charset="utf-8">
54
        $(document).ready(function() {
55
            var tableEl = $('#sdk_names');
56
 
57
            // Disable caching of AJAX responses
58
            $.ajaxSetup ({
59
                cache: false 
60
            });
61
 
62
            //  Configure the Summary Table
63
            var table = tableEl.DataTable({
64
                deferRender:    true,
65
                dom:            "t",
66
                sScrollY: $( document ).height() - 200,
67
                scrollCollapse: true,
68
                processing: true,
69
                'retrieve': true,
70
                'serverSide': true,
71
                'ajaxSource': 'sdk_names_json.asp',
72
                'ordering': false,
73
                'columns': [ { data: 1, className: 'dt-nowrap side_panel_data'  } ]
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
            //  Function to load a page using data in the window.location.hash
107
            //      Used on direct page load
108
            //      Used via navigation buttons
109
            function load_page_from_hash(mode) {
110
                if (typeof mode === 'object') mode = 'Indirect';
111
                var hash = window.location.hash;
112
                if (hash.charAt(0) == '#')
113
                {
114
                    hash = hash.substr(1) ;
115
                    var locationData = $.deserialize(hash);
116
                    load_page_body(locationData.url, locationData, false );
117
                }
118
            }
119
 
120
            load_page_from_hash('DirectLoad');
121
            $(window).on('hashchange',load_page_from_hash );
122
 
123
 
124
            // Process click on the table row
125
            // Display versions available for this SDK
126
            //      this - a DOM node
127
            //      $(this) - The jquery wrapped node
128
            //
129
            tableEl.on( 'click', 'tbody tr', function () {
130
                    var sdk_id = table.row( this ).data()[0];
131
                    load_page_body('sdk_versions.asp', {sdk_id: sdk_id}, true);
132
                    });
133
 
134
 
135
<%If canActionControl("AdminSdk") Then %>
136
            //  Wire up an 'Add New SDK' button
137
            $( '#addSdkName' ).click(function() {
138
                load_page_body('sdk_names_body.asp', true);
139
                });
140
<%End If%>
141
 
142
        //  Listen for any trigger to force the table to be refreshed
143
        //  Listen on 'document' as the event will trickle up
144
        $(document).on("sdkNameEdited", function(){
145
            table.ajax.reload();
146
            });
147
 
148
        // Listen for new page body reload requests
149
        $(document).on("newPageBody", function(e, args){
150
            load_page_body(args.url, args.data, true);
151
 
152
            });
153
        });
154
 
155
//  Centralise the loading of the body of the page
156
//
157
function load_page_body(url, data, mode) {
158
    //  Persist these values, but don't add to the stored URL
159
    var persist = {
160
        rtag_id : <%=DB_RTAG_ID%>,
161
        proj_id : <%=DB_PROJ_ID%>,
162
        pv_id : <%=DB_PV_ID%>
163
    };
164
 
165
    //  Reflect the current page load in the URL
166
    //      Shows what we are doing
167
    //      Allows page reload to work
168
    //      Allows browser history to work
169
    var newdata = {};
170
    newdata['url'] = url;
171
    if ( typeof(data) !== 'undefined' ){
172
        for (var key in data) {
173
            newdata[key] = (data[key]);
174
        }
175
    }
176
 
177
    //  Prevent duplicates caused by changing window.location.hash
178
    //
179
    var newHash = jQuery.param(newdata);
180
    if ( newHash !== load_page_body.last || mode === true ) {
181
        $('#sdk_version').off();
182
        $('#sdk_version').empty();
183
        $('#sdk_version').load(url, $.extend({}, data, persist));
184
 
185
        load_page_body.last = newHash;
186
        window.location.hash = newHash;
187
   }
188
}
189
        </script>
5751 dpurdie 190
      <!-- Local Style -->
191
      <style type="text/css">
192
        input, select, textarea, button {font:11px tahoma,sans-serif;text-decoration:none}
193
      </style>
5357 dpurdie 194
   </head>
195
   <body>
196
      <!-- HEADER -->
197
      <!--#include file="_header.asp"-->
198
      <!-- BODY -->
199
      <table border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEFEF" style="min-height:500px;width:100%">
200
         <tr>
201
            <td valign="top" class=side_panel style="position:relative;height:100%;width:10%;border-right:#999999 solid 1px;">
202
                <!-- Side panel -->
203
               <table id=sdk_names class="full_table side_panel_table">
204
                <thead>
205
                    <tr class="body_col form_align">
206
                        <th onclick="load_page_body('sdk_names_body.asp', null, true);">SDK Names
207
                </thead>
208
               </table>
209
 
210
            <!-- Side panel Bottom-->
211
<%If canActionControl("AdminSdk") Then %>
212
                <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">
213
<%End If%>
214
            </td>
215
            <td width="5%"  rowspan="2" valign="top"></td>
216
            <td width="80%" rowspan="2" align="center" valign="top">
217
               <!-- Main display panel -->
218
               <div id=sdk_version></div>
219
               <!-- End Main display panel -->
220
            <td width="5%"  rowspan="2" valign="top"></td>
221
         </tr>
222
      </table>
223
<!-- FOOTER -->
224
<!--#include file="_footer.asp"-->
225
</body>
226
</html>