mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
Et2Tabs: Recognise hidden & disabled in the template
This commit is contained in:
parent
7465da8908
commit
4a18963650
@ -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