forked from extern/egroupware
Home: Better edit for note
This commit is contained in:
parent
b09c6e804f
commit
da839dcfca
@ -2,7 +2,7 @@ import {Et2Portlet} from "../../api/js/etemplate/Et2Portlet/Et2Portlet";
|
||||
import {et2_createWidget} from "../../api/js/etemplate/et2_core_widget";
|
||||
import {css, html, TemplateResult} from "@lion/core";
|
||||
import shoelace from "../../api/js/etemplate/Styles/shoelace";
|
||||
import {SelectOption} from "../../api/js/etemplate/Et2Select/FindSelectOptions";
|
||||
import type {SelectOption} from "../../api/js/etemplate/Et2Select/FindSelectOptions";
|
||||
import {Et2Dialog} from "../../api/js/etemplate/Et2Dialog/Et2Dialog";
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
import shoelace from "../../api/js/etemplate/Styles/shoelace";
|
||||
import {css, html, TemplateResult, unsafeHTML} from "@lion/core";
|
||||
import {Et2Portlet} from "../../api/js/etemplate/Et2Portlet/Et2Portlet";
|
||||
import type {SelectOption} from "../../api/js/etemplate/Et2Select/FindSelectOptions";
|
||||
|
||||
/**
|
||||
* Home portlet to show a note
|
||||
@ -42,6 +43,19 @@ export class Et2PortletNote extends Et2Portlet
|
||||
}), 'home_' + this.id, window_width + 'x' + window_height, 'home');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a list of user-configurable properties
|
||||
* @returns {[{name : string, type : string, select_options? : [SelectOption]}]}
|
||||
*/
|
||||
get portletProperties() : { name : string, type : string, label : string, select_options? : SelectOption[] }[]
|
||||
{
|
||||
return [
|
||||
...super.portletProperties,
|
||||
{name: "title", type: "et2-textbox", label: "Title"},
|
||||
{name: "note", type: "htmlarea", label: ""}
|
||||
]
|
||||
}
|
||||
|
||||
bodyTemplate() : TemplateResult
|
||||
{
|
||||
return html`
|
||||
|
@ -2,17 +2,18 @@
|
||||
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2.0//EN" "https://www.egroupware.org/etemplate2.0.dtd">
|
||||
<overlay>
|
||||
<template id="home.edit" template="" lang="" group="0" version="1.9.001">
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<et2-label for="@${row}[name]" value="@${row}[label]"></et2-label>
|
||||
<widget type="@${row}[type]" id="@${row}[name]" no_lang="1" select_options="@${row}[select_options]"/>
|
||||
</row>
|
||||
</rows>
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<et2-label for="@${row}[name]" value="@${row}[label]"></et2-label>
|
||||
<widget type="@${row}[type]" id="@${row}[name]" no_lang="1"
|
||||
select_options="@${row}[select_options]"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
</overlay>
|
Loading…
Reference in New Issue
Block a user