mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-15 18:38:32 +01:00
Home: Change single entry to have its own portlet to immediately reflect change of selected entry.
This commit is contained in:
parent
014b4072a7
commit
adef3b6553
@ -214,6 +214,7 @@ class home_link_portlet extends home_portlet
|
|||||||
|
|
||||||
return $actions;
|
return $actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This portlet accepts files and links
|
* This portlet accepts files and links
|
||||||
*
|
*
|
||||||
@ -223,4 +224,9 @@ class home_link_portlet extends home_portlet
|
|||||||
{
|
{
|
||||||
return array('file', 'link');
|
return array('file', 'link');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_type()
|
||||||
|
{
|
||||||
|
return "et2-portlet-link";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
37
home/js/Et2PortletLink.ts
Normal file
37
home/js/Et2PortletLink.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import {Et2Portlet} from "../../api/js/etemplate/Et2Portlet/Et2Portlet";
|
||||||
|
import shoelace from "../../api/js/etemplate/Styles/shoelace";
|
||||||
|
import {css} from "@lion/core";
|
||||||
|
import {SelectOption} from "../../api/js/etemplate/Et2Select/FindSelectOptions";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Home portlet to show a list of entries
|
||||||
|
*/
|
||||||
|
export class Et2PortletLink extends Et2Portlet
|
||||||
|
{
|
||||||
|
static get styles()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
...shoelace,
|
||||||
|
...(super.styles || []),
|
||||||
|
css`
|
||||||
|
`
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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: "entry", type: "et2-link-entry", label: "Entry"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!customElements.get("et2-portlet-link"))
|
||||||
|
{
|
||||||
|
customElements.define("et2-portlet-link", Et2PortletLink);
|
||||||
|
}
|
@ -14,6 +14,7 @@ import {etemplate2} from "../../api/js/etemplate/etemplate2";
|
|||||||
import {Et2Portlet} from "../../api/js/etemplate/Et2Portlet/Et2Portlet";
|
import {Et2Portlet} from "../../api/js/etemplate/Et2Portlet/Et2Portlet";
|
||||||
import {Et2PortletFavorite} from "./Et2PortletFavorite";
|
import {Et2PortletFavorite} from "./Et2PortletFavorite";
|
||||||
import {loadWebComponent} from "../../api/js/etemplate/Et2Widget/Et2Widget";
|
import {loadWebComponent} from "../../api/js/etemplate/Et2Widget/Et2Widget";
|
||||||
|
import "./Et2PortletLink";
|
||||||
import "./Et2PortletList";
|
import "./Et2PortletList";
|
||||||
import "./Et2PortletNote";
|
import "./Et2PortletNote";
|
||||||
import './Et2PortletWeather';
|
import './Et2PortletWeather';
|
||||||
|
Loading…
Reference in New Issue
Block a user