Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5049 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|  form_new_sdk_version.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 -------------
5050 dpurdie 25
Dim parSdkTag_id
26
 
5049 dpurdie 27
'------------ Constants Declaration -----------
28
'------------ Variable Init -------------------
5050 dpurdie 29
parSdkTag_id = Request("sdktag_id")
30
if parSdkTag_id = "" Then parSdkTag_id = 0
5049 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>
40
        <script type="text/javascript" language="javascript" src="jquery/jquery.js"></script>
41
        <script type="text/javascript" language="javascript" src="jquery/jquery-ui.js"></script>
5050 dpurdie 42
        <script type="text/javascript" language="javascript" src="jquery/jquery.dataTables.js"></script>
43
        <script type="text/javascript" language="javascript" src="jquery/dataTables.scroller.js"></script>
44
        <link rel="stylesheet" href="jquery/dataTables.vix.css" type="text/css">
5049 dpurdie 45
        <link rel="stylesheet" href="jquery/jquery-ui.css" type="text/css">
46
        <script src="jquery/form-validator/jquery.form-validator.min.js"></script>
47
        <link rel="stylesheet" href="jquery/form-validator.css" type="text/css">
48
        <!-- TIPS -->
49
        <!-- DROPDOWN MENUS -->
50
        <!--#include file="_menu_def.asp"-->
51
        <script language="JavaScript1.2" src="images/popup_menu.js"></script>
5051 dpurdie 52
        <!-- Script associated with the display of the SDK Names side panel -->
5050 dpurdie 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
                    "columnDefs" : [ 
74
                        {"visible" : false, "targets" : [0]},
75
                        {"visible" : false, "targets" : [2]},
76
                        {"visible" : false, "targets" : [3]},
77
                        ],
78
                    });
79
 
5052 dpurdie 80
            //
81
            //  jQuery function to deserialise an encoded parameter list
82
            //  The opposite of $.param()
83
            (function ($) {
84
                $.deserialize = function (str, options) {
85
                    var pairs = str.split(/&amp;|&/i),
86
                        h = {},
87
                        options = options || {};
88
                    for(var i = 0; i < pairs.length; i++) {
89
                        var kv = pairs[i].split('=');
90
                        kv[0] = decodeURIComponent(kv[0]);
91
                        if(!options.except || options.except.indexOf(kv[0]) == -1) {
92
                            if((/^\w+\[\w+\]$/).test(kv[0])) {
93
                                var matches = kv[0].match(/^(\w+)\[(\w+)\]$/);
94
                                if(typeof h[matches[1]] === 'undefined') {
95
                                    h[matches[1]] = {};
96
                                }
97
                                h[matches[1]][matches[2]] = decodeURIComponent(kv[1]);
98
                            } else {
99
                                h[kv[0]] = decodeURIComponent(kv[1]);
100
                            }
101
                        }
102
                    }
103
                    return h;
104
                };
105
 
106
                $.fn.deserialize = function (options) {
107
                    return $.deserialize($(this).serialize(), options);
108
                };
109
            })(jQuery);
110
 
111
            //
112
            //  If this is a page refresh, then pick up the #, decode it
113
            //  and navigate to the required location
114
            var hash = window.location.hash;
115
            if (hash.charAt(0) == '#')
116
            {
117
                hash = hash.substr(1) ;
118
                var locationData = $.deserialize(hash);
119
                load_page_body(locationData.url, locationData );
120
            }
121
 
122
 
5051 dpurdie 123
            //  Centralise the loading of the body of the page
124
            //
125
            function load_page_body(url, data) {
126
                $('#sdk_version').off();
127
                $('#sdk_version').empty();
128
                $('#sdk_version').load(url, data);
5052 dpurdie 129
 
130
                //  Reflect the current page load in the URL
131
                //      Shows what we are doing
132
                //      Allows page reload to
133
 
134
                var newdata = {};
135
                newdata['url'] = url;
136
                if ( typeof(data) !== 'undefined' ){
137
                    for (var key in data) {
138
                        newdata[key] = (data[key]);
139
                    }
140
                }
141
                window.location.hash = jQuery.param(newdata);
5051 dpurdie 142
            }
143
 
5050 dpurdie 144
                    // Process click on the table row
145
                    // Display versions available for this SDK
146
                    //      this - a DOM node
147
                    //      $(this) - The jquery wrapped node
148
                    //
149
            tableEl.on( 'click', 'tbody tr', function () {
150
                    var sdk_id = table.row( this ).data()[0];
5051 dpurdie 151
                    load_page_body('sdk_versions.asp', {sdk_id: sdk_id});
5050 dpurdie 152
                    });
153
 
154
 
155
<%If objAccessControl.IsActive("CreateNewProject") Then %>
5051 dpurdie 156
            //  Wire up an 'Add New SDK' button
157
            $( '#addSdkName' ).click(function() {
158
                load_page_body('sdk_names_body.asp');
5050 dpurdie 159
                });
160
<%End If%>
5051 dpurdie 161
 
162
        //  Listen for any trigger to force the table to be refreshed
163
        //  Listen on 'document' as the event will trickle up
164
        $(document).on("sdkNameEdited", function(){
165
            table.ajax.reload();
166
            });
167
 
168
        // Listen for new page body reload requests
169
        $(document).on("newPageBody", function(e, args){
170
            load_page_body(args.url, args.data);
171
 
172
            });
5050 dpurdie 173
        });
174
        </script>
175
      <!-- DROPDOWN MENUS -->
5049 dpurdie 176
   </head>
177
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
178
 
179
      <!-- MENU LAYERS -------------------------------------->
180
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')"
181
         onmouseout="highlightmenu(event,'off');dynamichide(event)">
182
      </div>
183
      <!-- TIPS LAYERS -------------------------------------->
184
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
185
      <!----------------------------------------------------->
186
      <!-- HEADER -->
187
      <!--#include file="_header.asp"-->
188
      <!-- BODY ---->
189
      <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEFEF">
190
         <tr>
5050 dpurdie 191
            <td width="10%" background="images/bg_home_orange.gif" valign="top" class=side_panel>
192
                <!-- Side panel -->
193
               <table id=sdk_names class="full_table side_panel_table">
194
                <thead>
195
                    <tr class="body_col form_align">
196
                        <th>
197
                        <th>SDK Names
198
                        <th>
199
                        <th>
200
                </thead>
201
               </table>
202
            </td>
5049 dpurdie 203
            <td width="5%"  rowspan="2" valign="top"></td>
204
            <td width="80%" rowspan="2" align="center" valign="top">
205
               <!-- Main display panel -->
5051 dpurdie 206
               <div id=sdk_version></div>
207
               <!-- End Main display panel -->
5049 dpurdie 208
            <td width="5%"  rowspan="2" valign="top"></td>
209
         </tr>
210
         <tr>
5051 dpurdie 211
            <!-- Side panel Bottom-->
212
            <td valign="bottom" align="center" background="images/bg_home_orange.gif">
213
<%If objAccessControl.IsActive("CreateNewProject") Then %>
214
                <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">
215
<%End If%>
216
            </td>
5049 dpurdie 217
            <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
218
        </tr>
219
      </table>
220
<!-- FOOTER -->
221
<!--#include file="_footer.asp"-->
222
</body>
223
</html>
224
<%
225
Call Destroy_All_Objects
226
%>