Subversion Repositories DevTools

Rev

Rev 5156 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5156 Rev 5357
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|  sdk_main_page.asp
4
'|  sdk_main_page.asp
5
'|  Create a new version of an SDK
5
'|  Create a new version of an SDK
6
'|
6
'|
7
'=====================================================
7
'=====================================================
8
%>
8
%>
9
<%
9
<%
10
Option explicit
10
Option explicit
11
' Good idea to set when using redirect
11
' Good idea to set when using redirect
12
Response.Expires = 0   ' always load the page, dont store
12
Response.Expires = 0   ' always load the page, dont store
13
%>
13
%>
14
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/conf.asp"-->
15
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/globals.asp"-->
16
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/formating.asp"-->
17
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/qstr.asp"-->
18
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/common_subs.asp"-->
19
<%
19
<%
20
'------------ ACCESS CONTROL ------------------
20
'------------ ACCESS CONTROL ------------------
21
%>
21
%>
22
<!--#include file="_access_control_general.asp"-->
22
<!--#include file="_access_control_general.asp"-->
23
<%
23
<%
24
'------------ Variable Definition -------------
24
'------------ Variable Definition -------------
25
Dim parSdkTag_id
25
Dim parSdkTag_id
26
 
26
 
27
'------------ Constants Declaration -----------
27
'------------ Constants Declaration -----------
28
'------------ Variable Init -------------------
28
'------------ Variable Init -------------------
29
parSdkTag_id = Request("sdktag_id")
29
parSdkTag_id = Request("sdktag_id")
30
If parSdkTag_id = "" Then parSdkTag_id = 0
30
If parSdkTag_id = "" Then parSdkTag_id = 0
31
%>
31
%>
32
<!DOCTYPE html>
32
<!DOCTYPE html>
33
<html>
33
<html>
34
   <head>
34
   <head>
35
        <title>Release Manager</title>
35
        <title>Release Manager</title>
36
        <meta http-equiv="Pragma" content="no-cache">
36
        <link rel="shortcut icon" href="<%=FavIcon%>"/>
37
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
37
        <meta http-equiv="Pragma" content="no-cache">
38
        <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
38
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
39
        <link rel="stylesheet" href="images/navigation.css" type="text/css">
39
        <link rel="stylesheet" href="images/release_manager_style.css" type="text/css">
40
        <script language="JavaScript" src="images/common.js"></script>
40
        <link rel="stylesheet" href="images/navigation.css" type="text/css">
41
        <%bJqueryDataTables = TRUE%>
41
        <script language="JavaScript" src="images/common.js"></script>
42
        <%bJqueryForms = TRUE%>
42
        <%bJqueryDataTables = TRUE%>
43
        <!--#include file="_jquery_includes.asp"-->
43
        <%bJqueryForms = TRUE%>
44
        <!-- TIPS -->
44
        <!--#include file="_jquery_includes.asp"-->
45
        <script language="JavaScript" src="images/tipster.js"></script>
45
        <!-- TIPS -->
46
        <script language="JavaScript" src="images/_help_tips.js"></script>
46
        <script language="JavaScript" src="images/tipster.js"></script>
47
        <!-- DROPDOWN MENUS -->
47
        <script language="JavaScript" src="images/_help_tips.js"></script>
48
        <!--#include file="_menu_def.asp"-->
48
        <!-- DROPDOWN MENUS -->
49
        <script language="JavaScript1.2" src="images/popup_menu.js"></script>
49
        <!--#include file="_menu_def.asp"-->
50
        <!-- Script associated with the display of the SDK Names side panel -->
50
        <script language="JavaScript1.2" src="images/popup_menu.js"></script>
51
        <script type="text/javascript" charset="utf-8">
51
        <!-- Script associated with the display of the SDK Names side panel -->
