+ MPDF 6.1

This commit is contained in:
2020-08-11 18:04:59 +06:00
parent 11d3f0fc7a
commit c2e133debe
714 changed files with 120510 additions and 93145 deletions

View File

@ -166,11 +166,11 @@ function loadContent(url,obj)
}
//Вывести текст поверх окон с кнопочкой OK
function alert2(text)
function alert2(title,text)
{
let win=new TWin();
let win=new TWin(true);
win.BuildGUI(10,10);
win.setCaption(document.createTextNode("Alert"));
win.setCaption(document.createTextNode(title));
let html='\n\
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">\n\
<tr>\n\
@ -178,7 +178,7 @@ function alert2(text)
</tr>\n\
<tr style="height: 10px;">\n\
<td style="width: 100%;">&nbsp;</td>\n\
<td><button id="'+win.uid+'_close" style="width: 80; height: 25;">OK</button></td>\n\
<td><button class="button-secondary" id="'+win.uid+'_close" style="width: 80px;">'+_('OK')+'</button></td>\n\
</tr>\n\
</table>';
@ -192,6 +192,51 @@ function alert2(text)
return obj;
}
//Вывести текст поверх окон с кнопочкой OK
function confirm2(title,text,okFunc,cancelFunc)
{
let win=new TWin();
win.BuildGUI(10,10);
win.setCaption(document.createTextNode(title));
let html='\n\
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">\n\
<tr style="width: 100%;">\n\
<td colspan="3" style="text-align: center; vertical-align: middle; width: 100%;">'+text+'</td>\n\
</tr>\n\
<tr style="height: 10px;">\n\
<td style="width: 100%;">&nbsp;</td>\n\
<td><button class="button-secondary" id="'+win.uid+'_ok" style="width: 80px;">'+_('OK')+'</button></td>\n\
\<td><button class="button-secondary" id="'+win.uid+'_cancel" style="width: 80px;">'+_('Cancel')+'</button></td>\n\
</tr>\n\
</table>';
win.setContent(html);
let btnO=document.getElementById(win.uid+'_ok');
if(btnO!=null){
btnO.onclick=function(win){
return function(){
win.Close();
if(okFunc!=null) okFunc();
};
}(win,okFunc);
}
let btnC=document.getElementById(win.uid+'_cancel');
if(btnC!=null) {
btnC.onclick = function (win) {
return function () {
win.Close();
if(cancelFunc!=null) cancelFunc();
};
}(win,cancelFunc);
}
win.setSize("300px","150px");
win.setCenter();
win.shadow=true;
win.hide(false);
return win;
}
/**
* Добавить событие к объекту
* @param {object} obj Объект
@ -937,7 +982,7 @@ class TRequest
//загрузился xml документ начинаем его разбирать (по id функции в документе)
var xmldoc = xmlHttpRequest.responseXML;
if(xmldoc==null){
alert(_('Wrong_XML_document')+"!\nXML=("+xmlHttpRequest.responseText+')\nURL=('+url+')\nxmlString=('+xmlString+')');
alert2(_('Alert'),_('Wrong_XML_document')+"!\nXML=("+xmlHttpRequest.responseText+')\nURL=('+url+')\nxmlString=('+xmlString+')');
return;
}