мелочь
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -200,38 +200,42 @@ 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>')+' </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>')+` </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){
|
||||
return function(){
|
||||
if(document.getElementById('show_'+win.uid).checked) {
|
||||
document.getElementById('smallText_' + win.uid).style.display = "none";
|
||||
document.getElementById('fullText_' + win.uid).style.display = "table-row";
|
||||
}else{
|
||||
document.getElementById('smallText_' + win.uid).style.display = "table-row";
|
||||
document.getElementById('fullText_' + win.uid).style.display = "none";
|
||||
}
|
||||
};
|
||||
}(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";
|
||||
document.getElementById('fullText_' + win.uid).style.display = "table-row";
|
||||
}else{
|
||||
document.getElementById('smallText_' + win.uid).style.display = "table-row";
|
||||
document.getElementById('fullText_' + win.uid).style.display = "none";
|
||||
}
|
||||
};
|
||||
}(win);
|
||||
}
|
||||
|
||||
obj=document.getElementById('close_'+win.uid);
|
||||
obj.focus();
|
||||
if(obj!=null) obj.onclick=function(win,okFunc){return function(){ win.Close(); if(okFunc!=null) okFunc(); };}(win,okFunc);
|
||||
if(obj!=null){
|
||||
obj.focus();
|
||||
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 () {
|
||||
|
||||
Reference in New Issue
Block a user