Merge branch 'migration' into staging

pull/1/head
ansuz 3 years ago
commit 8953e62ddd

@ -363,7 +363,7 @@ define([
}); });
}); });
var sheetURL = '/common/onlyoffice/v4/web-apps/apps/spreadsheeteditor/main/index.html'; var sheetURL = '/common/onlyoffice/v5/web-apps/apps/spreadsheeteditor/main/index.html';
assert(function (cb, msg) { assert(function (cb, msg) {
msg.innerText = "Missing HTTP headers required for .xlsx export from sheets. "; msg.innerText = "Missing HTTP headers required for .xlsx export from sheets. ";
@ -671,7 +671,7 @@ define([
}); });
assert(function (cb, msg) { assert(function (cb, msg) {
var url = '/common/onlyoffice/v4/web-apps/apps/spreadsheeteditor/main/index.html'; var url = '/common/onlyoffice/v5/web-apps/apps/spreadsheeteditor/main/index.html';
msg.appendChild(CSP_WARNING(url)); msg.appendChild(CSP_WARNING(url));
deferredPostMessage({ deferredPostMessage({
command: 'GET_HEADER', command: 'GET_HEADER',

@ -61,7 +61,7 @@ define([
var CHECKPOINT_INTERVAL = 100; var CHECKPOINT_INTERVAL = 100;
var FORCE_CHECKPOINT_INTERVAL = 10000; var FORCE_CHECKPOINT_INTERVAL = 10000;
var DISPLAY_RESTORE_BUTTON = false; var DISPLAY_RESTORE_BUTTON = false;
var NEW_VERSION = 4; // version of the .bin, patches and ChainPad formats var NEW_VERSION = 5; // version of the .bin, patches and ChainPad formats
var PENDING_TIMEOUT = 30000; var PENDING_TIMEOUT = 30000;
var CURRENT_VERSION = X2T.CURRENT_VERSION; var CURRENT_VERSION = X2T.CURRENT_VERSION;
@ -1687,6 +1687,41 @@ define([
} }
}, },
"onDocumentReady": function () { "onDocumentReady": function () {
/*
// Cancel migration from v4 et v5 if there is no charts
if (APP.migrate && content.version === 4 && NEW_VERSION === 5) {
var skip = false;
// Skip if there is no chart in the document
if (getEditor()) {
var app = common.getMetadataMgr().getPrivateData().ooType;
var d, hasChart;
if (app === 'doc') {
d = getEditor().GetDocument();
hasChart = d.GetAllCharts().length;
} else if (app === 'presentation') {
hasChart = d.Slides.some(function (slide) {
return slide.getDrawingObjects().some(function (obj) {
return obj instanceof getWindow().AscFormat.CChartSpace;
});
});
}
if (!hasChart) { skip = true; }
}
if (skip) {
delete content.migration;
content.version = NEW_VERSION;
APP.onLocal();
APP.realtime.onSettle(function () {
UI.removeModals();
UI.alert(Messages.oo_sheetMigration_complete, function () {
common.gotoURL();
});
return;
});
return;
}
}
*/
evOnSync.fire(); evOnSync.fire();
var onMigrateRdy = Util.mkEvent(); var onMigrateRdy = Util.mkEvent();
onMigrateRdy.reg(function () { onMigrateRdy.reg(function () {
@ -2900,8 +2935,8 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
} }
readOnly = true; readOnly = true;
} }
} else if (content && content.version <= 3) { // V2 or V3 } else if (content && content.version <= 4) { // V2 or V3
version = 'v2b/'; version = content.version <= 3 ? 'v2b/' : 'v4/';
APP.migrate = true; APP.migrate = true;
// Registedred ~~users~~ editors can start the migration // Registedred ~~users~~ editors can start the migration
if (common.isLoggedIn() && !readOnly) { if (common.isLoggedIn() && !readOnly) {

@ -0,0 +1,110 @@
@charset "UTF-8";
/*
* Worksheet canvas
* --------------------------------------------------------
*/
#ws-canvas-outer {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
#ws-canvas {
border: 0;
}
#ws-canvas-overlay, #ws-canvas-graphic, #ws-canvas-graphic-overlay {
border: 0;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
/*
* Worksheet scroll bars
* --------------------------------------------------------
*/
#ws-v-scrollbar {
position: absolute;
right: 0;
width: 19px;
top: -1px;
bottom: 18px;
overflow: hidden;
z-index: 10;
}
#ws-v-scroll-helper {
width: 1px;
}
#ws-h-scrollbar {
position: absolute;
bottom: 0;
height: 19px;
left: 0;
right: 18px;
overflow: hidden;
z-index: 10;
}
#ws-h-scroll-helper {
height: 1px;
}
#ws-scrollbar-corner {
position: absolute;
right: 0;
bottom: 0;
width: 18px;
height: 18px;
background-color: #DCE2E8;
border: 0;
z-index: 10;
}
/* Scrollbars common */
#ws-v-scrollbar .jspVerticalBar,
#ws-h-scrollbar .jspHorizontalBar,
#ws-v-scrollbar .jspTrack,
#ws-h-scrollbar .jspTrack {
background-color: #DCE2E8;
}
#ws-v-scrollbar .jspDrag,
#ws-h-scrollbar .jspDrag {
background-color: #C0C0C0;
}
#ws-v-scrollbar .jspDrag.jspHover,
#ws-v-scrollbar .jspDrag.jspActive,
#ws-h-scrollbar .jspDrag.jspHover,
#ws-h-scrollbar .jspDrag.jspActive {
background-color: #808080;
}
/* Vertical scrollbar */
#ws-v-scrollbar .jspVerticalBar {
width: 7px;
border-left: 1px solid #C1C6CC;
}
#ws-v-scrollbar .jspTrack {
width: 8px;
}
/* Horizontal scrollbar */
#ws-h-scrollbar .jspHorizontalBar {
height: 7px;
border-top: 1px solid #C1C6CC;
}
#ws-h-scrollbar .jspTrack {
height: 8px;
}

@ -0,0 +1,160 @@
@charset "UTF-8";
/*
* Worksheet canvas
* --------------------------------------------------------
*/
#ws-canvas-outer {
position: absolute;
left: 0;
top: 0;
right: 14px;
bottom: 14px;
overflow: hidden;
}
#ws-canvas {
border: 0;
-webkit-user-select: none;
}
#ws-canvas-overlay, #ws-canvas-graphic, #ws-canvas-graphic-overlay {
-webkit-user-select: none;
border: 0;
position: absolute;
left: 0;
top: 0;
z-index: 1;
}
/*
* Worksheet scroll bars
* --------------------------------------------------------
*/
#ws-v-scrollbar {
position: absolute;
right: 0;
width: 14px;
top: 0px;
bottom: 14px;
overflow: hidden;
z-index: 10;
background-color: #f1f1f1;
}
#ws-v-scroll-helper {
width: 1px;
}
#ws-h-scrollbar {
position: absolute;
bottom: 0;
height: 14px;
left: 0px;
right: 14px;
overflow: hidden;
z-index: 10;
background-color: #f1f1f1;
}
#ws-h-scroll-helper {
height: 1px;
}
#ws-scrollbar-corner {
position: absolute;
right: 0;
bottom: 0;
width: 14px;
height: 14px;
background-color: #F4F4F4;
border: 0;
z-index: 10;
}
/* Scrollbars common */
#ws-v-scrollbar .jspVerticalBar,
#ws-h-scrollbar .jspHorizontalBar,
#ws-v-scrollbar .jspTrack,
#ws-h-scrollbar .jspTrack {
background-color: #DCE2E8;
}
#ws-v-scrollbar .jspDrag,
#ws-h-scrollbar .jspDrag {
background-color: #C0C0C0;
}
#ws-v-scrollbar .jspDrag.jspHover,
#ws-v-scrollbar .jspDrag.jspActive,
#ws-h-scrollbar .jspDrag.jspHover,
#ws-h-scrollbar .jspDrag.jspActive {
background-color: #808080;
}
/* Vertical scrollbar */
#ws-v-scrollbar .jspVerticalBar {
width: 7px;
border-left: 1px solid #C1C6CC;
}
#ws-v-scrollbar .jspTrack {
width: 8px;
}
/* Horizontal scrollbar */
#ws-h-scrollbar .jspHorizontalBar {
height: 7px;
border-top: 1px solid #C1C6CC;
}
#ws-h-scrollbar .jspTrack {
height: 8px;
}
/*
* Cell editor
* --------------------------------------------------------
*/
#ce-canvas-outer,
#ce-canvas-outer-menu {
position: absolute;
border: 0;
overflow: hidden;
}
#ce-canvas,
#ce-canvas-overlay,
#ce-canvas-menu,
#ce-canvas-overlay-menu {
border: 0;
position: absolute;
left: 0;
top: 0;
}
#ce-cursor,
#ce-cursor-menu {
position: absolute;
background-color: #000;
width: 1px;
height: 11pt;
cursor: text;
}
#apiPopUpSelector {
position: absolute;
}
#apiPopUpList {
width: 100%;
height: 100%;
max-height: 210px;
overflow: hidden;
position: relative;
}
#apiPopUpList li {
max-width: 500px;
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save