/** HTML закладки
*/
class tcTabs
{
//element_id - Контейнер где будут созданны закладки
constructor(element_id){
this.tbs=new Array();
if(typeof element_id == 'string') this.bd=document.getElementById(element_id); else this.bd=element_id;
this.wra=document.createElement('div');
this.wra.style.cssText="display: table; width :100%; height: 100%; padding: 0px; margin: 0px; border-collapse: collapse; border: 0px solid #000000;";
var tr=null;
tr=document.createElement('div');
tr.style.cssText='display: table-row; height: 1%; padding: 0px; margin: 0px; border: 0px solid #0000ff;'
this.btt=document.createElement('div');
this.btt.style.cssText='display: table-cell; width :100%; height: 1%; padding: 0px; margin: 0px; border: 0px solid #0000ff;background-color:var(--back-color-2);color:var(--text-color-1);';
tr.appendChild(this.btt);
this.wra.appendChild(tr);
tr=document.createElement('div');
tr.style.cssText='display: table-row; width :100%; height: 100%; padding: 0px; margin: 0px; border: 0px solid #0000ff;'
//Content
this.ctt=document.createElement('div');
this.ctt.style.cssText='display:table-cell; width :100%; height: 100%; padding: 0px; margin: 0px; border; border: 1px solid #b3b3b3; overflow:hidden;'
tr.appendChild(this.ctt);
this.wra.appendChild(tr);
this.bd.appendChild(this.wra);
}
//Добавление новой закладки
addTab(config)
{
let tab=new tcTab(config)
tab.par=this
this.btt.appendChild(tab.div);
this.tbs[this.tbs.length]=tab;
return tab;
}
//Удаление закладки
delTab(tab)
{
if (typeof tab === 'string' || tab instanceof String)
{
}else
{
for(let i=0;i