mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-30 01:38:37 +01:00
Home: Better edit for note
This commit is contained in:
parent
8b54fbbc62
commit
90c3bb6089
@ -2,7 +2,7 @@ import {Et2Portlet} from "../../api/js/etemplate/Et2Portlet/Et2Portlet";
|
|||||||
import {et2_createWidget} from "../../api/js/etemplate/et2_core_widget";
|
import {et2_createWidget} from "../../api/js/etemplate/et2_core_widget";
|
||||||
import {css, html, TemplateResult} from "@lion/core";
|
import {css, html, TemplateResult} from "@lion/core";
|
||||||
import shoelace from "../../api/js/etemplate/Styles/shoelace";
|
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";
|
import {Et2Dialog} from "../../api/js/etemplate/Et2Dialog/Et2Dialog";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import shoelace from "../../api/js/etemplate/Styles/shoelace";
|
import shoelace from "../../api/js/etemplate/Styles/shoelace";
|
||||||
import {css, html, TemplateResult, unsafeHTML} from "@lion/core";
|
import {css, html, TemplateResult, unsafeHTML} from "@lion/core";
|
||||||
import {Et2Portlet} from "../../api/js/etemplate/Et2Portlet/Et2Portlet";
|
import {Et2Portlet} from "../../api/js/etemplate/Et2Portlet/Et2Portlet";
|
||||||
|
import type {SelectOption} from "../../api/js/etemplate/Et2Select/FindSelectOptions";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Home portlet to show a note
|
* Home portlet to show a note
|
||||||
@ -42,6 +43,19 @@ export class Et2PortletNote extends Et2Portlet
|
|||||||
}), 'home_' + this.id, window_width + 'x' + window_height, 'home');
|
}), '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
|
bodyTemplate() : TemplateResult
|
||||||
{
|
{
|
||||||
return html`
|
return html`
|
||||||
|
@ -2,17 +2,18 @@
|
|||||||
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2.0//EN" "https://www.egroupware.org/etemplate2.0.dtd">
|
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2.0//EN" "https://www.egroupware.org/etemplate2.0.dtd">
|
||||||
<overlay>
|
<overlay>
|
||||||
<template id="home.edit" template="" lang="" group="0" version="1.9.001">
|
<template id="home.edit" template="" lang="" group="0" version="1.9.001">
|
||||||
<grid>
|
<grid width="100%">
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
<column/>
|
<column/>
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<et2-label for="@${row}[name]" value="@${row}[label]"></et2-label>
|
<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]"/>
|
<widget type="@${row}[type]" id="@${row}[name]" no_lang="1"
|
||||||
</row>
|
select_options="@${row}[select_options]"/>
|
||||||
</rows>
|
</row>
|
||||||
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
</overlay>
|
</overlay>
|
Loading…
Reference in New Issue
Block a user