diff --git a/customize.dist/src/less2/include/colortheme.less b/customize.dist/src/less2/include/colortheme.less
index c8848d02b..21913eee2 100644
--- a/customize.dist/src/less2/include/colortheme.less
+++ b/customize.dist/src/less2/include/colortheme.less
@@ -93,6 +93,18 @@
@colortheme_todo-color: #000;
@colortheme_todo-warn: #cd2532;
+@colortheme_oodoc-bg: #5170B5;
+@colortheme_oodoc-color: #FFF;
+@colortheme_oodoc-warn: #cd2532;
+
+@colortheme_ooslide-bg: #c65d27;
+@colortheme_ooslide-color: #FFF;
+@colortheme_ooslide-warn: #cd2532;
+
+@colortheme_oocell-bg: #7e983f;
+@colortheme_oocell-color: #FFF;
+@colortheme_oocell-warn: #cd2532;
+
// Sidebar layout (profile / settings)
@colortheme_sidebar-active: #fff;
@colortheme_sidebar-left-bg: #eee;
diff --git a/customize.dist/src/less2/include/icon-colors.less b/customize.dist/src/less2/include/icon-colors.less
index b787fee1c..a2f2215cb 100644
--- a/customize.dist/src/less2/include/icon-colors.less
+++ b/customize.dist/src/less2/include/icon-colors.less
@@ -13,6 +13,9 @@
.cp-icon-color-profile { color: @colortheme_settings-bg; }
.cp-icon-color-default { color: @colortheme_default-bg; }
.cp-icon-color-todo { color: @colortheme_todo-bg; }
+ .cp-icon-color-oodoc { color: @colortheme_oodoc-bg; }
+ .cp-icon-color-ooslide { color: @colortheme_ooslide-bg; }
+ .cp-icon-color-oocell { color: @colortheme_oocell-bg; }
.cp-border-color-pad { border-color: @colortheme_pad-bg !important; }
.cp-border-color-code { border-color: @colortheme_code-bg !important; }
@@ -26,5 +29,8 @@
.cp-border-color-profile { border-color: @colortheme_settings-bg !important; }
.cp-border-color-default { border-color: @colortheme_default-bg !important; }
.cp-border-color-todo { border-color: @colortheme_todo-bg !important; }
+ .cp-border-color-oodoc { border-color: @colortheme_oodoc-bg !important; }
+ .cp-border-color-ooslide { border-color: @colortheme_ooslide-bg !important; }
+ .cp-border-color-oocell { border-color: @colortheme_oocell-bg !important; }
}
diff --git a/customize.dist/src/less2/main.less b/customize.dist/src/less2/main.less
index 80c2673de..89dccef65 100644
--- a/customize.dist/src/less2/main.less
+++ b/customize.dist/src/less2/main.less
@@ -40,5 +40,7 @@ body.cp-app-profile { @import "../../../profile/app-profile.less"; }
body.cp-app-settings { @import "../../../settings/app-settings.less"; }
body.cp-app-debug { @import "../../../debug/app-debug.less"; }
body.cp-app-worker { @import "../../../worker/app-worker.less"; }
-body.cp-app-oo { @import "../../../onlyoffice/document/app-oo.less"; }
+body.cp-app-oodoc { @import "../../../oodoc/app-oodoc.less"; }
+body.cp-app-ooslide { @import "../../../ooslide/app-ooslide.less"; }
+body.cp-app-oocell { @import "../../../oocell/app-oocell.less"; }
diff --git a/customize.dist/translations/messages.fr.js b/customize.dist/translations/messages.fr.js
index 2d21cf9a6..ac77cf8dc 100644
--- a/customize.dist/translations/messages.fr.js
+++ b/customize.dist/translations/messages.fr.js
@@ -15,12 +15,18 @@ define(function () {
out.type.media = "Média";
out.type.todo = "Todo";
out.type.contacts = "Contacts";
+ out.type.oodoc = 'OnlyOffice Texte';
+ out.type.ooslide = 'OnlyOffice Présentation';
+ out.type.oocell = 'OnlyOffice Tableur';
out.button_newpad = 'Nouveau document texte';
out.button_newcode = 'Nouvelle page de code';
out.button_newpoll = 'Nouveau sondage';
out.button_newslide = 'Nouvelle présentation';
out.button_newwhiteboard = 'Nouveau tableau blanc';
+ out.button_newoodoc = 'Nouveau texte OnlyOffice';
+ out.button_newooslide = 'Nouvelle présentation OnlyOffice';
+ out.button_newoocell = 'Nouveau tableur OnlyOffice';
out.updated_0_common_connectionLost = "Connexion au serveur perdue
Vous êtes désormais en mode lecture seule jusqu'au retour de la connexion.";
out.common_connectionLost = out.updated_0_common_connectionLost;
diff --git a/customize.dist/translations/messages.js b/customize.dist/translations/messages.js
index eaceee812..3f94f2163 100644
--- a/customize.dist/translations/messages.js
+++ b/customize.dist/translations/messages.js
@@ -15,12 +15,18 @@ define(function () {
out.type.media = 'Media';
out.type.todo = "Todo";
out.type.contacts = 'Contacts';
+ out.type.oodoc = 'OnlyOffice Text';
+ out.type.ooslide = 'OnlyOffice Slide';
+ out.type.oocell = 'OnlyOffice Spreadsheet';
out.button_newpad = 'New Rich Text pad';
out.button_newcode = 'New Code pad';
out.button_newpoll = 'New Poll';
out.button_newslide = 'New Presentation';
out.button_newwhiteboard = 'New Whiteboard';
+ out.button_newoodoc = 'New OnlyOffice document';
+ out.button_newooslide = 'New OnlyOffice presentation';
+ out.button_newoocell = 'New OnlyOffice spreadsheet';
// NOTE: Remove updated_0_ if we need an updated_1_
out.updated_0_common_connectionLost = "Server Connection Lost
You're now in read-only mode until the connection is back.";
diff --git a/ooserver.js b/ooserver.js
index c11dc22dd..7d1c1b3ef 100644
--- a/ooserver.js
+++ b/ooserver.js
@@ -12,7 +12,7 @@ var origin = config.httpUnsafeOrigin || 'http://localhost:3000/';
exports.install = function(server, callbackFunction) {
var sockjs_opts = {sockjs_url: ""},
sockjs_echo = sockjs.createServer(sockjs_opts),
-urlParse = new RegExp("^/onlyoffice/doc/([0-9-.a-zA-Z_=]*)/c.+", 'i');
+urlParse = new RegExp("^/common/onlyoffice/doc/([0-9-.a-zA-Z_=]*)/c.+", 'i');
console.log("Start ooserver");
console.log("Port " + sockjs_echo.port);
@@ -70,11 +70,11 @@ sockjs_echo.on('connection', function(conn) {
switch (data.type) {
case 'auth':
console.log("Response auth");
- var fileUrl = origin + "onlyoffice/document/test.bin";
+ var fileUrl = origin + "oodoc/test.bin";
if (data.openCmd.format=="xlsx")
- fileUrl = origin + "onlyoffice/spreadsheet/test.bin"
+ fileUrl = origin + "oocell/test.bin"
else if (data.openCmd.format=="pptx")
- fileUrl = origin + "onlyoffice/presentation/test.bin"
+ fileUrl = origin + "ooslide/test.bin"
sendData(conn, {"type":"auth","result":1,"sessionId":"08e77705-dc5c-477d-b73a-b1a7cbca1e9b","sessionTimeConnect":1494226099270,"participants":[]});
sendData(conn, {"type":"documentOpen","data":{"type":"open","status":"ok","data":{"Editor.bin":fileUrl}}});
break;
@@ -109,7 +109,7 @@ sockjs_echo.on('connection', function(conn) {
});
});
- sockjs_echo.installHandlers(server, {prefix: '/onlyoffice/doc/[0-9-.a-zA-Z_=]*/c', log: function(severity, message) {
+ sockjs_echo.installHandlers(server, {prefix: '/common/onlyoffice/doc/[0-9-.a-zA-Z_=]*/c', log: function(severity, message) {
console.log(message);
}});
diff --git a/server.js b/server.js
index cde9278da..dd864a428 100644
--- a/server.js
+++ b/server.js
@@ -202,7 +202,7 @@ var FONT_OBFUSCATION_MAGIC = new Buffer([
var FONT_NAME_MAP = {};
-[ './www/onlyoffice/fonts/' ].forEach(function (path) {
+[ './www/common/onlyoffice/fonts/' ].forEach(function (path) {
Fs.readdir(path, function (err, list) {
if (err) { throw err; }
list.forEach(function (fontName) {
@@ -213,7 +213,7 @@ var FONT_NAME_MAP = {};
/* Code to automatically transform font to js */
/* Currently not active, but might be necessary */
-app.use("/onlyoffice/fonts/odttf/:name", function (req, res) {
+app.use("/common/onlyoffice/fonts/odttf/:name", function (req, res) {
var name = req.params.name.replace(/\.js$/, '').toLowerCase();
console.log(name);
if (!FONT_NAME_MAP[name]) {
@@ -233,12 +233,14 @@ app.use("/onlyoffice/fonts/odttf/:name", function (req, res) {
});
/* All fonts file replaced by the list of fonts in ttf */
-app.use("/onlyoffice/sdkjs/common/AllFonts.js",
- Express.static("./www/onlyoffice/allfonts-noobf.js"));
+app.use("/common/onlyoffice/sdkjs/common/AllFonts.js",
+ Express.static("./www/common/onlyoffice/allfonts-noobf.js"));
/* Replace fonts thumbnail call */
-app.use("/onlyoffice/sdkjs/common/Images/fonts_thumbnail@2x.png",
- Express.static("./www/onlyoffice/fonts_thumbnail.png"));
+app.use("/common/onlyoffice/sdkjs/common/Images/fonts_thumbnail@2x.png",
+ Express.static("./www/common/onlyoffice/fonts_thumbnail@2x.png"));
+app.use("/common/onlyoffice/sdkjs/common/Images/fonts_thumbnail.png",
+ Express.static("./www/common/onlyoffice/fonts_thumbnail.png"));
app.use(function (req, res, next) {
diff --git a/www/common/application_config_internal.js b/www/common/application_config_internal.js
index 91520c99a..9d9897772 100644
--- a/www/common/application_config_internal.js
+++ b/www/common/application_config_internal.js
@@ -9,7 +9,8 @@ define(function() {
/* Select the buttons displayed on the main page to create new collaborative sessions
* Existing types : pad, code, poll, slide
*/
- config.availablePadTypes = ['drive', 'pad', 'code', 'slide', 'poll', 'whiteboard', 'file', 'todo', 'contacts'];
+ config.availablePadTypes = ['drive', 'pad', 'code', 'slide', 'poll', 'whiteboard',
+ 'oodoc', 'ooslide', 'oocell', 'file', 'todo', 'contacts'];
config.registeredOnlyTypes = ['file', 'contacts'];
/* Cryptpad apps use a common API to display notifications to users
@@ -81,6 +82,9 @@ define(function() {
whiteboard: 'fa-paint-brush',
todo: 'fa-tasks',
contacts: 'fa-users',
+ oodoc: 'fa-file-word-o',
+ ooslide: 'fa-file-powerpoint-o',
+ oocell: 'fa-file-excel-o',
};
// EXPERIMENTAL: Enabling "displayCreationScreen" may cause UI issues and possible loss of data
diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js
index 8e4fce0e4..0a7f9bbde 100644
--- a/www/common/common-ui-elements.js
+++ b/www/common/common-ui-elements.js
@@ -672,12 +672,24 @@ define([
});
});
break;
+ case 'save': // OnlyOffice save
+ button = $('