Compare commits

..

13 Commits

Author SHA1 Message Date
529b76013d Merge tag 'win-install' into develop
win-install

Conflicts:
	web/documentserver-example/nodejs/config/production-windows.json
2016-11-14 19:39:11 +03:00
e8af9379f4 Merge branch 'hotfix/win-install' 2016-11-14 19:33:21 +03:00
8eaa1af0a3 Added Makefile to build nodejs example 2016-11-14 17:39:40 +03:00
0609932a51 add some plugins to develop config 2016-11-10 16:44:14 +03:00
68b279759a add num to word plugin 2016-11-10 16:28:04 +03:00
bc2b5aca6d urlDiff -> changesUrl 2016-11-02 10:41:59 +03:00
e02003da35 php: change method serverPath 2016-11-01 15:56:30 +03:00
b310236c64 php: fix comment 2016-11-01 14:53:32 +03:00
741076c36a Fixed SyntaxError 2016-10-27 14:04:24 +03:00
f42dc78f6e fixed plugins on windows 2016-10-27 12:47:22 +03:00
f873bf354a fix bug 33278 2016-10-25 17:15:06 +03:00
b223ce6e6b Merge pull request #18 from ONLYOFFICE/hotfix/windows-build
Added config for the windows version
2016-10-07 17:16:07 +03:00
bce32192af Added config for the windows version 2016-10-07 17:15:00 +03:00
12 changed files with 93 additions and 39 deletions

4
Makefile Normal file
View File

@ -0,0 +1,4 @@
.PHONY: all
all:
cd web/documentserver-example/nodejs && npm install

View File

@ -74,6 +74,13 @@ app.use(function (req, res, next) {
});
app.use(express.static(path.join(__dirname, "public")));
if (config.has('server.static')) {
var staticContent = config.get('server.static');
for (var i = 0; i < staticContent.length; ++i) {
var staticContentElem = staticContent[i];
app.use(staticContentElem['name'], express.static(staticContentElem['path'], staticContentElem['options']));
}
}
app.use(favicon(__dirname + "/public/images/favicon.ico"));
@ -473,7 +480,7 @@ app.get("/editor", function (req, res) {
history: history,
setHistoryData: {
url: prevUrl,
urlDiff: diff
changesUrl: diff
}
};

View File

@ -23,7 +23,13 @@
"editedDocs": [".docx", ".doc", ".odt", ".xlsx", ".xls", ".ods", ".csv", ".pptx", ".ppsx", ".rtf", ".txt", ".mht", ".html", ".htm"],
"convertedDocs": [".doc", ".odt", ".xls", ".ods", ".ppt", ".pps", ".odp", ".rtf", ".mht", ".html", ".htm", ".epub"],
"storageFolder": "files",
"maxFileSize": 1073741824
"maxFileSize": 1073741824,
"static":[
{
"name": "/public",
"path": "public"
}
]
},
"plugins": {
"url": "../../../../sdkjs-plugins/",

View File

@ -2,5 +2,21 @@
"server": {
"port": 80,
"siteUrl": "http://127.0.0.1:8001/"
},
"plugins": {
"pluginsData": [
"helloworld/config.json",
"chess/config.json",
"glavred/config.json",
"speech/config.json",
"youtube/config.json",
"cbr/config.json",
"num2word/config.json",
"ocr/config.json",
"yandextranslaterus/config.json",
"clipart/config.json",
"translate/config.json",
"templates/config.json"
]
}
}

View File

@ -1,7 +1,19 @@
{
"server": {
"siteUrl": "/",
"maxFileSize": 104857600
"maxFileSize": 104857600,
"static":[
{
"name": "/public",
"path": "public",
"options": {"maxAge": "7d"}
},
{
"name": "/sdkjs-plugins",
"path": "sdkjs-plugins",
"options": {"maxAge": "7d"}
}
]
},
"plugins": {
"url": "/sdkjs-plugins/"

View File

@ -330,18 +330,17 @@ docManager.getHistory = function (fileName, content, keyVersion, version) {
var userAddress = docManager.curUserHostAddress();
var username = content ? (oldVersion ? contentJson.username : contentJson.user.name) : (docManager.getFileData(fileName, userAddress))[2];
var userid = content ? (oldVersion ? contentJson.userid : contentJson.user.id) : (docManager.getFileData(fileName, userAddress))[1];
var date = content ? (oldVersion ? contentJson.date : contentJson.created) : (docManager.getFileData(fileName, userAddress))[0];
return {
key: keyVersion,
version: version,
created: date,
user: {
id: userid,
name: username
},
changes: content
var created = content ? (oldVersion ? contentJson.date : contentJson.created) : (docManager.getFileData(fileName, userAddress))[0];
var res = (content && !oldVersion) ? content : {changes: content};
res.key = keyVersion;
res.version = version;
res.created = created;
res.user = {
id: userid,
name: username
};
return res;
};
module.exports = docManager;

View File

@ -76,13 +76,13 @@
var onRequestHistoryData = function (data) {
var version = data.data;
var url_arr = "<%= setHistoryData.url %>".split(",");
var urlDiff_arr = "<%= setHistoryData.urlDiff %>".split(",");
var changesUrl_arr = "<%= setHistoryData.changesUrl %>".split(",");
docEditor.setHistoryData({
version: version,
url: url_arr[version-1] != "" ? url_arr[version-1]: null,
urlDiff: urlDiff_arr[version-1] != "" ? urlDiff_arr[version-1]: null
});
version: version,
url: url_arr[version - 1] != "" ? url_arr[version - 1] : null,
changesUrl: changesUrl_arr[version - 1] != "" ? changesUrl_arr[version - 1] : null
});
};
var onRequestHistoryClose = function (event){

View File

@ -1,4 +1,5 @@
<!--*
<?php
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
@ -15,13 +16,14 @@
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* Pursuant to Section 7 <20> 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
* Pursuant to Section 7 <20> 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*-->
*/
?>
<?php
@ -138,7 +140,7 @@ function getClientIp() {
}
function serverPath() {
return $_SERVER['HTTP_REFERER'];
return 'http://' . $_SERVER['HTTP_HOST'];
}
function getCurUserHostAddress($userAddress = NULL) {
@ -195,7 +197,7 @@ function getVirtualPath() {
$storagePath = $storagePath != "" ? $storagePath . '/' : "";
$virtPath = rtrim(serverPath(), '/') . '/' . $storagePath . getCurUserHostAddress() . '/';
$virtPath = serverPath() . '/' . $storagePath . getCurUserHostAddress() . '/';
sendlog("getVirtualPath virtPath: " . $virtPath, "logs/common.log");
return $virtPath;
}

View File

@ -1,4 +1,5 @@
<!--*
<?php
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
@ -21,7 +22,8 @@
* in every copy of the program you distribute.
* Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*-->
*/
?>
<?php
require_once( dirname(__FILE__) . '/config.php' );
@ -88,7 +90,7 @@
}
function getCallbackUrl($fileName) {
return rtrim(serverPath(), '/') . '/'
return serverPath() . '/'
. "webeditor-ajax.php"
. "?type=track&userAddress=" . getClientIp()
. "&fileName=" . urlencode($fileName);
@ -212,7 +214,7 @@
about: true,
feedback: true,
goback: {
url: "<?php echo rtrim(serverPath(), '/') ?>/index.php",
url: "<?php echo serverPath() ?>/index.php",
},
},
},

View File

@ -1,4 +1,5 @@
<!--*
<?php
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
@ -15,13 +16,14 @@
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* Pursuant to Section 7 <20> 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
* Pursuant to Section 7 <20> 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*-->
*/
?>
<?php

View File

@ -1,4 +1,5 @@
<!--*
<?php
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
@ -21,7 +22,8 @@
* in every copy of the program you distribute.
* Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*-->
*/
?>
<?php
require_once( dirname(__FILE__) . '/config.php' );

View File

@ -1,4 +1,5 @@
<!--*
<?php
/*
*
* (c) Copyright Ascensio System Limited 2010-2016
*
@ -15,13 +16,14 @@
* The interactive user interfaces in modified source and object code versions of ONLYOFFICE must display
* Appropriate Legal Notices, as required under Section 5 of the GNU GPL version 3.
*
* Pursuant to Section 7 § 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* Pursuant to Section 7 <20> 3(b) of the GNU GPL you must retain the original ONLYOFFICE logo which contains
* relevant author attributions when distributing the software. If the display of the logo in its graphic
* form is not reasonably feasible for technical reasons, you must include the words "Powered by ONLYOFFICE"
* in every copy of the program you distribute.
* Pursuant to Section 7 § 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
* Pursuant to Section 7 <20> 3(e) we decline to grant you any rights under trademark law for use of our trademarks.
*
*-->
*/
?>
<?php
/**