mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 17:14:44 +01:00
Fix disabled property/attribute was not getting reflected down to node, and Et2Box was missing the disabled style
This commit is contained in:
parent
23f8bc24c2
commit
d68b8fdfe4
@ -18,6 +18,7 @@ export class Et2Box extends Et2Widget(LitElement) implements et2_IDetachedDOM
|
||||
static get styles()
|
||||
{
|
||||
return [
|
||||
...super.styles,
|
||||
css`
|
||||
:host {
|
||||
display: block;
|
||||
|
@ -7,7 +7,7 @@ import {et2_cloneObject, et2_csvSplit} from "../et2_core_common";
|
||||
// @ts-ignore
|
||||
import type {IegwAppLocal} from "../../jsapi/egw_global";
|
||||
import {ClassWithAttributes, ClassWithInterfaces} from "../et2_core_inheritance";
|
||||
import {dedupeMixin} from "@lion/core";
|
||||
import {css, dedupeMixin} from "@lion/core";
|
||||
import type {et2_container} from "../et2_core_baseWidget";
|
||||
|
||||
/**
|
||||
@ -65,10 +65,21 @@ const Et2WidgetMixin = (superClass) =>
|
||||
protected _dom_id : string = "";
|
||||
protected _label : string = "";
|
||||
private statustext : string = "";
|
||||
protected disabled : Boolean = false;
|
||||
protected disabled : boolean = false;
|
||||
|
||||
|
||||
/** WebComponent **/
|
||||
static get styles()
|
||||
{
|
||||
return [
|
||||
...(super.styles ? super.styles : []),
|
||||
css`
|
||||
:host([disabled]) {
|
||||
display: none;
|
||||
}
|
||||
`];
|
||||
}
|
||||
|
||||
static get properties()
|
||||
{
|
||||
return {
|
||||
@ -195,7 +206,14 @@ const Et2WidgetMixin = (superClass) =>
|
||||
*/
|
||||
set_disabled(value : boolean)
|
||||
{
|
||||
this.disabled = value;
|
||||
if(value)
|
||||
{
|
||||
this.setAttribute("disabled", "")
|
||||
}
|
||||
else
|
||||
{
|
||||
this.removeAttribute("disabled");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user