<%layout("/eova/layout/default.html",{'title' : 'Eova Office'}){%>
<body class="easyui-layout">
	<div data-options="region:'north', split:false,border:true" style="height: 30px; overflow: hidden;">
		<div id="gridToolbar" style="height: 33px;">
			<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'eova-icon739',plain:true" onclick="eova_download()">下载文件</a>
			<a href="javascript:;" class="easyui-linkbutton" data-options="iconCls:'eova-icon887',plain:true" onclick="eova_print()">在线打印</a>
		</div>
	</div>
	<div data-options="region:'center', fit:true,border:false">
		<iframe id="show" src="/office/show/${menuCode}" allowtransparency="true" style="border: 0; width: 100%; height: 96%;" frameborder="0"></iframe>
		<iframe id="print" style="height: 0;width: 0"></iframe>
	</div>
	<script type="text/javascript">
		function eova_download() {
			window.open('/office/file/${menuCode}');
		}
		function eova_print() {
			var show = document.getElementById('show');
			var print = document.getElementById('print');
			
			// 保证打印内容按正常比例打印
			print.contentWindow.document.head.innerHTML = show.contentWindow.document.head.innerHTML
			print.contentWindow.document.body.innerHTML = show.contentWindow.document.body.innerHTML
			print.contentWindow.focus();
			print.contentWindow.print();
		}
	</script>
</body>

<%}%>
