Bug 18314.
This commit is contained in:
parent
4753d51917
commit
11367d0108
|
@ -772,12 +772,11 @@ define([
|
||||||
|
|
||||||
if (tips.length) me.showTips(tips);
|
if (tips.length) me.showTips(tips);
|
||||||
}
|
}
|
||||||
|
document.removeEventListener('visibilitychange', checkWarns);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof document.hidden !== 'undefined' && document.hidden) {
|
if (typeof document.hidden !== 'undefined' && document.hidden) {
|
||||||
document.addEventListener('visibilitychange', function() {
|
document.addEventListener('visibilitychange', checkWarns);
|
||||||
setTimeout(checkWarns, 50);
|
|
||||||
});
|
|
||||||
} else checkWarns();
|
} else checkWarns();
|
||||||
|
|
||||||
me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me));
|
me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me));
|
||||||
|
|
|
@ -551,8 +551,7 @@ define([
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var me = this,
|
var me = this,
|
||||||
value,
|
value;
|
||||||
tips = [];
|
|
||||||
|
|
||||||
me._isDocReady = true;
|
me._isDocReady = true;
|
||||||
|
|
||||||
|
@ -564,13 +563,21 @@ define([
|
||||||
var zf = (value!==null) ? parseInt(value) : -1;
|
var zf = (value!==null) ? parseInt(value) : -1;
|
||||||
(zf == -1) ? this.api.zoomFitToPage() : this.api.zoom(zf);
|
(zf == -1) ? this.api.zoomFitToPage() : this.api.zoom(zf);
|
||||||
|
|
||||||
if (!window['AscDesktopEditor']) {
|
function checkWarns() {
|
||||||
Common.Utils.isIE9m && tips.push(me.warnBrowserIE9);
|
if (!window['AscDesktopEditor']) {
|
||||||
!Common.Utils.isGecko && (Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, '{0}'));
|
var tips = [];
|
||||||
|
Common.Utils.isIE9m && tips.push(me.warnBrowserIE9);
|
||||||
|
!Common.Utils.isGecko && (Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, '{0}'));
|
||||||
|
|
||||||
if (tips.length) me.showTips(tips);
|
if (tips.length) me.showTips(tips);
|
||||||
|
}
|
||||||
|
document.removeEventListener('visibilitychange', checkWarns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof document.hidden !== 'undefined' && document.hidden) {
|
||||||
|
document.addEventListener('visibilitychange', checkWarns);
|
||||||
|
} else checkWarns();
|
||||||
|
|
||||||
me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me));
|
me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me));
|
||||||
me.api.asc_registerCallback('asc_onEndAction', _.bind(me.onLongActionEnd, me));
|
me.api.asc_registerCallback('asc_onEndAction', _.bind(me.onLongActionEnd, me));
|
||||||
me.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
me.api.asc_registerCallback('asc_onCoAuthoringDisconnect', _.bind(me.onCoAuthoringDisconnect, me));
|
||||||
|
|
|
@ -540,8 +540,7 @@ define([
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var me = this,
|
var me = this,
|
||||||
value,
|
value;
|
||||||
tips = [];
|
|
||||||
|
|
||||||
me._isDocReady = true;
|
me._isDocReady = true;
|
||||||
|
|
||||||
|
@ -667,16 +666,22 @@ define([
|
||||||
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
|
||||||
// me.getViewport().getEl().un('keypress', me.lockEscapeKey, me);
|
// me.getViewport().getEl().un('keypress', me.lockEscapeKey, me);
|
||||||
|
|
||||||
if (!window['AscDesktopEditor']) {
|
function checkWarns() {
|
||||||
Common.Utils.isIE9m && tips.push(me.warnBrowserIE9);
|
if (!window['AscDesktopEditor']) {
|
||||||
!Common.Utils.isGecko &&
|
var tips = [];
|
||||||
!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram &&
|
Common.Utils.isIE9m && tips.push(me.warnBrowserIE9);
|
||||||
!me.appOptions.nativeApp &&
|
!Common.Utils.isGecko && !me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram && !me.appOptions.nativeApp &&
|
||||||
(Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, '{0}'));
|
(Math.abs(me.getBrowseZoomLevel() - 1) > 0.1) && tips.push(Common.Utils.String.platformKey(me.warnBrowserZoom, '{0}'));
|
||||||
|
|
||||||
if (tips.length) me.showTips(tips);
|
if (tips.length) me.showTips(tips);
|
||||||
|
}
|
||||||
|
document.removeEventListener('visibilitychange', checkWarns);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof document.hidden !== 'undefined' && document.hidden) {
|
||||||
|
document.addEventListener('visibilitychange', checkWarns);
|
||||||
|
} else checkWarns();
|
||||||
|
|
||||||
if (this._state.licenseWarning) {
|
if (this._state.licenseWarning) {
|
||||||
value = Common.localStorage.getItem("de-license-warning");
|
value = Common.localStorage.getItem("de-license-warning");
|
||||||
value = (value!==null) ? parseInt(value) : 0;
|
value = (value!==null) ? parseInt(value) : 0;
|
||||||
|
|
Loading…
Reference in a new issue