UI Project: Show sidebar by default.

Change the logic to hide, instead.
This commit is contained in:
Pablo Vazquez 2019-03-29 15:47:21 +01:00
parent 77a7b15a73
commit 1d476d03d7
2 changed files with 17 additions and 13 deletions

View File

@ -100,38 +100,39 @@ function containerResizeY(window_height){
};
function loadProjectSidebar(){
var bcloud_ui = Cookies.getJSON('bcloud_ui');
if (bcloud_ui && bcloud_ui.show_project_sidebar) {
showProjectSidebar();
} else {
if (bcloud_ui && bcloud_ui.hide_project_sidebar) {
hideProjectSidebar();
} else {
showProjectSidebar();
};
}
function showProjectSidebar(){
setJSONCookie('bcloud_ui', 'show_project_sidebar', true);
Cookies.remove('bcloud_ui', 'hide_project_sidebar');
$('#project-container').addClass('is-sidebar-visible');
$('#project-side-container').removeClass('d-none');
// Hide the toggle button.
$('.breadcrumbs-container .project-sidebar-toggle').hide();
}
function hideProjectSidebar(){
Cookies.remove('bcloud_ui', 'show_project_sidebar');
setJSONCookie('bcloud_ui', 'hide_project_sidebar', true);
$('#project-container').removeClass('is-sidebar-visible');
$('#project-side-container').addClass('d-none');
// Show the toggle button.
$('.breadcrumbs-container .project-sidebar-toggle').show();
}
function toggleProjectSidebar(){
let $projectSidebar = $('#project-side-container');
let $projectContainer = $('#project-container');
if ($projectSidebar.hasClass('d-none')) {
showProjectSidebar();
} else {
if ($projectContainer.hasClass('is-sidebar-visible')) {
hideProjectSidebar();
} else {
showProjectSidebar();
};
}

View File

@ -17,6 +17,9 @@ body.svnman, body.edit_node_types, body.search-project
z-index: $z-index-base
&.is-sidebar-visible
#project-side-container
@extend .d-flex
.breadcrumbs-container
+media-xs
left: $project_nav-width-xs
@ -30,7 +33,7 @@ body.svnman, body.edit_node_types, body.search-project
left: $project_nav-width-xl
#project-side-container
display: flex
display: none
+media-xs
position: fixed