Skip to content

Commit

Permalink
Merge pull request #45 from ostis-ai/feature/scg_view_window_styles
Browse files Browse the repository at this point in the history
Feature/scg view window styles
  • Loading branch information
NikitaZotov authored Nov 15, 2022
2 parents 51073e0 + 1987d9c commit 77cb0d1
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions client/js/Core/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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) {
$('.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) {
$('.scg-tools-panel').css({'display': 'none'});
}
});
}
return true;
Expand Down
3 changes: 1 addition & 2 deletions client/js/Utils/sc_keynodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ ScKeynodes.prototype.init = async function () {
'languages',
'lang_ru',
'lang_en',
'lang_de',

'nrel_format',
'nrel_mimetype',
Expand All @@ -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 => {
Expand Down
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 77cb0d1

Please sign in to comment.