lint compliance

pull/1/head
yflory 4 years ago
parent e698241ee9
commit dec8fc3f01

@ -65,11 +65,11 @@ define([
var id = sortedCp[cps - cpIndex -1] || -1; var id = sortedCp[cps - cpIndex -1] || -1;
if (!ooMessages[id]) { return; } if (!ooMessages[id]) { return; }
var msgs = ooMessages[id]; var msgs = ooMessages[id];
console.log(ooMessages);
var p = 100*((msgIndex+1) / (msgs.length)); var p = 100*((msgIndex+1) / (msgs.length));
$pos.css('margin-left', p+'%'); $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()); } if (time) { $time.text(new Date(time).toLocaleString()); }
else { $time.text(''); } else { $time.text(''); }
}; };

@ -58,7 +58,7 @@ define([
var DISPLAY_RESTORE_BUTTON = false; var DISPLAY_RESTORE_BUTTON = false;
var NEW_VERSION = 3; var NEW_VERSION = 3;
var PENDING_TIMEOUT = 30000; var PENDING_TIMEOUT = 30000;
var READONLY_REFRESH_TO = 15000; //var READONLY_REFRESH_TO = 15000;
var debug = function (x) { var debug = function (x) {
if (!window.CP_DEV_MODE) { return; } if (!window.CP_DEV_MODE) { return; }
@ -587,6 +587,7 @@ define([
xhr.send(null); xhr.send(null);
}; };
/*
var refreshReadOnly = function () { var refreshReadOnly = function () {
var cancel = h('button.cp-corner-cancel', Messages.cancel); var cancel = h('button.cp-corner-cancel', Messages.cancel);
var reload = h('button.cp-corner-primary', [ var reload = h('button.cp-corner-primary', [
@ -615,6 +616,7 @@ define([
m.delete(); m.delete();
}); });
}; };
*/
var openVersionHash = function (version) { var openVersionHash = function (version) {
readOnly = true; readOnly = true;
@ -672,7 +674,7 @@ define([
// of the history has been deleted // of the history has been deleted
var vType = "warning"; var vType = "warning";
if (!exists) { if (!exists) {
vTxt = Messages.oo_deletedVersion vTxt = Messages.oo_deletedVersion;
vType = "danger"; vType = "danger";
} }
@ -1926,7 +1928,7 @@ define([
var hash, time; var hash, time;
if (obj && obj.hash && obj.time) { if (obj && obj.hash && obj.time) {
hash = obj.hash; hash = obj.hash;
time = obj.time time = obj.time;
} else { } else {
var major = Object.keys(content.hashes).length; var major = Object.keys(content.hashes).length;
var cpIndex = getLastCp().index || 0; var cpIndex = getLastCp().index || 0;

@ -144,7 +144,7 @@ define([
} }
Cryptpad.onlyoffice.execCommand(obj, cb); 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; } if (!obj || !obj.hash) { return; }
var parsed = Hash.parsePadUrl(window.location.href); var parsed = Hash.parsePadUrl(window.location.href);
var opts = parsed.getOptions(); var opts = parsed.getOptions();

Loading…
Cancel
Save