From f454888768668f0c1936b4fd1d7cecc13eaa4188 Mon Sep 17 00:00:00 2001 From: MksmOrlov Date: Thu, 3 Nov 2022 12:35:57 +0300 Subject: [PATCH 1/4] feature: add params to scg view window styles --- client/js/Core/main.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/client/js/Core/main.js b/client/js/Core/main.js index 62cc3b0f..2f36075b 100644 --- a/client/js/Core/main.js +++ b/client/js/Core/main.js @@ -106,6 +106,9 @@ SCWeb.core.Main = { SCWeb.core.Main.doDefaultCommandWithSystemIdentifier(sys_id); window.history.replaceState(null, null, window.location.pathname); if (scg_view){ + const hide_tools = urlObject['hide_tools']; + const hide_borders = urlObject['hide_borders']; + $('#window-header-tools').hide(); $('#static-window-container').hide(); $('#header').hide(); @@ -118,6 +121,18 @@ SCWeb.core.Main = { $('.scs-scn-view-toogle-button').hide().click(); $("[id*='tools-']").parent().css("height", "100%"); $("[id*='tools-']").parent().parent().css("height", "100%"); + + if (hide_borders === 'true') { + $('.sc-contour').css({'border': 'none'}); + $('.panel-default').css({'border-color': '#FFFFFF'}); + $('.main-container').css({'padding-left': '0', 'padding-right': '0'}); + } + }); + + this.waitForElm('.scg-tools-panel').then(() => { + if (hide_tools === 'true') { + $('.scg-tools-panel').css({'display': 'none'}); + } }); } return true; From 4f6f23967147f7f6069dcfb6f1de9d8521fe879d Mon Sep 17 00:00:00 2001 From: MksmOrlov Date: Thu, 3 Nov 2022 12:38:40 +0300 Subject: [PATCH 2/4] docs: update changelog --- docs/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/changelog.md b/docs/changelog.md index cb6709ff..cbd14631 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +- Add border and tools parameter to view window - Add language parameter to view window ## [0.7.0-Rebirth] - 12.10.2022 From 5737ca7277cae72967992fac5a057b7fd4bbdd98 Mon Sep 17 00:00:00 2001 From: MksmOrlov Date: Thu, 3 Nov 2022 13:11:48 +0300 Subject: [PATCH 3/4] refactor: if parameter exists --- client/js/Core/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/js/Core/main.js b/client/js/Core/main.js index 2f36075b..c2932089 100644 --- a/client/js/Core/main.js +++ b/client/js/Core/main.js @@ -122,7 +122,7 @@ SCWeb.core.Main = { $("[id*='tools-']").parent().css("height", "100%"); $("[id*='tools-']").parent().parent().css("height", "100%"); - if (hide_borders === 'true') { + if (hide_borders) { $('.sc-contour').css({'border': 'none'}); $('.panel-default').css({'border-color': '#FFFFFF'}); $('.main-container').css({'padding-left': '0', 'padding-right': '0'}); @@ -130,7 +130,7 @@ SCWeb.core.Main = { }); this.waitForElm('.scg-tools-panel').then(() => { - if (hide_tools === 'true') { + if (hide_tools) { $('.scg-tools-panel').css({'display': 'none'}); } }); From 1987d9cef3512cf57cd67acd78df3fdb9260bd92 Mon Sep 17 00:00:00 2001 From: MksmOrlov Date: Thu, 3 Nov 2022 14:47:10 +0300 Subject: [PATCH 4/4] fix: remove lang_de keynode --- client/js/Utils/sc_keynodes.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/client/js/Utils/sc_keynodes.js b/client/js/Utils/sc_keynodes.js index e4380178..7f98ca39 100644 --- a/client/js/Utils/sc_keynodes.js +++ b/client/js/Utils/sc_keynodes.js @@ -31,7 +31,6 @@ ScKeynodes.prototype.init = async function () { 'languages', 'lang_ru', 'lang_en', - 'lang_de', 'nrel_format', 'nrel_mimetype', @@ -58,7 +57,7 @@ ScKeynodes.prototype.resolveKeynode = async function (sys_idtf, property) { sys_idtf = [sys_idtf]; } let request = sys_idtf.map(x => { - return { id: x, type: sc.ScType.Unknown } + return { id: x, type: sc.ScType.NodeConst } }); let result = await this.scClient.resolveKeynodes(request); sys_idtf.forEach(x => {