[desktop] for bug 54434

This commit is contained in:
Maxim Kadushkin 2021-12-14 17:06:36 +03:00
parent bb7069283f
commit 140364aeab
11 changed files with 20 additions and 51 deletions

View file

@ -63,7 +63,7 @@ define([
var is_win_xp = window.RendererProcessVariable && window.RendererProcessVariable.os === 'winxp';
if ( !!native ) {
native.features = {};
native.features = native.features || {};
window.on_native_message = function (cmd, param) {
if (/^style:change/.test(cmd)) {
var obj = JSON.parse(param);

View file

@ -52,11 +52,8 @@ var checkLocalStorage = (function () {
}
})();
!window.desktop && !!window.AscDesktopEditor &&
(window.desktop = window.AscDesktopEditor);
if ( window.desktop && !!window.RendererProcessVariable ) {
var theme = window.RendererProcessVariable.theme
if ( window.desktop ) {
var theme = desktop.theme
if ( theme ) {
if ( !theme.id && !!theme.type ) {

View file

@ -1852,6 +1852,7 @@ define([
if (/window:features/.test(cmd)) {
var obj = JSON.parse(param);
if ( obj.singlewindow !== undefined ) {
native.features.singlewindow = obj.singlewindow;
$("#title-doc-name")[obj.singlewindow ? 'hide' : 'show']();
}
}
@ -1875,6 +1876,8 @@ define([
Common.Gateway.on('opendocument', function () {
api = DE.getController('ApplicationController').api;
$("#title-doc-name")[native.features.singlewindow ? 'hide' : 'show']();
var is_win_xp = window.RendererProcessVariable && window.RendererProcessVariable.os === 'winxp';
Common.UI.Themes.setAvailable(!is_win_xp);
});

View file

@ -127,19 +127,12 @@
}
</style>
<script>
if ( window.AscDesktopEditor ) {
window.on_native_message = function (cmd, param) {
!window.native_message_cmd && (window.native_message_cmd = []);
window.native_message_cmd[cmd] = param;
}
//window.desktop.execCommand('webapps:entry', '');
}
</script>
<script>window.uitype='fillform'</script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.6.1/html5shiv.js"></script>
<![endif]-->
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head>
<body class="embed-body">

View file

@ -217,20 +217,11 @@
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
if ( window.AscDesktopEditor ) {
window.desktop = window.AscDesktopEditor;
window.on_native_message = function (cmd, param) {
!window.native_message_cmd && (window.native_message_cmd = []);
window.native_message_cmd[cmd] = param;
}
window.desktop.execCommand('webapps:type', 'oform');
window.desktop.execCommand('webapps:entry', '');
}
</script>
<link rel="stylesheet" type="text/css" href="../../../apps/documenteditor/main/resources/css/app.css">
<script src="../../../../../apps/common/main/lib/util/themeinit.js?__inline=true"></script>
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head>
<body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

@ -285,6 +285,7 @@
</script>
<link rel="stylesheet" type="text/css" href="../../../apps/documenteditor/main/resources/css/app.css">
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head>
<body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

@ -252,19 +252,12 @@
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
if ( window.AscDesktopEditor ) {
window.desktop = window.AscDesktopEditor;
window.on_native_message = function (cmd, param) {
!window.native_message_cmd && (window.native_message_cmd = []);
window.native_message_cmd[cmd] = param;
}
window.desktop.execCommand('webapps:entry', '');
}
window.uitype = 'slide';
</script>
<link rel="stylesheet" type="text/css" href="../../../apps/presentationeditor/main/resources/css/app.css">
<script src="../../../../../apps/common/main/lib/util/themeinit.js?__inline=true"></script>
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head>
<body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

@ -245,6 +245,7 @@
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
window.uitype = 'slide';
if ( lang == 'de') loading = 'Ladevorgang...';
else if ( lang == 'es') loading = 'Cargando...';
@ -285,6 +286,7 @@
</script>
<link rel="stylesheet" type="text/css" href="../../../apps/presentationeditor/main/resources/css/app.css">
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head>
<body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

@ -252,20 +252,13 @@
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
if ( window.AscDesktopEditor ) {
window.desktop = window.AscDesktopEditor;
window.on_native_message = function (cmd, param) {
!window.native_message_cmd && (window.native_message_cmd = []);
window.native_message_cmd[cmd] = param;
}
window.desktop.execCommand('webapps:entry', '');
}
window.uitype = "cell";
</script>
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
<link rel="stylesheet" type="text/css" href="../../../apps/spreadsheeteditor/main/resources/css/app.css">
<script src="../../../../../apps/common/main/lib/util/themeinit.js?__inline=true"></script>
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head>
<body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

@ -173,23 +173,17 @@
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
window.uitype = "cell";
if ( !!params.uitheme ) {
document.documentElement.classList.add(params.uitheme);
}
if ( window.AscDesktopEditor ) {
window.desktop = window.AscDesktopEditor;
window.on_native_message = function (cmd, param) {
!window.native_message_cmd && (window.native_message_cmd = []);
window.native_message_cmd[cmd] = param;
}
}
</script>
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
<link rel="stylesheet" type="text/css" href="../../../apps/spreadsheeteditor/main/resources/css/app.css">
<script src="../../../../../apps/common/main/lib/util/themeinit.js?__inline=true"></script>
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head>
<body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

@ -244,6 +244,7 @@
window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"];
window.uitype = "cell";
if ( lang == 'de') loading = 'Ladevorgang...';
else if ( lang == 'es') loading = 'Cargando...';
@ -285,6 +286,7 @@
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/>
<link rel="stylesheet" type="text/css" href="../../../apps/spreadsheeteditor/main/resources/css/app.css">
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head>
<body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>