Commit 0cb44c05 authored by Oleg Korshul's avatar Oleg Korshul

desktop DRM realization

parent 137dc775
......@@ -13,24 +13,14 @@ copy ..\cell\sdk-all-min.js ..\..\core\build\jsdesktop\cell\sdk-all-min.js
copy ..\common\Native\native.js ..\..\core\build\jsdesktop\common\Native\native.js
copy ..\word\sdk-all.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Debug\Local\editors\sdkjs\word\sdk-all.js
copy ..\slide\sdk-all.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Debug\Local\editors\sdkjs\slide\sdk-all.js
copy ..\cell\sdk-all.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Debug\Local\editors\sdkjs\cell\sdk-all.js
copy ..\word\sdk-all.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\word\sdk-all.js
copy ..\slide\sdk-all.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\slide\sdk-all.js
copy ..\cell\sdk-all.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\cell\sdk-all.js
copy ..\word\sdk-all-min.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Debug\Local\editors\sdkjs\word\sdk-all-min.js
copy ..\slide\sdk-all-min.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Debug\Local\editors\sdkjs\slide\sdk-all-min.js
copy ..\cell\sdk-all-min.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Debug\Local\editors\sdkjs\cell\sdk-all-min.js
copy ..\word\sdk-all-min.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\word\sdk-all-min.js
copy ..\slide\sdk-all-min.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\slide\sdk-all-min.js
copy ..\cell\sdk-all-min.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\cell\sdk-all-min.js
copy ..\common\Native\native.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Debug\Local\editors\sdkjs\common\Native\native.js
copy ..\word\sdk-all.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Release\Local\editors\sdkjs\word\sdk-all.js
copy ..\slide\sdk-all.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Release\Local\editors\sdkjs\slide\sdk-all.js
copy ..\cell\sdk-all.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Release\Local\editors\sdkjs\cell\sdk-all.js
copy ..\word\sdk-all-min.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Release\Local\editors\sdkjs\word\sdk-all-min.js
copy ..\slide\sdk-all-min.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Release\Local\editors\sdkjs\slide\sdk-all-min.js
copy ..\cell\sdk-all-min.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Release\Local\editors\sdkjs\cell\sdk-all-min.js
copy ..\common\Native\native.js ..\..\core-ext\ChromiumBasedEditors\app\test\src\build\win_64\Release\Local\editors\sdkjs\common\Native\native.js
copy ..\common\Native\native.js ..\..\core-ext\desktop-sdk-wrapper\test\src\build\win_64\Debug\Local\editors\sdkjs\common\Native\native.js
pause
\ No newline at end of file
......@@ -112,16 +112,20 @@ var c_oAscError = Asc.c_oAscError;
window["Asc"]['spreadsheet_api'].prototype.asc_setAdvancedOptions = function(idOption, option)
{
if (window["Asc"].c_oAscAdvancedOptionsID.CSV === idOption) {
window["AscDesktopEditor"]["SetAdvancedOptions"]("" + option.asc_getCodePage(), "" + option.asc_getDelimiter());
var _param = "";
_param += ("<m_nCsvTxtEncoding>" + option.asc_getCodePage() + "</m_nCsvTxtEncoding>");
_param += ("<m_nCsvDelimiter>" + option.asc_getDelimiter() + "</m_nCsvDelimiter>");
window["AscDesktopEditor"]["SetAdvancedOptions"](_param);
}
else if (window["Asc"].c_oAscAdvancedOptionsID.DRM === idOption) {
var _param = "";
_param += ("<m_sPassword>" + AscCommon.CopyPasteCorrectString(option.asc_getPassword()) + "</m_sPassword>");
window["AscDesktopEditor"]["SetAdvancedOptions"](_param);
}
};
window["Asc"]['spreadsheet_api'].prototype["asc_setAdvancedOptions"] = window["Asc"]['spreadsheet_api'].prototype.asc_setAdvancedOptions;
window["asc_initAdvancedOptions"] = function()
{
window["Asc"]["editor"]._onNeedParams(undefined);
};
window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data)
{
AscCommon.g_oDocumentUrls.documentUrl = _url;
......
......@@ -17,7 +17,7 @@
border: 0;
}
#ws-canvas-overlay {
#ws-canvas-overlay, #ws-canvas-graphic, #ws-canvas-graphic-overlay {
border: 0;
position: absolute;
left: 0;
......
......@@ -226,6 +226,12 @@ AscCommon.InitDragAndDrop = function(oHtmlElement, callback) {
}
}
window["asc_initAdvancedOptions"] = function(_code)
{
var _editor = window["Asc"]["editor"] ? window["Asc"]["editor"] : window.editor;
_editor._onNeedParams(undefined, (_code == 90 || _code == 91) ? true : undefined);
};
// меняем среду
//AscBrowser.isSafari = false;
//AscBrowser.isSafariMacOs = false;
......
......@@ -260,3 +260,12 @@ window["on_editor_native_message"] = function(sCommand, sParam)
else if (sCommand == "editor:stopDemonstration")
editor.EndDemonstration(true);
};
Asc['asc_docs_api'].prototype.asc_setAdvancedOptions = function(idOption, option)
{
if (window["Asc"].c_oAscAdvancedOptionsID.DRM === idOption) {
var _param = "";
_param += ("<m_sPassword>" + AscCommon.CopyPasteCorrectString(option.asc_getPassword()) + "</m_sPassword>");
window["AscDesktopEditor"]["SetAdvancedOptions"](_param);
}
};
\ No newline at end of file
......@@ -84,16 +84,18 @@ window["DesktopOfflineAppDocumentEndLoad"] = function(_url, _data)
Asc['asc_docs_api'].prototype.asc_setAdvancedOptions = function(idOption, option)
{
if (window["Asc"].c_oAscAdvancedOptionsID.TXT === idOption) {
window["AscDesktopEditor"]["SetAdvancedOptions"]("" + option.asc_getCodePage());
var _param = "";
_param += ("<m_nCsvTxtEncoding>" + option.asc_getCodePage() + "</m_nCsvTxtEncoding>");
window["AscDesktopEditor"]["SetAdvancedOptions"](_param);
}
else if (window["Asc"].c_oAscAdvancedOptionsID.DRM === idOption) {
var _param = "";
_param += ("<m_sPassword>" + AscCommon.CopyPasteCorrectString(option.asc_getPassword()) + "</m_sPassword>");
window["AscDesktopEditor"]["SetAdvancedOptions"](_param);
}
};
Asc['asc_docs_api'].prototype["asc_setAdvancedOptions"] = Asc['asc_docs_api'].prototype.asc_setAdvancedOptions;
window["asc_initAdvancedOptions"] = function()
{
editor._onNeedParams(undefined);
};
/////////////////////////////////////////////////////////
////////////// CHANGES /////////////////////
/////////////////////////////////////////////////////////
......
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