Rev 7290 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@LANGUAGE="VBSCRIPT"%><%'====================================================='| |'| view by file |'| |'=====================================================%><%Option explicit' Good idea to set when using redirectResponse.Expires = 0 ' always load the page, dont store%><!--#include file="common/conf.asp"--><!--#include file="common/globals.asp"--><!--#include file="common/formating.asp"--><!--#include file="common/qstr.asp"--><!--#include file="common/common_subs.asp"--><%'------------ ACCESS CONTROL ------------------%><!--#include file="_access_control_login_optional.asp"--><!--#include file="_access_control_general.asp"--><%'------------ Variable Definition -------------Dim rsRepDim parKeywordDim parFPkgName, parFPkgVersionDim FileNameDim sLink'------------ Constants Declaration -----------Const MaxRows = 100'------------ Variable Init -------------------parKeyword = Request("filename")parFPkgName = RequestDefault("fpkgname", "*")parFPkgVersion = RequestDefault("fpkgversion", "*")'----------------------------------------------%><%'-----------------------------------------------------------------------------------------------------------------------'-----------------------------------------------------------------------------------------------------------------------%><%'==================== MAIN LINE ===============================If (parKeyword = "") ThenCall Destroy_All_ObjectsResponse.Redirect ("index.asp")End If'=============================================================='----------------------------------------------'Sub InsertJavaScript%><script type="text/javascript" charset="utf-8">var table;$(document).ready(function() {/* Init DataTables */// Format a search string for DataTables// Convert all * into a %function formatSearch(str) {return str.replace(/\*/g,'%');}// Setup - add a text input to each cell within the header row marked with a search class// Must be done before the dataTable is created as the DOM is changed$('#tfiles .search th').each( function (colIdx) {var title = $(this).text();if ( (title) ) {var el = $('<input id=inp_' + title.toLowerCase() + ' type="search" placeholder="Search ' + title + '" />');$(this).html(el);el.on('keyup change', function(ev) {if (ev.keyCode == 13) { //only on enter keypress (code 13)table.column(colIdx).search(formatSearch(this.value)).draw();}});}});// Add Jason listeners$("#tfiles").on('preXhr.dt', function ( e, settings, data ) {showGlobalProgress();});$("#tfiles").on('xhr.dt', function ( e, settings, data ) {hideGlobalProgress();});// Create the DataTable$.fn.dataTable.ext.errMode = function ( settings, helpPage, message ) {hideGlobalProgress();console.log(message);};var w = window,d = document,e = d.documentElement,g = d.getElementsByTagName('body')[0],x = w.innerWidth || e.clientWidth || g.clientWidth,y = w.innerHeight|| e.clientHeight|| g.clientHeight;var theight = y - $('#tfiles').offset().top - 90;//console.log("theight", y , $('#tfiles').offset().top)table = $("#tfiles").dataTable({serverSide: true,deferRender : true,xxxprocessing: true,ajax : {url : "view_by_files_json.asp",type : "POST",data : function (o){o.filename = formatSearch("<%=parKeyword%>");}},dom: "rti",scrollY: theight,scrollCollapse: true,paging: true,scroller: {loadingIndicator: true,displayBuffer: 9,},order: [[ 0, "desc" ]],info: true,columns: [{ "visible": false },{ render : function ( data, type, row, meta ) {var sLink = "<%=dpkg_archiveURL%>" + row[3] + "/" + row[4] + "/" + row[2] + "/" + row[1];sLink = sLink.replace(/\\+/g,'/') ;sLink = sLink.replace(/\/+/g,'/') ;return '<img src="images/rex_images/ext_blank.gif" border="0" hspace="2" align="absmiddle"><a href="'+sLink+'" class=body_link>'+data+'</a>';}},{ render : function ( data, type, row, meta ) {if ( data ) {data = data.replace(/\\+/g, '/');data = data.replace(/\/+/g,'\\') ;}return data;}},null,{ render : function ( data, type, row, meta ) { return '<a href="dependencies.asp?pv_id='+row[0]+'" class=body_link>'+data+'</a>';}},null],columnDefs : [{className: "nowrap", targets : '_all' }],orderCellsTop : true,initComplete : function () {},}).api();// Transfer the keyword to the 'file' search item$('#inp_file').val('<%=parKeyword%>');table.column(1).search( formatSearch("<%=parKeyword%>") );});</script><%End Sub'----------------------------------------------Sub ShowMainPanel%><!-- PACKAGE SEARCH ------------------------------------------------><%' Format keyword for searchIf InStr( parKeyword, "*" ) > 0 Then' Use wild cardsFileName = Replace( parKeyword, "*", "%")Else' Wildcard is not used, hence append card to the end for better resultsFileName = parKeyword & "%"End If%><table id=tfiles width="100%" border="0" cellspacing="1" cellpadding="2" class=stdGrey><thead><tr><th width="20%" nowrap>PvId</th><th width="20%" nowrap>File<%=Quick_Help("FindFile")%></th><th width="40%" nowrap>Path</th><th width="20%" nowrap>Package Name</th><th width="20%" nowrap>Version</th><th width="1%" nowrap>CheckSum (CKSUM)</th></tr><tr class=search><th></th><th>File</th><th>Path</th><th>Package</th><th>Version</th><th></th></tr></thead></table><%End Sub%><html><head><title>Release Manager</title><link rel="shortcut icon" href="<%=FavIcon%>"/><meta HTTP-EQUIV="Pragma" CONTENT="no-cache"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link rel="stylesheet" href="images/release_manager_style.css?ver=<%=VixVerNum%>" type="text/css"><link rel="stylesheet" href="images/navigation.css?ver=<%=VixVerNum%>" type="text/css"><script language="JavaScript" src="images/common.js?ver=<%=VixVerNum%>"></script><!-- TIPS --><script language="JavaScript" src="images/tipster.js?ver=<%=VixVerNum%>"></script><script language="JavaScript" src="images/_help_tips.js?ver=<%=VixVerNum%>"></script><%bJqueryDataTables = TRUE%><!--#include file="_jquery_includes.asp"--><!-- DROPDOWN MENUS --><!--#include file="_menu_def.asp"--><script language="JavaScript1.2" src="images/popup_menu.js?ver=<%=VixVerNum%>"></script><%Call InsertJavaScript%></head><body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" ><!-- HEADER --><!--#include file="_header.asp"--><!-- BODY ----><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="20%" class='bg_panel'><!--#include file="_front_explorer.asp"--></td><td rowspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td ><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td style="width:10px;height:20px"></td><td class=body_sect>Files</td><td></td></tr><tr><td></td><td><%Call ShowMainPanel%> </td><td> </td></tr></table></td></tr></table></td><td width="11%"> </td></tr><tr><td class='bg_panel_btm' height="350"><img src="images/img_gear.gif" width="107" height="107" vspace="20" hspace="30"></td><td></td></tr></table><!-- FOOTER --><!--#include file="_footer.asp"--></body></html>