|
|
@ -249,7 +249,6 @@ define([
|
|
|
|
var locked = false;
|
|
|
|
var locked = false;
|
|
|
|
var show = function (_i) {
|
|
|
|
var show = function (_i) {
|
|
|
|
if (locked) { return; }
|
|
|
|
if (locked) { return; }
|
|
|
|
locked = true;
|
|
|
|
|
|
|
|
if (_i < 0) { i = 0; }
|
|
|
|
if (_i < 0) { i = 0; }
|
|
|
|
else if (_i > tags.length -1) { i = tags.length - 1; }
|
|
|
|
else if (_i > tags.length -1) { i = tags.length - 1; }
|
|
|
|
else { i = _i; }
|
|
|
|
else { i = _i; }
|
|
|
@ -293,7 +292,6 @@ define([
|
|
|
|
if (_key) { key = 'cryptpad:' + Nacl.util.encodeBase64(_key); }
|
|
|
|
if (_key) { key = 'cryptpad:' + Nacl.util.encodeBase64(_key); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!src || !key) {
|
|
|
|
if (!src || !key) {
|
|
|
|
locked = false;
|
|
|
|
|
|
|
|
$spinner.hide();
|
|
|
|
$spinner.hide();
|
|
|
|
return void UI.log(Messages.error);
|
|
|
|
return void UI.log(Messages.error);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -307,13 +305,18 @@ define([
|
|
|
|
locked = false;
|
|
|
|
locked = false;
|
|
|
|
$spinner.hide();
|
|
|
|
$spinner.hide();
|
|
|
|
UI.log(Messages.error);
|
|
|
|
UI.log(Messages.error);
|
|
|
|
|
|
|
|
}).on('progress', function () {
|
|
|
|
|
|
|
|
$spinner.hide();
|
|
|
|
|
|
|
|
locked = true;
|
|
|
|
|
|
|
|
}).on('complete', function () {
|
|
|
|
|
|
|
|
locked = false;
|
|
|
|
|
|
|
|
$spinner.hide();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var observer = new MutationObserver(function(mutations) {
|
|
|
|
var observer = new MutationObserver(function(mutations) {
|
|
|
|
mutations.forEach(function() {
|
|
|
|
mutations.forEach(function() {
|
|
|
|
locked = false;
|
|
|
|
|
|
|
|
$spinner.hide();
|
|
|
|
$spinner.hide();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|