From 16af013bce3cf636946ae5ec937983fc3d71f814 Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 24 Sep 2020 16:04:44 +0200 Subject: [PATCH] Versioned hash for onlyoffice --- www/common/onlyoffice/history.js | 17 ++- www/common/onlyoffice/inner.js | 186 ++++++++++++++++++++----------- www/common/onlyoffice/main.js | 14 ++- www/common/outer/async-store.js | 2 - 4 files changed, 144 insertions(+), 75 deletions(-) diff --git a/www/common/onlyoffice/history.js b/www/common/onlyoffice/history.js index 9907d9320..329c3cb40 100644 --- a/www/common/onlyoffice/history.js +++ b/www/common/onlyoffice/history.js @@ -40,13 +40,16 @@ define([ if (endWithCp) { cpIndex = 0; } - var $version, $time; + var $version, $time, $share; var $hist = $toolbar.find('.cp-toolbar-history'); var $bottom = $toolbar.find('.cp-toolbar-bottom'); - var showVersion = function (initial) { + var getVersion = function () { var major = sortedCp.length - cpIndex; - var v = major + '.' + msgIndex; + return major + '.' + msgIndex; + }; + var showVersion = function (initial) { + var v = getVersion(); if (initial) { v = "Latest"; // XXX } @@ -113,6 +116,7 @@ define([ fillOO(id, messages); loading = false; config.onCheckpoint(cp); + $share.show(); }); }; @@ -199,10 +203,10 @@ define([ $next.hide().appendTo($hist); $fastNext.hide().appendTo($hist); - var $share = $('