|
|
@ -989,7 +989,12 @@ define([
|
|
|
|
deleteOfflineLocks();
|
|
|
|
deleteOfflineLocks();
|
|
|
|
// Prepare callback
|
|
|
|
// Prepare callback
|
|
|
|
if (cpNfInner) {
|
|
|
|
if (cpNfInner) {
|
|
|
|
APP.waitLock = Util.mkEvent(true);
|
|
|
|
var waitLock = APP.waitLock = Util.mkEvent(true);
|
|
|
|
|
|
|
|
setTimeout(function () {
|
|
|
|
|
|
|
|
// Make sure the waitLock is never stuck
|
|
|
|
|
|
|
|
waitLock.fire();
|
|
|
|
|
|
|
|
if (waitLock === APP.waitLock) { delete APP.waitLock; }
|
|
|
|
|
|
|
|
}, 5000);
|
|
|
|
var onPatchSent = function (again) {
|
|
|
|
var onPatchSent = function (again) {
|
|
|
|
if (!again) { cpNfInner.offPatchSent(onPatchSent); }
|
|
|
|
if (!again) { cpNfInner.offPatchSent(onPatchSent); }
|
|
|
|
// Answer to our onlyoffice
|
|
|
|
// Answer to our onlyoffice
|
|
|
@ -1005,8 +1010,8 @@ define([
|
|
|
|
type: "getLock",
|
|
|
|
type: "getLock",
|
|
|
|
locks: getLock()
|
|
|
|
locks: getLock()
|
|
|
|
});
|
|
|
|
});
|
|
|
|
APP.waitLock.fire();
|
|
|
|
waitLock.fire();
|
|
|
|
delete APP.waitLock;
|
|
|
|
if (waitLock === APP.waitLock) { delete APP.waitLock; }
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
if (!isLockedModal.modal) {
|
|
|
|
if (!isLockedModal.modal) {
|
|
|
|
isLockedModal.modal = UI.openCustomModal(isLockedModal.content);
|
|
|
|
isLockedModal.modal = UI.openCustomModal(isLockedModal.content);
|
|
|
|