mirror of https://github.com/xwiki-labs/cryptpad
Move OnlyOffice dist to own directory
https://github.com/cryptpad/cryptpad/issues/1416
This commit is contained in:
parent
9a60af328c
commit
bb5d7aa326
|
@ -33,3 +33,4 @@ lib/plugins/*
|
|||
www/common/onlyoffice/v*
|
||||
|
||||
/onlyoffice-builds.git/
|
||||
/www/common/onlyoffice/dist/
|
||||
|
|
|
@ -4,11 +4,12 @@ set -euxo pipefail
|
|||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
BUILDS_DIR=$SCRIPT_DIR/onlyoffice-builds.git
|
||||
OO_DIR=$SCRIPT_DIR/www/common/onlyoffice
|
||||
OO_DIR=$SCRIPT_DIR/www/common/onlyoffice/dist
|
||||
|
||||
main () {
|
||||
parse_arguments "$@"
|
||||
validate_arguments
|
||||
|
||||
prepare_builds
|
||||
install_version v1 4f370beb
|
||||
install_version v2b d9da72fd
|
||||
|
@ -91,6 +92,8 @@ prepare_builds () {
|
|||
else
|
||||
git clone --bare git@github.com:cryptpad/onlyoffice-builds.git "$BUILDS_DIR" # TODO use https here, when repo is public
|
||||
fi
|
||||
|
||||
mkdir -p "$OO_DIR"
|
||||
}
|
||||
|
||||
install_version () {
|
||||
|
|
|
@ -32,13 +32,7 @@ var isPossiblyGenerated = function (key) {
|
|||
var grep = function (pattern, cb) {
|
||||
var exclude = [
|
||||
'www/common/translations/*',
|
||||
'www/common/onlyoffice/v1/*',
|
||||
'www/common/onlyoffice/v2b*',
|
||||
'www/common/onlyoffice/v4*',
|
||||
'www/common/onlyoffice/v5*',
|
||||
'www/common/onlyoffice/v6*',
|
||||
'www/common/onlyoffice/x2t/*',
|
||||
//'www/common/onlyoffice/build/*',
|
||||
'www/common/onlyoffice/dist/*',
|
||||
'www/lib/*',
|
||||
'www/common/pdfjs/*',
|
||||
'*.css',
|
||||
|
|
|
@ -421,7 +421,7 @@ define([
|
|||
});
|
||||
});
|
||||
|
||||
var sheetURL = '/common/onlyoffice/v5/web-apps/apps/spreadsheeteditor/main/index.html';
|
||||
var sheetURL = '/common/onlyoffice/dist/v5/web-apps/apps/spreadsheeteditor/main/index.html';
|
||||
|
||||
assert(function (cb, msg) {
|
||||
msg.innerText = "Missing HTTP headers required for .xlsx export from sheets. ";
|
||||
|
@ -718,7 +718,7 @@ define([
|
|||
});
|
||||
|
||||
assert(function (cb, msg) { // FIXME possibly superseded by more advanced CSP tests?
|
||||
var url = '/common/onlyoffice/v5/web-apps/apps/spreadsheeteditor/main/index.html';
|
||||
var url = '/common/onlyoffice/dist/v5/web-apps/apps/spreadsheeteditor/main/index.html';
|
||||
msg.appendChild(CSP_WARNING(url));
|
||||
deferredPostMessage({
|
||||
command: 'GET_HEADER',
|
||||
|
|
|
@ -2582,7 +2582,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
|
|||
(content.version <= 3 ? 'v2b/' : CURRENT_VERSION+'/');
|
||||
var s = h('script', {
|
||||
type:'text/javascript',
|
||||
src: '/common/onlyoffice/'+version+'web-apps/apps/api/documents/api.js'
|
||||
src: '/common/onlyoffice/dist/'+version+'web-apps/apps/api/documents/api.js'
|
||||
});
|
||||
$('#cp-app-oo-editor').empty().append(h('div#cp-app-oo-placeholder-a')).append(s);
|
||||
|
||||
|
@ -3006,7 +3006,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
|
|||
|
||||
var s = h('script', {
|
||||
type:'text/javascript',
|
||||
src: '/common/onlyoffice/'+version+'web-apps/apps/api/documents/api.js'
|
||||
src: '/common/onlyoffice/dist/'+version+'web-apps/apps/api/documents/api.js'
|
||||
});
|
||||
$('#cp-app-oo-editor').append(s);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ define([
|
|||
var x2tReady = Util.mkEvent(true);
|
||||
var fetchFonts = function (x2t, obj, cb) {
|
||||
if (!obj.fonts) { return void cb(); }
|
||||
var path = ApiConfig.httpSafeOrigin + '/common/onlyoffice/'+CURRENT_VERSION+'/fonts/';
|
||||
var path = ApiConfig.httpSafeOrigin + '/common/onlyoffice/dist/'+CURRENT_VERSION+'/fonts/';
|
||||
var ver = '?' + ApiConfig.requireConf.urlArgs;
|
||||
var fonts = obj.fonts;
|
||||
var files = obj.fonts_files;
|
||||
|
|
|
@ -118,7 +118,7 @@ define([
|
|||
var loadOO = function (blob, type, name, cb) {
|
||||
var s = h('script', {
|
||||
type:'text/javascript',
|
||||
src: '/common/onlyoffice/'+CURRENT_VERSION+'/web-apps/apps/api/documents/api.js'
|
||||
src: '/common/onlyoffice/dist/'+CURRENT_VERSION+'/web-apps/apps/api/documents/api.js'
|
||||
});
|
||||
var file = getFileType(type);
|
||||
APP.$rightside.append(s);
|
||||
|
|
Loading…
Reference in New Issue