From 599e38b9fc7b1b9177cc97a65e2b12317cee2aa9 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 15 Aug 2024 11:32:05 -0600 Subject: [PATCH] - Hide course & material selection - Show material name - Move requested actions into advanced settings dropdown below video - Style changes --- api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts | 8 +++++++- api/js/etemplate/Et2MenuItem/Et2MenuItem.ts | 8 ++++++++ api/js/etemplate/etemplate2.ts | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 api/js/etemplate/Et2MenuItem/Et2MenuItem.ts diff --git a/api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts b/api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts index 7f690f8e5e..157ae600f5 100644 --- a/api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts +++ b/api/js/etemplate/Et2DropdownButton/Et2DropdownButton.ts @@ -14,6 +14,7 @@ import {css, html, LitElement, TemplateResult} from "lit"; import {Et2WidgetWithSelectMixin} from "../Et2Select/Et2WidgetWithSelectMixin"; import {SelectOption} from "../Et2Select/FindSelectOptions"; import shoelace from "../Styles/shoelace"; +import {ifDefined} from "lit/directives/if-defined.js"; /** * A split button - a button with a dropdown list @@ -121,6 +122,7 @@ export class Et2DropdownButton extends Et2WidgetWithSelectMixin(LitElement) ${(this.select_options || []).map((option : SelectOption) => this._optionTemplate(option))} + @@ -133,7 +135,11 @@ export class Et2DropdownButton extends Et2WidgetWithSelectMixin(LitElement) ` : ''; return html` - + ${icon} ${this.noLang ? option.label : this.egw().lang(option.label)} `; diff --git a/api/js/etemplate/Et2MenuItem/Et2MenuItem.ts b/api/js/etemplate/Et2MenuItem/Et2MenuItem.ts new file mode 100644 index 0000000000..4e4ce33fa3 --- /dev/null +++ b/api/js/etemplate/Et2MenuItem/Et2MenuItem.ts @@ -0,0 +1,8 @@ +import {customElement} from "lit/decorators/custom-element.js"; +import {SlMenuItem} from "@shoelace-style/shoelace"; +import {Et2Widget} from "../Et2Widget/Et2Widget"; + +@customElement('et2-menu-item') +export class Et2MenuItem extends Et2Widget(SlMenuItem) +{ +} \ No newline at end of file diff --git a/api/js/etemplate/etemplate2.ts b/api/js/etemplate/etemplate2.ts index cc52fa3f9c..205c2c775f 100644 --- a/api/js/etemplate/etemplate2.ts +++ b/api/js/etemplate/etemplate2.ts @@ -74,6 +74,7 @@ import './Et2Nextmatch/Headers/AccountFilterHeader'; import './Et2Nextmatch/Headers/CustomFilterHeader'; import './Et2Nextmatch/Headers/EntryHeader'; import './Et2Nextmatch/Headers/FilterHeader'; +import './Et2MenuItem/Et2MenuItem'; import './Et2Select/Et2Listbox'; import './Et2Select/Et2Select'; import './Et2Select/SelectTypes';