<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
<%
|
String path = request.getContextPath();
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
|
+ path + "/";
|
%>
|
|
<!DOCTYPE HTML>
|
<html>
|
<head>
|
<base href="<%=basePath%>">
|
<meta name="viewport" charset="width=device-width, initial-scale=1.0">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
<title>文件浏览</title>
|
<!--[if !IE]><!-->
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<!--<![endif]-->
|
<!--[if gt IE 8]>
|
<link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
|
<![endif]-->
|
<link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
|
<link rel="stylesheet" href="static/styles/initialize.css" type="text/css">
|
<link rel="stylesheet" href="static/styles/common.css" type="text/css">
|
<link rel="stylesheet" href="static/plugins/layer/skin/default/layer.css" type="text/css">
|
<link rel="stylesheet" href="static/plugins/jquery.iviewer/jquery.iviewer.css" type="text/css" />
|
|
<script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
|
<script type="text/javascript" src="static/scripts/easyuiExtend.js"></script>
|
<script type="text/javascript" src="static/scripts/jquery-extend.js"></script>
|
<script type="text/javascript" src="static/plugins/layer/layer.js"></script>
|
<script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
|
|
<!-- 图片浏览插件引入 -->
|
<script type="text/javascript" src="static/plugins/jquery.js" ></script>
|
<script type="text/javascript" src="static/plugins/jqueryui.js" ></script>
|
<script type="text/javascript" src="static/plugins/jquery.mousewheel.min.js" ></script>
|
<script type="text/javascript" src="static/plugins/jquery.iviewer/jquery.iviewer.min.js"></script>
|
|
|
<script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
|
<script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
|
<script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
|
|
<script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
|
<script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
|
|
<!--[if lt IE 9]>
|
<script type="text/javascript" src="static/plugins/json2.js"></script>
|
<![endif]-->
|
<style type="text/css">
|
.viewer
|
{
|
width: 100%;
|
border: 1px solid black;
|
position: relative;
|
}
|
</style>
|
</head>
|
<body class="pt-tree">
|
<div class="margin-lr">
|
<div class="pt-form">
|
<form id="form1">
|
<!-- 普通图片浏览(iViewer插件) -->
|
<div id="div_Img" style="display:none">
|
<div class="wrapper">
|
<div id="viewer" class="viewer">
|
</div>
|
</div>
|
</div>
|
<!-- tiff图片浏览 -->
|
<div id="div_Tif" style="display:none;width: 100%; height: 100%;text-align: center;">
|
</div>
|
<!-- pdf浏览(iWebPdf插件) -->
|
<div id="div_PDF" style="margin-top: -25px;display:none;height: 103%;">
|
<object id="iWebPDF" width="100%" height="100%" classid="clsid:39E08D82-C8AC-4934-BE07-F6E816FD47A1"
|
codebase="iWebPDF.ocx#version=8,0,0,592" viewastext>
|
<span style="color: red" align="center">你未安装pdf阅读器,请下载并安装AdbeReader软件。</span>
|
</object>
|
</div>
|
<!-- office文件浏览(officeviewer插件) -->
|
<div id="div_Office" style="display:none;height: 100%;overflow-y: hidden;">
|
<div>
|
<!-- <input type="button" value="选择头部红头文件" class="btn4" onclick="SelectHead()" id="btn_officetbht" />
|
<input type="button" value="选择尾部红头文件" class="btn4" onclick="SelectLast()" id="btn_officewbht" />
|
<input type="button" value="保存在服务器" class="btn4" onclick="SavetoServer()" id="btn_SavetoServer" />
|
-->
|
<input id="btnSaveFile" type="button" value="保存服务器" class="btn4" style="display:none" onclick="SavetoServer()"/>
|
<span id="masklayer" style=" display:none;font-size:14px; color:red; font-weight:bold;"></span>
|
<div style="display: none">
|
<input id="txt_hongtou2" type="text" value="" />
|
</div>
|
</div>
|
|
<div style="width:100%; height:100%;">
|
<object classid="clsid:7677E74E-5831-4C9E-A2DD-9B1EF9DF2DB4" id="OA1" width="100%" height="98%" codebase="static/plugins/officeviewer.cab#version=8,0,0,651">
|
<param name="Toolbars" value="-1">
|
<param name="LicenseName" value="HZRAETC6706823702">
|
<param name="LicenseCode" value="EDO8-552B-126C-ABEB">
|
<param name="BorderColor" value="15647136">
|
<param name="BorderStyle" value="2">
|
</object>
|
<script language="JavaScript" type="text/javascript" src="static/plugins/NoIEActivate.js"></script>
|
</div>
|
|
</div>
|
</form>
|
</div>
|
|
</div>
|
</body>
|
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
|
|
|
<script>
|
//窗口参数,用于弹窗传递
|
var params = {
|
callBack : null
|
};
|
|
$(function() {
|
var extension='${attach.extension}';
|
var attachViewUrl="${attach.attachViewUrl}";
|
switch(extension.toLowerCase())
|
{
|
case '.jpg':
|
case '.png':
|
case '.bmp':
|
case '.bmp':
|
case '.jpeg':
|
case '.gif':
|
$('#div_Img').show();
|
$(".viewer").css("height", $(document).height() - 55);
|
var iv1 = $("#viewer").iviewer({src:attachViewUrl});
|
break;
|
case '.tiff':
|
$('#div_Tif').show();
|
var server = "/fcgi-bin/iipsrv.fcgi";
|
var credit = "杭州瑞利声电技术公司";
|
var flashvars = {
|
server: server,
|
image: attachViewUrl,
|
navigation: true,
|
credit: credit
|
}
|
var params = {
|
scale: "noscale",
|
bgcolor: "#000000",
|
allowfullscreen: "true",
|
allowscriptaccess: "always"
|
}
|
swfobject.embedSWF("IIPZoom.swf", "container", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, params);
|
break;
|
case '.pdf':
|
$('#div_PDF').show();
|
form1.iWebPDF.WebOpenUrlFile("http://"+window.location.host+attachViewUrl);
|
break;
|
case '.doc':
|
case '.docm':
|
case '.docx':
|
case '.xls':
|
case '.xlsx':
|
case '.ppt':
|
case '.pptx':
|
$('#div_Office').show();
|
if('${isEdit}'=='1')
|
{
|
$('#btnSaveFile').show();
|
}
|
OpenFromServer("http://"+window.location.host+attachViewUrl);
|
break;
|
default:
|
wcp.message.error("不支持此格式文件浏览!");
|
closeWindow();
|
break;
|
}
|
});
|
function closeWindow() {
|
var index = top.layer.getFrameIndex(window.name); //获取窗口索引
|
top.layer.close(index);
|
}
|
</script>
|
|
<!-- PDF插件初始化及各种方法-->
|
<script>
|
try{
|
var UserPrintRight = "1"; //用户打印权限。
|
var DownLoad = "1";
|
form1.iWebPDF.ShowMenus = 0; //菜单栏是否显示 1:显示 0:隐藏
|
form1.iWebPDF.ShowTools = 1; //工具栏是否显示
|
form1.iWebPDF.ShowSigns = 0; //签章栏是否显示
|
form1.iWebPDF.ShowSides = 0; //侧边栏是否显示
|
form1.iWebPDF.ShowMarks = 1; //书签树是否显示
|
form1.iWebPDF.ShowState = 1; //状态栏是否显示
|
form1.iWebPDF.ShowPostil=0;//批注栏是否显示
|
|
//禁止显示页面的页码数。
|
//禁用所有按钮
|
//form1.iWebPDF.EnableTools("实际大小;搜索文本", 2);
|
//form1.iWebPDF.EnableTools("全屏显示", 0);
|
|
|
//依据打印权限来控制打印按钮
|
if (UserPrintRight == "1") {
|
//有权限
|
form1.iWebPDF.EnableTools("打印文档", 1);
|
}
|
else {
|
form1.iWebPDF.EnableTools("打印文档", 2)
|
}
|
if (DownLoad == "1") {
|
form1.iWebPDF.EnableTools("另存为", 1);
|
}
|
else {
|
form1.iWebPDF.EnableTools("另存为", 0);
|
}
|
form1.iWebPDF.EnableTools("保存文档", 0);
|
form1.iWebPDF.EnableTools("文档属性", 0);
|
form1.iWebPDF.EnableTools("关闭文档", 0);
|
|
form1.iWebPDF.EnableTools("搜索文本", 0);
|
form1.iWebPDF.EnableTools("文本选择", 0);
|
form1.iWebPDF.EnableTools("快照工具", 0);
|
form1.iWebPDF.EnableTools("关于金格", 0);
|
WateMark();
|
EnablePages();
|
}catch(e){}
|
|
function ChangeTrueUrl(url) {
|
var pathfilepathindex = url.lastIndexOf('/');
|
var pathfilepath = url.substr(0, pathfilepathindex + 1);
|
var pathfilename = url.substr(pathfilepathindex + 1);
|
var pathfilenameq = pathfilename.substr(0, 2);
|
var pathfilenameh = pathfilename.substr(3);
|
return pathfilepath + pathfilenameq + pathfilenameh;
|
}
|
//保存到服务器
|
function SavePDF() {
|
form1.iWebPDF.WebSave();
|
}
|
//设置水印 参数1,起始页 2,终止页 3,水印文本 4,透明度 5,字体大小 0表示自适应 6,旋转角度 7,水印位置(文本上/下) true/false 8,水印左下角X坐标,-1时则为居中位置 9,水印左下角Y坐标,-1时则为居中位置
|
//特别说明:在X或Y不为-1时,FontSize必须为大于零的值,否则会导致水印不可见
|
function WateMark() {
|
var WateMarkText = "水印";
|
var WateMarkStartPage = 1;
|
var WateMarkEndPage = form1.iWebPDF.PageCount;
|
var Xloaction = "100";
|
var Ylocation = "100";
|
var Transparency=10;//透明度
|
var fontSize=20;//字体大小
|
var Angel=45;//旋转角度
|
form1.iWebPDF.WateMark(WateMarkStartPage, WateMarkEndPage, WateMarkText,Transparency , fontSize, Angel, false, Xloaction, Ylocation);
|
}
|
|
//禁止显示部分页面 参数1:string页面范围,2:bool显示与否,3:String 禁止显示的文本
|
function EnablePages() {
|
var NoPageNum = "";
|
form1.iWebPDF.EnablePages(NoPageNum, false, "此页为涉密件!");
|
}
|
|
//页面
|
function PageChanged(action) {
|
switch (action) {
|
case "Next":
|
if (form1.iWebPDF.CurPage + 1 <= form1.iWebPDF.PageCount) {
|
form1.iWebPDF.GotoNextPage();
|
}
|
break;
|
case "Prve":
|
if (form1.iWebPDF.CurPage - 1 >= 1) {
|
form1.iWebPDF.GotoPreviousPage();
|
}
|
break;
|
case "First":
|
if (form1.iWebPDF.CurPage != 1) {
|
form1.iWebPDF.GotoFirstPage();
|
}
|
break;
|
case "End":
|
if (form1.iWebPDF.CurPage != form1.iWebPDF.PageCount) {
|
form1.iWebPDF.GotoLastPage();
|
}
|
break;
|
}
|
|
}
|
// //打印 参数1:打印份数 2.打印机名称 3.打印起始页 4,打印结束页 5,是否显示打印窗口
|
// function PrintPDF() {
|
// if (WebPrint(1, PrinterName, 0, 0, false)) {
|
// alert("打印成功!");
|
// }
|
// else{
|
// alert("打印失败!");
|
// }
|
// }
|
</script>
|
<script ID="clientEventHandlersJS" LANGUAGE="javascript">
|
//<!--
|
|
function OpenFromServer(sPath) {
|
CloseDoc();
|
//var sPath= window.prompt("Type the file url:", "http://www.ocxt.com/demo/samples/sample.doc");
|
|
// var sPath = "http://localhost:8161/ViewFile/2015/201507/20150721/rl19303137_淳安公积金网站修改内容.docx";
|
|
// var sPath = "http://localhost:8161/ViewFile/2015/201507/20150721/rl19303137_淳安公积金网站修改内容.docx";
|
// document.all.OA1.Open(sPath, "PowerPoint.Application");
|
|
//document.all.OA1.LoadFile(sPath);
|
// document.all.OA1.Open(sPath, "Word.Application");
|
//document.all.OA1.Open(sPath, "Excel.Application");
|
document.all.OA1.Open(sPath);
|
// if (document.all.OA1.GetCurrentProgID() == "Word.Application") {
|
// document.all.OA1.Open(sPath, "Word.Application");
|
// }
|
// if (document.all.OA1.GetCurrentProgID() == "Excel.Application") {
|
// document.all.OA1.Open(sPath, "Excel.Application");
|
// }
|
// if (document.all.OA1.GetCurrentProgID() == "PowerPoint.Application") {
|
// document.all.OA1.Open(sPath, "PowerPoint.Application");
|
// }
|
|
|
|
//document.all.OA1.Open(sPath, "Word.Application");
|
//document.all.OA1.Open(sPath, "Excel.Application");
|
//document.all.OA1.Open(sPath, "PowerPoint.Application");
|
//document.all.OA1.Open(sPath, "Visio.Application");
|
//document.all.OA1.Open(sPath, "MSProject.Application");
|
}
|
|
function PrintDoc() {
|
if (document.all.OA1.IsOpened()) {
|
document.all.OA1.PrintDialog();
|
}
|
}
|
|
function PrintPreview() {
|
if (document.all.OA1.IsOpened()) {
|
document.all.OA1.PrintPreview();
|
}
|
}
|
|
function ProtectDoc() {
|
|
if (document.all.OA1.GetCurrentProgID() != "PowerPoint.Application") {
|
if (document.all.OA1.IsOpened()) {
|
if (document.all.OA1.GetCurrentProgID() == "Word.Application") {
|
document.all.OA1.ProtectDoc(2); //wdAllowOnlyFormFields
|
|
|
}
|
else if (document.all.OA1.GetCurrentProgID() == "Excel.Application") {
|
document.all.OA1.ProtectDoc(1);
|
}
|
}
|
}
|
else {
|
window.alert("The method doesn't work for the MS PowerPoint!");
|
}
|
}
|
|
function UnProtectDoc() {
|
if (document.all.OA1.GetCurrentProgID() != "PowerPoint.Application") {
|
if (document.all.OA1.IsOpened()) {
|
document.all.OA1.UnProtectDoc();
|
}
|
}
|
else {
|
window.alert("The method doesn't work for the MS PowerPoint!");
|
}
|
}
|
|
function DocIsDirty() {
|
if (document.all.OA1.IsOpened()) {
|
if (document.OA1.IsDirty) {
|
window.alert("The file has been modified!");
|
}
|
else {
|
window.alert("The file hasn't been modified!");
|
}
|
}
|
}
|
|
function ShowHideToolbar() {
|
if (document.all.OA1.IsOpened()) {
|
var x = document.OA1.Toolbars;
|
document.OA1.ShowMenubar(!x);
|
document.OA1.Toolbars = !x;
|
}
|
}
|
|
function DisableHotKey() {
|
if (document.all.OA1.GetCurrentProgID() == "Word.Application") {
|
if (document.all.OA1.IsOpened()) {
|
document.all.OA1.WordDisableSaveHotKey(true);
|
document.all.OA1.WordDisablePrintHotKey(true);
|
document.all.OA1.WordDisableCopyHotKey(true);
|
}
|
}
|
else if (document.all.OA1.GetCurrentProgID() == "Excel.Application") {
|
document.all.OA1.WordDisableSaveHotKey(true);
|
document.all.OA1.WordDisablePrintHotKey(true);
|
document.all.OA1.WordDisableCopyHotKey(true);
|
}
|
else {
|
}
|
}
|
|
function DisableRightClick() {
|
if (document.all.OA1.IsOpened()) {
|
document.all.OA1.DisableViewRightClickMenu(true);
|
}
|
}
|
|
function SaveAs() {
|
if (document.all.OA1.IsOpened()) {
|
document.all.OA1.SaveFileDialog();
|
//You can call the SaveAs method to save silently.
|
}
|
}
|
|
function SavetoServer() {
|
if (document.OA1.IsOpened) {
|
document.OA1.SetAppFocus();
|
document.OA1.HttpInit();
|
//var sFileName = document.OA1.GetDocumentName();
|
// alert(sFileName);
|
sFileName = "${attach.attachViewUrl}";//??
|
// alert(sFileName);
|
document.OA1.HttpAddPostOpenedFile(sFileName); //save as the same file format with the sFileName then upload
|
//document.OA1.HttpAddPostOpenedFile (sFileName, 16); //save as docx file then upload
|
//document.OA1.HttpAddPostOpenedFile (sFileName, 0); //save as doc file then upload
|
//document.OA1.HttpAddPostOpenedFile (sFileName, -4143); //save as xls file then upload
|
//document.OA1.HttpAddPostOpenedFile (sFileName, 51); //save as xlxs file then upload
|
//document.OA1.HttpPost("http://www.ocxt.com/demo/upload_weboffice.php");
|
var url="http://"+window.location.host+"/wcp/management/attach/saveServer";
|
//alert(url);
|
document.OA1.HttpPost(url);
|
//if (document.OA1.GetErrorCode() == 0 || document.OA1.GetErrorCode() == 200) {
|
if (document.OA1.GetErrorCode() == 200) {
|
var sPath = "保存成功! ";
|
window.alert(sPath);
|
}
|
else {
|
window.alert("you need enable the IIS Windows Anonymous Authentication if you have not set the username and password in the HttpPost method. you need set the timeout and largefile size in the web.config file.");
|
}
|
}
|
else {
|
window.alert("Please open a document firstly!");
|
}
|
}
|
|
function CloseDoc() {
|
document.all.OA1.ExitOfficeApp();
|
document.all.OA1.ClearTempFiles();
|
if (document.OA1.IsOpened) {
|
document.all.OA1.ExitOfficeApp();
|
document.all.OA1.ClearTempFiles();
|
}
|
}
|
|
function VBAProgramming() {
|
// alert(0);
|
if (document.OA1.IsOpened) {
|
// alert(1);
|
var objWord = document.OA1.ActiveDocument;
|
// alert(1.5);
|
// document.OA1.GotoItem(101, 0); //move to start.
|
// alert(2);
|
// document.OA1.InsertBreak(6); //insert a line break
|
alert(3);
|
var range = objWord.Range(0, 0);
|
var WTable = objWord.Tables.Add(range, 3, 3);
|
alert(4);
|
WTable.Cell(1, 1).Range.Font.Name = "Times New Roman";
|
WTable.Cell(1, 1).Range.Text = "Automation 1";
|
WTable.Cell(1, 2).Range.Font.Size = 18;
|
WTable.Cell(1, 2).Range.Bold = true;
|
WTable.Cell(1, 2).Range.Font.Italic = true;
|
WTable.Cell(1, 2).Range.Text = "Automation 2";
|
WTable.Cell(2, 1).Range.ParagraphFormat.Alignment = 1; // 0= Left, 1=Center, 2=Right
|
WTable.Cell(2, 1).Range.Font.Name = "Arial";
|
WTable.Cell(2, 1).Range.Font.Size = 12;
|
WTable.Cell(2, 1).Range.Bold = false;
|
WTable.Cell(2, 1).Range.ParagraphFormat.Alignment = 2;
|
WTable.Cell(3, 3).Range.Font.Name = "Times New Roman";
|
WTable.Cell(3, 3).Range.Font.Size = 14;
|
WTable.Cell(3, 3).Range.Bold = true;
|
WTable.Cell(3, 3).Range.Font.Underline = true;
|
WTable.Cell(3, 3).Range.ParagraphFormat.Alignment = 0;
|
WTable.Cell(3, 2).Range.Text = "Automation 3";
|
}
|
}
|
function GetAllRedFile() {
|
|
if (isGetRedFileList == false) {
|
//var urljson = [{ "webpath": "http://localhost:8115/Upload/Hongtou/201408187800.doc" }, { "webpath": "http://localhost:8115/Upload/Hongtou/201408184052.doc" }, { "webpath": "http://localhost:8115/Upload/Hongtou/201408187050.doc"}];
|
|
var urljson = eval(RedFileList);
|
for (var i = 0; i < urljson.length; i++) {
|
var path = document.all.OA1.HttpDownloadFileToTempDir(urljson[i].webpath);
|
RedHeadTempPath.push({ "weburl": urljson[i].webpath, "baseurl": path });
|
}
|
isGetRedFileList = true;
|
}
|
}
|
function InsertRedFile(webpath,position) {
|
// var webpath = "http://localhost:8115/Upload/Hongtou/201408187050.doc";
|
var basepath = "";
|
$.each(RedHeadTempPath, function (i, elem) {
|
if (RedHeadTempPath[i].weburl == webpath) {
|
basepath = RedHeadTempPath[i].baseurl;
|
}
|
});
|
if (basepath != "") {
|
|
var ttt = document.all.OA1.WordInsertFile(basepath, position);
|
if (ttt == false) {
|
|
alert(basepath+" 可以再试试插入一次");
|
}
|
} else {
|
alert("没有获取到相符合的文件,检查红头文件是否存在!");
|
}
|
}
|
|
|
|
function OA1_NotifyCtrlReady() {
|
//document.OA1.ShowRibbonTitlebar (false);
|
//document.OA1.ShowMenubar (false);
|
//document.OA1.Toolbars = false;
|
|
//If you want to open a document when the page loads, you should put the code here.
|
//document.all.OA1.Open("http://www.ocxt.com/demo/samples/sample.doc");
|
document.OA1.LicenseName = "HZRAETC6706823702";
|
document.OA1.LicenseCode = "EDO8-552B-126C-ABEB";
|
}
|
|
function OA1_BeforeDocumentOpened() {
|
document.OA1.DisableFileCommand(1, true); //wdUIDisalbeOfficeButton
|
document.OA1.DisableFileCommand(2, true); //wdUIDisalbeNew
|
document.OA1.DisableFileCommand(4, true); //wdUIDisalbeOpen
|
|
// var viewSign = "";//??
|
// if (document.all.OA1.GetCurrentProgID() == "Word.Application" && viewSign == "0") {
|
//
|
// document.OA1.DisableFileCommand(16, false);
|
// } else {
|
// document.OA1.DisableFileCommand(16, true); //wdUIDisalbeSave
|
// }
|
|
document.OA1.DisableFileCommand(16, true); //wdUIDisalbeSave
|
document.OA1.DisableFileCommand(32, true); //wdUIDisalbeSaveAs
|
document.OA1.DisableFileCommand(512, true); //wdUIDisalbePrint (Ctrl+P) PES,PCT,CON
|
document.OA1.DisableFileCommand(1024, true); //wdUIDisalbePrintQuick
|
document.OA1.DisableFileCommand(2048, true); //wdUIDisalbePrintPreview
|
}
|
|
function OA1_DocumentOpened() {
|
//You can do the office automation here
|
//var objWord = document.OA1.ActiveDocument;
|
//objWord.Content.Text = "You can do the office Automation with the Edraw Viewer Component.";
|
|
|
|
}
|
|
function OA_DocumentBeforePrint() {
|
//window.alert("OA_DocumentBeforePrint");
|
}
|
|
function OA_WindowBeforeRightClick() {
|
//window.alert("OA_WindowBeforeRightClick");
|
}
|
|
function OA_BeforeDocumentSaved() {
|
//window.alert("OA_BeforeDocumentSaved");
|
//document.OA1.DisableStandardCommand(1, true);//cmdTypeSave = 0x00000001, the line code will prevent the save
|
|
// if (document.all.OA1.GetCurrentProgID() == "Word.Application") {
|
// var r = confirm("是否保存到服务器?")
|
// if (r == true) {
|
//
|
// }
|
// else {
|
// document.OA1.DisableStandardCommand(1, true);
|
// }
|
// }
|
}
|
|
</script>
|
|
<script language="javascript">
|
window.onbeforeunload = function () {
|
document.all.OA1.ExitOfficeApp();
|
}
|
</script>
|
|
<SCRIPT LANGUAGE=javascript FOR=OA1 EVENT=NotifyCtrlReady>
|
<!--
|
OA1_NotifyCtrlReady();
|
//-->
|
</SCRIPT>
|
|
<script language="javascript" for="OA1" event="DocumentOpened()">
|
OA1_DocumentOpened();
|
</script>
|
|
<script language="javascript" for="OA1" event="BeforeDocumentOpened()">
|
OA1_BeforeDocumentOpened();
|
</script>
|
|
<script language="javascript" for="OA1" event="DocumentBeforePrint()">
|
OA_DocumentBeforePrint();
|
</script>
|
|
<script language="javascript" for="OA1" event="BeforeDocumentSaved()">
|
OA_BeforeDocumentSaved();
|
</script>
|
|
<script language="javascript" for="OA1" event="WindowBeforeRightClick()">
|
OA_WindowBeforeRightClick();
|
</script>
|
|
</html>
|