Subversion Repositories DevTools

Rev

Rev 6625 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6624 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'   View Package Owner Information
5
'       form_view_package_owners.asp
6
'=====================================================
7
%>
8
<%
9
Option explicit
10
' Good idea to set when using redirect
11
Response.Expires = 0   ' always load the page, dont store
12
%>
13
<!--#include file="common/conf.asp"-->
14
<!--#include file="common/globals.asp"-->
15
<!--#include file="common/formating.asp"-->
16
<!--#include file="common/qstr.asp"-->
17
<!--#include file="common/common_subs.asp"-->
18
<!--#include file="common/_form_window_common.asp"-->
19
<!--#include file="_action_buttons.asp"-->
20
 
21
<!--#include file="class/classActionButtonControl.asp"-->
22
<%
23
'------------ ACCESS CONTROL ------------------
24
%>
25
<!--#include file="_access_control_login_optional.asp"-->
26
<!--#include file="_access_control_general.asp"-->
27
<%
28
'------------ Variable Definition -------------
29
Dim parRtagId
30
Dim modifyState
31
'------------ Constants Declaration -----------
32
'------------ Variable Init -------------------
33
parRtagId = Request("rtag_id")
34
objPMod.PersistInQryString("rtag_id")
35
ReleaseMode = GetReleaseMode( Request("rtag_id") )
36
 
37
modifyState = "disabled"
38
If canActionControl("BulkChangePackageOwner") Then modifyState = ""
39
'----------------------------------------------
40
Sub ShowSidePanel
41
End Sub
42
'----------------------------------------------
43
Sub ShowMainPanel
44
 %>
45
    <table class="embedded_table" style="margin-bottom:10px; width:50%">
46
      <tr>
47
         <td>
48
            <span nowrap class="form_ttl">VIEW PACKAGE OWNER</span>
49
            <!-- Section Top Border ---->
50
            <div class="rounded_box" style="background: white;">
51
                <!-- Section Body Header ---->
52
                <!-- Main Pane -->
53
                <table id="deploymentstatetable" width="100%" class="stripe">
54
                    <thead class="body_col">
55
                        <tr>
56
                          <th>PV_ID
57
                          <th>Package Name
58
                          <th>Package Version
59
                          <th>Base View
60
                          <th>Short Description
61
                          <th>Package Owner
62
                          <th>Select
63
                          <th>Hide1
64
                          <th>Hide2
65
                        </tr>
66
                    </thead>
67
                    <tbody>
68
                    </tbody>
69
                </table>
70
                <!-- Info / Ajax Progress bar -->
71
                <div class='bg_dialog body_txt' style='position:relative;min-height:19px;' >
72
                    <img id='ds_progressBar' style='visibility:hidden;position: absolute;display: block' src='icons/i_processing.gif' width='79' height='14'>
73
                    <div id='ds_info'  style='position: absolute;'></div>
74
                    <div>
75
                          <button id='ds_refresh'  class='rmbutton' style="display:inline; float:right;">Refresh</button>
76
                          <button id='ds_setOwner' class='rmbutton' style="display:inline; float:right;" <%=modifyState%>>Set Owner</button>
77
                          <button id='ds_clearAll' class='rmbutton' style="display:inline; float:right;" <%=modifyState%>>Clear Visible</button>
78
                          <button id='ds_setAll'   class='rmbutton' style="display:inline; float:right;" <%=modifyState%>>Set Visible</button>
79
                    </div>
80
                </div>
81
            </div>
82
            </td>
83
        </tr>
84
    </table>
85
<%
86
End Sub
87
'----------------------------------------------
88
%>
89
<html>
90
   <head>
91
        <title>Release Manager</title>
92
        <link rel="shortcut icon" href="<%=FavIcon%>"/>
93
        <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
94
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
95
        <link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
96
        <link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
97
        <script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
98
        <%bJqueryDataTables = TRUE%>
99
        <!--#include file="_jquery_includes.asp"-->
100
        <!-- TIPS -->
101
        <script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
102
        <script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
103
        <script language="JavaScript" type="text/javascript">
104
        formTips.tips.h       = stdTip(300, 'Title', 'Text');
105
        </script>
106
        <script type="text/javascript" charset="utf-8">
107
        var table;
108
 
109
        // Suppress errros about badly formatted data
110
        $.fn.dataTable.ext.errMode = 'none';
111
 
112
        /* Create an array with the values of all the checkboxes in a column */
113
        $.fn.dataTable.ext.order['dom-checkbox'] = function  ( settings, col )
114
        {
115
            return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
116
                return $('input', td).prop('checked') ? '1' : '0';
117
            } );
118
        }
119
 