52
        $(document).ready(function() {
52
        <script type="text/javascript" charset="utf-8">
53
            var tableEl = $('#sdk_names');
53
        $(document).ready(function() {
54
 
54
            var tableEl = $('#sdk_names');
55
            // Disable caching of AJAX responses
55
 
56
            $.ajaxSetup ({
56
            // Disable caching of AJAX responses
57
                cache: false 
57
            $.ajaxSetup ({
58
            });
58
                cache: false 
59
 
59
            });
60
            //  Configure the Summary Table
60
 
61
            var table = tableEl.DataTable({
61
            //  Configure the Summary Table
62
                deferRender:    true,
62
            var table = tableEl.DataTable({
63
                dom:            "t",
63
                deferRender:    true,
64
                sScrollY: $( document ).height() - 200,
64
                dom:            "t",
65
                scrollCollapse: true,
65
                sScrollY: $( document ).height() - 200,
66
                processing: true,
66
                scrollCollapse: true,
67
                'retrieve': true,
67
                processing: true,
68
                'serverSide': true,
68
                'retrieve': true,
69
                'ajaxSource': 'sdk_names_json.asp',
69
                'serverSide': true,
70
                'ordering': false,
70
                'ajaxSource': 'sdk_names_json.asp',
71
                'columns': [ { data: 1, className: 'dt-nowrap side_panel_data'  } ]
71
                'ordering': false,
72
            });
72
                'columns': [ { data: 1, className: 'dt-nowrap side_panel_data'  } ]
73
            //
73
            });
74
            //  jQuery function to deserialise an encoded parameter list
74
            //
75
            //  The opposite of $.param()
75
            //  jQuery function to deserialise an encoded parameter list
76
            (function ($) {
76
            //  The opposite of $.param()
77
                $.deserialize = function (str, options) {
77
            (function ($) {
78
                    var pairs = str.split(/&amp;|&/i),
78
                $.deserialize = function (str, options) {
79
                        h = {},
79
                    var pairs = str.split(/&amp;|&/i),
80
                        options = options || {};
80
                        h = {},
81
                    for(var i = 0; i < pairs.length; i++) {
81
                        options = options || {};
82
                        var kv = pairs[i].split('=');
82
                    for(var i = 0; i < pairs.length; i++) {
83
                        kv[0] = decodeURIComponent(kv[0]);
83
                        var kv = pairs[i].split('=');
84
                        if(!options.except || options.except.indexOf(kv[0]) == -1) {
84
                        kv[0] = decodeURIComponent(kv[0]);
85
                            if((/^\w+\[\w+\]$/).test(kv[0])) {
85
                        if(!options.except || options.except.indexOf(kv[0]) == -1) {
86
                                var matches = kv[0].match(/^(\w+)\[(\w+)\]$/);
86
                            if((/^\w+\[\w+\]$/).test(kv[0])) {
87
                                if(typeof h[matches[1]] === 'undefined') {
87
                                var matches = kv[0].match(/^(\w+)\[(\w+)\]$/);
88
                                    h[matches[1]] = {};
88
                                if(typeof h[matches[1]] === 'undefined') {
89
                                }
89
                                    h[matches[1]] = {};
90
                                h[matches[1]][matches[2]] = decodeURIComponent(kv[1]);
90
                                }
91
                            } else {
91
                                h[matches[1]][matches[2]] = decodeURIComponent(kv[1]);
92
                                h[kv[0]] = decodeURIComponent(kv[1]);
92
                            } else {
93
                            }
93
                                h[kv[0]] = decodeURIComponent(kv[1]);
94
                        }
94
                            }
95
                    }
95
                        }
96
                    return h;
96
                    }
97
                };
97
                    return h;
98
 
98
                };
99
                $.fn.deserialize = function (options) {
99
 
100
                    return $.deserialize($(this).serialize(), options);
100
                $.fn.deserialize = function (options) {
101
                };
101
                    return $.deserialize($(this).serialize(), options);
102
            })(jQuery);
102
                };
103
 
103
            })(jQuery);
104
            //  Function to load a page using data in the window.location.hash
104
 
105
            //      Used on direct page load
105
            //  Function to load a page using data in the window.location.hash
106
            //      Used via navigation buttons
106
            //      Used on direct page load
107
            function load_page_from_hash(mode) {
107
            //      Used via navigation buttons
108
                if (typeof mode === 'object') mode = 'Indirect';
108
            function load_page_from_hash(mode) {
109
                var hash = window.location.hash;
109
                if (typeof mode === 'object') mode = 'Indirect';
110
                if (hash.charAt(0) == '#')
110
                var hash = window.location.hash;
111
                {
111
                if (hash.charAt(0) == '#')
112
                    hash = hash.substr(1) ;
112
                {
113
                    var locationData = $.deserialize(hash);
113
                    hash = hash.substr(1) ;
114
                    load_page_body(locationData.url, locationData, false );
114
                    var locationData = $.deserialize(hash);
115
                }
115
                    load_page_body(locationData.url, locationData, false );
116
            }
116
                }
117
 
117
            }
118
            load_page_from_hash('DirectLoad');
118
 
119
            $(window).on('hashchange',load_page_from_hash );
119
            load_page_from_hash('DirectLoad');
120
 
120
            $(window).on('hashchange',load_page_from_hash );
121
 
121
 
122
            // Process click on the table row
122
 
123
            // Display versions available for this SDK
123
            // Process click on the table row
124
            //      this - a DOM node
124
            // Display versions available for this SDK
125
            //      $(this) - The jquery wrapped node
125
            //      this - a DOM node
126
            //
126
            //      $(this) - The jquery wrapped node
127
            tableEl.on( 'click', 'tbody tr', function () {
127
            //
128
                    var sdk_id = table.row( this ).data()[0];
128
            tableEl.on( 'click', 'tbody tr', function () {
129
                    load_page_body('sdk_versions.asp', {sdk_id: sdk_id}, true);
129
                    var sdk_id = table.row( this ).data()[0];
130
                    });
130
                    load_page_body('sdk_versions.asp', {sdk_id: sdk_id}, true);
131
 
131
                    });
132
 
132
 
133
<%If canActionControl("AdminSdk") Then %>
133
 
134
            //  Wire up an 'Add New SDK' button
134
<%If canActionControl("AdminSdk") Then %>
135
            $( '#addSdkName' ).click(function() {
135
            //  Wire up an 'Add New SDK' button
136
                load_page_body('sdk_names_body.asp', true);
136
            $( '#addSdkName' ).click(function() {
137
                });
137
                load_page_body('sdk_names_body.asp', true);
138
<%End If%>
138
                });
139
 
139
<%End If%>
140
        //  Listen for any trigger to force the table to be refreshed
140
 
141
        //  Listen on 'document' as the event will trickle up
141
        //  Listen for any trigger to force the table to be refreshed
142
        $(document).on("sdkNameEdited", function(){
142
        //  Listen on 'document' as the event will trickle up
143
            table.ajax.reload();
143
        $(document).on("sdkNameEdited", function(){
144
            });
144
            table.ajax.reload();
145
 
145
            });
146
        // Listen for new page body reload requests
146
 
147
        $(document).on("newPageBody", function(e, args){
147
        // Listen for new page body reload requests
148
            load_page_body(args.url, args.data, true);
148
        $(document).on("newPageBody", function(e, args){
149
 
149
            load_page_body(args.url, args.data, true);
150
            });
150
 
151
        });
151
            });
152
 
152
        });
