From 4df922252f0a7abaf93219e7eabd1c77e7ed7e0e Mon Sep 17 00:00:00 2001 From: Igor Date: Sun, 2 Aug 2020 22:26:34 +0600 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=BE=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metadata/dbms/dbms.css | 8 ++++---- metadata/dbms/editrecord.js | 6 +++--- metadata/dbms/showrecord.js | 13 ++++++------- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/metadata/dbms/dbms.css b/metadata/dbms/dbms.css index 4da0b47..cd6cab9 100644 --- a/metadata/dbms/dbms.css +++ b/metadata/dbms/dbms.css @@ -1,9 +1,9 @@ /*Переменные для настройки цветов*/ :root{ - /*--header-color: #505050;*/ - --header-color: #fdfdfd; - /*--back-color: #3a3a3a;*/ - --back-color: #ffffff; + --header-color: #505050; + /*--header-color: #fdfdfd;*/ + --back-color: #3a3a3a; + /*--back-color: #ffffff;*/ } diff --git a/metadata/dbms/editrecord.js b/metadata/dbms/editrecord.js index c80678a..9a8f99a 100644 --- a/metadata/dbms/editrecord.js +++ b/metadata/dbms/editrecord.js @@ -654,7 +654,7 @@ class EdtRec //Button to send the file to the server let btnSel = document.createElement('input'); - button.className='button-secondary'; + btnSel.className='button-secondary'; btnSel.setAttribute("type","button"); btnSel.setAttribute("value","..."); btnSel.setAttribute("title",_('Upload')); @@ -663,7 +663,7 @@ class EdtRec newCell2.appendChild(btnSel); let button2 = document.createElement('input'); - button.className='button-secondary'; + button2.className='button-secondary'; button2.setAttribute("type","button"); button2.setAttribute("value","X"); button2.setAttribute("title",_('Delete')); @@ -672,7 +672,7 @@ class EdtRec newCell3.appendChild(button2); //Download button - newCell4.innerHTML='
' + newCell4.innerHTML='
' td2.appendChild( tbl_b ); diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js index d08b1e4..90cf6e3 100644 --- a/metadata/dbms/showrecord.js +++ b/metadata/dbms/showrecord.js @@ -1059,7 +1059,7 @@ class SRec th.style.textDecoration='underline'; th.style.cursor='pointer'; th.onclick=function(thiz,cName){ return function(){ findNodeOnPath(thiz.nodeMetadata,"type/objects-list").setAttribute('order',cName); thiz.appendFilter(); thiz.sendFilter(-1,0);}; }(this,columnNode.getAttribute("n")); - th.onmouseover=function(){ this.style.backgroundColor='#C2D7FC'; }; + th.onmouseover=function(){ this.style.backgroundColor="var(--btn-color2)"; }; th.onmouseout=function(thiz,cName){ return function(){ if(findNodeOnPath(thiz.nodeMetadata,"type/objects-list").getAttribute('order') == cName) this.style.backgroundColor='#afafaf'; else this.style.backgroundColor='#dadada'; }; }(this,columnNode.getAttribute("n")); } tr.appendChild(th); @@ -1167,8 +1167,8 @@ class SRec let id=nodeRecord.getAttribute("id"); //add rows to an existing record table let tr = document.createElement('tr'); - tr.onmouseover=function(){this.setAttribute("bgColor","#C2D7FC");}; - tr.onmouseout=function(val1,val2){return function(){val1.setAttribute("bgColor",val2);}}(tr,bgColor); + 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); //sequential record number @@ -1211,13 +1211,12 @@ class SRec if (this.masCT[colN]!=null) { //Opening a new window in the filter is passed to the current values of the row - td.setAttribute("bgColor","#AAFFFF"); - td.style.cssText="cursor: pointer;"; + td.style.cssText="cursor: pointer; background-color: var(--btn-color); font-weight: bold;"; td.onmouseover=function(){ - this.setAttribute("bgColor","#FFAAAA"); + this.style.backgroundColor="var(--btn-color2)"; }; td.onmouseout=function(){ - this.setAttribute("bgColor","#AAFFFF"); + this.style.backgroundColor="var(--btn-color)"; }; //when you click on a cell, the sent filter is prefilled with variables in accordance with the id of the pressed line //in the function we pass the cell id and the column number