mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-19 04:19:28 +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()
|
static get styles()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
|
...super.styles,
|
||||||
css`
|
css`
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -7,7 +7,7 @@ import {et2_cloneObject, et2_csvSplit} from "../et2_core_common";
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import type {IegwAppLocal} from "../../jsapi/egw_global";
|
import type {IegwAppLocal} from "../../jsapi/egw_global";
|
||||||
import {ClassWithAttributes, ClassWithInterfaces} from "../et2_core_inheritance";
|
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";
|
import type {et2_container} from "../et2_core_baseWidget";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,10 +65,21 @@ const Et2WidgetMixin = (superClass) =>
|
|||||||
protected _dom_id : string = "";
|
protected _dom_id : string = "";
|
||||||
protected _label : string = "";
|
protected _label : string = "";
|
||||||
private statustext : string = "";
|
private statustext : string = "";
|
||||||
protected disabled : Boolean = false;
|
protected disabled : boolean = false;
|
||||||
|
|
||||||
|
|
||||||
/** WebComponent **/
|
/** WebComponent **/
|
||||||
|
static get styles()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
...(super.styles ? super.styles : []),
|
||||||
|
css`
|
||||||
|
:host([disabled]) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
`];
|
||||||
|
}
|
||||||
|
|
||||||
static get properties()
|
static get properties()
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
@ -195,7 +206,14 @@ const Et2WidgetMixin = (superClass) =>
|
|||||||
*/
|
*/
|
||||||
set_disabled(value : boolean)
|
set_disabled(value : boolean)
|
||||||
{
|
{
|
||||||
this.disabled = value;
|
if(value)
|
||||||
|
{
|
||||||
|
this.setAttribute("disabled", "")
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.removeAttribute("disabled");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user