Merge branch 'master' of https://git.dirt.kz/igor/Metadata_PHP
# Conflicts: # metadata/dbms/window.js
This commit is contained in:
@ -359,9 +359,14 @@ class TWin
|
||||
//json - объект который передастца в виде JSON строки по URL
|
||||
//func - функция которая выполниться после загрузки данных в форму
|
||||
load(url,json,func,tr)
|
||||
{
|
||||
this.loadBody(url,"POST",json,func,tr);
|
||||
console.error('Please use the "loadBody" function.');
|
||||
};
|
||||
loadBody(url,method,json,func,tr)
|
||||
{
|
||||
this.showProgressBar();
|
||||
var r=createRequestObject();
|
||||
let r=createRequestObject();
|
||||
r.onreadystatechange = function(r,w,thiz,func)
|
||||
{
|
||||
return function(){
|
||||
@ -370,18 +375,20 @@ class TWin
|
||||
else w.innerHTML=r.responseText;
|
||||
thiz.hideProgressBar();
|
||||
if(func !== undefined && func!=null) func();
|
||||
|
||||
|
||||
//Для подстройки формы под новый размер, а то showProgressBar не по размеру было
|
||||
thiz.div.style.width=thiz.tbl.offsetWidth+"px"
|
||||
thiz.div.style.height=thiz.tbl.offsetHeight+"px";
|
||||
|
||||
|
||||
thiz.setCenter();
|
||||
}
|
||||
}
|
||||
}(r,this.co,this,func,tr)
|
||||
|
||||
if(json!=null) {
|
||||
r.open( "POST", url, true );
|
||||
r.open( method, url, true );
|
||||
r.setRequestHeader("Cache-Control", "no-cache, no-store, must-revalidate");
|
||||
r.setRequestHeader("Pragma", "no-cache");
|
||||
r.setRequestHeader("Expires", "0");
|
||||
if(json!=null)
|
||||
r.send(JSON.stringify(json));
|
||||
}else {
|
||||
r.open( "GET", url, true );
|
||||
|
||||
Reference in New Issue
Block a user