Commit 1c0ed1c8 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander.Trofimov

offlineMode: updateTitle

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47224 954022d7-b5bf-4e40-9824-e11837661b57
parent 8145a084
......@@ -910,6 +910,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}
}
data = oBinaryFileWriter.Write();
if (undefined != window['appBridge']) {
window['appBridge']['dummyCommandSave_CSV'] (data);
this.asc_OnSaveEnd(true);
return;
}
}
this._asc_sendCommand (fCallback, "mnuSaveAs" + this.cCharDelimiter + JSON.stringify(oAdditionalData) + this.cCharDelimiter + data);
},
......@@ -2458,7 +2464,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
if (!window['scriptBridge']['save']) {
window['scriptBridge']['save'] = function(sFormat) {
var oAdditionalData = new Object();
oAdditionalData["documentId"] = t.documentId+ "." + t.documentFormat;
oAdditionalData["documentId"] = t.documentId + "." + t.documentFormat;
oAdditionalData["vkey"] = t.documentVKey;
oAdditionalData["outputformat"] = sFormat;
......@@ -2466,13 +2472,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var oBinaryFileWriter = new BinaryFileWriter(t.wbModel);
oAdditionalData["savetype"] = "completeall";
// TODO: csv
// if (c_oAscFileType.CSV === sFormat) {
// if (options instanceof asc.asc_CCSVAdvancedOptions) {
// oAdditionalData["saveparams"] = options.asc_getCodePage() + "-" + options.asc_getDelimiter();
// }
// }
var data = oBinaryFileWriter.Write();
t.asc_OnSaveEnd(true);
return data;
......@@ -2485,6 +2484,37 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}
}
if (!window['scriptBridge']['save_csv']) {
window['scriptBridge']['save_csv'] = function() {
var v = {"id":this.documentId, "c":"getcodepage"};
this._asc_sendCommand (function(incomeObject){
// if(null != incomeObject && "save" == incomeObject.type)
// {
// var outputData = JSON.parse(incomeObject.data);
// t.asc_processSavedFile(outputData.url, false);
// }
// Меняем тип состояния (на никакое)
t.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
// t.asc_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.DownloadAs);
}, JSON.stringify(v));
// if (c_oAscFileType.CSV === sFormat) {
// if (options instanceof asc.asc_CCSVAdvancedOptions) {
// oAdditionalData["codepage"] = options.asc_getCodePage();
// oAdditionalData["delimiter"] = options.asc_getDelimiter();
// }
//}
}
}
if (!window['scriptBridge']['updateTitle']) {
window['scriptBridge']['updateTitle'] = function(title) {
t.documentTitle = title;
}
}
if (!window['scriptBridge']['loadDocumentFromString']) {
window['scriptBridge']['loadDocumentFromString'] = function(workbook) {
var wb = new Workbook("", t.handlers, t);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment