You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

163 lines
8.5 KiB

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DocumentCrop.aspx.cs" Inherits=" Swift.web.Remit.Administration.CustomerRegistration.DocumentCrop" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="/ui/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="/ui/css/style.css" rel="stylesheet" />
<link href="../../../js/jQuery/jquery-ui.css" rel="stylesheet" />
<link href="../../../css/Crop/jquery.Jcrop.min.css" rel="stylesheet" />
<%-- <script src="../../../js/jQuery/jquery.min.js"></script>--%>
<script src="../../../ui/js/jquery.min.js"></script>
<script src="../../../js/Crop/jquery.Jcrop.min.js"></script>
<script type="text/javascript">
var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
var isSafari = navigator.userAgent.toLowerCase().indexOf('safari') > -1;
$(window).on("load", function () {
var width2 = jQuery('#<%=fileDisplay.ClientID%>').prop('naturalWidth');
var height2 = jQuery('#<%=fileDisplay.ClientID%>').prop('naturalHeight');
var editorID = '<%= fileDisplay.ClientID %>';
$('#' + editorID).Jcrop({
// aspectRatio: 1, //If you want to keep aspectRatio
onSelect: showCoords,
trueSize: [width2, height2]
});
});
$(document).ready(function () {
});
function showCoords(c) {
console.log(c);
var xField = document.getElementById('<%= _xField.ClientID %>');
var yField = document.getElementById('<%= _yField.ClientID %>');
var widthField = document.getElementById('<%= _widthField.ClientID %>');
var heightField = document.getElementById('<%= _heightField.ClientID %>');
xField.value = c.x.toFixed();
yField.value = c.y.toFixed();
widthField.value = c.w.toFixed();
heightField.value = c.h.toFixed();
}
function CloseWindow(id) {
window.opener.PopulateImage(id, 'Y');
if (isChrome) {
window.opener.focus();
}
window.close();
};
function ReloadRotation(id) {
window.opener.PopulateImage(id, 'N');
if (isChrome) {
window.opener.focus();
}
};
function showPdfImage(imgSrc) {
//OpenInNewWindow(imgSrc);
sessionStorage.setItem("fileLoadPath", imgSrc);
OpenInNewWindowModifyChrome('/Remit/PDFView.aspx', 'width=800,height=900,resizable=1,status=1,toolbar=0,scrollbars=1,center=1');
};
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:HiddenField ID="hdnFileName" runat="server" />
<asp:HiddenField ID="hdnCreatedBy" runat="server" />
<asp:HiddenField ID="hdnDocumentTypeId" runat="server" />
<asp:HiddenField ID="hdncustomerId" runat="server" />
<asp:HiddenField ID="hdnMembershipId" runat="server" />
<asp:HiddenField ID="hdnFileType" runat="server" />
<asp:HiddenField ID="hdnDocumentName" runat="server" />
<asp:HiddenField ID="hdnId" runat="server" />
<asp:HiddenField ID="hdnCropValue" runat="server" Value="N" />
<asp:HiddenField ID="hdnRegDate" runat="server" />
<input type="hidden" runat="server" id="_xField" />
<input type="hidden" runat="server" id="_yField" />
<input type="hidden" runat="server" id="_widthField" />
<input type="hidden" runat="server" id="_heightField" />
<div class="page-wrapper">
<div class="report-tab" runat="server" id="regUp">
<div class="tab-content">
<div role="tabpanel" class="tab-pane" id="List">
</div>
<div role="tabpanel" id="Manage">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="register-form">
<div class="panel panel-default clearfix m-b-20">
<div class="panel-heading">
<h4 class="panel-title">Customer Document View</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12" id="msgDiv" runat="server" visible="false" style="background-color: red;">
<div class="form-group">
<asp:Label ID="msgLabel" runat="server" ForeColor="White"></asp:Label>
</div>
</div>
<%--body part--%>
<div class="form-group">
<div id="msg" runat="server" class="alert alert-info"></div>
</div>
<div class="col-md-12" id="imageDiv" runat="server">
<div class="form-group">
<asp:Image runat="server" ID="fileDisplay" Style="height: 650px; width: 1200px;" />
</div>
<div class="form-group">
<asp:Button runat="server" ID="downloadFile" CssClass="btn btn-primary m-t-25" Text="Download" OnClick="downloadFile_Click" Style="display: none" />
<asp:Button runat="server" ID="downloadIdPicture" CssClass="btn btn-primary m-t-25" Text="Download" OnClick="downloadIdPicture_Click" />
</div>
</div>
<%--End body part--%>
<div class="col-md-12 form-group" style="height: 1000px;">
<iframe id="pdfDiv" runat="server" style="width: 100%; height: 100%;"></iframe>
<%-- <table border="0" cellpadding="2" cellspacing="0">
<tr>
<td>x:</td>
<td id="tdX">-</td>
<td>y:</td>
<td id="tdY">-</td>
<td>width:</td>
<td id="tdWidth">-</td>
<td>height:</td>
<td id="tdHeight">-</td>
<td></td>
</tr>
</table>--%>
<asp:Button runat="server" ID="btnRotate" CssClass="btn btn-info m-t-25 " OnClick="Rotate_Click" Text="Rotate" />
<asp:Button runat="server" ID="_cropCommand" CssClass="btn btn-primary" OnClick="_cropCommand_Click" OnClientClick="return confirm('Are you sure you want to edit?');" Text="Edit & Close" />
<asp:Button runat="server" ID="_btnRefresh" CssClass="btn btn-info m-t-25 " OnClientClick="Refresh()" Text="Reset" />
</div>
<div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>