def _show_main_menu_content(self) -> None: for menu_item in self._get_main_menu_items(): if isinstance(menu_item.icon, dict): active_icon: Icon = { "icon": menu_item.icon["icon"] + "_active", "emblem": menu_item.icon["emblem"] } else: active_icon = menu_item.icon + "_active" html.open_li() html.popup_trigger( (self._get_popup_trigger_content(active_icon, menu_item)), ident="mega_menu_" + menu_item.name, method=MethodInline(self._get_mega_menu_content(menu_item)), cssclass=menu_item.name, popup_group="main_menu_popup", hover_switch_delay=150, # ms onopen=menu_item.onopen, ) html.div("", id_="popup_shadow", onclick="cmk.popup_menu.close_popup()", class_="min" if config.user.get_attribute("nav_hide_icons_title") else None) html.close_li()
def _show_dropdown_trigger(self, dropdown: PageMenuDropdown) -> None: html.popup_trigger( html.render_h2(dropdown.title), ident="menu_" + dropdown.name, method=MethodInline(self._render_dropdown_area(dropdown)), data=dropdown.popup_data, popup_group="menu", )
def _show_main_menu_content(self) -> None: html.open_li() html.popup_trigger( html.render_icon("main_search") + html.render_div(_("Search")), "mega_menu_search", method=MethodInline(self._get_search_menu_content()), ) html.close_li() for menu_item in self._get_main_menu_items(): html.open_li() html.popup_trigger( html.render_icon(menu_item.icon_name) + html.render_div(menu_item.title), ident="mega_menu_" + menu_item.name, method=MethodInline(self._get_mega_menu_content(menu_item)), cssclass=menu_item.name, ) html.close_li()
def _show_main_menu_content(self) -> None: for menu_item in self._get_main_menu_items(): html.open_li() html.popup_trigger( (html.render_icon(menu_item.icon_name) + html.render_icon( menu_item.icon_name + "_active", class_="active") + html.render_div(menu_item.title)), ident="mega_menu_" + menu_item.name, method=MethodInline(self._get_mega_menu_content(menu_item)), cssclass=menu_item.name, popup_group="main_menu_popup", hover_switch_delay=150, # ms onopen=menu_item.onopen, ) html.close_li()
def _show_main_menu_content(self) -> None: for menu_item in self._get_main_menu_items(): if isinstance(menu_item.icon, dict): active_icon: Icon = { "icon": menu_item.icon["icon"] + "_active", "emblem": menu_item.icon["emblem"] } else: active_icon = menu_item.icon + "_active" html.open_li() html.popup_trigger( (html.render_icon(menu_item.icon) + html.render_icon(active_icon, class_="active") + html.render_div(menu_item.title)), ident="mega_menu_" + menu_item.name, method=MethodInline(self._get_mega_menu_content(menu_item)), cssclass=menu_item.name, popup_group="main_menu_popup", hover_switch_delay=150, # ms onopen=menu_item.onopen, ) html.close_li()