После проверки на ИБ
This commit is contained in:
@ -253,17 +253,26 @@ class TWin
|
||||
obj.appendChild(val);
|
||||
}
|
||||
|
||||
//Присвоить содержимое в виде строки
|
||||
//Присвоить содержимое
|
||||
setContent(html)
|
||||
{
|
||||
let obj=document.getElementById('TWin_Co_'+this.tWinId);
|
||||
if(obj!=null)
|
||||
{
|
||||
obj.innerHTML=html;
|
||||
obj.innerHTML = '';
|
||||
if (html instanceof HTMLElement || html instanceof DocumentFragment) {
|
||||
obj.appendChild(html);
|
||||
} else if (typeof html === 'string') {
|
||||
obj.innerHTML = html; //TODO не использовать
|
||||
} else {
|
||||
console.warn('setContent: unsupported data type passed', html);
|
||||
return;
|
||||
}
|
||||
if(this.tbl.offsetHeight>this.div.offsetHeight) this.div.style.height=this.tbl.offsetHeight+"px";
|
||||
if(this.tbl.offsetWidth>this.div.offsetWidth) this.div.style.width=this.tbl.offsetWidth+"px";
|
||||
}
|
||||
}
|
||||
|
||||
//Выбрать (активизировать) окно
|
||||
setSel()
|
||||
{
|
||||
@ -388,7 +397,7 @@ class TWin
|
||||
r.setRequestHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
r.setRequestHeader("Pragma", "no-cache");
|
||||
r.setRequestHeader("Expires", "0");
|
||||
if(json!=null)
|
||||
if(json!=null){
|
||||
r.send(JSON.stringify(json));
|
||||
}else {
|
||||
r.open( "GET", url, true );
|
||||
@ -427,17 +436,25 @@ class TWin
|
||||
w.childs[w.childs.length]=this;
|
||||
}
|
||||
}
|
||||
hide(val)
|
||||
{
|
||||
if(val)
|
||||
{ this.div.style.display='none';
|
||||
this.divsh.style.display='none';
|
||||
}else
|
||||
{
|
||||
|
||||
get visible() {
|
||||
return this.div.style.display!=='none';
|
||||
}
|
||||
|
||||
set visible(val){
|
||||
if(val){
|
||||
this.div.style.display='inline';
|
||||
if(this.shadow) this.divsh.style.display='block';
|
||||
}else
|
||||
{
|
||||
this.div.style.display='none';
|
||||
this.divsh.style.display='none';
|
||||
}
|
||||
}
|
||||
hide(val)//TODO Outdated
|
||||
{
|
||||
this.visible=!val;
|
||||
}
|
||||
|
||||
//Показать прогрес бар
|
||||
showProgressBar()
|
||||
|
||||
Reference in New Issue
Block a user