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

View file

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

View file

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

View file

@ -127,19 +127,12 @@
} }
</style> </style>
<script> <script>window.uitype='fillform'</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>
<!--[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="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head> </head>
<body class="embed-body"> <body class="embed-body">

View file

@ -217,20 +217,11 @@
window.frameEditorId = params["frameEditorId"]; window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"]; 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> </script>
<link rel="stylesheet" type="text/css" href="../../../apps/documenteditor/main/resources/css/app.css"> <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/themeinit.js?__inline=true"></script>
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head> </head>
<body> <body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script> <script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

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

View file

@ -252,19 +252,12 @@
window.frameEditorId = params["frameEditorId"]; window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"]; window.parentOrigin = params["parentOrigin"];
window.uitype = 'slide';
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', '');
}
</script> </script>
<link rel="stylesheet" type="text/css" href="../../../apps/presentationeditor/main/resources/css/app.css"> <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/themeinit.js?__inline=true"></script>
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head> </head>
<body> <body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script> <script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

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

View file

@ -252,20 +252,13 @@
window.frameEditorId = params["frameEditorId"]; window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"]; window.parentOrigin = params["parentOrigin"];
window.uitype = "cell";
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', '');
}
</script> </script>
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/> <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"> <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/themeinit.js?__inline=true"></script>
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head> </head>
<body> <body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script> <script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

@ -173,23 +173,17 @@
window.frameEditorId = params["frameEditorId"]; window.frameEditorId = params["frameEditorId"];
window.parentOrigin = params["parentOrigin"]; window.parentOrigin = params["parentOrigin"];
window.uitype = "cell";
if ( !!params.uitheme ) { if ( !!params.uitheme ) {
document.documentElement.classList.add(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> </script>
<link rel="stylesheet" type="text/css" href="../../../../sdkjs/cell/css/main.css"/> <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"> <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/themeinit.js?__inline=true"></script>
<script src="../../../../../apps/common/main/lib/util/desktopinit.js?__inline=true"></script>
</head> </head>
<body> <body>
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script> <script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>

View file

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