From d9cd847bb42f83f226efd53b94eb792f6168579c Mon Sep 17 00:00:00 2001 From: igor Date: Mon, 24 Jan 2022 15:38:12 +0600 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B5?= =?UTF-8?q?=D0=BA=20=D1=84=D0=B8=D0=BB=D1=8C=D1=82=D1=80=D0=B0=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=BD=D0=B0=D0=B6=D0=B0=D1=82=D0=B8=D0=B8=20?= =?UTF-8?q?=D0=BD=D0=B0=20...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metadata/dbms/DBMSRecords.java | 32 ++------ metadata/dbms/editrecord.js | 83 ++++++++++++-------- metadata/dbms/showrecord.js | 139 ++++++++++++++++++++++----------- metadata/dbms/tools.js | 34 +++++--- metadata/include/hint.min.css | 5 ++ metadata/include/tools.php | 10 ++- 6 files changed, 188 insertions(+), 115 deletions(-) create mode 100644 metadata/include/hint.min.css diff --git a/metadata/dbms/DBMSRecords.java b/metadata/dbms/DBMSRecords.java index ac9f578..c448030 100644 --- a/metadata/dbms/DBMSRecords.java +++ b/metadata/dbms/DBMSRecords.java @@ -1510,7 +1510,7 @@ public class DBMSRecords implements ServletContextAware { //Filter options for display in the header Excel(XLS) document. /* - String filter=""+__("Filter_options",user)+":
"; + String filter=""+trt("Filter_options",user)+":
"; expr = xpath.compile("objects-list/filter/column"); exprResult = expr.evaluate(nTypeR, XPathConstants.NODESET); nodeList = (NodeList) exprResult; @@ -1588,8 +1588,8 @@ public class DBMSRecords implements ServletContextAware { writer.write(" \n"); writer.write(" \n"); - writer.write("" + __(conn,"Time_and_date_of_generation",user) + ": " + (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date())) + "
"); - writer.write("" + __(conn,"Creator",user) + ": " + uName); + writer.write("" + trt(conn,"Time_and_date_of_generation",user) + ": " + (new SimpleDateFormat("yyyy.MM.dd.HH.mm.ss").format(new Date())) + "
"); + writer.write("" + trt(conn,"Creator",user) + ": " + uName); //writer.write(filter); @@ -2156,7 +2156,7 @@ public class DBMSRecords implements ServletContextAware { } //Перевести слово по идентификатору из базы - public String __(Connection conn,String key,User user) + public String trt(Connection conn,String key,User user) { String result=""; ResultSet rs=null; @@ -2178,26 +2178,6 @@ public class DBMSRecords implements ServletContextAware { if(rs!=null) try{rs.close();}catch(SQLException ex) {} } - /* закоментил так как теперь цифровые id и всё перенесено в базу - if(result.equals("")) - { - if(m_props==null || !user.language_id.equals(m_props_loc)) - { - m_props_loc = user.language_id; - - InputStream utf8in = getClass().getClassLoader().getResourceAsStream("messages_"+m_props_loc+".properties"); - Reader reader; - try { - reader = new InputStreamReader(utf8in, "UTF-8"); - m_props = new Properties(); - m_props.load(reader); - } catch (IOException ex) { - logger.info(ex.getMessage()); - } - } - result = m_props.getProperty(key,""); - }*/ - if(result.equals("")) { result = Tools.replaceAll(key,"_", " "); @@ -2209,14 +2189,14 @@ public class DBMSRecords implements ServletContextAware { public String getText(Connection conn,String text,User user) { int pos1 = 0; while (true) { - pos1 = text.indexOf("_('", pos1); + pos1 = text.indexOf("trt('", pos1); if (pos1 == -1) break; int pos2 = text.indexOf("')", pos1); if (pos2 == -1) break; - text = text.substring(0, pos1) + __(conn,text.substring(pos1 + 3, pos2),user) + text.substring(pos2 + 2); + text = text.substring(0, pos1) + trt(conn,text.substring(pos1 + 5, pos2),user) + text.substring(pos2 + 2); } return text; } diff --git a/metadata/dbms/editrecord.js b/metadata/dbms/editrecord.js index b8d4d2d..b1d08ef 100644 --- a/metadata/dbms/editrecord.js +++ b/metadata/dbms/editrecord.js @@ -21,9 +21,10 @@ class EdtRec let eDiv=document.getElementById('eDiv'+this.uid); eDiv.innerHTML = '
' - - if(caption!='') - this.win.setCaption(document.createTextNode(caption)); + + this.caption=caption; + if(this.caption!='') + this.win.setCaption(this.caption); this.win.obj=this; this.win.hide(false); @@ -85,20 +86,10 @@ class EdtRec //Задать CDATA значение для узла "type->properties->prop" по "n" setPropCdata(name,value) { - let nodeProperties=findNodeOnPath(this.nodeMetadata, 'type/properties'); - let nodeProp=nodeProperties.firstChild; - while(nodeProp!=null) - { - if(nodeProp.nodeName=="prop") - { - if(nodeProp.getAttribute("n")==name) - { - getCdata(nodeProp).nodeValue=value; - } - } - nodeProp=nodeProp.nextSibling; - } + let node=findNodeOnPath(this.nodeMetadata,"type/properties/prop[@n='"+name+"']"); + if(node!=null) getCdata(node).nodeValue=value; } + //Задать новое значение GUI полю (не XML, XML выше) setValue(propName,value){ let field=document.getElementById("prop_"+this.uid+"_"+propName); @@ -162,8 +153,8 @@ class EdtRec let eTable=document.getElementById('eTable'+this.uid); let type_name=nodeType.getAttribute("n"); - //document.getElementById('caption'+this.uid).appendChild(document.createTextNode(nodeType.getAttribute("d"))); - this.win.setCaption(document.createTextNode(nodeType.getAttribute("d"))); + if(this.caption === undefined || this.caption=='') + this.win.setCaption(nodeType.getAttribute("d")); let nodeProperties=findNodeOnPath(this.nodeMetadata, 'type/properties'); this.win.setWidth(nodeProperties.getAttribute("width")); @@ -533,7 +524,11 @@ class EdtRec button.setAttribute("type","button"); button.setAttribute("value","..."); button.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;height:100%;"; - button.onclick=function(thiz,val1,val2){return function(){thiz.SelectObjects(val1,val2);};}(this,nodeProp.getAttribute("ot"),nodeProp.getAttribute("n")); + button.onclick=function(thiz,val1,val2){ + return function(){ + thiz.SelectObjects(val1,val2); + }; + }(this,nodeProp.getAttribute("ot"),nodeProp.getAttribute("n")); newCell2.appendChild(button); td2.appendChild( table ); @@ -925,17 +920,23 @@ class EdtRec rec.f_State=1; rec.f_PropName=propname; rec.f_TypeName=typeName; - rec.win.setLeftTop(pageX-250,pageY-10); + rec.win.setCenter(); //rec.win.setLeftTop(pageX-250,pageY-10); rec.win.setParent(this.win); - rec.callData(rec.f_TypeName,""); + let settings=""; + let node=findNodeOnPath(this.nodeMetadata, "type/properties/prop[@n='"+propname+"']/type"); + if(node!=null){ + settings=getXMLNodeSerialisation(node); + } + + rec.callData(rec.f_TypeName,settings); /*if(rec.request.callServer(ScriptName,'')) { rec.showProgressBar(); }*/ } - //Call the ShowRecord.html window with the parameters for the filter (not just the object name). + //Call the ShowRecord window with the parameters for the filter (not just the object name). callWindow(nodeProp) { let xmlString=""; @@ -977,7 +978,7 @@ class EdtRec rec.showProgressBar(); } }; - + //Запросить данные для выпадающих списков и других объектов (только после загрузки данных полей) callDataSelect() { @@ -1226,22 +1227,41 @@ class EdtRec this.hideProgressBar(); } }; - - //Request data to fill in the field with the button - setFilterObject(TypeName,prop_id,id) + /** + * Request data to fill in the field with the button + * + * @filter - xml text: filter settings + * @return null + */ + setFilterObject(TypeName, prop_id, id, filter) { let node=findFirstNodeOnAttribute(this.nodeMetadata,'prop','n',prop_id); if(node!==null) { + getCdata(node).nodeValue=id; let name=node.getAttribute("FieldCaption"); - findNode(node,'#cdata-section').nodeValue=id; //We request data from the server to fill in the comments on the id of the record. - let prop=document.getElementById("filter_"+prop_id); + let prop=document.getElementById("prop_"+this.uid+"_"+prop_id); if(prop!==null) prop.value=id; //Request a comment on the record id from the server - let xml=''; - xml+=''; - xml+=''; + let xml = ''; + if(filter!=''){ + //Настройка для последующего вызова формы через кнопку + xml=''+filter+''; + applyNodeToNode(CreateXMLDOC(xml).documentElement, node, "n"); + + //Для запроса списка значений для выпадающего списка + xml = '' + + '' + + '' + filter + '' + + ''; + }else{ + xml = '' + + '' + + '' + + ''; + } + if(this.request.callServer(ScriptName,xml,true)) { this.showProgressBar(); @@ -1442,7 +1462,6 @@ class EdtRec this.showProgressBar(); } }; - //Check the field according to its type checkData(value,type,maybenull) { diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js index a7f1a93..70428e9 100644 --- a/metadata/dbms/showrecord.js +++ b/metadata/dbms/showrecord.js @@ -92,10 +92,10 @@ class SRec { if ((xmlStr!=null)&&(xmlStr!="")) { - xmlDOC=CreateXMLDOC(xmlStr); + let xmlDOC=CreateXMLDOC(xmlStr); //let nPFilter=findFirstNode(xmlDOC,"filter") let nPFilter=findNodeOnPath(xmlDOC.documentElement,"type/objects-list/filter"); - nPColumn=nPFilter.firstChild; + let nPColumn=nPFilter.firstChild; while (nPColumn != null) { if(nPColumn.nodeName=="column") @@ -156,6 +156,7 @@ class SRec \ \ \ + \ \ \ \ @@ -387,29 +388,49 @@ class SRec } } - //we pass the id to the object filter prop_id - the name of the filter - setFilterObject(TypeName, prop_id, id) + //we pass the id to the object filter column_n - the name of the filter + setFilterObject(TypeName, column_n, id, filter) { - let node=findFirstNodeOnAttribute(this.nodeMetadata,'column','n',prop_id); - if(node!=null) + let node=findFirstNodeOnAttribute(this.nodeMetadata,'column','n',column_n); + if(node!==null) { let name=node.getAttribute("FieldCaption"); getCdata(node).nodeValue=id; //we request data from the server to fill in the comments on the record id - let prop=document.getElementById('filter_'+this.uid+'_'+prop_id); - if(prop!=null) prop.value=id; - //request comment on the id of the record from the server - if(this.request.callServer(ScriptName,'',true)) + let prop=document.getElementById('filter_'+this.uid+'_'+column_n); + if(prop!==null) { + prop.value = id; + } + //Request a comment on the record id from the server + let xml = ''; + if(filter!=''){ + //Настройка для последующего вызова + xml=''+filter+''; + applyNodeToNode(CreateXMLDOC(xml).documentElement, node, "n"); + + //Настройка для фильтрации списка + xml = '' + + '' + + '' + filter + '' + + ''; + }else{ + xml = '' + + '' + + '' + + ''; + } + + if(this.request.callServer(ScriptName,xml,true)) { this.showProgressBar(); } }else { - alert2(trt('Alert'),'Filter "'+prop_id+'" not find!'); + alert2(trt('Alert'),'Filter "'+column_n+'" not find!'); } } - //The function to collect data from HTML fields in XML + //The function to collect data from HTML fields in to XML appendFilter() { let nodeType=findFirstNode(this.nodeMetadata, "type"); @@ -953,6 +974,10 @@ class SRec } if((count==0)||(h=0)) deleteHTML("idfilter"+this.uid); + if(this.f_State>0){ + document.getElementById('Selection_'+this.uid).parentNode.style.display = "block"; + } + //Columns in which there are links to the array let pos=0; let columnNode=this.nodeMetadataObjList.firstChild; @@ -1325,7 +1350,38 @@ class SRec } } - //Call the ShowRecord.html window with the parameters for the filter (not just the object name) + //request data to fill the Object Filter + //The result can fill the filter field with complete information or a window with a further choice of the value + SelectObjects(typeName,propname) + { + let rec=new SRec(); + rec.opener=this; + rec.create(); + rec.f_State=1; + rec.f_PropName=propname; + rec.f_TypeName=typeName; + rec.win.setCenter(); //rec.win.setLeftTop(pageX-250,pageY-10); + rec.win.setParent(this.win); + + let settings=""; + let node=findNodeOnPath(this.nodeMetadata, "type/objects-list/filter/column[@n='"+propname+"']/type"); + if(node!=null){ + settings=getXMLNodeSerialisation(node); + console.log("settings = "+settings); + } + + rec.callData(rec.f_TypeName,settings); + //if(rec.request.callServer(ScriptName,'')) + //{ + // rec.showProgressBar(); + //} + + //the filter is sent if not 1 value has come and much it is necessary to display a window with a choice of one of them + //if the "..." button was pressed to display the showrecord.html window with the object selection mode + //wishWin = window.open("showrecord.html?name="+typeName+"&state=1&propname="+propname,typeName+Math.floor(Math.random()*1000000),"width=800,height=600,menubar=no,location=no,resizable=yes,scrollbars=yes"); + } + + //Call the ShowRecord window with the parameters for the filter (not just the object name) //id - id records from the database //col - Column Number callWindow(id,col) @@ -1440,28 +1496,6 @@ class SRec } } - //request data to fill the Object Filter - //The result can fill the filter field with complete information or a window with a further choice of the value - SelectObjects(typeName,propname) - { - let rec=new SRec(); - rec.opener=this; - rec.create(); - rec.f_State=1; - rec.f_PropName=propname; - rec.f_TypeName=typeName; - rec.win.setLeftTop(pageX-250,pageY-10); - rec.win.setParent(this.win); - if(rec.request.callServer(ScriptName,'')) - { - rec.showProgressBar(); - } - - //the filter is sent if not 1 value has come and much it is necessary to display a window with a choice of one of them - //if the "..." button was pressed to display the showrecord.html window with the object selection mode - //wishWin = window.open("showrecord.html?name="+typeName+"&state=1&propname="+propname,typeName+Math.floor(Math.random()*1000000),"width=800,height=600,menubar=no,location=no,resizable=yes,scrollbars=yes"); - } - openPage(page) { open(page); @@ -1533,19 +1567,36 @@ class SRec { if(this.f_State=="0") //editing { - let erec = new EdtRec(""); - erec.win.setParent(this.win); - erec.opener=this; - erec.eRecNo(this.nodeMetadata,id); - + let eRec = new EdtRec(""); + eRec.win.setParent(this.win); + eRec.opener=this; + eRec.eRecNo(this.nodeMetadata,id); //e.win.setLeftTop(pageX-10,pageY-10); }else if(this.f_State=="1") //select one record { - //Send the id of the selected record to the parent of the selected record and close the window - //alert2(trt('Alert'),"id="+id+" f_PropName="+this.f_PropName+" f_TypeName="+this.f_TypeName); - this.opener.setFilterObject(this.f_TypeName,this.f_PropName,id); - this.win.Close(); + if(document.getElementById('Selection_'+this.uid).checked) { + + //this.appendFilter(); //To write filter fields in XML + let filter=""; + let nodeType=findFirstNode(this.nodeMetadata, "type"); + let nodeFilter=findNodeOnPath(nodeType,"objects-list/filter"); + if (nodeFilter!=null) + { + filter=getXMLNodeSerialisation(nodeFilter) + } + + //Send the id of the selected record to the parent of the selected record and close the window + //alert2(trt('Alert'),"id="+id+" f_PropName="+this.f_PropName+" f_TypeName="+this.f_TypeName); + this.opener.setFilterObject(this.f_TypeName, this.f_PropName, id, filter); + this.win.Close(); + }else{ + let eRec = new EdtRec(""); + eRec.win.setParent(this.win); + eRec.opener=this; + eRec.eRecNo(this.nodeMetadata,id); + //e.win.setLeftTop(pageX-10,pageY-10); + } }else if(this.f_State=="2") //Multiple choice (on the records of ticking TODO is not implemented) { diff --git a/metadata/dbms/tools.js b/metadata/dbms/tools.js index 5fe14a7..d9bd1c8 100644 --- a/metadata/dbms/tools.js +++ b/metadata/dbms/tools.js @@ -723,8 +723,8 @@ function findNodeOnNum(node,nodename,n) } return null; } -//вернуть первый узел заданного типа -function findNodeOnAttribute(node, nodename,Attribute,val) +//Вернуть первый узел заданного типа +function findNodeOnAttribute(node, nodename, Attribute, val) { if(node==null) return null; let n = node.firstChild; @@ -739,19 +739,19 @@ function findNodeOnAttribute(node, nodename,Attribute,val) } //Вернуть номер узла по атрибуту среди себеподобных (нумерация с 0) function findNumNodeOnAttribute(node, nodename,Attribute,val) -{ if(node==null) return -1; +{ + if(node==null) return -1; let i=0; let n = node.firstChild; - while (n != null) - {if(n.nodeName.toLowerCase()==nodename.toLowerCase()) - {if(n.getAttribute(Attribute)==val) return i; + while (n != null){ + if(n.nodeName.toLowerCase()==nodename.toLowerCase()){ + if(n.getAttribute(Attribute)==val) return i; i++; } n=n.nextSibling; } return -1; } - //рекурсию не буду использовать, обойдусь массивом вложенности function findFirstNode(node, nodename) { @@ -830,7 +830,11 @@ function findFirstNodeOnAttribute(node, nodename,Attribute,val) } return null; } -//поиск узла по пути "type/objects/list/filter/column" +/** + * Поиск узла по пути "type/objects/list/filter/column" или "Employees/Employee[@id='4']" + * @node Node Узел с которого ищется + * @path String Путь по котрому ищется + */ function findNodeOnPath(node, path) { if(node==null) return null; @@ -838,10 +842,22 @@ function findNodeOnPath(node, path) for (let i=0;i=0){ + let pos2=Params[i].indexOf("='"); + let pos3=Params[i].indexOf("']"); + let name=Params[i].substring(0, pos1); + let attribute=Params[i].substring(pos1+2, pos2); + let val=Params[i].substring(pos2+2, pos3); + + node = findNodeOnAttribute(node, name, attribute, val); + }else { + node = findNode(node, Params[i]); + } } return node; } + //вернёт первую CDATA секцию если её нет то создаст} function getCdata(node,n) { diff --git a/metadata/include/hint.min.css b/metadata/include/hint.min.css new file mode 100644 index 0000000..02f023f --- /dev/null +++ b/metadata/include/hint.min.css @@ -0,0 +1,5 @@ +/*! Hint.css - v2.5.0 - 2017-04-23 +* http://kushagragour.in/lab/hint/ +* Copyright (c) 2017 Kushagra Gour */ + +[class*=hint--]{position:relative;display:inline-block}[class*=hint--]:after,[class*=hint--]:before{position:absolute;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translate3d(0,0,0);visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;-webkit-transition:.3s ease;-moz-transition:.3s ease;transition:.3s ease;-webkit-transition-delay:0s;-moz-transition-delay:0s;transition-delay:0s}[class*=hint--]:hover:after,[class*=hint--]:hover:before{visibility:visible;opacity:1;-webkit-transition-delay:.1s;-moz-transition-delay:.1s;transition-delay:.1s}[class*=hint--]:before{content:'';position:absolute;background:0 0;border:6px solid transparent;z-index:1000001}[class*=hint--]:after{background:#383838;color:#fff;padding:8px 10px;font-size:12px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;line-height:12px;white-space:nowrap;text-shadow:0 -1px 0 #000;box-shadow:4px 4px 8px rgba(0,0,0,.3)}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label='']:after,[aria-label='']:before,[data-hint='']:after,[data-hint='']:before{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#383838}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#383838}.hint--top:after,.hint--top:before{bottom:100%;left:50%}.hint--top:before{margin-bottom:-11px;left:calc(50% - 6px)}.hint--top:after{-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);transform:translateX(-50%)}.hint--top:hover:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--top:hover:after{-webkit-transform:translateX(-50%) translateY(-8px);-moz-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}.hint--bottom:after,.hint--bottom:before{top:100%;left:50%}.hint--bottom:before{margin-top:-11px;left:calc(50% - 6px)}.hint--bottom:after{-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);transform:translateX(-50%)}.hint--bottom:hover:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--bottom:hover:after{-webkit-transform:translateX(-50%) translateY(8px);-moz-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}.hint--right:before{border-right-color:#383838;margin-left:-11px;margin-bottom:-6px}.hint--right:after{margin-bottom:-14px}.hint--right:after,.hint--right:before{left:100%;bottom:50%}.hint--right:hover:after,.hint--right:hover:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}.hint--left:before{border-left-color:#383838;margin-right:-11px;margin-bottom:-6px}.hint--left:after{margin-bottom:-14px}.hint--left:after,.hint--left:before{right:100%;bottom:50%}.hint--left:hover:after,.hint--left:hover:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--top-left:after,.hint--top-left:before{bottom:100%;left:50%}.hint--top-left:before{margin-bottom:-11px;left:calc(50% - 6px)}.hint--top-left:after{-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);transform:translateX(-100%);margin-left:12px}.hint--top-left:hover:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--top-left:hover:after{-webkit-transform:translateX(-100%) translateY(-8px);-moz-transform:translateX(-100%) translateY(-8px);transform:translateX(-100%) translateY(-8px)}.hint--top-right:after,.hint--top-right:before{bottom:100%;left:50%}.hint--top-right:before{margin-bottom:-11px;left:calc(50% - 6px)}.hint--top-right:after{-webkit-transform:translateX(0);-moz-transform:translateX(0);transform:translateX(0);margin-left:-12px}.hint--top-right:hover:after,.hint--top-right:hover:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--bottom-left:after,.hint--bottom-left:before{top:100%;left:50%}.hint--bottom-left:before{margin-top:-11px;left:calc(50% - 6px)}.hint--bottom-left:after{-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);transform:translateX(-100%);margin-left:12px}.hint--bottom-left:hover:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--bottom-left:hover:after{-webkit-transform:translateX(-100%) translateY(8px);-moz-transform:translateX(-100%) translateY(8px);transform:translateX(-100%) translateY(8px)}.hint--bottom-right:after,.hint--bottom-right:before{top:100%;left:50%}.hint--bottom-right:before{margin-top:-11px;left:calc(50% - 6px)}.hint--bottom-right:after{-webkit-transform:translateX(0);-moz-transform:translateX(0);transform:translateX(0);margin-left:-12px}.hint--bottom-right:hover:after,.hint--bottom-right:hover:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--large:after,.hint--medium:after,.hint--small:after{white-space:normal;line-height:1.4em;word-wrap:break-word}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}.hint--error:after{background-color:#b34e4d;text-shadow:0 -1px 0 #592726}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{background-color:#c09854;text-shadow:0 -1px 0 #6c5328}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{background-color:#3986ac;text-shadow:0 -1px 0 #1a3c4d}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{background-color:#458746;text-shadow:0 -1px 0 #1a321a}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--always.hint--top:after{-webkit-transform:translateX(-50%) translateY(-8px);-moz-transform:translateX(-50%) translateY(-8px);transform:translateX(-50%) translateY(-8px)}.hint--always.hint--top-left:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--always.hint--top-left:after{-webkit-transform:translateX(-100%) translateY(-8px);-moz-transform:translateX(-100%) translateY(-8px);transform:translateX(-100%) translateY(-8px)}.hint--always.hint--top-right:after,.hint--always.hint--top-right:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.hint--always.hint--bottom:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--always.hint--bottom:after{-webkit-transform:translateX(-50%) translateY(8px);-moz-transform:translateX(-50%) translateY(8px);transform:translateX(-50%) translateY(8px)}.hint--always.hint--bottom-left:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--always.hint--bottom-left:after{-webkit-transform:translateX(-100%) translateY(8px);-moz-transform:translateX(-100%) translateY(8px);transform:translateX(-100%) translateY(8px)}.hint--always.hint--bottom-right:after,.hint--always.hint--bottom-right:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.hint--always.hint--left:after,.hint--always.hint--left:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translateX(-8px)}.hint--always.hint--right:after,.hint--always.hint--right:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translateX(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:after,.hint--no-animate:before{-webkit-transition-duration:0s;-moz-transition-duration:0s;transition-duration:0s}.hint--bounce:after,.hint--bounce:before{-webkit-transition:opacity .3s ease,visibility .3s ease,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s ease,visibility .3s ease,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s ease,visibility .3s ease,transform .3s cubic-bezier(.71,1.7,.77,1.24)} \ No newline at end of file diff --git a/metadata/include/tools.php b/metadata/include/tools.php index c28f36e..8a6fba2 100644 --- a/metadata/include/tools.php +++ b/metadata/include/tools.php @@ -369,10 +369,12 @@ function afterFirst(&$str,$ch) { return substr($str, strpos($str, $ch)+strlen($ch)); } - -// Вернёт подстроку если символа нет то всю строку -// @param string $str -// @param string $chr +/** + * Вернёт подстроку если символа нет то всю строку + * @param string $str + * @param string $chr + * @return string Подстрока + */ function cutStr(&$str,$chr) { $pos = strpos($str, $chr);
adddelexcel '+trt('Settings')+''+trt('Refresh')+'