mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-28 16:59:36 +01:00
Add toggle alignment option into Et2Details widget
This commit is contained in:
parent
8ff468520d
commit
2369daa2e8
@ -82,6 +82,13 @@ export class Et2Details extends Et2Widget(SlDetails)
|
||||
*/
|
||||
hoist: {
|
||||
type: Boolean
|
||||
},
|
||||
|
||||
/**
|
||||
* set toggle alignment either to left or right. Default is right alignment.
|
||||
*/
|
||||
toggleAlign: {
|
||||
type: String
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -90,6 +97,7 @@ export class Et2Details extends Et2Widget(SlDetails)
|
||||
{
|
||||
super();
|
||||
this.toggleOnHover = false;
|
||||
this.toggleAlign = 'right';
|
||||
this.hoist = false;
|
||||
}
|
||||
|
||||
@ -106,6 +114,10 @@ export class Et2Details extends Et2Widget(SlDetails)
|
||||
{
|
||||
this.shadowRoot.querySelector('.details').classList.add('hoist');
|
||||
}
|
||||
if (this.toggleAlign === 'left')
|
||||
{
|
||||
this.shadowRoot.querySelector('.details__summary-icon').style.order = -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user