Тема через CSS
This commit is contained in:
@ -264,8 +264,8 @@ class EdtRec
|
||||
{
|
||||
rpos++;
|
||||
tr = document.createElement('tr');
|
||||
if (rpos%2==0) bgColor=g_rowColor1; else bgColor=g_rowColor2;
|
||||
tr.setAttribute("bgColor",bgColor);
|
||||
if (rpos%2==0) bgColor='var(--row-color-1)'; else bgColor='var(--row-color-2)';
|
||||
tr.style.backgroundColor=bgColor;
|
||||
if(nodeProp.getAttribute("visible")=='0') tr.style.display='none';
|
||||
td1 = document.createElement('td');
|
||||
td2 = document.createElement('td');
|
||||
|
||||
@ -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
|
||||
|
||||
@ -15,7 +15,7 @@ class tcTabs
|
||||
tr.style.cssText='display: table-row; height: 1%; padding: 0px; margin: 0px; border: 0px solid #0000ff;'
|
||||
|
||||
this.btt=document.createElement('div');
|
||||
this.btt.style.cssText='display: table-cell; width :100%; height: 1%; padding: 0px; margin: 0px; border: 0px solid #0000ff;background-color: '+g_backColor2+';color:'+g_textColor1+';';
|
||||
this.btt.style.cssText='display: table-cell; width :100%; height: 1%; padding: 0px; margin: 0px; border: 0px solid #0000ff;background-color:var(--back-color-2);color:var(--text-color-1);';
|
||||
tr.appendChild(this.btt);
|
||||
this.wra.appendChild(tr);
|
||||
|
||||
@ -91,11 +91,11 @@ class tcTab
|
||||
//Сам таб на который нажимаем (ушко)
|
||||
this.div=document.createElement('div')
|
||||
this.div.style.cssText='position: relative; top: 1px; cursor: pointer; float: '+config.float+'; border: 1px solid #b3b3b3; border-radius: 5px 5px 0px 0px; padding: 1px; padding-right: 4px; padding-left: 4px; margin-left: 2px; margin-right: 2px;'
|
||||
this.div.style.background = g_backColor1;
|
||||
this.div.style.background = 'var(--back-color-1)';
|
||||
this.div.innerHTML=config.caption;
|
||||
|
||||
this.div.onmouseover=function(obj){return function(){ if(!obj.sel) obj.div.style.background = g_rowColor1; }}(this);
|
||||
this.div.onmouseout=function(obj){return function(){ if(!obj.sel) obj.div.style.background = g_backColor1; }}(this);
|
||||
this.div.onmouseover=function(obj){return function(){ if(!obj.sel) obj.div.style.background = 'var(--row-color-1)'; }}(this);
|
||||
this.div.onmouseout=function(obj){return function(){ if(!obj.sel) obj.div.style.background = 'var(--back-color-1)'; }}(this);
|
||||
this.div.onclick=function(obj){return function(){ obj.setSel(); if(obj.href!='') goToURL(obj.href); }}(this)
|
||||
}
|
||||
|
||||
@ -124,12 +124,12 @@ class tcTab
|
||||
setSel()
|
||||
{
|
||||
for(let i=0;i<this.par.tbs.length;i++)
|
||||
{ this.par.tbs[i].div.style.background = g_backColor1;
|
||||
{ this.par.tbs[i].div.style.background = 'var(--back-color-1)';
|
||||
this.par.tbs[i].div.style.borderBottom = "1px solid #b3b3b3"
|
||||
this.par.tbs[i].sel=false
|
||||
this.par.tbs[i].con.style.display='none'
|
||||
}
|
||||
this.div.style.background = g_rowColor2;
|
||||
this.div.style.background = 'var(--row-color-2)';
|
||||
this.div.style.borderBottom = '1px solid var(--back-color)'
|
||||
//this.con.style.display='inline'
|
||||
this.con.style.display='block';
|
||||
|
||||
@ -1275,7 +1275,7 @@ class TWin
|
||||
|
||||
let imgB='g_b.png';
|
||||
let imgX='x_w.png';
|
||||
if(g_textColor1=='#000000') { //Если тёмный стиль
|
||||
if(document.body.getAttribute('data-theme')!='1') { //Если тёмный стиль
|
||||
imgB = 'g_w.gif';
|
||||
imgX = 'x_b.gif';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user