mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Et2Tabs: Recognise hidden & disabled in the template
This commit is contained in:
parent
ecd7b4557d
commit
11812e36b6
@ -269,6 +269,7 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab
|
||||
let selected = "";
|
||||
this._selectedIndex = -1;
|
||||
let hidden = {};
|
||||
|
||||
if(this.id)
|
||||
{
|
||||
// Set the value for this element
|
||||
@ -297,7 +298,7 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab
|
||||
if(nodeName == "tab")
|
||||
{
|
||||
const index_name = et2_readAttrWithDefault(node, "id", '');
|
||||
var hide = false;
|
||||
const hide = et2_readAttrWithDefault(node, "hidden", hidden[index_name]);
|
||||
var widget_options = {};
|
||||
if(index_name)
|
||||
{
|
||||
@ -305,10 +306,6 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab
|
||||
{
|
||||
this.selected_index = i;
|
||||
}
|
||||
if(hidden[index_name])
|
||||
{
|
||||
hide = true;
|
||||
}
|
||||
// Get the class attribute and add it as widget_options
|
||||
const classAttr = et2_readAttrWithDefault(node, "class", '');
|
||||
if(classAttr)
|
||||
@ -326,7 +323,8 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab
|
||||
"contentDiv": null,
|
||||
"flagDiv": null,
|
||||
"tabNode": node,
|
||||
"hidden": hide,
|
||||
"hidden": et2_readAttrWithDefault(node, "hidden", hidden[index_name] ?? false),
|
||||
"disabled": et2_readAttrWithDefault(node, "disabled", false),
|
||||
"XMLNode": null,
|
||||
"promise": null
|
||||
});
|
||||
@ -398,6 +396,7 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab
|
||||
panel: tab.id,
|
||||
active: index == this._selectedIndex,
|
||||
hidden: tab.hidden,
|
||||
disabled: tab.disabled,
|
||||
onclick: tab.onclick,
|
||||
ondblclick: tab.ondblclick
|
||||
}, this);
|
||||
|
Loading…
Reference in New Issue
Block a user