fix: only show menu button if it contains action items
This commit is contained in:
parent
7fdc6007ba
commit
064caaa3b4
1 changed files with 7 additions and 0 deletions
|
|
@ -113,6 +113,9 @@ class FormBuilder {
|
|||
this.go_to_doctype_btn.hide();
|
||||
this.go_to_customize_form_btn.hide();
|
||||
|
||||
this.page.menu_btn_group.show();
|
||||
let hide_menu = true;
|
||||
|
||||
// show customize form & Go to customize form btn
|
||||
if (
|
||||
this.store.doc &&
|
||||
|
|
@ -147,6 +150,10 @@ class FormBuilder {
|
|||
this.go_to_doctype_list_btn.text(label).show();
|
||||
}
|
||||
|
||||
if (hide_menu && window.matchMedia("(min-device-width: 992px)").matches) {
|
||||
this.page.menu_btn_group.hide();
|
||||
}
|
||||
|
||||
// toggle preview btn text
|
||||
this.preview_btn.text(this.store.preview ? __("Hide Preview") : __("Show Preview"));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue