Subversion Repositories DevTools

Rev

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

Rev 7290 Rev 7291
Line 1... Line 1...
1
<%@LANGUAGE="VBSCRIPT"%>
1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
2
<%
3
'=====================================================
3
'=====================================================
4
'|                                                   |
4
'|                                                   |
5
'|				        view by file			     |
5
'|                        view by file                 |
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"-->
Line 46... Line 46...
46
If (parKeyword = "") Then 
46
If (parKeyword = "") Then 
47
    Call Destroy_All_Objects
47
    Call Destroy_All_Objects
48
    Response.Redirect ("index.asp")
48
    Response.Redirect ("index.asp")
49
End If
49
End If
50
'==============================================================
50
'==============================================================
-
 
51
'----------------------------------------------
-
 
52
'
-
 
53
Sub InsertJavaScript%>
-
 
54
<script type="text/javascript" charset="utf-8">
-
 
55
    var table;
-
 
56
    $(document).ready(function() {
-
 
57
    /* Init DataTables */
-
 
58
 
-
 
59
        // Format a search string for DataTables
-
 
60
        // Convert all * into a %
-
 
61
        function formatSearch(str) {
-
 
62
            return str.replace(/\*/g,'%');
-
 
63
        }
-
 
64
 
-
 
65
        // Setup - add a text input to each cell within the header row marked with a search class
-
 
66
        // Must be done  before the dataTable is created as the DOM is changed 
-
 
67
        $('#tfiles .search th').each( function (colIdx) {
-
 
68
            var title = $(this).text();
-
 
69
            if ( (title) ) {
-
 
70
                var el = $('<input id=inp_' + title.toLowerCase() + ' type="search" placeholder="Search ' + title + '" />');
-
 
71
                $(this).html(el);
-
 
72
                el.on('keyup change', function(ev) {
-
 
73
                if (ev.keyCode == 13) { //only on enter keypress (code 13)
-
 
74
                    table
-
 
75
                        .column(colIdx)
-
 
76
                        .search(formatSearch(this.value))
-
 
77
                        .draw();
-
 
78
                    }
-
 
79
                });
-
 
80
            }
-
 
81
        });
-
 
82
 
-
 
83
        // Add Jason listeners
-
 
84
        $("#tfiles").on('preXhr.dt', function ( e, settings, data ) {
-
 
85
            showGlobalProgress();
-
 
86
         });
-
 
87
 
-
 
88
        $("#tfiles").on('xhr.dt', function ( e, settings, data ) {
-
 
89
            hideGlobalProgress();
-
 
90
         });
-
 
91
 
-
 
92
        // Create the DataTable
-
 
93
        $.fn.dataTable.ext.errMode = function ( settings, helpPage, message ) { 
-
 
94
            hideGlobalProgress();
-
 
95
            console.log(message);
-
 
96
        };
-
 
97
 
-
 
98
        var w = window,
-
 
99
            d = document,
-
 
100
            e = d.documentElement,
-
 
101
            g = d.getElementsByTagName('body')[0],
-
 
102
            x = w.innerWidth || e.clientWidth || g.clientWidth,
-
 
103
            y = w.innerHeight|| e.clientHeight|| g.clientHeight;
-
 
104
        var theight = y - $('#tfiles').offset().top - 90;
-
 
105
//console.log("theight", y , $('#tfiles').offset().top)
-
 
106
        table = $("#tfiles").dataTable({
-
 
107
            serverSide: true,
-
 
108
            deferRender : true,
-
 
109
            xxxprocessing: true,
-
 
110
            ajax : {
-
 
111
                url : "view_by_files_json.asp",
-
 
112
                type : "POST",
-
 
113
                data : function (o){
-
 
114
                           o.filename = formatSearch("<%=parKeyword%>");
-
 
115
                }
-
 
116
            },
-
 
117
            dom: "rti",
-
 
118
            scrollY: theight,
-
 
119
            scrollCollapse: true,
-
 
120
            paging: true,
-
 
121
            scroller: {
-
 
122
                loadingIndicator: true,
-
 
123
                displayBuffer: 9,
-
 
124
            },
-
 
125
            order: [[ 0, "desc" ]],
-
 
126
            info: true,
-
 
127
            columns: [
-
 
128
                { "visible": false },
-
 
129
                { render :  function ( data, type, row, meta ) { 
-
 
130
                      var sLink = "<%=dpkg_archiveURL%>" + row[3] + "/" +  row[4] + "/" + row[2] + "/" + row[1];
-
 
131
                      sLink = sLink.replace(/\\+/g,'/') ;
-
 
132
                      sLink = sLink.replace(/\/+/g,'/') ;
-
 
133
                      return '<img src="images/rex_images/ext_blank.gif" border="0" hspace="2" align="absmiddle"><a href="'+sLink+'" class=body_link>'+data+'</a>';
-
 
134
                }},
-
 
135
                { render :  function ( data, type, row, meta ) {
-
 
136
                      if ( data  ) {
-
 
137
                          data = data.replace(/\\+/g, '/');
-
 
138
                          data = data.replace(/\/+/g,'\\') ;
-
 
139
                      }
-
 
140
                      return data;
-
 
141
                }},null,
-
 
142
                { render :  function ( data, type, row, meta ) { return '<a href="dependencies.asp?pv_id='+row[0]+'" class=body_link>'+data+'</a>';}},
-
 
143
                null
-
 
144
            ],
-
 
145
            columnDefs : [
-
 
146
                {className: "nowrap", targets : '_all' } 
-
 
147
            ],
-
 
148
            orderCellsTop : true,
-
 
149
            initComplete : function () {
-
 
150
            },
-
 
151
        }).api();
-
 
152
 
-
 
153
        //  Transfer the keyword to the 'file' search item
-
 
154
        $('#inp_file').val('<%=parKeyword%>');
-
 
155
        table.column(1).search( formatSearch("<%=parKeyword%>") );
-
 
156
    });
