Subversion Repositories DevTools

Rev

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

Rev 5050 Rev 5051
Line 47... Line 47...
47
        <link rel="stylesheet" href="jquery/form-validator.css" type="text/css">
47
        <link rel="stylesheet" href="jquery/form-validator.css" type="text/css">
48
        <!-- TIPS -->
48
        <!-- TIPS -->
49
        <!-- DROPDOWN MENUS -->
49
        <!-- DROPDOWN MENUS -->
50
        <!--#include file="_menu_def.asp"-->
50
        <!--#include file="_menu_def.asp"-->
51
        <script language="JavaScript1.2" src="images/popup_menu.js"></script>
51
        <script language="JavaScript1.2" src="images/popup_menu.js"></script>
52
        <script language="JavaScript" type="text/javascript">
-
 
53
            $(document).ready(function() {
-
 
54
//                $('#popmenu').load('sdk_version_new.asp', {rtag_id : <%=parRtag_id%>});
-
 
55
                if (<%=parSdkTag_id%> <= 0 )
-
 
56
                    $("#main_section").css('visibility', 'hidden');
-
 
57
            });
-
 
58
        </script>
-
 
59
            <script type="text/javascript" charset="utf-8">
-
 
60
            $(document).ready(function() {
-
 
61
 
-
 
62
                // Disable caching of AJAX responses
-
 
63
                $.ajaxSetup ({
-
 
64
                    cache: false 
-
 
65
                });
-
 
66
 
-
 
67
                function setInfo(txt) {
-
 
68
                    $("#info").text( txt);
-
 
69
                }
-
 
70
 
-
 
71
                //  Configure the Summary Table
-
 
72
                $('#sdk_content').DataTable({
-
 
73
                        deferRender:    true,
-
 
74
                        dom:            "frtiS",
-
 
75
                        sScrollY: $( document ).height() - 255,
-
 
76
                        scrollCollapse: true,
-
 
77
                        processing: true,
-
 
78
                        retrieve:true,
-
 
79
                        serverSide: true,
-
 
80
                        ajaxSource: "sdk_content_json.asp",
-
 
81
                        "fnServerParams": function ( aoData ) {
-
 
82
                            aoData.push( { "name": "sdktag_id", "value": <%=parSdkTag_id%> } );
-
 
83
                        },
-
 
84
                        "ordering": true,
-
 
85
                        "order": [[ 1, "asc" ]],
-
 
86
 
-
 
87
                         "columns": [
-
 
88
                            { "data": "PV_ID" },
-
 
89
                            { "data": "PKG_NAME" },
-
 
90
                            { "data": "PKG_VERSION" },
-
 
91
                            { "data": "SDKPKG_CHECK" },
-
 
92
                        ],
-
 
93
 
-
 
94
                        //"columnDefs" : [ 
-
 
95
                        //    {"visible" : false, "targets" : [0]},
-
 
96
                        //    ],
-
 
97
 
-
 
98
                        });
-
 
99
 
-
 
100
                    //  Process each row of table data before it is presented to the table scroller
-
 
101
                    //  Process the raw Ajax data
-
 
102
                    //      Create a checkbox for the state
-
 
103
                    //      Add a data item to the entry - to allow traceback when saving
-
 
104
                    $('#sdk_content')
-
 
105
                        .on('xhr.dt', function ( e, settings, json ) {
-
 
106
                            json.aaData.forEach(function(row){
-
 
107
                                var checked = row.SDKPKG_STATE == "E" ? 'checked' : '';
-
 
108
                                row.SDKPKG_CHECK = '<input type="checkbox" class=clickable '+ checked +' data-pvid='+ row.PV_ID +'>';
-
 
109
                            });
-
 
110
                        } );
-
 
111
 
-
 
112
                    // Process click on checkboxes within the datatable
-
 
113
                    //      this - a DOM node
-
 
114
                    //      $(this) - The jquery wrapped node
-
 
115
                    //
-
 
116
                    $('#sdk_content').on( 'click', 'tbody td :checkbox', function () {
-
 
117
setInfo("checked:" +  this.checked + ", pvid:" + $(this).data('pvid'));
-
 
118
 
-
 
119
var table = $('#sdk_content').DataTable();
-
 
120
var row = $(this).closest('tr');
-
 
121
var d = table.row( row ).data();
-
 
122
 
-
 
123
 
-
 
124
                            $("#progressBar").css('visibility', 'visible');
-
 
125
                            $.ajax(
-
 
126
                            {
-
 
127
                                url : 'sdk_opr_json.asp',
-
 
128
                                type: "POST",
-
 
129
                                data : { action : 'setSdkContentState', sdktagId : <%=parSdkTag_id%>, pv_id : $(this).data('pvid'), sdkpkg_state : this.checked ? 'E' : '-' },
-
 
130
                                dataType : "json",
-
 
131
                                cache: false,
-
 
132
                                success:function(data, textStatus, jqXHR)
-
 
133
                                {
-
 
134
                                    //data: return data from server
-
 
135
                                    //console.log ("UpdateData", data);
-
 
136
                                    if (data.result != 0)
-
 
137
                                    {
-
 
138
                                        setInfo("Error:" + ((data.error != 0) ? data.emsgSummary : "Reason not given"));
-
 
139
                                        //if (data.error >= 0) disableForm();
-
 
140
                                        return;
-
 
141
                                    }
-
 
142
                                    //  call user success function
-
 
143
                                    //success(data);
-
 
144
                                },
-
 
145
                                error: function(jqXHR, textStatus, errorThrown)
-
 
146
                                {
-
 
147
                                    setInfo("Error:" + errorThrown);
-
 
148
                                    //disableForm();
-
 
149
                                    //if fails
-
 
150
                                },
-
 
151
                                complete : function()
-
 
152
                                {
-
 
153
                                    $("#progressBar").css('visibility', 'hidden');
-
 
154
                                }
-
 
155
                            });
-
 
156
                        } );
-
 
157
                });
-
 
158
            </script>
-
 
159
        <!-- Script associated with the display of the SDK Namess side panel -->
52
        <!-- Script associated with the display of the SDK Names side panel -->
160
        <script type="text/javascript" charset="utf-8">
53
        <script type="text/javascript" charset="utf-8">
161
        $(document).ready(function() {
54
        $(document).ready(function() {
162
            var tableEl = $('#sdk_names');
55
            var tableEl = $('#sdk_names');
163
 
56
 
164
            // Disable caching of AJAX responses
57
            // Disable caching of AJAX responses
Line 182... Line 75...
182
                        {"visible" : false, "targets" : [2]},
75
                        {"visible" : false, "targets" : [2]},
183
                        {"visible" : false, "targets" : [3]},
76
                        {"visible" : false, "targets" : [3]},
184
                        ],
77
                        ],
185
                    });
78
                    });
186
 
79
 
-
 
80
            //  Centralise the loading of the body of the page
-
 
81
            //
-
 
82
            function load_page_body(url, data) {
-
 
83
                $('#sdk_version').off();
-
 
84
                $('#sdk_version').empty();
-
 
85
                $('#sdk_version').load(url, data);
-
 
86
            }
-
 
87
 
187
                    // Process click on the table row
88
                    // Process click on the table row
188
                    // Display versions available for this SDK
89
                    // Display versions available for this SDK
189
                    //      this - a DOM node
90
                    //      this - a DOM node
190
                    //      $(this) - The jquery wrapped node
91
                    //      $(this) - The jquery wrapped node
191
                    //
92
                    //
192
            tableEl.on( 'click', 'tbody tr', function () {
93
            tableEl.on( 'click', 'tbody tr', function () {
193
                    var sdk_id = table.row( this ).data()[0];
94
                    var sdk_id = table.row( this ).data()[0];
194
 
-
 
195
                    $('#sdk_version').empty();
-
 
196
                    $('#sdk_version').load('sdk_versions.asp', {rtag_id: <%=parRtag_id%>, sdk_id: sdk_id});
95
                    load_page_body('sdk_versions.asp', {sdk_id: sdk_id});
197
                    });
96
                    });
198
 
97
 
199
 
98
 
200
<%If objAccessControl.IsActive("CreateNewProject") Then %>
99
<%If objAccessControl.IsActive("CreateNewProject") Then %>
201
            //  Wire up an 'Add' button
100
            //  Wire up an 'Add New SDK' button
202
            $( '#addSdk' ).click(function() {
101
            $( '#addSdkName' ).click(function() {
203
                $('#popmenu').load('sdk_names_new.asp');
102
                load_page_body('sdk_names_body.asp');
204
                });
103
                });
205
<%End If%>
104
<%End If%>
-
 
105
 
-
 
106
        //  Listen for any trigger to force the table to be refreshed
-
 
107
        //  Listen on 'document' as the event will trickle up
-
 
108
        $(document).on("sdkNameEdited", function(){
-
 
109
            table.ajax.reload();
-
 
110
            });
-
 
111
 
-
 
112
        // Listen for new page body reload requests
-
 
113
        $(document).on("newPageBody", function(e, args){
-
 
114
console.log ("nePageBody:" + args.url + args.data);
-
 
115
            load_page_body(args.url, args.data);
-
 
116
 
-
 
117
            });
206
        });
118
        });
207
        </script>
119
        </script>
208
      <!-- DROPDOWN MENUS -->
120
      <!-- DROPDOWN MENUS -->
209
 
-
 
210
 
-
 
211
        <style type="text/css">
-
 
212
        </style>
-
 
213
   </head>
121
   </head>
214
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
122
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
215
 
123
 
216
      <!-- MENU LAYERS -------------------------------------->
124
      <!-- MENU LAYERS -------------------------------------->
217
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')"
125
      <div id="popmenu" class="menuskin" onmouseover="clearhidemenu();highlightmenu(event,'on')"
Line 238... Line 146...
238
               </table>
146
               </table>
239
            </td>
147
            </td>
240
            <td width="5%"  rowspan="2" valign="top"></td>
148
            <td width="5%"  rowspan="2" valign="top"></td>
241
            <td width="80%" rowspan="2" align="center" valign="top">
149
            <td width="80%" rowspan="2" align="center" valign="top">
242
               <!-- Main display panel -->
150
               <!-- Main display panel -->
243
                    <div id=sdk_version></div>
151
               <div id=sdk_version></div>
244
               <table id=main_section class="full_table">
-
 
245
                  <!-- Section Header ---->
-
 
246
                  <tr>
-
 
247
                     <td nowrap class="form_ttl">DON'T KNOW YET</td>
-
 
248
                  </tr>
-
 
249
 
-
 
250
                  <!-- Section Body ---->
-
 
251
                  <tr>
-
 
252
                  <td>
-
 
253
                    <div class="rounded_box">
-
 
254
                      <table id=sdk_content class="full_table" >
-
 
255
                          <thead>
-
 
256
                          <tr class="body_col form_align">
-
 
257
                            <th width="1%"> PV_ID
-
 
258
                            <th width="10%"> Package Name
-
 
259
                            <th> Package Version
-
 
260
                            <th width="1%"> State
-
 
261
                          </thead>
-
 
262
                      </table>
-
 
263
 
-
 
264
                      <!-- Info / Ajax Progress bar -->
-
 
265
                      <div class='bg_dialog body_txt' style='position:relative;min-height:1em;' >
-
 
266
                          <img id='progressBar' style='visibility:hidden;position: absolute' src='icons/i_processing.gif' width='79' height='14'>
-
 
267
                          <div id=info  style='position: absolute;'></div>
-
 
268
                      </div>
-
 
269
 
-
 
270
                    </div>
-
 
271
                </table>
-
 
272
                <!-- End Main display panel -->
152
               <!-- End Main display panel -->
273
            <td width="5%"  rowspan="2" valign="top"></td>
153
            <td width="5%"  rowspan="2" valign="top"></td>
274
         </tr>
154
         </tr>
275
         <tr>
155
         <tr>
-
 
156
            <!-- Side panel Bottom-->
276
            <td valign="bottom" align="center" background="images/bg_home_orange.gif"></td>
157
            <td valign="bottom" align="center" background="images/bg_home_orange.gif">
-
 
158
<%If objAccessControl.IsActive("CreateNewProject") Then %>
-
 
159
                <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">
-
 
160
<%End If%>
-
 
161
            </td>
277
            <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
162
            <td background="images/bg_lght_gray.gif" valign="top"><img src="images/h_trsp_dot.gif" width="1" height="500"></td>
278
        </tr>
163
        </tr>
279
      </table>
164
      </table>
280
<!-- FOOTER -->
165
<!-- FOOTER -->
281
<!--#include file="_footer.asp"-->
166
<!--#include file="_footer.asp"-->