153
//  Centralise the loading of the body of the page
153
 
154
//
154
//  Centralise the loading of the body of the page
155
function load_page_body(url, data, mode) {
155
//
156
    //  Persist these values, but don't add to the stored URL
156
function load_page_body(url, data, mode) {
157
    var persist = {
157
    //  Persist these values, but don't add to the stored URL
158
        rtag_id : <%=DB_RTAG_ID%>,
158
    var persist = {
159
        proj_id : <%=DB_PROJ_ID%>,
159
        rtag_id : <%=DB_RTAG_ID%>,
160
        pv_id : <%=DB_PV_ID%>
160
        proj_id : <%=DB_PROJ_ID%>,
161
    };
161
        pv_id : <%=DB_PV_ID%>
162
 
162
    };
163
    //  Reflect the current page load in the URL
163
 
164
    //      Shows what we are doing
164
    //  Reflect the current page load in the URL
165
    //      Allows page reload to work
165
    //      Shows what we are doing
166
    //      Allows browser history to work
166
    //      Allows page reload to work
167
    var newdata = {};
167
    //      Allows browser history to work
168
    newdata['url'] = url;
168
    var newdata = {};
169
    if ( typeof(data) !== 'undefined' ){
169
    newdata['url'] = url;
170
        for (var key in data) {
170
    if ( typeof(data) !== 'undefined' ){
171
            newdata[key] = (data[key]);
171
        for (var key in data) {
172
        }
172
            newdata[key] = (data[key]);
173
    }
173
        }
174
 
174
    }
175
    //  Prevent duplicates caused by changing window.location.hash
175
 
176
    //
176
    //  Prevent duplicates caused by changing window.location.hash
177
    var newHash = jQuery.param(newdata);
177
    //
178
    if ( newHash !== load_page_body.last || mode === true ) {
178
    var newHash = jQuery.param(newdata);
179
        $('#sdk_version').off();
179
    if ( newHash !== load_page_body.last || mode === true ) {
180
        $('#sdk_version').empty();
180
        $('#sdk_version').off();
181
        $('#sdk_version').load(url, $.extend({}, data, persist));
181
        $('#sdk_version').empty();
182
 
182
        $('#sdk_version').load(url, $.extend({}, data, persist));
183
        load_page_body.last = newHash;
183
 
184
        window.location.hash = newHash;
184
        load_page_body.last = newHash;
185
   }
185
        window.location.hash = newHash;
186
}
186
   }
187
        </script>
187
}
188
      <!-- DROPDOWN MENUS -->
