From dec8fc3f01b41c64379fbb50ba53274d2c908368 Mon Sep 17 00:00:00 2001 From: yflory Date: Mon, 5 Oct 2020 16:45:37 +0200 Subject: [PATCH] lint compliance --- www/common/onlyoffice/history.js | 4 ++-- www/common/onlyoffice/inner.js | 8 +++++--- www/common/onlyoffice/main.js | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/www/common/onlyoffice/history.js b/www/common/onlyoffice/history.js index af00c8103..ee5b10402 100644 --- a/www/common/onlyoffice/history.js +++ b/www/common/onlyoffice/history.js @@ -65,11 +65,11 @@ define([ var id = sortedCp[cps - cpIndex -1] || -1; if (!ooMessages[id]) { return; } var msgs = ooMessages[id]; - console.log(ooMessages); var p = 100*((msgIndex+1) / (msgs.length)); $pos.css('margin-left', p+'%'); - var time = currentTime = msgs[msgIndex] && msgs[msgIndex].time; + var time = msgs[msgIndex] && msgs[msgIndex].time; + currentTime = time; if (time) { $time.text(new Date(time).toLocaleString()); } else { $time.text(''); } }; diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 7d1c2e909..c1380d2fd 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -58,7 +58,7 @@ define([ var DISPLAY_RESTORE_BUTTON = false; var NEW_VERSION = 3; var PENDING_TIMEOUT = 30000; - var READONLY_REFRESH_TO = 15000; + //var READONLY_REFRESH_TO = 15000; var debug = function (x) { if (!window.CP_DEV_MODE) { return; } @@ -587,6 +587,7 @@ define([ xhr.send(null); }; + /* var refreshReadOnly = function () { var cancel = h('button.cp-corner-cancel', Messages.cancel); var reload = h('button.cp-corner-primary', [ @@ -615,6 +616,7 @@ define([ m.delete(); }); }; + */ var openVersionHash = function (version) { readOnly = true; @@ -672,7 +674,7 @@ define([ // of the history has been deleted var vType = "warning"; if (!exists) { - vTxt = Messages.oo_deletedVersion + vTxt = Messages.oo_deletedVersion; vType = "danger"; } @@ -1926,7 +1928,7 @@ define([ var hash, time; if (obj && obj.hash && obj.time) { hash = obj.hash; - time = obj.time + time = obj.time; } else { var major = Object.keys(content.hashes).length; var cpIndex = getLastCp().index || 0; diff --git a/www/common/onlyoffice/main.js b/www/common/onlyoffice/main.js index f3bf744d4..83d887548 100644 --- a/www/common/onlyoffice/main.js +++ b/www/common/onlyoffice/main.js @@ -144,7 +144,7 @@ define([ } Cryptpad.onlyoffice.execCommand(obj, cb); }); - sframeChan.on('EV_OO_OPENVERSION', function (obj, cb) { + sframeChan.on('EV_OO_OPENVERSION', function (obj) { if (!obj || !obj.hash) { return; } var parsed = Hash.parsePadUrl(window.location.href); var opts = parsed.getOptions();