fileManagePreviewFileDialog.jsp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <%@page language="java" pageEncoding="UTF-8"%>
  2. <%@include file="/commons/include/html_doctype.html"%>
  3. <%
  4. response.setHeader("Pragma","No-cache");
  5. response.setHeader("Cache-Control","no-cache");
  6. response.setDateHeader("Expires", -10);
  7. %>
  8. <html>
  9. <head>
  10. <title>文件上传管理</title>
  11. <%@include file="/commons/include/form.jsp"%>
  12. <script type="text/javascript" src="${ctx}/js/hotent/platform/form/OfficeControl.js"></script>
  13. <script type="text/javascript" src="${ctx}/js/hotent/platform/form/OfficePlugin.js"></script>
  14. <script type="text/javascript">
  15. $().ready(function (){
  16. getOffice();
  17. });
  18. // 获取Office 控件
  19. function getOffice(){
  20. OfficePlugin.init();
  21. var path= "${ctx}/platform/file/fileManage/previewFile.ht?fileId=${fileId}";
  22. try{
  23. OfficePlugin.officeObjs[0].controlObj.OpenFromURL(path);
  24. OfficePlugin.officeObjs[0].setFileReadOnly(true);
  25. }
  26. catch(err){
  27. alert(err);
  28. }finally{
  29. }
  30. };
  31. </script>
  32. </head>
  33. <body>
  34. <div class="panel">
  35. <div class="panel-top">
  36. <div class="tbar-title">
  37. <span class="tbar-label">文件预览</span>
  38. </div>
  39. </div>
  40. <div class="panel-body">
  41. <table class="table-detail" cellpadding="0" cellspacing="0"
  42. border="0">
  43. <tr>
  44. <td>
  45. <input type="hidden" class="hidden" name="${fileId}" lablename="filePreview" controltype="office" right="r" doctype="${ext }" />
  46. </td>
  47. </tr>
  48. </table>
  49. </div>
  50. </div>
  51. </body>
  52. </html>