Project: Remove collapse of sidebar
Since projects went full-width it's not needed anymore.
This commit is contained in:
parent
ce7754ffe4
commit
2ad65b0485
@ -1,81 +1,3 @@
|
|||||||
function projectNavCollapse() {
|
|
||||||
$("#project-side-container").addClass('collapsed');
|
|
||||||
};
|
|
||||||
|
|
||||||
function projectNavExpand() {
|
|
||||||
$("#project-side-container").removeClass('collapsed');
|
|
||||||
};
|
|
||||||
|
|
||||||
function projectNavCheck(){
|
|
||||||
|
|
||||||
/* Only run if there is a tree */
|
|
||||||
if(document.getElementById("project_tree") !== null) {
|
|
||||||
|
|
||||||
var nav_status = Cookies.getJSON('bcloud_ui');
|
|
||||||
|
|
||||||
if (nav_status && nav_status.nav_collapsed) {
|
|
||||||
if (nav_status.nav_collapsed == 'expanded') {
|
|
||||||
projectNavExpand();
|
|
||||||
|
|
||||||
} else if ( nav_status.nav_collapsed == 'collapsed' ) {
|
|
||||||
projectNavCollapse();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
projectNavExpand();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function projectNavToggle(){
|
|
||||||
|
|
||||||
var nav_status = Cookies.getJSON('bcloud_ui');
|
|
||||||
|
|
||||||
if (nav_status && nav_status.nav_collapsed) {
|
|
||||||
if (nav_status.nav_collapsed == 'expanded') {
|
|
||||||
|
|
||||||
projectNavCollapse();
|
|
||||||
setJSONCookie('bcloud_ui', 'nav_collapsed', 'collapsed');
|
|
||||||
|
|
||||||
} else if ( nav_status.nav_collapsed == 'collapsed' ) {
|
|
||||||
|
|
||||||
projectNavExpand();
|
|
||||||
setJSONCookie('bcloud_ui', 'nav_collapsed', 'expanded');
|
|
||||||
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
projectNavCollapse();
|
|
||||||
setJSONCookie('bcloud_ui', 'nav_collapsed', 'collapsed');
|
|
||||||
}
|
|
||||||
|
|
||||||
$('#project_context-header').width($('#project_context-container').width());
|
|
||||||
}
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
|
|
||||||
/* Check on first load */
|
|
||||||
projectNavCheck();
|
|
||||||
|
|
||||||
$('.project_split, .project_nav-toggle-btn').on('click', function (e) {
|
|
||||||
projectNavToggle();
|
|
||||||
});
|
|
||||||
|
|
||||||
/* Only run if there is a tree */
|
|
||||||
if(document.getElementById("project_tree") !== null) {
|
|
||||||
|
|
||||||
$(document).keypress(function(e) {
|
|
||||||
var tag = e.target.tagName.toLowerCase();
|
|
||||||
|
|
||||||
/* Toggle when pressing [T] key */
|
|
||||||
if(e.which == 116 && tag != 'input' && tag != 'textarea' && !e.ctrlKey && !e.metaKey && !e.altKey) {
|
|
||||||
projectNavToggle();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/* Small utility to enable specific node_types under the Add New dropdown */
|
/* Small utility to enable specific node_types under the Add New dropdown */
|
||||||
/* It takes:
|
/* It takes:
|
||||||
* empty: Enable every item
|
* empty: Enable every item
|
||||||
|
@ -41,10 +41,6 @@ body.blog
|
|||||||
width: 100%
|
width: 100%
|
||||||
left: 0
|
left: 0
|
||||||
|
|
||||||
#project-side-container.collapsed+#project_context-header
|
|
||||||
span#status-bar
|
|
||||||
left: $project-sidebar-width
|
|
||||||
|
|
||||||
#project_context-header
|
#project_context-header
|
||||||
span#status-bar
|
span#status-bar
|
||||||
text-align: left
|
text-align: left
|
||||||
@ -316,10 +312,6 @@ span#project-edit-title
|
|||||||
weight: 400
|
weight: 400
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
|
|
||||||
.project_split.collapsed+#project_context-header
|
|
||||||
span#project-edit-title
|
|
||||||
left: 0
|
|
||||||
|
|
||||||
|
|
||||||
/* Edit Asset buttons */
|
/* Edit Asset buttons */
|
||||||
.project-mode-view,
|
.project-mode-view,
|
||||||
@ -702,41 +694,6 @@ ul.project_nav-edit-list
|
|||||||
min-height: 800px
|
min-height: 800px
|
||||||
border: none
|
border: none
|
||||||
|
|
||||||
#project-side-container
|
|
||||||
&.collapsed
|
|
||||||
.project_nav-toggle-btn i:before
|
|
||||||
content: '\e827'
|
|
||||||
|
|
||||||
.project_split
|
|
||||||
background-color: $project-sidebar-background
|
|
||||||
cursor: e-resize
|
|
||||||
right: 0
|
|
||||||
left: 8px
|
|
||||||
width: 5px
|
|
||||||
|
|
||||||
#project_nav
|
|
||||||
width: 5px
|
|
||||||
+media-xs
|
|
||||||
width: initial
|
|
||||||
|
|
||||||
#project_nav-container
|
|
||||||
width: 5px
|
|
||||||
+media-xs
|
|
||||||
display: block
|
|
||||||
width: initial
|
|
||||||
position: relative
|
|
||||||
|
|
||||||
#project_nav-header,
|
|
||||||
#project_context-header,
|
|
||||||
#project_tree
|
|
||||||
display: none
|
|
||||||
visibility: hidden
|
|
||||||
|
|
||||||
+media-xs
|
|
||||||
display: block
|
|
||||||
visibility: visible
|
|
||||||
position: relative
|
|
||||||
|
|
||||||
|
|
||||||
/* The actual navigation tree container */
|
/* The actual navigation tree container */
|
||||||
#project_tree
|
#project_tree
|
||||||
@ -753,20 +710,6 @@ ul.project_nav-edit-list
|
|||||||
&.edit
|
&.edit
|
||||||
margin-top: 0
|
margin-top: 0
|
||||||
|
|
||||||
/* Clickable bar between navtree and context view, to collapse tree */
|
|
||||||
.project_split
|
|
||||||
float: right
|
|
||||||
position: absolute
|
|
||||||
width: 15px
|
|
||||||
margin-left: -8px
|
|
||||||
top: 0
|
|
||||||
right: -15px
|
|
||||||
bottom: 0
|
|
||||||
cursor: w-resize
|
|
||||||
user-select: none
|
|
||||||
|
|
||||||
+media-xs
|
|
||||||
display: none
|
|
||||||
|
|
||||||
/* Node Context */
|
/* Node Context */
|
||||||
=project-node-title
|
=project-node-title
|
||||||
|
@ -131,11 +131,6 @@ link(href="{{ url_for('static_pillar', filename='assets/css/project-main.css', v
|
|||||||
i.pi-cog
|
i.pi-cog
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
.project_nav-toggle-btn(
|
|
||||||
title="Toggle navigation [T]",
|
|
||||||
data-toggle="tooltip",
|
|
||||||
data-placement="right")
|
|
||||||
i.pi-angle-double-left
|
|
||||||
|
|
||||||
#project_nav(class="{{ title }}")
|
#project_nav(class="{{ title }}")
|
||||||
#project_nav-container
|
#project_nav-container
|
||||||
@ -150,7 +145,6 @@ link(href="{{ url_for('static_pillar', filename='assets/css/project-main.css', v
|
|||||||
| {% endblock project_tree %}
|
| {% endblock project_tree %}
|
||||||
| {% endif %}
|
| {% endif %}
|
||||||
|
|
||||||
.project_split(title="Toggle Navigation [T]")
|
|
||||||
|
|
||||||
#project_context-container
|
#project_context-container
|
||||||
| {% if project.has_method('PUT') %}
|
| {% if project.has_method('PUT') %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user