YNICTE/BO/Views/Shared/_PrintLayout.cshtml

140 lines
4.9 KiB
Plaintext
Raw Normal View History

2020-10-12 14:39:23 +09:00
@{
var pmenus = (String)(ViewBag.pmenunos ?? "");
}
<!DOCTYPE html>
<html style="background-color: #fff;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Expires" content="-1" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="No-Cache" />
2020-10-12 15:32:10 +09:00
<title>@ViewData["Title"] - 영남건설기술교육원 Back-Office</title>
2020-10-12 14:39:23 +09:00
@*<link rel="shortcut icon" href="/images/nptech.ico" />*@
@Styles.Render("~/Content/css")
@RenderSection("styles", required: false)
<style type="text/css">
table tr th {
background-color: #f7f6ed;
vertical-align: middle;
}
table tr td {
background-color: #fff;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
vertical-align: middle;
border-bottom: 1px solid #ddd;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
}
.table.noborder > thead > tr > th,
.table.noborder > tbody > tr > th,
.table.noborder > tfoot > tr > th,
.table.noborder > thead > tr > td,
.table.noborder > tbody > tr > td,
.table.noborder > tfoot > tr > td {
border: 0 none;
}
</style>
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/scripts")
<script src="/js/site.js?v=181018"></script>
@RenderSection("scriptsHeader", required: false)
<script type="text/javascript">
$(window).load(function () {
$(document).focus();
});
$(document).ready(function () {
$(document).on("keydown", function (e) {
if (e.keyCode == 27) {
self.close();
}
});
$.each($(".editor-block-css font"), function (i, r) {
if ($(r).hasAttr("color")) {
$(r).css("color", $(r).hasAttr("color"));
}
});
$(".printNonArea").on("click", "#btnPrint", function () {
fnPrint();
Prevent(); return false;
});
$(".printNonArea").on("click", "#btnCancel", function () {
self.close();
Prevent(); return false;
});
$(document).on("click", function () {
if ($(".printNonArea").css("display") == "none") {
$(".printNonArea").css("display", "block");
}
});
$("body").on("click", "#btnPrint", function () {
fnPrint();
Prevent(); return false;
});
$("body").on("click", "#btnCancel", function () {
self.close();
Prevent(); return false;
});
});
function fnPrint() {
$(".printNonArea").css("display", "none");
initBody = document.body.innerHTML;
window.onberforeprint = function () {
document.body.innerHTML = document.getElementById('print_area').innerHTML;
}
window.onafterprint = function () {
document.body.innerHTML = initBody;
}
window.print();
}
function Prevent() {
try {
if (event.preventDefault) {
event.preventDefault();
}
}
catch (e) {
}
}
var initBody;
function printthis() {
//var strparam = ""
//strparam = "?CertificateGubun=CRT001";
//$('form[id=mainForm]').attr('action', '/MyPage/popcertificate' + strparam).submit();
$(".printNonArea").css("display", "none");
initBody = document.body.innerHTML;
window.onberforeprint = function () {
document.body.innerHTML = document.getElementById('print_area').innerHTML;
}
window.onafterprint = function () {
document.body.innerHTML = initBody;
}
window.print();
}
</script>
</head>
<body class="popupbody" style="padding: 0 20px;">
<div class="con-body">
<div class="con-body-title printNonArea"><span class="glyphicon glyphicon-tags"></span>&nbsp;&nbsp;&nbsp;@ViewBag.PopupMenuName</div>
@RenderBody()
<br />
</div>
@RenderSection("scriptscdn", required: false)
@RenderSection("scripts", required: false)
</body>
</html>