120
	$(document).ready(function() {
121
		/* Init DataTables */
122
        table = $("#deploymentstatetable").DataTable({
123
            processing: true,
124
            deferRender: false,
125
            dom: "frtiS",
126
            sScrollY: $( document ).height() - 45 - 200 - 15,
127
            scrollCollapse: true,
128
            retrieve:true,
129
            serverSide: false,
130
            ajax : {
131
                url : "view_package_owner_json.asp",
132
                data : function (o){
133
                    o.rtag_id = <%=parRtagId%>;
134
                },
135
                dataSrc : function (json){
136
                    // Detect errors
137
                     if (json.result != 0) {
138
                         $('#ds_info').text("Error:" + ((json.error != 0) ? json.emsgSummary : "Reason not given"));
139
                         return { data: {}};
140
                     }
141
 
142
                    //  Process the raw Ajax data
143
                    $.each(json.data, function(idx,row){
144
                        //      Create nice email fields
145
                        row[5] = "<span title='Select Email Options' class='mailto txt_linked' data-email='" + row[7] + "' data-uname='" + row[6] + "'>" + row[5] + "</span>"
146
 
147
                        // Create a check box
148
                        //  Not for packages imported via SDK
149
                        var cbClass = row[9] ? '' : 'clickable';
150
                        var cbDis = row[9] || "<%=modifyState%>" ? ' disabled ' : '';
151
                        row[6] = '<div><input type="checkbox" class='+cbClass+' data-pvid=' + row[0] + ' '+ cbDis + '></div>'
152
 
153
                    });
154
                    return json.data;
155
                },
156
                beforeSend: function (){
157
                     $("#ds_progressBar").css('visibility', 'visible');
158
                     $(document.body).css({ 'cursor': 'progress' });
159
                     $('#ds_info').empty();
160
                },
161
                complete: function (){
162
                     $("#ds_progressBar").css('visibility', 'hidden');
163
                     $(document.body).css({ 'cursor': 'auto' });
164
                },
165
                error: function(jqXHR, textStatus, errorThrown) {
166
                    $('#ds_info').text("Error:" + errorThrown);
167
                    //if fails
168
                },
169
            },
170
            ordering: true,
171
            order: [[ 1, "asc" ]],
172
            lengthChange : false,
173
 
174
            columns: [
175
               { visible : false },
176
               { width: "20%", className: "dt-nowrap",},
177
               { width: "20%", className: "dt-nowrap"  },
178
               { width: "1%", className: "dt-nowrap"  },
179
               { orderable: false },
180
               { className: "dt-nowrap" },
181
               { width: "1%", orderable: true, className: "dt-nowrap", orderDataType : 'dom-checkbox' },
182
               { visible: false },
183
               { visible: false },
184
           ],
185
          columnDefs: [
186
                { "orderData": [ 8 ],    "targets": 1 },
187
            ]
188
        });
189
 
190
        // Wire Up buttons
191
        $('#ds_refresh').on("click", function(){
192
            table.ajax.reload(null, false);
193
        });
194
 
195
        $('#ds_clearAll').on("click", function(){
196
            $('.clickable').removeAttr('checked');
197
            updateCounts();        
198
        });
199
 
200
        $('#ds_setAll').on("click", function(){
201
            $('.clickable').prop('checked', true);
202
            updateCounts();        
203
        });
204
 
205
        $('#ds_setOwner').on("click", function(){
206
            var selList = new Array();
207
             $('.clickable:checked').each(function(){
208
                 var pvid = $(this).data("pvid");
209
                 selList.push(pvid);
210
             });
211
 
212
            //console.log('Data', selList);
213
            if ( selList.length > 0 ) {
214
                MM_openVixIFrame('_wform_change_owner_bulk.asp?pvidList=' + selList.join(','),'Bulk Change Owner');
215
            }
216
        });
217
 
218
        $('#deploymentstatetable').click(updateCounts);
219
 
220
        function updateCounts() {
221
            console.log("CheckCounts");
222
            var checkCount = $('.clickable:checked').length;
223
            $('#ds_info').text(checkCount + " packages selected");
224
        }
225
    });
226
</script>
227
 
228
      <!-- DROPDOWN MENUS -->
229
      <!--#include file="_menu_def.asp"-->
230
      <script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
231
   </head>
232
   <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
233
      <!-- HEADER -->
234
      <!--#include file="_header.asp"-->
235
      <!-- BODY ---->
236
      <table class="full_table">
237
         <tr>
238
            <td class="panel_bg" valign="top" style="min-width:146px">
239
                <%Call ShowSidePanel%>
240
            </td>
241
            <td width="100%" rowspan="2" align="center" valign="top" bgcolor="#EEEFEF">
242
                <%Call ShowMainPanel%>
243
            </td>
244
         </tr>
245
         <tr>
246
            <td class="panel_bg" valign="bottom" align="center" height="350"></td>
247
         </tr>
248
      </table>
249
      <!-- FOOTER -->
250
      <!--#include file="_footer.asp"-->
251
   </body>
252
</html>