[DE forms] Fix forms mode
This commit is contained in:
parent
e31fadc861
commit
ffd5f7dd39
|
@ -37,6 +37,8 @@ define([
|
||||||
var me = this;
|
var me = this;
|
||||||
if (!Common.Utils.isBrowserSupported()){
|
if (!Common.Utils.isBrowserSupported()){
|
||||||
Common.Utils.showBrowserRestriction();
|
Common.Utils.showBrowserRestriction();
|
||||||
|
$('#editor_sdk').hide().remove();
|
||||||
|
$('#toolbar').hide().remove();
|
||||||
Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText);
|
Common.Gateway.reportError(undefined, this.unsupportedBrowserErrorText);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1200,6 +1202,8 @@ define([
|
||||||
errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.",
|
errorForceSave: "An error occurred while saving the file. Please use the 'Download as' option to save the file to your computer hard drive or try again later.",
|
||||||
textCloseTip: "Click to close the tip.",
|
textCloseTip: "Click to close the tip.",
|
||||||
txtPressLink: 'Press Ctrl and click link',
|
txtPressLink: 'Press Ctrl and click link',
|
||||||
txtEmpty: '(Empty)'
|
txtEmpty: '(Empty)',
|
||||||
|
titleServerVersion: 'Editor updated',
|
||||||
|
errorServerVersion: 'The editor version has been updated. The page will be reloaded to apply the changes.'
|
||||||
}, DE.Controllers.ApplicationController));
|
}, DE.Controllers.ApplicationController));
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: none;
|
border: none;
|
||||||
background-color: #f4f4f4;
|
background-color: #f4f4f4;
|
||||||
z-index: 10000;
|
z-index: 1001;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loadmask > .brendpanel {
|
.loadmask > .brendpanel {
|
||||||
|
@ -113,6 +113,7 @@
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
|
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
<script src="../../common/main/lib/util/themeinit.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="embed-body theme-classic-light theme-type-light">
|
<body class="embed-body theme-classic-light theme-type-light">
|
||||||
|
@ -126,7 +127,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var userAgent = navigator.userAgent.toLowerCase(),
|
var userAgent = navigator.userAgent.toLowerCase(),
|
||||||
check = function(regex){ return regex.test(userAgent); };
|
check = function(regex){ return regex.test(userAgent); },
|
||||||
|
stopLoading = false;
|
||||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||||
if (m && parseFloat(m[1]) < 10.0) {
|
if (m && parseFloat(m[1]) < 10.0) {
|
||||||
|
@ -134,10 +136,19 @@
|
||||||
'<div id="id-error-mask" class="errormask">',
|
'<div id="id-error-mask" class="errormask">',
|
||||||
'<div class="error-body" align="center">',
|
'<div class="error-body" align="center">',
|
||||||
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
||||||
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
'<div id="id-error-mask-text">Sorry, Document Editor is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'</div>'
|
'</div>'
|
||||||
);
|
);
|
||||||
|
stopLoading = true;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if (check(/windows\snt/i)) {
|
||||||
|
var re = /chrome\/(\d+)/i.exec(userAgent);
|
||||||
|
if (!!re && !!re[1] && !(re[1] > 49)) {
|
||||||
|
setTimeout(function () {
|
||||||
|
document.getElementsByTagName('body')[0].className += "winxp";
|
||||||
|
},0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,6 +180,12 @@
|
||||||
window.frameEditorId = params["frameEditorId"];
|
window.frameEditorId = params["frameEditorId"];
|
||||||
window.parentOrigin = params["parentOrigin"];
|
window.parentOrigin = params["parentOrigin"];
|
||||||
|
|
||||||
|
if(/MSIE \d|Trident.*rv:/.test(navigator.userAgent))
|
||||||
|
document.write('<script src="../../common/main/lib/util/fix-ie-compat.js"><\/script>');
|
||||||
|
|
||||||
|
if (stopLoading) {
|
||||||
|
document.body.removeChild(document.getElementById('loading-mask'));
|
||||||
|
} else {
|
||||||
var elem = document.querySelector('.loading-logo');
|
var elem = document.querySelector('.loading-logo');
|
||||||
if (elem && logo) {
|
if (elem && logo) {
|
||||||
elem.style.backgroundImage= 'none';
|
elem.style.backgroundImage= 'none';
|
||||||
|
@ -176,6 +193,7 @@
|
||||||
img && img.setAttribute('src', logo);
|
img && img.setAttribute('src', logo);
|
||||||
img.style.opacity = 1;
|
img.style.opacity = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
|
<div id="editor_sdk" class="viewer" style="overflow: hidden;" tabindex="-1"></div>
|
||||||
|
@ -208,10 +226,6 @@
|
||||||
|
|
||||||
<!--vendor-->
|
<!--vendor-->
|
||||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
<script type="text/javascript" src="../../../vendor/jquery/jquery.min.js"></script>
|
||||||
<script type="text/javascript" src="../../../vendor/jquery.browser/dist/jquery.browser.min.js"></script>
|
|
||||||
<!--<script type="text/javascript" src="../../../vendor/bootstrap/dist/js/bootstrap.js"></script>-->
|
|
||||||
|
|
||||||
<!--<script type="text/javascript" src="../../../vendor/sockjs/sockjs.min.js"></script>-->
|
|
||||||
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
|
<script type="text/javascript" src="../../../vendor/xregexp/xregexp-all-min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="../../../../sdkjs/develop/sdkjs/word/scripts.js"></script>
|
<script type="text/javascript" src="../../../../sdkjs/develop/sdkjs/word/scripts.js"></script>
|
||||||
|
@ -219,28 +233,17 @@
|
||||||
window.sdk_scripts.forEach(function(item){
|
window.sdk_scripts.forEach(function(item){
|
||||||
document.write('<script type="text/javascript" src="' + item + '"><\/script>');
|
document.write('<script type="text/javascript" src="' + item + '"><\/script>');
|
||||||
});
|
});
|
||||||
</script>
|
window.requireTimeourError = function(){
|
||||||
|
var reqerr;
|
||||||
|
|
||||||
<!--application-->
|
if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.';
|
||||||
<script type="text/javascript">
|
else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.';
|
||||||
var isBrowserSupported = function() {
|
else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.';
|
||||||
return ($.browser.msie && parseFloat($.browser.version) > 9) ||
|
else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.';
|
||||||
($.browser.chrome && parseFloat($.browser.version) > 7) ||
|
else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.';
|
||||||
($.browser.safari && parseFloat($.browser.version) > 4) ||
|
|
||||||
($.browser.opera && parseFloat($.browser.version) > 10.4) ||
|
return reqerr;
|
||||||
($.browser.mozilla && parseFloat($.browser.version) > 3.9);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!isBrowserSupported()){
|
|
||||||
document.write(
|
|
||||||
'<div id="id-error-mask" class="errormask">',
|
|
||||||
'<div class="error-body" align="center">',
|
|
||||||
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
|
||||||
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
|
||||||
'</div>',
|
|
||||||
'</div>'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<script data-main="app_dev" src="../../../vendor/requirejs/require.js"></script>
|
<script data-main="app_dev" src="../../../vendor/requirejs/require.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: none;
|
border: none;
|
||||||
background-color: #f4f4f4;
|
background-color: #f4f4f4;
|
||||||
z-index: 10000;
|
z-index: 1001;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loadmask > .brendpanel {
|
.loadmask > .brendpanel {
|
||||||
|
@ -119,7 +119,8 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var userAgent = navigator.userAgent.toLowerCase(),
|
var userAgent = navigator.userAgent.toLowerCase(),
|
||||||
check = function(regex){ return regex.test(userAgent); };
|
check = function(regex){ return regex.test(userAgent); },
|
||||||
|
stopLoading = false;
|
||||||
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
if (!check(/opera/) && (check(/msie/) || check(/trident/))) {
|
||||||
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
var m = /msie (\d+\.\d+)/.exec(userAgent);
|
||||||
if (m && parseFloat(m[1]) < 10.0) {
|
if (m && parseFloat(m[1]) < 10.0) {
|
||||||
|
@ -127,10 +128,19 @@
|
||||||
'<div id="id-error-mask" class="errormask">',
|
'<div id="id-error-mask" class="errormask">',
|
||||||
'<div class="error-body" align="center">',
|
'<div class="error-body" align="center">',
|
||||||
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
||||||
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
'<div id="id-error-mask-text">Sorry, Document Editor is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
||||||
'</div>',
|
'</div>',
|
||||||
'</div>'
|
'</div>'
|
||||||
);
|
);
|
||||||
|
stopLoading = true;
|
||||||
|
}
|
||||||
|
} else
|
||||||
|
if (check(/windows\snt/i)) {
|
||||||
|
var re = /chrome\/(\d+)/i.exec(userAgent);
|
||||||
|
if (!!re && !!re[1] && !(re[1] > 49)) {
|
||||||
|
setTimeout(function () {
|
||||||
|
document.getElementsByTagName('html')[0].className += "winxp";
|
||||||
|
},0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,30 +207,44 @@
|
||||||
<span id="box-tools"></span>
|
<span id="box-tools"></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
<script type="text/javascript" src="../../../vendor/jquery/jquery.browser.min.js"></script>
|
if (stopLoading) {
|
||||||
|
document.body.removeChild(document.getElementById('loading-mask'));
|
||||||
<!--application-->
|
} else {
|
||||||
<script type="text/javascript">
|
var elem = document.querySelector('.loading-logo img');
|
||||||
var isBrowserSupported = function() {
|
if (elem) {
|
||||||
return ($.browser.msie && parseFloat($.browser.version) > 9) ||
|
logo && (elem.setAttribute('src', logo));
|
||||||
($.browser.chrome && parseFloat($.browser.version) > 7) ||
|
elem.style.opacity = 1;
|
||||||
($.browser.safari && parseFloat($.browser.version) > 4) ||
|
}
|
||||||
($.browser.opera && parseFloat($.browser.version) > 10.4) ||
|
|
||||||
($.browser.mozilla && parseFloat($.browser.version) > 3.9);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!isBrowserSupported()){
|
|
||||||
document.write(
|
|
||||||
'<div id="id-error-mask" class="errormask">',
|
|
||||||
'<div class="error-body" align="center">',
|
|
||||||
'<div id="id-error-mask-title" class="title">Your browser is not supported.</div>',
|
|
||||||
'<div id="id-error-mask-text">Sorry, ONLYOFFICE Document is currently only supported in the latest versions of the Chrome, Firefox, Safari or Internet Explorer web browsers.</div>',
|
|
||||||
'</div>',
|
|
||||||
'</div>'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<script>
|
||||||
|
window.requireTimeourError = function(){
|
||||||
|
var reqerr;
|
||||||
|
|
||||||
|
if ( lang == 'de') reqerr = 'Die Verbindung ist zu langsam, einige Komponenten konnten nicht geladen werden. Aktualisieren Sie bitte die Seite.';
|
||||||
|
else if ( lang == 'es') reqerr = 'La conexión es muy lenta, algunos de los componentes no han podido cargar. Por favor recargue la página.';
|
||||||
|
else if ( lang == 'fr') reqerr = 'La connexion est trop lente, certains des composants n\'ons pas pu être chargé. Veuillez recharger la page.';
|
||||||
|
else if ( lang == 'ru') reqerr = 'Слишком медленное соединение, не удается загрузить некоторые компоненты. Пожалуйста, обновите страницу.';
|
||||||
|
else reqerr = 'The connection is too slow, some of the components could not be loaded. Please reload the page.';
|
||||||
|
|
||||||
|
return reqerr;
|
||||||
|
};
|
||||||
|
|
||||||
|
var requireTimeoutID = setTimeout(function(){
|
||||||
|
window.alert(window.requireTimeourError());
|
||||||
|
window.location.reload();
|
||||||
|
}, 30000);
|
||||||
|
|
||||||
|
var require = {
|
||||||
|
waitSeconds: 30,
|
||||||
|
callback: function(){
|
||||||
|
clearTimeout(requireTimeoutID);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<!--application-->
|
||||||
|
<script src="../../../../../../sdkjs/common/device_scale.js?__inline=true"></script>
|
||||||
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
|
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue