New apps for text, slide and spreadsheet
@@ -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
|
||||
|
||||
@@ -672,12 +672,24 @@ define([
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 'save': // OnlyOffice save
|
||||
button = $('<button>', {
|
||||
'class': 'fa fa-save',
|
||||
title: 'TODO OnlyOffice save',
|
||||
}).append($('<span>', {'class': 'cp-toolbar-drawer-element'})
|
||||
.text('TODO: OnlyOffice save'))
|
||||
.click(common.prepareFeedback(type));
|
||||
if (callback) { button.click(callback); }
|
||||
break;
|
||||
default:
|
||||
button = $('<button>', {
|
||||
'class': "fa fa-question",
|
||||
style: 'font:'+size+' FontAwesome'
|
||||
})
|
||||
.click(common.prepareFeedback(type));
|
||||
if (callback) {
|
||||
button.click(callback);
|
||||
}
|
||||
}
|
||||
if (rightside) {
|
||||
button.addClass('cp-toolbar-rightside-button');
|
||||
|
||||
|
Before Width: | Height: | Size: 477 KiB After Width: | Height: | Size: 477 KiB |
BIN
www/common/onlyoffice/fonts_thumbnail2.png
Normal file
|
After Width: | Height: | Size: 222 KiB |
@@ -29,10 +29,13 @@ define([
|
||||
{
|
||||
var saveAs = window.saveAs;
|
||||
|
||||
/*
|
||||
var ooReady = window.frames[0] && window.frames[0].frames[0] && window.frames[0].frames[0].editor;
|
||||
window.onOOReady = function () {
|
||||
console.log('ready!');
|
||||
ooReady = true;
|
||||
};
|
||||
*/
|
||||
|
||||
var APP = window.APP = {
|
||||
$: $
|
||||
@@ -77,9 +80,12 @@ define([
|
||||
var loadDocument = APP.loadDocument = function (content, file) {
|
||||
console.log("Read " + content);
|
||||
return;
|
||||
/*
|
||||
// TODO: load a document from server here
|
||||
window.frames[0].frames[0].editor.asc_CloseFile();
|
||||
var openResult = {bSerFormat: true, data: content, url: "http://localhost:3000/onlyoffice/", changes: null};
|
||||
window.frames[0].frames[0].editor.openDocument(openResult);
|
||||
*/
|
||||
};
|
||||
|
||||
var readOnly = false;
|
||||
@@ -119,7 +125,6 @@ define([
|
||||
};
|
||||
|
||||
APP.onLocal = config.onLocal = function () {
|
||||
console.log(initializing, readOnly);
|
||||
if (initializing) { return; }
|
||||
if (readOnly) { return; }
|
||||
|
||||
@@ -127,8 +132,9 @@ define([
|
||||
console.log("Cannot access editor");
|
||||
return;
|
||||
}
|
||||
console.log('ok');
|
||||
var data = window.frames[0].frames[0].editor.asc_nativeGetFile();
|
||||
console.log('onLocal, data avalable');
|
||||
data = '';
|
||||
var content = stringifyInner(data);
|
||||
APP.realtime.contentUpdate(content);
|
||||
};
|
||||
@@ -169,14 +175,9 @@ define([
|
||||
var $import = common.createButton('import', true, {}, loadDocument);
|
||||
$rightside.append($import);
|
||||
var $save = common.createButton('save', true, {}, saveToServer);
|
||||
$save.click(function () {
|
||||
saveToServer();
|
||||
});
|
||||
$rightside.append($save);
|
||||
var $remote = common.createButton('remote', true, {}, callRemote);
|
||||
$remote.click(function () {
|
||||
callRemote();
|
||||
});
|
||||
$remote.attr('title', 'call onRemote');
|
||||
$rightside.append($remote);
|
||||
|
||||
if (common.isLoggedIn()) {
|
||||
@@ -293,9 +294,11 @@ define([
|
||||
var common;
|
||||
|
||||
nThen(function (waitFor) {
|
||||
/*
|
||||
if (!ooReady) {
|
||||
window.onOOReady = waitFor();
|
||||
}
|
||||
*/
|
||||
$(waitFor(function () {
|
||||
UI.addLoadingScreen();
|
||||
}));
|
||||
@@ -20,8 +20,8 @@ define([
|
||||
window.rc = requireConfig;
|
||||
window.apiconf = ApiConfig;
|
||||
document.getElementById('sbox-iframe').setAttribute('src',
|
||||
ApiConfig.httpSafeOrigin + '/onlyoffice/document/inner.html?' + requireConfig.urlArgs +
|
||||
'#' + encodeURIComponent(JSON.stringify(req)));
|
||||
ApiConfig.httpSafeOrigin + window.location.pathname + 'inner.html?' +
|
||||
requireConfig.urlArgs + '#' + encodeURIComponent(JSON.stringify(req)));
|
||||
|
||||
// This is a cheap trick to avoid loading sframe-channel in parallel with the
|
||||
// loading screen setup.
|
||||
1
www/common/onlyoffice/plugins.json
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 902 B After Width: | Height: | Size: 902 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 540 KiB After Width: | Height: | Size: 540 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |