Skip to content

Commit

Permalink
fix styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Radoslav Štofko committed Feb 22, 2024
1 parent 85ee062 commit dadefc7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 22 deletions.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ or use this new parameter `addAllowedFrameAncestorDomain` in `config.php`
'addAllowedFrameAncestorDomain' => '*.example.com:*'
...
```]]></description>
<version>2.2.1</version>
<version>2.2.2</version>
<licence>agpl</licence>
<author mail="rstofko@gmail.com" >Radoslav Stofko</author>
<category>customization</category>
Expand Down
36 changes: 15 additions & 21 deletions js/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ window.addEventListener('DOMContentLoaded', function(event) {
if (getParameterByName('hide-sidebars') !== null) {
hideTopMenu();
hideLeftMenu();
contentChanges();
}

if (getParameterByName('hide-top-menu') !== null) {
hideTopMenu(true);
hideTopMenu();
}

if (getParameterByName('hide-left-menu') !== null) {
Expand Down Expand Up @@ -38,16 +37,7 @@ window.addEventListener('DOMContentLoaded', function(event) {
}
}

function contentChanges() {
applyStyleChanges([
{el: '#content', style: 'width', value: '100%'},
{el: '#content-vue', style: 'width', value: '100%'},
{el: '#content', style: 'border-radius', value: '0'},
{el: '#content-vue', style: 'border-radius', value: '0'},
]);
}

function hideTopMenu(onlyTopMenu) {
function hideTopMenu() {
var changeStyles = [
{el: '#header', style: 'display', value: 'none'},
{el: '#app-navigation-vue', style: 'top', value: '0'},
Expand All @@ -62,17 +52,17 @@ window.addEventListener('DOMContentLoaded', function(event) {
{el: '#filestable thead', style: 'top', value: '44px'},
{el: '#body-public #content', style: 'min-height', value: '100%'},
{el: 'footer', style: 'display', value: 'none'},
{el: '#content', style: 'width', value: '100%'},
{el: '#content-vue', style: 'width', value: '100%'},
{el: '#content', style: 'border-radius', value: '0'},
{el: '#content-vue', style: 'border-radius', value: '0'},
{el: '#content', style: 'margin', value: 0},
{el: '#content-vue', style: 'margin', value: 0},
{el: '#content', style: 'height', value: '100%'},
{el: '#content-vue', style: 'height', value: '100%'},
{el: '#app-navigation-vue', style: 'height', value: '100%'},
];
applyStyleChanges(changeStyles);

if (onlyTopMenu) {
applyStyleChanges([
{el: '#content', style: 'margin', value: 0},
{el: '#content-vue', style: 'margin', value: 0},
{el: '#content', style: 'height', value: '100%'},
{el: '#content-vue', style: 'height', value: '100%'},
])
}
}

function hideLeftMenu(onlyLeftMenu) {
Expand All @@ -83,6 +73,10 @@ window.addEventListener('DOMContentLoaded', function(event) {
{el: '#app-content', style: 'marginLeft', value: 0},
{el: '#controls', style: 'paddingLeft', value: 0},
{el: '#app-navigation-toggle', style: 'zIndex', value: 0},
{el: '#content', style: 'width', value: '100%'},
{el: '#content-vue', style: 'width', value: '100%'},
{el: '#content', style: 'border-radius', value: '0'},
{el: '#content-vue', style: 'border-radius', value: '0'},
];
applyStyleChanges(changeStyles);

Expand Down

0 comments on commit dadefc7

Please sign in to comment.