мелочь

This commit is contained in:
2023-10-25 11:19:53 +06:00
parent b8f655f69b
commit d4aa8a48f8
2 changed files with 32 additions and 28 deletions

View File

@ -133,7 +133,7 @@ table.SShow {
border-collapse: collapse;
border: 1px double #999999;
width: 100%;
background-color: #ffffff;
background-color: var(--row-color-2);
border-spacing: 1px 1px;
}

View File

@ -200,24 +200,25 @@ function alert2(title,smallText,fullText,okFunc=null)
let win=new TWin(true);
win.BuildGUI(10,10);
win.setCaption(document.createTextNode(title));
let html='\n\
<table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">\n\
<tr id="smallText_'+win.uid+'">\n\
<td colspan="2" style="text-align: center; vertical-align: middle;">'+smallText+'</td>\n\
</tr>\n\
<tr id="fullText_'+win.uid+'" style="display: none;">\n\
<td colspan="2" style="text-align: center; vertical-align: middle;">'+fullText+'</td>\n\
</tr>\n\
<tr style="width: 100%;height: 10px;">\n\
<td>'+(fullText === undefined || fullText == '' ? '' : '<label><input type="checkbox" id="show_'+win.uid+'" name="scales"> '+trt('Full_text')+'</label>')+'&nbsp;</td>\n\
<td style="width: 80px;"><button class="button-secondary" id="close_'+win.uid+'" style="width: 100%;">'+trt('OK')+'</button></td>\n\
</tr>\n\
</table>';
let html=`
<table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%;">
<tr id="smallText_`+win.uid+`">
<td colspan="2" style="text-align: center; vertical-align: middle;">`+smallText+`</td>
</tr>
<tr id="fullText_`+win.uid+`" style="display: none;">
<td colspan="2" style="text-align: center; vertical-align: middle;">`+fullText+`</td>
</tr>
<tr style="width: 100%;height: 10px;">
<td>`+(fullText === undefined || fullText == '' ? '' : '<label><input type="checkbox" id="show_'+win.uid+'" name="scales"> '+trt('Full_text')+'</label>')+`&nbsp;</td>
<td style="width: 80px;"><button class="button-secondary" id="close_`+win.uid+`" style="width: 100%;">`+trt('OK')+`</button></td>
</tr>
</table>`;
win.setContent(html);
let obj=document.getElementById('show_'+win.uid);
if(obj!=null) obj.onclick=function(win){
if(obj!=null){
obj.onclick=function(win){
return function(){
if(document.getElementById('show_'+win.uid).checked) {
document.getElementById('smallText_' + win.uid).style.display = "none";
@ -228,10 +229,13 @@ function alert2(title,smallText,fullText,okFunc=null)
}
};
}(win);
}
obj=document.getElementById('close_'+win.uid);
if(obj!=null){
obj.focus();
if(obj!=null) obj.onclick=function(win,okFunc){return function(){ win.Close(); if(okFunc!=null) okFunc(); };}(win,okFunc);
obj.onclick=function(win,okFunc){return function(){ win.Close(); if(okFunc!=null) okFunc(); };}(win,okFunc);
}
win.setSize("300px","150px");
win.setCenter();
win.shadow=true;
@ -276,7 +280,6 @@ function confirm2(title,smallText,fullText,okFunc,cancelFunc)
}(win);
let btnO=document.getElementById(win.uid+'_ok');
btnO.focus();
if(btnO!=null){
btnO.onclick=function(win){
return function(){
@ -286,6 +289,7 @@ function confirm2(title,smallText,fullText,okFunc,cancelFunc)
}(win,okFunc);
}
let btnC=document.getElementById(win.uid+'_cancel');
btnC.focus();
if(btnC!=null) {
btnC.onclick = function (win) {
return function () {