From 3017c07e4eaacc4729c6e2cb754dcd1787069067 Mon Sep 17 00:00:00 2001 From: Maxim Kadushkin Date: Mon, 29 Apr 2019 18:03:21 +0300 Subject: [PATCH] [all] fix for win xp support --- apps/common/main/resources/less/winxp_fix.less | 6 ++++++ apps/documenteditor/main/index.html | 8 ++++++++ apps/documenteditor/main/index.html.deploy | 8 ++++++++ apps/documenteditor/main/resources/less/app.less | 1 + apps/presentationeditor/main/index.html.deploy | 8 ++++++++ apps/presentationeditor/main/resources/less/app.less | 1 + apps/spreadsheeteditor/main/index.html.deploy | 8 ++++++++ apps/spreadsheeteditor/main/resources/less/app.less | 1 + 8 files changed, 41 insertions(+) create mode 100644 apps/common/main/resources/less/winxp_fix.less diff --git a/apps/common/main/resources/less/winxp_fix.less b/apps/common/main/resources/less/winxp_fix.less new file mode 100644 index 0000000000..25e0611956 --- /dev/null +++ b/apps/common/main/resources/less/winxp_fix.less @@ -0,0 +1,6 @@ +.winxp { + .toolbar .tabs>ul, + .toolbar .extra .btn-slot,#box-document-title .btn-slot { + height:28px; + } +} \ No newline at end of file diff --git a/apps/documenteditor/main/index.html b/apps/documenteditor/main/index.html index eb828a57d1..53d722209a 100644 --- a/apps/documenteditor/main/index.html +++ b/apps/documenteditor/main/index.html @@ -194,6 +194,14 @@ ''); stopLoading = true; } + } else + if (check(/windows\snt/i)) { + var re = /chrome\/(\d+)/i.exec(userAgent); + if (!!re[1] && !(re[1] > 49)) { + setTimeout(function () { + document.getElementsByTagName('body')[0].className += "winxp"; + },0); + } } function getUrlParams() { diff --git a/apps/documenteditor/main/index.html.deploy b/apps/documenteditor/main/index.html.deploy index 58c5043390..d80ea3fbde 100644 --- a/apps/documenteditor/main/index.html.deploy +++ b/apps/documenteditor/main/index.html.deploy @@ -193,6 +193,14 @@ ''); stopLoading = true; } + } else + if (check(/windows\snt/i)) { + var re = /chrome\/(\d+)/i.exec(userAgent); + if (!!re[1] && !(re[1] > 49)) { + setTimeout(function () { + document.getElementsByTagName('body')[0].className += "winxp"; + },0); + } } function getUrlParams() { diff --git a/apps/documenteditor/main/resources/less/app.less b/apps/documenteditor/main/resources/less/app.less index 8d6040fa79..a16802d193 100644 --- a/apps/documenteditor/main/resources/less/app.less +++ b/apps/documenteditor/main/resources/less/app.less @@ -117,6 +117,7 @@ @import "../../../../common/main/resources/less/plugins.less"; @import "../../../../common/main/resources/less/toolbar.less"; @import "../../../../common/main/resources/less/language-dialog.less"; +@import "../../../../common/main/resources/less/winxp_fix.less"; // App // -------------------------------------------------- diff --git a/apps/presentationeditor/main/index.html.deploy b/apps/presentationeditor/main/index.html.deploy index 1fd784bf9a..dc72101ad6 100644 --- a/apps/presentationeditor/main/index.html.deploy +++ b/apps/presentationeditor/main/index.html.deploy @@ -193,6 +193,14 @@ ''); stopLoading = true; } + } else + if (check(/windows\snt/i)) { + var re = /chrome\/(\d+)/i.exec(userAgent); + if (!!re[1] && !(re[1] > 49)) { + setTimeout(function () { + document.getElementsByTagName('body')[0].className += "winxp"; + },0); + } } function getUrlParams() { diff --git a/apps/presentationeditor/main/resources/less/app.less b/apps/presentationeditor/main/resources/less/app.less index 62dce12ddf..995117453f 100644 --- a/apps/presentationeditor/main/resources/less/app.less +++ b/apps/presentationeditor/main/resources/less/app.less @@ -113,6 +113,7 @@ @import "../../../../common/main/resources/less/plugins.less"; @import "../../../../common/main/resources/less/toolbar.less"; @import "../../../../common/main/resources/less/language-dialog.less"; +@import "../../../../common/main/resources/less/winxp_fix.less"; // App // -------------------------------------------------- diff --git a/apps/spreadsheeteditor/main/index.html.deploy b/apps/spreadsheeteditor/main/index.html.deploy index 350e9dfe65..f2eb95fa6d 100644 --- a/apps/spreadsheeteditor/main/index.html.deploy +++ b/apps/spreadsheeteditor/main/index.html.deploy @@ -192,6 +192,14 @@ ''); stopLoading = true; } + } else + if (check(/windows\snt/i)) { + var re = /chrome\/(\d+)/i.exec(userAgent); + if (!!re[1] && !(re[1] > 49)) { + setTimeout(function () { + document.getElementsByTagName('body')[0].className += "winxp"; + },0); + } } function getUrlParams() { diff --git a/apps/spreadsheeteditor/main/resources/less/app.less b/apps/spreadsheeteditor/main/resources/less/app.less index ec146cba06..a5d13d177c 100644 --- a/apps/spreadsheeteditor/main/resources/less/app.less +++ b/apps/spreadsheeteditor/main/resources/less/app.less @@ -114,6 +114,7 @@ @import "../../../../common/main/resources/less/plugins.less"; @import "../../../../common/main/resources/less/toolbar.less"; @import "../../../../common/main/resources/less/language-dialog.less"; +@import "../../../../common/main/resources/less/winxp_fix.less"; // App // --------------------------------------------------