Тема через CSS

This commit is contained in:
2021-11-09 23:53:56 +06:00
parent 0ee4dd3d48
commit 07a7e2fff6
4 changed files with 20 additions and 18 deletions

View File

@ -81,7 +81,7 @@ class SRec
if(this.rwin!=null)
{
this.rwin.hideProgressBar();
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: '+g_backColor1+';"><tr><td align="center"><a href="'+ScriptRName+(ScriptRName.indexOf('?')!=-1 ? '&file=' : '?file=')+findFirstNode(node,'#cdata-section').nodeValue+'" target="_blank">'+trt('Download_report')+': "'+this.win.getCaption().innerHTML+'".</a></td></tr></table>');
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: var(--back-color-1);"><tr><td align="center"><a href="'+ScriptRName+(ScriptRName.indexOf('?')!=-1 ? '&file=' : '?file=')+findFirstNode(node,'#cdata-section').nodeValue+'" target="_blank">'+trt('Download_report')+': "'+this.win.getCaption().innerHTML+'".</a></td></tr></table>');
}
}else
alert2(trt('Alert'),"Unknown function! fn=\""+fn+"\"" );
@ -149,7 +149,7 @@ class SRec
let str='\
<div id="eDiv'+this.uid+'" style="width: 100%; height: 100%; position: relative;">\
<table class="SFilter" style="width: 100%; height: 100%;"><tr><td>\
<table id="idfilter'+this.uid+'" cellspacing="2" cellpadding="0" style="border: 1px solid rgb(99, 99, 99); table-layout: auto;" width="100%" bgcolor="'+g_rowColor2+'">\
<table id="idfilter'+this.uid+'" cellspacing="2" cellpadding="0" style="border: 1px solid rgb(99, 99, 99); table-layout: auto;background-color: var(--row-color-2);" width="100%">\
<caption></caption><tbody></tbody>\
</table>\
</td></tr><tr><td>\
@ -342,7 +342,7 @@ class SRec
}else
if(count>1) //The item selection window is displayed.
{
let htmlString='<table width="100%" bgcolor="'+g_rowColor2+'">';
let htmlString='<table width="100%" style="background-color: var(--row-color-2)">';
nodeProp=nodeType.firstChild
i=0;
while (nodeProp!=null)
@ -1071,7 +1071,7 @@ class SRec
th.appendChild( document.createTextNode(trt('Del')));
th.title = trt('Invert_selection');
th.style.cssText='width: 1%; cursor: pointer; text-decoration: underline;';
th.onmouseover=function(){ this.style.backgroundColor=g_rowColor2; };
th.onmouseover=function(){ this.style.backgroundColor='var(--row-color-2)'; };
th.onmouseout=function(){ this.style.backgroundColor='var(--header-color)'; };
th.onclick= ()=>{ for(let i=0;i<this.masChBox.length;i++){ if(!this.masChBox[i].disabled) this.masChBox[i].checked = ! this.masChBox[i].checked; }};
tr.appendChild(th);
@ -1147,7 +1147,7 @@ class SRec
{
let bgColor='var(--btn-color)';
if (i%2==0) bgColor='var(--btn-color3)';
if (this.pagepos==i) bgColor='DodgerBlue';
if (this.pagepos==i) bgColor='var(--btn-color)';
let newCell = newRow.insertCell(-1);
newCell.style.backgroundColor = bgColor;
newCell.style.cursor="pointer";
@ -1196,10 +1196,11 @@ class SRec
{
let bgColor='';
let i=theTable.rows.length; //number of rows in the table
if (i%2==0) bgColor=g_rowColor1; else bgColor=g_rowColor2;
if (i%2==0) bgColor='var(--row-color-1)'; else bgColor='var(--row-color-2)';
if(nColor>=0) //Color from Result
{ bgColorT=findNodeOnNum(nodeRecord,"#cdata-section",nColor).nodeValue;
{
let bgColorT=findNodeOnNum(nodeRecord,"#cdata-section",nColor).nodeValue;
if(bgColorT!="") bgColor=bgColorT;
}
let id=nodeRecord.getAttribute("id");
@ -1208,7 +1209,8 @@ class SRec
tr.onmouseover=function(){ this.style.backgroundColor="var(--btn-color2)"; };
tr.onmouseout=function(val1,val2){return function(){val1.style.backgroundColor=val2;}}(tr,bgColor);
tr.setAttribute("id",id+'_'+this.uid);
tr.setAttribute("bgColor",bgColor);
tr.style.backgroundColor=bgColor;
//sequential record number
let td = document.createElement('td');
td.appendChild( document.createTextNode( i+100*this.pagepos ) );
@ -1480,7 +1482,7 @@ class SRec
this.rwin.setParent(this.win);
this.rwin.setSize(280,130);
this.rwin.setCaption(trt('Report'));
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: '+g_backColor1+';"><tr><td align="center"><b>'+trt('Preparing_of_report')+'</b></td></tr></table>');
this.rwin.setContent('<table border="0px" style="width: 100%; height: 100%; background-color: var(--back-color-1);"><tr><td align="center"><b>'+trt('Preparing_of_report')+'</b></td></tr></table>');
this.appendFilter();
//Call data from server