188
        </script>
189
   </head>
189
      <!-- DROPDOWN MENUS -->
190
   <body>
190
   </head>
191
 
191
   <body>
192
      <!-- MENU LAYERS -->
192
 
193
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')"
193
      <!-- MENU LAYERS -->
194
         onmouseout="highlightmenu(event,'off');dynamichide(event)">
194
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')"
195
      </div>
195
         onmouseout="highlightmenu(event,'off');dynamichide(event)">
196
      <!-- TIPS LAYERS -->
196
      </div>
197
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
197
      <!-- TIPS LAYERS -->
198
      <!-- HEADER -->
198
      <div id="formTipsLayer" style="position: absolute; z-index: 1000; visibility: hidden; left:0; top: 0; width: 10">&nbsp;</div>
199
      <!--#include file="_header.asp"-->
199
      <!-- HEADER -->
200
      <!-- BODY -->
200
      <!--#include file="_header.asp"-->
201
      <table border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEFEF" style="min-height:500px;width:100%">
201
      <!-- BODY -->
202
         <tr>
202
      <table border="0" cellspacing="0" cellpadding="0" bgcolor="#EEEFEF" style="min-height:500px;width:100%">
203
            <td valign="top" class=side_panel style="position:relative;height:100%;width:10%;border-right:#999999 solid 1px;">
203
         <tr>
204
                <!-- Side panel -->
204
            <td valign="top" class=side_panel style="position:relative;height:100%;width:10%;border-right:#999999 solid 1px;">
205
               <table id=sdk_names class="full_table side_panel_table">
205
                <!-- Side panel -->
206
                <thead>
206
               <table id=sdk_names class="full_table side_panel_table">
207
                    <tr class="body_col form_align">
207
                <thead>
208
                        <th onclick="load_page_body('sdk_names_body.asp', null, true);">SDK Names
208
                    <tr class="body_col form_align">
209
                </thead>
209
                        <th onclick="load_page_body('sdk_names_body.asp', null, true);">SDK Names
210
               </table>
210
                </thead>
211
 
211
               </table>
212
            <!-- Side panel Bottom-->
212
 
213
<%If canActionControl("AdminSdk") Then %>
213
            <!-- Side panel Bottom-->
214
                <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">
214
<%If canActionControl("AdminSdk") Then %>
215
<%End If%>
215
                <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">
216
            </td>
216
<%End If%>
217
            <td width="5%"  rowspan="2" valign="top"></td>
217
            </td>
218
            <td width="80%" rowspan="2" align="center" valign="top">
218
            <td width="5%"  rowspan="2" valign="top"></td>
219
               <!-- Main display panel -->
219
            <td width="80%" rowspan="2" align="center" valign="top">
220
               <div id=sdk_version></div>
220
               <!-- Main display panel -->
221
               <!-- End Main display panel -->
221
               <div id=sdk_version></div>
222
            <td width="5%"  rowspan="2" valign="top"></td>
222
               <!-- End Main display panel -->
223
         </tr>
223
            <td width="5%"  rowspan="2" valign="top"></td>
224
      </table>
224
         </tr>
225
<!-- FOOTER -->
225
      </table>
226
<!--#include file="_footer.asp"-->
226
<!-- FOOTER -->
227
</body>
227
<!--#include file="_footer.asp"-->
228
</html>
228
</body>
229
<%
229
</html>
230
Call Destroy_All_Objects
230
<%
231
%>
231
Call Destroy_All_Objects
-
 
232
%>