Move onDocumentReady api event to the end of document loading (fix opening version history)
This commit is contained in:
parent
620df09aff
commit
04bd8e2c62
|
@ -216,8 +216,6 @@ var ApplicationController = new(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDocumentContentReady() {
|
function onDocumentContentReady() {
|
||||||
Common.Gateway.documentReady();
|
|
||||||
|
|
||||||
hidePreloader();
|
hidePreloader();
|
||||||
|
|
||||||
var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom) : -2);
|
var zf = (config.customization && config.customization.zoom ? parseInt(config.customization.zoom) : -2);
|
||||||
|
@ -320,7 +318,7 @@ var ApplicationController = new(function(){
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Common.Gateway.documentReady();
|
||||||
Common.Analytics.trackEvent('Load', 'Complete');
|
Common.Analytics.trackEvent('Load', 'Complete');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -802,8 +802,6 @@ define([
|
||||||
if (this._isDocReady)
|
if (this._isDocReady)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Common.Gateway.documentReady();
|
|
||||||
|
|
||||||
if (this._state.openDlg)
|
if (this._state.openDlg)
|
||||||
this._state.openDlg.close();
|
this._state.openDlg.close();
|
||||||
|
|
||||||
|
@ -994,6 +992,7 @@ define([
|
||||||
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
|
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
|
||||||
|
|
||||||
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||||
|
Common.Gateway.documentReady();
|
||||||
},
|
},
|
||||||
|
|
||||||
onLicenseChanged: function(params) {
|
onLicenseChanged: function(params) {
|
||||||
|
|
|
@ -485,8 +485,6 @@ define([
|
||||||
if (this._isDocReady)
|
if (this._isDocReady)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Common.Gateway.documentReady();
|
|
||||||
|
|
||||||
if (this._state.openDlg)
|
if (this._state.openDlg)
|
||||||
uiApp.closeModal(this._state.openDlg);
|
uiApp.closeModal(this._state.openDlg);
|
||||||
|
|
||||||
|
@ -579,6 +577,7 @@ define([
|
||||||
me.applyLicense();
|
me.applyLicense();
|
||||||
|
|
||||||
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||||
|
Common.Gateway.documentReady();
|
||||||
},
|
},
|
||||||
|
|
||||||
onLicenseChanged: function(params) {
|
onLicenseChanged: function(params) {
|
||||||
|
|
|
@ -213,8 +213,6 @@ var ApplicationController = new(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDocumentContentReady() {
|
function onDocumentContentReady() {
|
||||||
Common.Gateway.documentReady();
|
|
||||||
|
|
||||||
api.ShowThumbnails(false);
|
api.ShowThumbnails(false);
|
||||||
api.asc_DeleteVerticalScroll();
|
api.asc_DeleteVerticalScroll();
|
||||||
|
|
||||||
|
@ -394,6 +392,7 @@ var ApplicationController = new(function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#btn-play').on('click', onPlayStart);
|
$('#btn-play').on('click', onPlayStart);
|
||||||
|
Common.Gateway.documentReady();
|
||||||
Common.Analytics.trackEvent('Load', 'Complete');
|
Common.Analytics.trackEvent('Load', 'Complete');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -591,8 +591,6 @@ define([
|
||||||
if (this._isDocReady)
|
if (this._isDocReady)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Common.Gateway.documentReady();
|
|
||||||
|
|
||||||
if (this._state.openDlg)
|
if (this._state.openDlg)
|
||||||
this._state.openDlg.close();
|
this._state.openDlg.close();
|
||||||
|
|
||||||
|
@ -758,6 +756,7 @@ define([
|
||||||
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
|
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
|
||||||
|
|
||||||
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||||
|
Common.Gateway.documentReady();
|
||||||
},
|
},
|
||||||
|
|
||||||
onLicenseChanged: function(params) {
|
onLicenseChanged: function(params) {
|
||||||
|
|
|
@ -464,8 +464,6 @@ define([
|
||||||
if (this._isDocReady)
|
if (this._isDocReady)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Common.Gateway.documentReady();
|
|
||||||
|
|
||||||
if (this._state.openDlg)
|
if (this._state.openDlg)
|
||||||
uiApp.closeModal(this._state.openDlg);
|
uiApp.closeModal(this._state.openDlg);
|
||||||
|
|
||||||
|
@ -533,6 +531,7 @@ define([
|
||||||
me.applyLicense();
|
me.applyLicense();
|
||||||
|
|
||||||
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||||
|
Common.Gateway.documentReady();
|
||||||
},
|
},
|
||||||
|
|
||||||
onLicenseChanged: function(params) {
|
onLicenseChanged: function(params) {
|
||||||
|
|
|
@ -168,8 +168,6 @@ var ApplicationController = new(function(){
|
||||||
}
|
}
|
||||||
|
|
||||||
function onDocumentContentReady() {
|
function onDocumentContentReady() {
|
||||||
Common.Gateway.documentReady();
|
|
||||||
|
|
||||||
hidePreloader();
|
hidePreloader();
|
||||||
|
|
||||||
if ( !embedConfig.shareUrl )
|
if ( !embedConfig.shareUrl )
|
||||||
|
@ -292,6 +290,7 @@ var ApplicationController = new(function(){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Common.Gateway.documentReady();
|
||||||
Common.Analytics.trackEvent('Load', 'Complete');
|
Common.Analytics.trackEvent('Load', 'Complete');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -601,8 +601,6 @@ define([
|
||||||
if (this._isDocReady)
|
if (this._isDocReady)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Common.Gateway.documentReady();
|
|
||||||
|
|
||||||
if (this._state.openDlg)
|
if (this._state.openDlg)
|
||||||
this._state.openDlg.close();
|
this._state.openDlg.close();
|
||||||
|
|
||||||
|
@ -785,6 +783,8 @@ define([
|
||||||
if (typeof document.hidden !== 'undefined' && document.hidden) {
|
if (typeof document.hidden !== 'undefined' && document.hidden) {
|
||||||
document.addEventListener('visibilitychange', checkWarns);
|
document.addEventListener('visibilitychange', checkWarns);
|
||||||
} else checkWarns();
|
} else checkWarns();
|
||||||
|
|
||||||
|
Common.Gateway.documentReady();
|
||||||
},
|
},
|
||||||
|
|
||||||
onLicenseChanged: function(params) {
|
onLicenseChanged: function(params) {
|
||||||
|
|
|
@ -466,8 +466,6 @@ define([
|
||||||
if (this._isDocReady)
|
if (this._isDocReady)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Common.Gateway.documentReady();
|
|
||||||
|
|
||||||
if (this._state.openDlg)
|
if (this._state.openDlg)
|
||||||
uiApp.closeModal(this._state.openDlg);
|
uiApp.closeModal(this._state.openDlg);
|
||||||
|
|
||||||
|
@ -550,6 +548,7 @@ define([
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||||
|
Common.Gateway.documentReady();
|
||||||
},
|
},
|
||||||
|
|
||||||
onLicenseChanged: function(params) {
|
onLicenseChanged: function(params) {
|
||||||
|
|
Loading…
Reference in a new issue