mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +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');
|
Modal.open('archivedBoards');
|
||||||
},
|
},
|
||||||
'click .js-toggle-board-view': Popup.open('boardChangeView'),
|
'click .js-toggle-board-view': Popup.open('boardChangeView'),
|
||||||
// Sidebar toggle is handled by the sidebar component itself
|
'click .js-toggle-sidebar'() {
|
||||||
// 'click .js-toggle-sidebar'() {
|
console.log('Hamburger menu clicked');
|
||||||
// if (Sidebar) {
|
// Use the same approach as keyboard shortcuts
|
||||||
// Sidebar.toggle();
|
if (typeof Sidebar !== 'undefined' && Sidebar && typeof Sidebar.toggle === 'function') {
|
||||||
// } else {
|
console.log('Using Sidebar.toggle()');
|
||||||
// console.warn('Sidebar not available for 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'() {
|
'click .js-open-filter-view'() {
|
||||||
if (Sidebar) {
|
if (Sidebar) {
|
||||||
Sidebar.setView('filter');
|
Sidebar.setView('filter');
|
||||||
|
|
|
||||||
|
|
@ -167,3 +167,4 @@ export const attachmentMigrationManager = new AttachmentMigrationManager();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue