mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
Fix opening sidebar.
Thanks to xet7 !
This commit is contained in:
parent
a8f6170fdf
commit
0fd781e80a
2 changed files with 19 additions and 8 deletions
|
|
@ -81,14 +81,24 @@ BlazeComponent.extendComponent({
|
|||
Modal.open('archivedBoards');
|
||||
},
|
||||
'click .js-toggle-board-view': Popup.open('boardChangeView'),
|
||||
// Sidebar toggle is handled by the sidebar component itself
|
||||
// 'click .js-toggle-sidebar'() {
|
||||
// if (Sidebar) {
|
||||
// Sidebar.toggle();
|
||||
// } else {
|
||||
// console.warn('Sidebar not available for toggle');
|
||||
// }
|
||||
// },
|
||||
'click .js-toggle-sidebar'() {
|
||||
console.log('Hamburger menu clicked');
|
||||
// Use the same approach as keyboard shortcuts
|
||||
if (typeof Sidebar !== 'undefined' && Sidebar && typeof Sidebar.toggle === 'function') {
|
||||
console.log('Using Sidebar.toggle()');
|
||||
Sidebar.toggle();
|
||||
} else {
|
||||
console.warn('Sidebar not available, trying alternative approach');
|
||||
// Try to trigger the sidebar through the global Blaze helper
|
||||
if (typeof Blaze !== 'undefined' && Blaze._globalHelpers && Blaze._globalHelpers.Sidebar) {
|
||||
const sidebar = Blaze._globalHelpers.Sidebar();
|
||||
if (sidebar && typeof sidebar.toggle === 'function') {
|
||||
console.log('Using Blaze helper Sidebar.toggle()');
|
||||
sidebar.toggle();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
'click .js-open-filter-view'() {
|
||||
if (Sidebar) {
|
||||
Sidebar.setView('filter');
|
||||
|
|
|
|||
|
|
@ -167,3 +167,4 @@ export const attachmentMigrationManager = new AttachmentMigrationManager();
|
|||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue