[desktop] fix fill forms stylesheets

This commit is contained in:
Maxim Kadushkin 2021-11-19 20:29:36 +03:00
parent 3e9469ccbe
commit f7e367e617
4 changed files with 59 additions and 0 deletions

View file

@ -52,6 +52,9 @@ var checkLocalStorage = (function () {
}
})();
!window.desktop && !!window.AscDesktopEditor &&
(window.desktop = window.AscDesktopEditor);
if ( window.desktop && !!window.RendererProcessVariable ) {
var theme = window.RendererProcessVariable.theme

View file

@ -1531,4 +1531,40 @@ define([
uploadImageExtMessage: 'Unknown image format.'
}, DE.Controllers.ApplicationController));
var Desktop = function () {
var features = {
version: '{{PRODUCT_VERSION}}',
// eventloading: true,
uithemes: true
};
var native = window.desktop || window.AscDesktopEditor;
!!native && native.execCommand('webapps:features', JSON.stringify(features));
if ( !!native ) {
$('#header-logo, .brand-logo').hide();
window.on_native_message = function (cmd, param) {
if (/theme:changed/.test(cmd)) {
Common.UI.Themes.setTheme(param);
}
};
Common.NotificationCenter.on({
'uitheme:changed' : function (name) {
var theme = Common.UI.Themes.get(name);
if ( theme )
native.execCommand("uitheme:changed", JSON.stringify({name:name, type:theme.type}));
},
});
}
return {
isActive: function () {
return !!native;
},
}
};
DE.Controllers.Desktop = new Desktop();
});

View file

@ -152,6 +152,16 @@
<body class="embed-body">
<script src="../../common/main/lib/util/htmlutils.js"></script>
<script>
if ( !!window.desktop ) {
var sheet = document.createElement('style')
sheet.innerHTML = ".device-desktop .loading-logo {display:none;}";
document.body.appendChild(sheet);
document.body.classList.add('device-desktop');
}
</script>
<div id="loading-mask" class="loadmask">
<div class="brendpanel">
<div><div class="brand-logo loading-logo"><img src=""></div><div class="doc-title"></div><div class="circle"></div></div>

View file

@ -134,6 +134,16 @@
<body class="embed-body">
<script src="../../../../../apps/common/main/lib/util/htmlutils.js?__inline=true"></script>
<script>
if ( !!window.desktop ) {
var sheet = document.createElement('style')
sheet.innerHTML = ".device-desktop .loading-logo {display:none;}";
document.body.appendChild(sheet);
document.body.classList.add('device-desktop');
}
</script>
<div id="loading-mask" class="loadmask">
<div class="brendpanel">
<div><div class="brand-logo loading-logo"><img src=""></div><div class="doc-title"></div><div class="circle"></div></div>