-
 
157
</script>
-
 
158
<%End Sub
-
 
159
'----------------------------------------------
51
Sub ShowMainPanel
160
Sub ShowMainPanel
52
%>
161
%>
53
	<!-- PACKAGE SEARCH ------------------------------------------------>
162
    <!-- PACKAGE SEARCH ------------------------------------------------>
54
	<%
163
    <%
55
	' Format keyword for search
164
    ' Format keyword for search
56
	If InStr( parKeyword, "*" ) > 0 Then
165
    If InStr( parKeyword, "*" ) > 0 Then
57
		' Use wild cards
166
        ' Use wild cards
58
		FileName = Replace( parKeyword, "*", "%")
167
        FileName = Replace( parKeyword, "*", "%")
59
	Else
168
    Else
60
		' Wildcard is not used, hence append card to the end for better results
169
        ' Wildcard is not used, hence append card to the end for better results
61
		FileName = parKeyword & "%"
170
        FileName = parKeyword & "%"
62
	End If
171
    End If
63
 
-
 
64
 
-
 
65
	OraDatabase.Parameters.Add "FILE_NAME", 	FileName, ORAPARM_INPUT, ORATYPE_VARCHAR2
-
 
66
	OraDatabase.Parameters.Add "PKG_NAME", 		Replace( parFPkgName, "*", "%" ), ORAPARM_INPUT, ORATYPE_VARCHAR2
-
 
67
	OraDatabase.Parameters.Add "PKG_VERSION", 	Replace( parFPkgVersion, "*", "%" ), ORAPARM_INPUT, ORATYPE_VARCHAR2
-
 
68
	OraDatabase.Parameters.Add "PAGE_SIZE", 	MaxRows, ORAPARM_INPUT, ORATYPE_NUMBER
-
 
69
 
-
 
70
	Set rsRep = OraDatabase.DbCreateDynaset( GetQuery("FindFiles.sql"), 0 )
-
 
71
 
-
 
72
	OraDatabase.Parameters.Remove "FILE_NAME"
-
 
73
	OraDatabase.Parameters.Remove "PKG_NAME"
-
 
74
	OraDatabase.Parameters.Remove "PKG_VERSION"
-
 
75
	OraDatabase.Parameters.Remove "PAGE_SIZE"
-
 
76
 
-
 
77
	%>
-
 
78
	<table width="100%"  border="0" cellspacing="0" cellpadding="5">
-
 
79
	  <tr>
-
 
80
		<td class="body_sect">Files</td>
-
 
81
	  </tr>
-
 
82
	  <tr>
172
    %>
83
		<td nowrap class="body_txt">
-
 
84
			Results for <b><%=parKeyword%></b>. Showing max. <%=MaxRows%> results.
-
 
85
		</td>
-
 
86
	  </tr>
-
 
87
	</table>
-
 
88
	<table width="100%" border="0" cellspacing="1" cellpadding="5" class=stdGrey>
173
    <table id=tfiles width="100%" border="0" cellspacing="1" cellpadding="2" class=stdGrey>
89
	<form name="file_search" method="get" action="<%=ScriptName%>">
-
 
90
	  <input type="hidden" name="filename" value="<%=parKeyword%>">
-
 
91
	  <input type="hidden" name="listby" value="<%=parListBy%>">
-
 
92
	  <thead>
174
      <thead>
93
		<tr>
175
        <tr>
94
		<th width="20%" nowrap>File</th>
176
            <th width="20%" nowrap>PvId</th>
-
 
177
            <th width="20%" nowrap>File<%=Quick_Help("FindFile")%></th>
95
		<th width="40%" nowrap>Path</th>
178
            <th width="40%" nowrap>Path</th>
96
		<th width="20%" nowrap>Package Name</th>
179
            <th width="20%" nowrap>Package Name</th>
97
		<th width="20%" nowrap>Version</th>
180
            <th width="20%" nowrap>Version</th>
98
		<th width="1%" nowrap>CheckSum&nbsp;(CKSUM)</th>
181
            <th width="1%" nowrap>CheckSum&nbsp;(CKSUM)</th>
99
	  </tr>
182
        </tr>
100
	  <tr>
-
 
101
		<th nowrap></th>
183
        <tr class=search>
102
		<th nowrap></th>
184
            <th></th>
103
		<th nowrap><input name="fpkgname" type="text" class="form_item" size="10" value="<%=parFPkgName%>"></th>
-
 
104
		<th nowrap><input name="fpkgversion" type="text" class="form_item" size="10" value="<%=parFPkgVersion%>"></th>
-
 
105
		<th nowrap></th>
185
            <th>File</th>
106
	  </tr>
-
 
107
	 </thead>
-
 
108
	  <%
-
 
109
	  If rsRep.RecordCount = 0 Then
186
            <th>Path</th>
110
		With Response
-
 
111
			.write "<tr>"
-
 
112
			.write "<td colspan='5'>Your search <b>"& parKeyword &"</b> did not match any file names.</td>"
-
 
113
			.write "</tr>"
-
 
114
		End With
-
 
115
	  End If
-
 
116
	  
-
 
117
	  Do While ((NOT rsRep.BOF) AND (NOT rsRep.EOF)) 
-
 
118
		sLink = dpkg_archiveURL & rsRep("pkg_name") &"/"& rsRep("pkg_version") &"/"& Replace( rsRep("file_path") & rsRep("file_name"), "\", "/" )
-
 
119
	  %>
-
 
120
		  <tr> 
-
 
121
			<td nowrap><a href="<%=sLink%>" class="body_link"><img src='images/rex_images/ext_blank.gif' border='0' hspace='2' align='absmiddle'><%=Highlight_Substring( rsRep("file_name"), parKeyword )%></a></td>
-
 
122
			<td nowrap><%=rsRep("file_path")%></td>
-
 
123
			<td nowrap><%=rsRep("pkg_name")%></td>
187
            <th>Package</th>
124
			<td nowrap><a href="dependencies.asp?pv_id=<%=rsRep("pv_id")%>" class="body_link"><%=rsRep("pkg_version")%></a></td>
-
 
125
			<td nowrap><%=rsRep("crc_cksum")%></td>
188
            <th>Version</th>
126
		  </tr>
-
 
127
	  <%  
-
 
128
		  rsRep.MoveNext
189
            <th></th>
129
	  Loop
-
 
130
	  
-
 
131
	  rsRep.Close()
-
 
132
	  %>
-
 
133
	  <tr> 
-
 
134
		<td colspan="5" background="images/bg_rep_line.gif"><img src="images/spacer.gif" width="1" height="1"></td>
-
 
135
	  </tr>
190
        </tr>
136
	  
-
 
137
	  </form>
191
     </thead>
138
	</table>
192
    </table>
139
<%
193
<%
140
End Sub
194
End Sub
141
%>
195
%>
142
<html>
196
<html>
143
	<head>
197
    <head>
144
	<title>Release Manager</title>
198
    <title>Release Manager</title>
145
	<link rel="shortcut icon" href="<%=FavIcon%>"/>
199
    <link rel="shortcut icon" href="<%=FavIcon%>"/>
146
	<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
200
    <meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
147
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
201
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
148
	<link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
202
    <link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css">
149
	<link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
203
    <link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css">
150
	<script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
204
    <script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script>
-
 
205
    <!-- TIPS -->
-
 
206
    <script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script>
-
 
207
    <script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script>
-
 
208
    <%bJqueryDataTables = TRUE%>
151
	<!--#include file="_jquery_includes.asp"-->
209
    <!--#include file="_jquery_includes.asp"-->
152
	<!-- DROPDOWN MENUS -->
210
    <!-- DROPDOWN MENUS -->
153
	<!--#include file="_menu_def.asp"-->
211
    <!--#include file="_menu_def.asp"-->
154
	<script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
212
    <script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script>
-
 
213
    <%Call InsertJavaScript%>
155
	</head>
214
    </head>
156
	<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
215
    <body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" >
157
	<!-- HEADER -->
216
    <!-- HEADER -->
158
	<!--#include file="_header.asp"-->
217
    <!--#include file="_header.asp"-->
159
	<!-- BODY ---->
218
    <!-- BODY ---->
160
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
219
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
161
			<tr> 
220
            <tr> 
162
				<td width="20%" class='bg_panel'>
221
                <td width="20%" class='bg_panel'>
163
				<!--#include file="_front_explorer.asp"-->
222
                <!--#include file="_front_explorer.asp"-->
164
				</td>
223
                </td>
165
				<td rowspan="2" valign="top"> 
224
                <td rowspan="2" valign="top"> 
166
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
225
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
167
						<tr> 
226
                        <tr> 
168
							<td >
227
                            <td >
169
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
228
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
170
									<tr> 
-
 
171
										<td width="1%"></td>
229
                                    <tr> 
172
										<td width="100%" align="right"><img src="images/h_trsp_dot.gif" width="1" height="20"></td>
230
                                        <td style="width:10px;height:20px"></td>
173
										<td width="1%"></td>
231
                                        <td class=body_sect>Files</td>
174
									</tr>
-
 
175
									<tr> 
-
 
176
										<td bgcolor="#FFFFFF"><img src="images/h_trsp_dot.gif" width="10" height="500"></td>
232
                                        <td></td>
177
										<td bgcolor="#FFFFFF" valign="top"> 
233
                                    </tr>
178
											<%Call ShowMainPanel%>
234
                                    <tr> 
179
											<br>
235
                                        <td></td>
180
											<!------------------------------------------------------------>			
236
                                        <td><%Call ShowMainPanel%> </td>
181
										</td>
-
 
182
										<td background="images/lbox_bgside_white.gif">&nbsp;</td>
237
                                        <td>&nbsp;</td>
183
									</tr>
238
                                    </tr>
184
								</table>
239
                                </table>
185
							</td>
240
                            </td>
186
						</tr>
241
                        </tr>
187
				  </table>
242
                  </table>
188
				</td>
243
                </td>
189
				<td width="11%">&nbsp;</td>
244
                <td width="11%">&nbsp;</td>
190
			</tr>
245
            </tr>
191
			<tr> 
246
            <tr> 
192
				<td class='bg_panel_btm' height="350">
247
                <td class='bg_panel_btm' height="350">
193
					<img src="images/img_gear.gif" width="107" height="107" vspace="20" hspace="30"></td>
248
                    <img src="images/img_gear.gif" width="107" height="107" vspace="20" hspace="30"></td>
194
				<td></td>
249
                <td></td>
195
			</tr>
250
            </tr>
196
		</table>
251
        </table>
197
		<!-- FOOTER -->
252
        <!-- FOOTER -->
198
		<!--#include file="_footer.asp"-->
253
        <!--#include file="_footer.asp"-->
199
	</body>
254
    </body>
200
</html>
255
</html>