Commit e9b7f5c0 authored by Alexey.Golubev's avatar Alexey.Golubev Committed by Alexander.Trofimov

Рефакторинг для включения кода в sdk-all.js

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47906 954022d7-b5bf-4e40-9824-e11837661b57
parent 9fd94cde
......@@ -21,14 +21,15 @@
"sdk": {
"src": [
"../Common/Build/License.js",
"../Common/Merge/NodejsEnv.js",
"../Common/docscoapisettings.js",
"../Common/docscoapicommon.js",
"../Common/docscoapi.js",
"../Common/spellcheckapisettings.js",
"../Common/spellcheckapi.js",
"../Common/spellcheckapisettings.js",
"../Common/spellcheckapi.js",
"../Common/wordcopypaste.js",
"../Common/spellCheckLanguage.js",
"../Common/spellCheckLanguagesAll.js",
"../Common/spellCheckLanguage.js",
"../Common/spellCheckLanguagesAll.js",
"../Common/downloaderfiles.js",
"../Common/commonDefines.js",
"../Common/editorscommon.js",
......@@ -63,7 +64,7 @@
"../Common/FontsFreeType/font_engine.js",
"../Common/FontsFreeType/FontFile.js",
"../Common/FontsFreeType/FontManager.js",
"../Common/PresentationSerializeAdapter.js",
"../Common/PresentationSerializeAdapter.js",
"../Word/Drawing/Externals.js",
"../Word/Drawing/AllFonts.js",
"../Word/Drawing/GlobalLoaders.js",
......@@ -104,7 +105,7 @@
"../Word/Editor/Serialize2.js",
"../Word/Editor/Search.js",
"../Word/Editor/FontClassification.js",
"../Word/Editor/Spelling.js",
"../Word/Editor/Spelling.js",
"../Word/Drawing/Graphics.js",
"../Word/Drawing/ArcTo.js",
"../Word/Drawing/Hit.js",
......@@ -124,8 +125,9 @@
"../Word/Editor/SerializeCommon.js",
"../Word/apiDefines.js",
"../Word/api-all.js",
"../Word/merge/api_merge.js",
"../Word/Build/Log/apiExport.js",
"../Excel/graphics/DrawingContextWord.js"
"../Excel/graphics/DrawingContextWord.js"
],
"dst": "../Word/sdk-all.js",
"externs": [
......
......@@ -13,6 +13,6 @@ if (typeof window === 'undefined') {
}
else {
//Run under browser
window.exports = {};
window.exports = window;
}
......@@ -8,13 +8,16 @@
<!-- <script type="text/javascript" src="utils.js"></script> -->
<script type="text/javascript" src="menu/js/jquery-1.6.1.min.js"></script>
<script src="../Common/Merge/NodejsEnv.js"></script>
<script src="../Common/downloaderfiles.js"></script>
<script src="../Common/docscoapisettings.js"></script>
<script src="../Common/docscoapicommon.js"></script>
<script type="text/javascript" src="../Common/spellCheckLanguage.js"></script>
<script type="text/javascript" src="../Common/spellCheckLanguagesAll.js"></script>
<script type="text/javascript" src="../Common/3rdparty/Underscore/underscore-min.js"></script>
<script type="text/javascript" src="../Common/3rdparty/Sockjs/sockjs-0.3.min.js"></script>
<script type="text/javascript" src="../Common/docscoapi.js"></script>
<script type="text/javascript" src="../Common/spellcheckapisettings.js"></script>
<script type="text/javascript" src="../Common/spellcheckapi.js"></script>
<script type="text/javascript" src="../Common/wordcopypaste.js"></script>
<script type="text/javascript" src="../Common/CommonDefines.js"></script>
......@@ -117,6 +120,8 @@
<script type="text/javascript" src="Drawing/documentrenderer.js"></script>
<script type="text/javascript" src="apiDefines.js"></script>
<script type="text/javascript" src="apiCommon.js"></script>
<script type="text/javascript" src="api.js"></script>
<script type="text/javascript" src="merge/api_merge.js"></script>
<script type="text/javascript" src="Drawing/scrolls/scroll.js"></script>
<script type="text/javascript" src="../Common/Shapes/EditorSettings.js"></script>
......@@ -138,20 +143,26 @@
</head>
<body>
<p>Test page</p>
<p>See the console log.</p>
<script>
//var sdk_all = require('../sdk-all.js');
var editor = new asc_docs_api();
var editor = new asc_docs_merge_api();
console.log("Base document:", base_doc);
//var fs = require('fs');
//var base_doc = fs.readFileSync(base_file, 'utf-8');
editor.LoadDocument( base_doc );
console.log("Changes:", doc_changes);
//var doc_changes = require(changes_file);
editor.ApplyChanges( doc_changes );
var changed_doc = editor.Save();
//fs.writeFileSync(output_file, changed_doc, 'utf-8');
console.log("Merged document:", changed_doc);
</script>
</body>
</html>
\ No newline at end of file
node merge.js document/editor.bin document/changes.json editor_modified.bin
node merge.js ./document/editor.bin ./document/changes.json ./editor_modified.bin
echo %ERRORLEVEL%
pause
\ No newline at end of file
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