Commit ae5c4f1a authored by Oleg.Korshul's avatar Oleg.Korshul

локальная

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66501 954022d7-b5bf-4e40-9824-e11837661b57
parent 8afbc966
...@@ -29,7 +29,29 @@ ...@@ -29,7 +29,29 @@
window.OfflineOpenCallback = undefined; window.OfflineOpenCallback = undefined;
History.UserSaveMode = true; History.UserSaveMode = true;
} }
};
DesktopOfflineUpdateLocalName(this);
};
asc['spreadsheet_api'].prototype.asc_addImageDrawingObject = function(url)
{
var _url = window["AscDesktopEditor"]["LocalFileGetImageUrl"](url);
var ws = this.wb.getWorksheet();
if (ws)
{
var _url = window["AscDesktopEditor"]["LocalFileGetImageUrl"](url);
ws.objectRender.addImageDrawingObject(g_oDocumentUrls.getImageUrl(_url) , null);
}
};
asc['spreadsheet_api'].prototype.asc_showImageFileDialog = function()
{
window["AscDesktopEditor"]["LocalFileGetImageUrlFromOpenFileDialog"]();
};
asc['spreadsheet_api'].prototype.asc_addImage = function()
{
window["AscDesktopEditor"]["LocalFileGetImageUrlFromOpenFileDialog"]();
};
})(jQuery, window); })(jQuery, window);
window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data) window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data)
...@@ -108,7 +130,7 @@ window["DesktopOfflineAppDocumentApplyChanges"] = function(_changes) ...@@ -108,7 +130,7 @@ window["DesktopOfflineAppDocumentApplyChanges"] = function(_changes)
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
window["Asc"]['spreadsheet_api'].prototype.asc_Save = function (isNoUserSave) window["Asc"]['spreadsheet_api'].prototype.asc_Save = function (isNoUserSave)
{ {
var t = this; var t = this;
if (true !== isNoUserSave) if (true !== isNoUserSave)
this.IsUserSave = true; this.IsUserSave = true;
...@@ -125,6 +147,12 @@ window["Asc"]['spreadsheet_api'].prototype.asc_Save = function (isNoUserSave) ...@@ -125,6 +147,12 @@ window["Asc"]['spreadsheet_api'].prototype.asc_Save = function (isNoUserSave)
window["DesktopOfflineAppDocumentStartSave"](); window["DesktopOfflineAppDocumentStartSave"]();
} }
}; };
window["Asc"]['spreadsheet_api'].prototype.asc_isOffline = function()
{
return true;
};
window["DesktopOfflineAppDocumentStartSave"] = function() window["DesktopOfflineAppDocumentStartSave"] = function()
{ {
window["Asc"]["editor"].sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save); window["Asc"]["editor"].sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save);
...@@ -137,9 +165,20 @@ window["DesktopOfflineAppDocumentEndSave"] = function(isCancel) ...@@ -137,9 +165,20 @@ window["DesktopOfflineAppDocumentEndSave"] = function(isCancel)
DesktopOfflineUpdateLocalName(window["Asc"]["editor"]); DesktopOfflineUpdateLocalName(window["Asc"]["editor"]);
}; };
window["Asc"]['spreadsheet_api'].prototype.asc_isOffline = function() window["Asc"]['spreadsheet_api'].prototype["asc_addImageDrawingObject"] = window["Asc"]['spreadsheet_api'].prototype.asc_addImageDrawingObject;
{ window["Asc"]['spreadsheet_api'].prototype["asc_showImageFileDialog"] = window["Asc"]['spreadsheet_api'].prototype.asc_showImageFileDialog;
return true;
};
window["Asc"]['spreadsheet_api'].prototype["asc_Save"] = window["Asc"]['spreadsheet_api'].prototype.asc_Save; window["Asc"]['spreadsheet_api'].prototype["asc_Save"] = window["Asc"]['spreadsheet_api'].prototype.asc_Save;
window["Asc"]['spreadsheet_api'].prototype["asc_isOffline"] = window["Asc"]['spreadsheet_api'].prototype.asc_isOffline; window["Asc"]['spreadsheet_api'].prototype["asc_isOffline"] = window["Asc"]['spreadsheet_api'].prototype.asc_isOffline;
\ No newline at end of file
window["DesktopOfflineAppDocumentAddImageEnd"] = function(url)
{
if (url == "")
return;
var ws = window["Asc"]["editor"].wb.getWorksheet();
if (ws)
{
var _url = window["AscDesktopEditor"]["LocalFileGetImageUrl"](url);
ws.objectRender.addImageDrawingObject(g_oDocumentUrls.getImageUrl(_url) , null);
}
};
\ No newline at end of file
...@@ -137,6 +137,8 @@ asc_docs_api.prototype.asc_isOffline = function() ...@@ -137,6 +137,8 @@ asc_docs_api.prototype.asc_isOffline = function()
{ {
return true; return true;
}; };
asc_docs_api.prototype["asc_addImage"] = asc_docs_api.prototype.asc_addImage;
asc_docs_api.prototype["AddImageUrl"] = asc_docs_api.prototype.AddImageUrl; asc_docs_api.prototype["AddImageUrl"] = asc_docs_api.prototype.AddImageUrl;
asc_docs_api.prototype["AddImage"] = asc_docs_api.prototype.AddImage; asc_docs_api.prototype["AddImage"] = asc_docs_api.prototype.AddImage;
asc_docs_api.prototype["asc_Save"] = asc_docs_api.prototype.asc_Save; asc_docs_api.prototype["asc_Save"] = asc_docs_api.prototype.asc_Save;
......
...@@ -143,6 +143,8 @@ asc_docs_api.prototype.asc_isOffline = function() ...@@ -143,6 +143,8 @@ asc_docs_api.prototype.asc_isOffline = function()
{ {
return true; return true;
}; };
asc_docs_api.prototype["asc_addImage"] = asc_docs_api.prototype.asc_addImage;
asc_docs_api.prototype["AddImageUrl"] = asc_docs_api.prototype.AddImageUrl; asc_docs_api.prototype["AddImageUrl"] = asc_docs_api.prototype.AddImageUrl;
asc_docs_api.prototype["AddImage"] = asc_docs_api.prototype.AddImage; asc_docs_api.prototype["AddImage"] = asc_docs_api.prototype.AddImage;
asc_docs_api.prototype["asc_Save"] = asc_docs_api.prototype.asc_Save; asc_docs_api.prototype["asc_Save"] = asc_docs_api.prototype.asc_Save;
......
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