mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-01 17:17:04 +08:00
Fix layout overflow when navigator is open [SCI-8589]
This commit is contained in:
parent
d4fb499a17
commit
673c1fbaa8
3 changed files with 9 additions and 1 deletions
|
|
@ -1,4 +1,8 @@
|
|||
body {
|
||||
min-width: 1140px;
|
||||
}
|
||||
|
||||
body.navigator-collapsed {
|
||||
min-width: 900px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,11 @@ window.addEventListener('DOMContentLoaded', () => {
|
|||
navigatorCollapsed: function () {
|
||||
let stateUrl = $('#sciNavigationNavigatorContainer').attr('data-navigator-state-url');
|
||||
$('.sci--layout').attr('data-navigator-collapsed', this.navigatorCollapsed);
|
||||
$('body').toggleClass('navigator-collapsed', this.navigatorCollapsed);
|
||||
$.post(stateUrl, {state: this.navigatorCollapsed ? 'collapsed' : 'open'});
|
||||
|
||||
// refresh action toolbar width on navigator toggle, take into account transition time of .4s
|
||||
if (window.actionToolbarComponent) setTimeout(window.actionToolbarComponent.setWidth, 401);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
<%= javascript_include_tag 'vue_navigation_top_menu', nonce: true %>
|
||||
</head>
|
||||
<body
|
||||
class="<%= yield :body_class %>"
|
||||
class="<%= yield :body_class %> <%= 'navigator-collapsed' if !@navigator || session[:navigator_collapsed] %>"
|
||||
<% if user_signed_in? && current_team.present? %>
|
||||
data-current-team-id="<%= current_team.id %>"
|
||||
data-atwho-users-url="<%= atwho_users_team_path(current_team) %>"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue