|
楼主 |
发表于 2014-8-7 16:29:24
|
显示全部楼层
他的代码是这样的...
saveToServer:function(createVersion){
if(this.OVP.saving == false && $OV2("ov").IsDocOpened()){
var filename = "";
if(fno == ""||fno == null||fno == undefined){
filename = $('#fileName').val() + $OV2("ov").GetOpenedFileExt();
}else{
filename = fno + ".doc";
}
$OV2("ov").DisableStandardCommand(1,false);
$OV2("ov").HttpInit();
$OV2("ov").HttpAddPostString("fileID",this.OVP.fileID?this.OVP.fileID:"");
$OV2("ov").HttpAddPostString("cacheName",this.OVP.cacheName?this.OVP.cacheName:"");
$OV2("ov").HttpAddPostString("partType","revision");
var resultID = justep.Utils.randomString();
$OV2("ov").HttpAddPostString("resultID",resultID);
$OV2("ov").HttpAddPostOpenedFile(filename);
$OV2("ov").HttpPost(this.getUrl(this.OVP.host));
var HTTPResult = $OV2("ov").GetHttpResult(this.getUrl(this.OVP.host,'',resultID));
HTTPResult.filename = filename;
HTTPResult.changes = "";
if($OV2("ov").IsWordOpened()){
HTTPResult.changes = OV2.Base64.encode($OV2("ov").WordGetRevisionJSON());
if(createVersion){
$OV2("ov").ActiveDocument().AcceptAllRevisions();
}
}
$OV2("ov").HttpInit();
$OV2("ov").HttpAddPostOpenedFile(filename);
$OV2("ov").HttpAddPostString("fileID",this.OVP.fileID?this.OVP.fileID:"");
$OV2("ov").HttpAddPostString("changes",HTTPResult.changes);
$OV2("ov").HttpAddPostString("partType","content");
$OV2("ov").HttpAddPostString("cacheName",HTTPResult.cacheName);
resultID = justep.Utils.randomString();
$OV2("ov").HttpAddPostString("resultID",resultID);
$OV2("ov").HttpPost(this.getUrl(this.OVP.host));
var revisionHTTPResult = $OV2("ov").GetHttpResult(this.getUrl(this.OVP.host,'',resultID));
revisionHTTPResult.revisionCacheName = HTTPResult.cacheName;
revisionHTTPResult.filename = HTTPResult.filename;
revisionHTTPResult.changes = HTTPResult.changes;
HTTPResult = revisionHTTPResult;
HTTPResult.isReadOnly = false;
HTTPResult.createVersion = createVersion;
HTTPResult.type = "officeAction";
justep.xbl('attachmentEditor2Receiver').sendData(HTTPResult);
//window.modalReceiver.sendMessage(HTTPResult);
this.OVP.saving = false;
if(createVersion){
window.isCreateVersion = true;
window.close();
}else{
window.isSaved = true;
$('#saveTip').fadeIn(2000,function(){$(this).fadeOut(1000)});
}
}
}
我没找到在哪儿掉的后台
那个attachmentEditor2Receiver 是通过附件编辑器打开的,也没有receive函数啊 |
|