mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-28 19:03:14 +01:00
fix error in mobile template/framework
This commit is contained in:
parent
7431f0c25a
commit
29b1eaeeb4
@ -217,6 +217,31 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab
|
|||||||
this.createTabs(tabData);
|
this.createTabs(tabData);
|
||||||
|
|
||||||
// Use the height of the first tab if height not set
|
// Use the height of the first tab if height not set
|
||||||
|
this._sizeTabs();
|
||||||
|
|
||||||
|
// Load any additional child nodes
|
||||||
|
for(let i = 0; i < _node.childNodes.length; i++)
|
||||||
|
{
|
||||||
|
let node = _node.childNodes[i];
|
||||||
|
let widgetType = node.nodeName.toLowerCase();
|
||||||
|
|
||||||
|
// Skip text & already handled nodes
|
||||||
|
if(["#comment", "#text", "tabs", "tabpanels"].includes(widgetType))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create the new element
|
||||||
|
this.createElementFromNode(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the height of the first tab if height not set
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
protected _sizeTabs()
|
||||||
|
{
|
||||||
if(!this.tabHeight && tabData.length > 0)
|
if(!this.tabHeight && tabData.length > 0)
|
||||||
{
|
{
|
||||||
const firstTab = tabData[0].contentDiv;
|
const firstTab = tabData[0].contentDiv;
|
||||||
@ -246,22 +271,6 @@ export class Et2Tabs extends Et2InputWidget(SlTabGroup) implements et2_IResizeab
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load any additional child nodes
|
|
||||||
for(let i = 0; i < _node.childNodes.length; i++)
|
|
||||||
{
|
|
||||||
let node = _node.childNodes[i];
|
|
||||||
let widgetType = node.nodeName.toLowerCase();
|
|
||||||
|
|
||||||
// Skip text & already handled nodes
|
|
||||||
if(["#comment", "#text", "tabs", "tabpanels"].includes(widgetType))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create the new element
|
|
||||||
this.createElementFromNode(node);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_readTabs(tabData, tabs)
|
_readTabs(tabData, tabs)
|
||||||
|
@ -31,6 +31,15 @@ export class Et2TabsMobile extends Et2Tabs
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use the height of the first tab if height not set
|
||||||
|
* @protected
|
||||||
|
*/
|
||||||
|
protected _sizeTabs()
|
||||||
|
{
|
||||||
|
// no need to do anything, as we use details
|
||||||
|
}
|
||||||
|
|
||||||
getAllTabs(includeDisabled = false)
|
getAllTabs(includeDisabled = false)
|
||||||
{
|
{
|
||||||
const slot = <Et2Details[]><unknown>this.shadowRoot.querySelectorAll('et2-details');
|
const slot = <Et2Details[]><unknown>this.shadowRoot.querySelectorAll('et2-details');
|
||||||
|
Loading…
Reference in New Issue
Block a user