Commit 11367d01 authored by Julia Radzhabova's avatar Julia Radzhabova

Bug 18314.

parent 4753d519
......@@ -772,12 +772,11 @@ define([
if (tips.length) me.showTips(tips);
}
document.removeEventListener('visibilitychange', checkWarns);
}
if (typeof document.hidden !== 'undefined' && document.hidden) {
document.addEventListener('visibilitychange', function() {
setTimeout(checkWarns, 50);
});
document.addEventListener('visibilitychange', checkWarns);
} else checkWarns();
me.api.asc_registerCallback('asc_onStartAction', _.bind(me.onLongActionBegin, me));
......
......@@ -551,8 +551,7 @@ define([
return;
var me = this,
value,
tips = [];
value;
me._isDocReady = true;
......@@ -564,12 +563,20 @@ define([
var zf = (value!==null) ? parseInt(value) : -1;
(zf == -1) ? this.api.zoomFitToPage() : this.api.zoom(zf);
function checkWarns() {
if (!window['AscDesktopEditor']) {
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);
}
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_onEndAction', _.bind(me.onLongActionEnd, me));
......
......@@ -540,8 +540,7 @@ define([
return;
var me = this,
value,
tips = [];
value;
me._isDocReady = true;
......@@ -667,15 +666,21 @@ define([
$(document).on('contextmenu', _.bind(me.onContextMenu, me));
// me.getViewport().getEl().un('keypress', me.lockEscapeKey, me);
function checkWarns() {
if (!window['AscDesktopEditor']) {
var tips = [];
Common.Utils.isIE9m && tips.push(me.warnBrowserIE9);
!Common.Utils.isGecko &&
!me.appOptions.isEditMailMerge && !me.appOptions.isEditDiagram &&
!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}'));
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) {
value = Common.localStorage.getItem("de-license-warning");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment