Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/scg view window styles #45

Merged
merged 4 commits into from
Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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