feat: Add sidebar toggle action [WIP]
This commit is contained in:
parent
950fc99831
commit
69cea92a22
1 changed files with 6 additions and 1 deletions
|
|
@ -156,7 +156,12 @@ frappe.ui.Page = Class.extend({
|
|||
|
||||
setup_sidebar_toggle() {
|
||||
let sidebar_toggle = $('.page-head').find('.sidebar-toggle-btn');
|
||||
sidebar_toggle.click(console.log);
|
||||
let sidebar_wrapper = this.wrapper.find('.layout-side-section');
|
||||
if (sidebar_wrapper.length) {
|
||||
sidebar_toggle.click(() => sidebar_wrapper.toggle());
|
||||
} else {
|
||||
sidebar_toggle.hide();
|
||||
}
|
||||
},
|
||||
|
||||
set_indicator: function(label, color) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue