mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
Home: Change single entry to have its own portlet to immediately reflect change of selected entry.
This commit is contained in:
parent
7c229e1df3
commit
9f2481e90c
@ -214,6 +214,7 @@ class home_link_portlet extends home_portlet
|
||||
|
||||
return $actions;
|
||||
}
|
||||
|
||||
/**
|
||||
* This portlet accepts files and links
|
||||
*
|
||||
@ -221,6 +222,11 @@ class home_link_portlet extends home_portlet
|
||||
*/
|
||||
public function accept_drop()
|
||||
{
|
||||
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 {Et2PortletFavorite} from "./Et2PortletFavorite";
|
||||
import {loadWebComponent} from "../../api/js/etemplate/Et2Widget/Et2Widget";
|
||||
import "./Et2PortletLink";
|
||||
import "./Et2PortletList";
|
||||
import "./Et2PortletNote";
|
||||
import './Et2PortletWeather';
|
||||
|
Loading…
Reference in New Issue
Block a user