diff --git a/metadata/dbms/TCGallery.js b/metadata/dbms/TCGallery.js index d431a72..d96ec1f 100644 --- a/metadata/dbms/TCGallery.js +++ b/metadata/dbms/TCGallery.js @@ -1,8 +1,21 @@ //Галерея изображений на первой странице сайта -function TCGallery(parent) +class TCGallery { - this.work = function() + constructor(parent) + { + this.test=0; + + //Конструктор + this.timeout_id =0; + this.parent=parent; + this.mas = this.getChildsMas(); //Массив элементов которые будут "Галереится" + this.mas.sort(function(a,b){return b.style.zIndex-a.style.zIndex;}); + this.firstmas = [].concat(this.mas); //Первоначальный порядок элементов + this.btns = new Array(); + } + + work() { if(this.mas[0].style.opacity > 0.05) { @@ -15,8 +28,8 @@ function TCGallery(parent) //Перестовляем Z индексы первый на последнее место (больший наверху) if(this.mas.length>0) { - var z=this.mas[this.mas.length-1].style.zIndex; - for(var i=this.mas.length-1;i>0;i--) + let z=this.mas[this.mas.length-1].style.zIndex; + for(let i=this.mas.length-1;i>0;i--) { this.mas[i].style.zIndex=this.mas[i-1].style.zIndex } @@ -24,7 +37,7 @@ function TCGallery(parent) } //Поменяли местами востанавливаем прозрачность - for(var i=0;i0) this.btns[0].style.backgroundColor='#f3af5a'; - }; + } //Переместить на заданный слой (позиция с 0) - this.moveTo = function(pos) + moveTo(pos) { if(pos<0 || pos>this.firstmas.length - 1) return; - var elm=this.firstmas[pos]; - for(var j=0;j0;i--) + let z=this.mas[this.mas.length-1].style.zIndex; + for(let i=this.mas.length-1;i>0;i--) { this.mas[i].style.zIndex=this.mas[i-1].style.zIndex } @@ -78,67 +91,57 @@ function TCGallery(parent) this.mas.sort(function(a,b){return b.style.zIndex-a.style.zIndex;}); } //Поменяли местами востанавливаем прозрачность - for(var i=0;ithis.work(),10000); this.selected(); - }; + } //Поменялся элемент - this.selected = function() + selected() { - var pos=0; - for(var i=0;i'; + }else{ + td1.innerHTML=nodeProp.getAttribute("d"); + } + if(nodeProp.getAttribute("t")!=null) td1.title=nodeProp.getAttribute("t"); if (nodeProp.getAttribute("maybenull")=='0') td1.style.cssText="font-weight: bold;"; var value=getCdata(nodeProp).nodeValue; - var vt=nodeProp.getAttribute("vt"); + if(vt=="string" || vt=="str") { var table=document.createElement('table'); @@ -322,8 +330,9 @@ class EdtRec newCell1.appendChild(nodeProp.field.getDiv()); }else { - input = document.createElement('input'); + let input = document.createElement('input'); input.setAttribute("type","text"); + input.classList.add('DBMS'); input.style.cssText="width: 100%;overflow:hidden;"; input.setAttribute("name",nodeProp.getAttribute("n")); if(nodeProp.getAttribute("size")!=null) @@ -339,7 +348,7 @@ class EdtRec if(tObj!=null) { let button = document.createElement('input'); - button.className='button-secondary'; + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value","..."); button.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;"; @@ -357,6 +366,7 @@ class EdtRec if(vt=="password") { input = document.createElement('input'); + input.classList.add('DBMS'); input.style.cssText="width: 100%;"; input.setAttribute("type","password"); input.setAttribute("name",nodeProp.getAttribute("n")); @@ -366,7 +376,8 @@ class EdtRec }else if(vt=="b") { - var select = document.createElement('select'); + let select = document.createElement('select'); + select.classList.add('DBMS'); select.style.cssText="width: 100%;"; select.setAttribute("name",nodeProp.getAttribute("n")); var opt=findFirstNode(nodeProp,"options"); @@ -409,10 +420,11 @@ class EdtRec //alert2(trt('Alert'),"prop name = "+nodeProp.getAttribute("n")); //If there is a node "list" with the elements "CheckBox" then create them. - var opt=findNode(nodeProp, "options"); + let opt=findNode(nodeProp, "options"); if(opt!=null) //If combobox { - var select = document.createElement('select'); + let select = document.createElement('select'); + select.classList.add('DBMS'); select.style.cssText="width: 100%;"; select.setAttribute("name",nodeProp.getAttribute("n")); select.setAttribute("id","prop_"+this.uid+"_"+nodeProp.getAttribute("n")); @@ -445,6 +457,7 @@ class EdtRec newCell3.style.cssText="padding:0px;height:100%;"; input = document.createElement('input'); + input.classList.add('DBMS'); input.style.cssText="width: 100%; height:22px;"; input.setAttribute("type","text"); input.setAttribute("name",nodeProp.getAttribute("n")); @@ -452,8 +465,8 @@ class EdtRec input.setAttribute("id","prop_"+this.uid+"_"+nodeProp.getAttribute("n")); newCell1.appendChild( input ); - button = document.createElement('input'); - button.className='button-secondary'; + let button = document.createElement('input'); + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value","+"); button.setAttribute("title",trt("Increase_by_1")); @@ -463,7 +476,7 @@ class EdtRec newCell2.appendChild( button ); button = document.createElement('input'); - button.className='button-secondary'; + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value","-"); button.setAttribute("title",trt("Decrease_by_1")); @@ -476,7 +489,8 @@ class EdtRec }else if(vt=="f4") { - input = document.createElement('input'); + let input = document.createElement('input'); + input.classList.add('DBMS'); input.style.cssText="width: 100%;"; input.setAttribute("type","text"); input.setAttribute("name",nodeProp.getAttribute("n")); @@ -500,7 +514,8 @@ class EdtRec var newCell2 = newRow.insertCell(1); //in the created line we add a column newCell2.style.cssText="padding:0px;height:100%;"; - select = document.createElement('select'); + let select = document.createElement('select'); + select.classList.add('DBMS'); select.style.cssText="width: 100%; height:22px; line-height: 22px;"; select.setAttribute("name",nodeProp.getAttribute("n")); //select.setAttribute("value",value) does not work because when creating no values in the list @@ -515,8 +530,8 @@ class EdtRec //cmbInp.addEventListener(IndexChangeEvent.CHANGE,onComboObjectChangeHandler); - var button = document.createElement('input'); - button.className='button-secondary'; + let button = document.createElement('input'); + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value","..."); button.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;height:100%;"; @@ -571,6 +586,7 @@ class EdtRec //two elements are placed in the table input = document.createElement('input'); + input.classList.add('DBMS'); //After pressing "Enter" we pass the entered line to the server. input.onkeydown=this.onCallFV(nodeProp.getAttribute("ot"),nodeProp.getAttribute("FieldCaption"),input,nodeProp.getAttribute("n"),nodeProp.getAttribute("fn")); input.style.cssText="width: 100%; height:22px; line-height: 22px;"; @@ -584,8 +600,8 @@ class EdtRec hidden.setAttribute("id","prop_"+this.uid+"_"+nodeProp.getAttribute("n")); hidden.value=value; newCell1.appendChild(hidden); - var button = document.createElement('input'); - button.className='button-secondary'; + let button = document.createElement('input'); + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value","..."); button.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;"; @@ -608,6 +624,7 @@ class EdtRec }else if(vt=="text") { let ta = document.createElement('textarea') + ta.classList.add('DBMS'); ta.setAttribute("id", "prop_" + this.uid + "_" + nodeProp.getAttribute("n")); ta.style.cssText = "width: 100%;"; ta.setAttribute("rows", 4); @@ -618,6 +635,7 @@ class EdtRec }else if(vt=="html"){ let ta = document.createElement('textarea') + ta.classList.add('DBMS'); ta.setAttribute("id", "prop_" + this.uid + "_" + nodeProp.getAttribute("n")); ta.style.cssText = "width: 100%;"; ta.setAttribute("rows", 4); @@ -651,6 +669,7 @@ class EdtRec //Two elements are placed in the table input = document.createElement('input'); + input.classList.add('dbms'); //After pressing Enter we pass the entered line to the server //input.onkeydown=this.onCallFV(nodeProp.getAttribute("ot"),nodeProp.getAttribute("FieldCaption"),input,nodeProp.getAttribute("n"),nodeProp.getAttribute("fn")) input.style.cssText="width: 100%; color: #777777;"; @@ -662,7 +681,7 @@ class EdtRec //Button to send the file to the server let btnSel = document.createElement('input'); - btnSel.className='button-secondary'; + btnSel.classList.add('button-secondary'); btnSel.setAttribute("type","button"); btnSel.setAttribute("value","..."); btnSel.setAttribute("title",trt('Upload')); @@ -671,6 +690,7 @@ class EdtRec newCell2.appendChild(btnSel); let button2 = document.createElement('input'); + button2.classList.add('button-secondary'); button2.className='button-secondary'; button2.setAttribute("type","button"); button2.setAttribute("value","X"); @@ -716,7 +736,8 @@ class EdtRec var newCell2 = newRow.insertCell(1); newCell2.style.cssText="padding:0px;"; - input = document.createElement('input'); + let input = document.createElement('input'); + input.classList.add('DBMS'); input.style.cssText="width: 100%;"; input.setAttribute("type","text"); input.setAttribute("name",nodeProp.getAttribute("n")); @@ -757,7 +778,8 @@ class EdtRec }); }else { - input = document.createElement('input'); + let input = document.createElement('input'); + input.classList.add('DBMS'); input.style.cssText="width: 100%;"; input.setAttribute("type","text"); input.setAttribute("name",nodeProp.getAttribute("n")); @@ -780,8 +802,8 @@ class EdtRec tr.appendChild(td); //var td = document.createElement('td'); td.setAttribute("align","right"); - button = document.createElement('input'); - button.className='button-secondary'; + let button = document.createElement('input'); + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.style.cssText="margin:0px;margin-right:1px;"; button.setAttribute("value",trt('Apply')); @@ -789,8 +811,8 @@ class EdtRec td.appendChild( button ); button = document.createElement('input'); //Button cancel + button.classList.add('button-secondary'); button.setAttribute("type","button"); - button.className='button-secondary'; button.style.cssText="margin:0px;"; button.setAttribute("value",trt('Cancel')); //button.onclick=function f_exit(this) { alert2(trt('Alert'),this.win.div); } @@ -1516,14 +1538,15 @@ class TCheckboxListField } addCheckbox(value, name) { - var input = document.createElement('input'); + let input = document.createElement('input'); + input.classList.add('DBMS'); this.array.push(input); input.setAttribute("type", "checkbox"); input.setAttribute("value", value); - var label = document.createElement("Label"); + let label = document.createElement("Label"); // label.setAttribute("for",id_from_input); label.appendChild(input); label.appendChild(document.createTextNode(" " + name + " ")); diff --git a/metadata/dbms/login.js b/metadata/dbms/login.js index 32af443..eee57b5 100644 --- a/metadata/dbms/login.js +++ b/metadata/dbms/login.js @@ -98,10 +98,10 @@ class DBMSUser this.win.setSize("350px","200px"); var str='
\n\ - \n\ +
\n\ \n\
\n\ - \n\ +
\n\ \n\ \n\ \n\ @@ -228,7 +228,7 @@ class DBMSUser win.setCaption(trt("Password_recovery")); str='
\n\ -
'+trt('Login')+' (E-mail):
\n\ +
\n\ \n\ \n\ \
'+trt('Login')+' (E-mail)\n\ diff --git a/metadata/dbms/records.php b/metadata/dbms/records.php index cc83fa1..1767ca6 100644 --- a/metadata/dbms/records.php +++ b/metadata/dbms/records.php @@ -69,7 +69,7 @@ if($v=='1') $v='true'; else if($v=='0') $v='false'; }else - if($t=='string' || $t=='text' || $t=='dateTime' || $t=='time' || $t=='date' || $t=='file') { + if($t=='string' || $t=='html' || $t=='text' || $t=='dateTime' || $t=='time' || $t=='date' || $t=='file') { if ($v == '') { $v = 'NULL'; } else { diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js index 6e50433..f4b30f6 100644 --- a/metadata/dbms/showrecord.js +++ b/metadata/dbms/showrecord.js @@ -127,7 +127,14 @@ class SRec //Apply the parameters to the current XML filter if there are filter settings in the parent window! if(xml===null || typeof(xml) == "undefined" || xml=="") return; if(typeof(xml) == "string"){ - applyNodeToNode(findFirstNodeOnAttribute(CreateXMLDOC(xml), "type", "n", this.f_TypeName), findFirstNodeOnAttribute(this.nodeMetadata, "type", "n", this.f_TypeName), "n"); + let doc=CreateXMLDOC(xml); + if(doc==null) + alert2(trt('Alert'),xml); + else { + let node=findFirstNodeOnAttribute(doc, "type", "n", this.f_TypeName); + if(node!=null) + applyNodeToNode(node, findFirstNodeOnAttribute(this.nodeMetadata, "type", "n", this.f_TypeName), "n"); + } }else if(typeof(xml) == "object"){ if(xml.getAttribute("n")==this.f_TypeName) @@ -146,12 +153,12 @@ class SRec
\
\ - \ - \ - \ +
adddelexcel
\ + \ + \ \ - \ - \ + \ + \
adddelexcel '+trt('Settings')+''+trt('Refresh')+'
'+trt('Settings')+''+trt('Refresh')+'
\
\
\ @@ -209,7 +216,7 @@ class SRec { this.pBarDiv=document.createElement('div'); this.pBarDiv.style.cssText='position: absolute; left: 0px; top: 0px; z-index: 1; background-color: rgba(0,0,0,0.5); width:100%; height: 100%;'; - this.pBarDiv.innerHTML='
'; + this.pBarDiv.innerHTML='
'; let eDiv=document.getElementById('eDiv'+this.uid); eDiv.appendChild(this.pBarDiv); @@ -581,6 +588,7 @@ class SRec newCell2.style.cssText="padding:0px;width:25px;"; let input = document.createElement('input'); + input.classList.add('DBMS'); input.style.cssText="width: 100%;"; input.setAttribute("type","text"); /*input.onkeydown=function(event){ @@ -626,7 +634,8 @@ class SRec let newCell2 = newRow.insertCell(1); newCell2.style.cssText="padding:0px;width:25px;"; - input = document.createElement('input'); + let input = document.createElement('input'); + input.classList.add('DBMS'); input.style.cssText="width: 100%;"; input.setAttribute("type","text"); /*input.onkeydown=function(event){ @@ -662,6 +671,7 @@ class SRec if (columnNode.getAttribute("vt")==="b") { let select = document.createElement('select'); + select.classList.add('DBMS'); select.onkeydown=function(){ if(event.keyCode==13) event.keyCode=9; }; @@ -706,6 +716,7 @@ class SRec if (columnNode.getAttribute("vt")==="string") { let input = document.createElement('input'); + input.classList.add('DBMS'); input.style.cssText="width: 100%;"; input.setAttribute("type","text"); input.onkeydown=function(event){if(event.which==13) event.which=9;}; @@ -730,6 +741,7 @@ class SRec newCell3.style.cssText="padding:0px;width:25px;height:100%;"; let input = document.createElement('input'); + input.classList.add('DBMS'); input.style.cssText="width: 100%;"; input.setAttribute("type","text"); input.onkeydown=function(){ if(event.keyCode==13) event.keyCode=9; }; @@ -741,7 +753,7 @@ class SRec newCell1.appendChild( input ); let button = document.createElement('input'); - button.className='button-secondary'; + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value","+"); button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;"; @@ -749,7 +761,7 @@ class SRec button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)+1; }}(input); button = document.createElement('input'); - button.className='button-secondary'; + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value","-"); button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;"; @@ -761,8 +773,9 @@ class SRec if (columnNode.getAttribute("vt")==="f8") { let input = document.createElement('input'); - input.style.cssText="width: 100%;"; input.setAttribute("type","text"); + button.classList.add('DBMS'); + input.style.cssText="width: 100%;"; input.onkeydown=function(){ if(event.keyCode==13) event.keyCode=9; }; input.setAttribute("name",columnNode.getAttribute("n")); if(columnNode.getAttribute("size")!=null) @@ -790,6 +803,7 @@ class SRec if(selector=="combo") { let select = document.createElement('select'); + select.classList.add('DBMS'); select.style.cssText="width: 100%;"; select.onkeydown=function(){ if(event.keyCode==13) event.keyCode=9; }; //select.setAttribute("name",columnNode.getAttribute("n")) @@ -800,7 +814,7 @@ class SRec newCell1.appendChild(select); let button = document.createElement('input'); - button.className='button-secondary'; + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value","..."); button.style.cssText="display:block; box-sizing: border-box; margin: 0px; padding: 0px;width:100%; height:100%; font-size: 9pt;"; @@ -844,6 +858,7 @@ class SRec { //Two elements are placed in the table let input = document.createElement('input'); + input.classList.add('DBMS'); //After pressing Enter we pass the entered line to the server input.onkeydown=function(obj,val1,val2,val3,val4){ return function(e){ @@ -869,7 +884,7 @@ class SRec newCell1.appendChild(hidden); let button = document.createElement('input'); - button.className='button-secondary'; + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value","..."); button.style.cssText="width:30px; height:100%;margin: 0px; padding: 0px;"; @@ -904,7 +919,7 @@ class SRec td.setAttribute("align","right"); let button = document.createElement('input'); - button.className='button-secondary'; + button.classList.add('button-secondary'); button.setAttribute("type","button"); button.setAttribute("value",trt("Filtering")); button.setAttribute("id","btnfilter_"+this.uid); @@ -1187,6 +1202,7 @@ class SRec if(!(this.f_pD!="1" || nodeRecord.getAttribute("a").indexOf("d")==-1)) { let checkbox = document.createElement('input'); + checkbox.classList.add('DBMS'); this.masChBox.push(checkbox); //checkbox.disabled=true; checkbox.setAttribute("type","checkbox"); diff --git a/metadata/dbms/tools.js b/metadata/dbms/tools.js index 96e9889..2c95853 100644 --- a/metadata/dbms/tools.js +++ b/metadata/dbms/tools.js @@ -125,7 +125,7 @@ function showProgressBar(obj,img_id) let pBarDiv=document.createElement('div'); pBarDiv.id=obj.id+'_pBar'; pBarDiv.style.cssText='position: absolute; left: 0px; top: 0px; z-index: 1; background-color: rgba(0,0,0,0.5); width:100%; height: 100%;'; - pBarDiv.innerHTML='
'; + pBarDiv.innerHTML='
'; obj.appendChild(pBarDiv); }; @@ -192,7 +192,7 @@ function alert2(title,text,okFunc=null) win.BuildGUI(10,10); win.setCaption(document.createTextNode(title)); let html='\n\ - \n\ +
\n\ \n\ \n\ \n\ @@ -219,7 +219,7 @@ function confirm2(title,text,okFunc,cancelFunc) win.BuildGUI(10,10); win.setCaption(document.createTextNode(title)); let html='\n\ -
'+text+'
\n\ +
\n\ \n\ \n\ \n\ @@ -326,12 +326,15 @@ function validateNumber(myEvent,decimal) { //Добавить предшествующие нули к цифре function pad(number, length) { - var str = '' + number; + let str = '' + number; while (str.length < length) { str = '0' + str; } return str; } + + + //Добавить дней к дате function addDays(date, n) { @@ -469,7 +472,7 @@ function eraseCookies() function move_me(e,win) { - var elem=win.div; + let elem=win.div; if(!e) e = window.event; win.dx=parseInt(elem.style.left)-(e.pageX || e.x); win.dy=parseInt(elem.style.top)-(e.pageY || e.y); @@ -478,8 +481,8 @@ function move_me(e,win) }; document.onmousemove = function(e) { if(!e) e = window.event; - var x2 = e.pageX || e.x; - var y2 = e.pageY || e.y; + let x2 = e.pageX || e.x; + let y2 = e.pageY || e.y; elem.style.top = win.dy + y2+'px'; if(parseInt(elem.style.top)<0) elem.style.top='0px'; elem.style.left = win.dx + x2+'px'; @@ -494,7 +497,7 @@ function move_me(e,win) function createImg(src,w,h) { - var img=new Image(); + let img=new Image(); if ((/MSIE (5\.5|6).+Win/.test(navigator.userAgent))&&(/\.png$/.test(src))) { img.style.cssText="height:"+h+"; width:"+w+"; background:none; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"' ,sizingMethod='scale');"; @@ -514,7 +517,7 @@ function fixPNG(element) { if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)) { - var src; + let src; if (element.tagName=='IMG') { if (/\.png$/.test(element.src)) @@ -632,10 +635,10 @@ function getParam(sParamName,win) //утилитарная функция из-за различий IE и FF function getXMLNodeSerialisation(xmlNode) { - var text = null; + let text = null; try { - var serializer = new XMLSerializer(); // Gecko-based browsers, Safari, Opera. + let serializer = new XMLSerializer(); // Gecko-based browsers, Safari, Opera. text = serializer.serializeToString(xmlNode); } catch (e) @@ -671,7 +674,7 @@ function createRequestObject() //создать DOMParser function CreateXMLDOC(xmlString) { - var xml=null; + let xml=null; if (window.ActiveXObject) { xml = new ActiveXObject("MSXML2.DOMDocument"); @@ -679,7 +682,7 @@ function CreateXMLDOC(xmlString) } else if(document.implementation) { - var parser = new DOMParser(); + let parser = new DOMParser(); xml = parser.parseFromString(xmlString,"text/xml"); } return xml @@ -689,7 +692,7 @@ function findNode(node, nodename, n) { if (typeof n == "undefined") n = 0; if(node==null) return null; - var nextNode = node.firstChild; + let nextNode = node.firstChild; while (nextNode != null) { if(nextNode.nodeName.toLowerCase()==nodename.toLowerCase()) return nextNode; @@ -702,8 +705,8 @@ function findNodeOnNum(node,nodename,n) { if (typeof n == "undefined") n = 0; if(node==null) return null; - var nextNode = node.firstChild; - var i=0 + let nextNode = node.firstChild; + let i=0 while (nextNode != null) { if(nextNode.nodeName.toLowerCase()==nodename.toLowerCase()) @@ -719,7 +722,7 @@ function findNodeOnNum(node,nodename,n) function findNodeOnAttribute(node, nodename,Attribute,val) { if(node==null) return null; - var n = node.firstChild; + let n = node.firstChild; while (n != null) { if((n.nodeName.toLowerCase()==nodename.toLowerCase())&&(n.getAttribute(Attribute)==val)) { @@ -732,8 +735,8 @@ function findNodeOnAttribute(node, nodename,Attribute,val) //Вернуть номер узла по атрибуту среди себеподобных (нумерация с 0) function findNumNodeOnAttribute(node, nodename,Attribute,val) { if(node==null) return -1; - var i=0; - var n = node.firstChild; + let i=0; + let n = node.firstChild; while (n != null) {if(n.nodeName.toLowerCase()==nodename.toLowerCase()) {if(n.getAttribute(Attribute)==val) return i; @@ -748,8 +751,8 @@ function findNumNodeOnAttribute(node, nodename,Attribute,val) function findFirstNode(node, nodename) { if(node==null) return null; - var mas=new Array(); - var pos=0; + let mas=new Array(); + let pos=0; mas[pos] = node.firstChild; while (mas[pos] != null) { @@ -787,8 +790,8 @@ function findFirstNode(node, nodename) function findFirstNodeOnAttribute(node, nodename,Attribute,val) { if(node==null) return null; - var mas=new Array(); - var pos=0; + let mas=new Array(); + let pos=0; mas[pos] = node.firstChild; while (mas[pos] != null) { @@ -826,8 +829,8 @@ function findFirstNodeOnAttribute(node, nodename,Attribute,val) function findNodeOnPath(node, path) { if(node==null) return null; - var Params = path.split("/"); - for (var i=0;i'; @@ -1217,7 +1221,7 @@ class TWin hd+=' '; hd+='
'+text+'
'; - var str=''; + let str=''; str+=''; str+=' '; str+=' '; @@ -1238,7 +1242,7 @@ class TWin str+='
'+hd+'
'; */ /* - var str=''; + let str=''; str+=''; str+=' '; str+=' '; @@ -1267,7 +1271,7 @@ class TWin } let str=''; - str+='
'; + str+='
'; str+=' '; str+=' '; str+=' '; @@ -1392,8 +1396,8 @@ class TWin //В центр видимой части экрана setCenter() { - var scrollLeft = window.pageXOffset || document.documentElement.scrollLeft; - var scrollTop = window.pageYOffset || document.documentElement.scrollTop; + let scrollLeft = window.pageXOffset || document.documentElement.scrollLeft; + let scrollTop = window.pageYOffset || document.documentElement.scrollTop; this.div.style.left=(scrollLeft+((document.documentElement.clientWidth || document.body.clientWidth)-parseInt(this.div.style.width))/2)+"px" this.div.style.top=(scrollTop+((document.documentElement.clientHeight || document.body.clientHeight)-parseInt(this.div.style.height))/2)+"px" @@ -1533,7 +1537,7 @@ class TWin this.pBarDiv=document.createElement('div'); this.pBarDiv.style.cssText='position: absolute; left: 0px; top: 0px; z-index: 1; width:100%; height: 100%; margin-top:30px; padding-bottom:30px;'; - this.pBarDiv.innerHTML='
'+(this.disableClosing ? '' : '')+'
'; + this.pBarDiv.innerHTML='
'; //var eDiv=document.getElementById('eDiv'+this.uid); this.div.appendChild(this.pBarDiv); @@ -1653,30 +1657,34 @@ function getIntVal(str) else return parseInt(rez) } -//Аналог PHP функции форматирования чисел -function number_format (number, decimals, dec_point, thousands_sep) +//Аналог PHP функции форматирования чисел (для разделения на десятки и сотни) +function number_format (number, decimals, dec_point, thousands_sep) { - number = (number + '').replace(/[^0-9+\-Ee.]/g, ''); - var n = !isFinite(+number) ? 0 : +number, - prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), - sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, - dec = (typeof dec_point === 'undefined') ? '.' : dec_point, - s = '', - toFixedFix = function (n, prec) { - var k = Math.pow(10, prec); - return '' + Math.round(n * k) / k; - }; - // Fix for IE parseFloat(0.55).toFixed(0) = 0; - s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.'); - if (s[0].length > 3) { - s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); - } - if ((s[1] || '').length < prec) { - s[1] = s[1] || ''; - s[1] += new Array(prec - s[1].length + 1).join('0'); - } - return s.join(dec); + number = (number + '').replace(/[^0-9+\-Ee.]/g, ''); + let n = !isFinite(+number) ? 0 : +number; + let prec = !isFinite(+decimals) ? 0 : Math.abs(decimals); + let sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep; + let dec = (typeof dec_point === 'undefined') ? '.' : dec_point; + let s = ''; + let toFixedFix = function (n, prec) { + let k = Math.pow(10, prec); + return '' + Math.round(n * k) / k; + }; + // Fix for IE parseFloat(0.55).toFixed(0) = 0; + s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.'); + if (s[0].length > 3) { + s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); + } + if ((s[1] || '').length < prec) { + s[1] = s[1] || ''; + s[1] += new Array(prec - s[1].length + 1).join('0'); + } + return s.join(dec); } + + + + /* function number_format( number, decimals, dec_point, thousands_sep ) { // Format a number with grouped thousands diff --git a/metadata/include/jscalendar/demo/3-months.html b/metadata/include/jscalendar/demo/3-months.html index e918b55..511ba72 100644 --- a/metadata/include/jscalendar/demo/3-months.html +++ b/metadata/include/jscalendar/demo/3-months.html @@ -6,9 +6,9 @@ Dynarch Calendar -- Single calendar for multiple fields - - - + + + diff --git a/metadata/include/jscalendar/demo/dateInfo.html b/metadata/include/jscalendar/demo/dateInfo.html index 547e1ca..df2308f 100644 --- a/metadata/include/jscalendar/demo/dateInfo.html +++ b/metadata/include/jscalendar/demo/dateInfo.html @@ -6,10 +6,10 @@ Dynarch Calendar -- Special date information - - - - @@ -21,7 +21,7 @@
- - - - + + + @@ -18,7 +18,7 @@
- - - - + + +

@@ -21,7 +21,7 @@
- - - - + + + diff --git a/metadata/include/jscalendar/demo/populateFields.html b/metadata/include/jscalendar/demo/populateFields.html index c78f982..ef12e32 100644 --- a/metadata/include/jscalendar/demo/populateFields.html +++ b/metadata/include/jscalendar/demo/populateFields.html @@ -6,9 +6,9 @@ Dynarch Calendar -- Populate fields - - - + + +

@@ -36,7 +36,7 @@

- - - - + + + @@ -19,7 +19,7 @@
- - - - + + +
- @@ -36,7 +36,7 @@ - + @@ -45,7 +45,7 @@

The new coolest JavaScript calendar

- - + + opener['name'] == "tinymce"): ?> - + config['theme']}/js.php")): ?> - + - - + - + - + - + - + - + - - - - + + + + +
@@ -18,7 +18,7 @@
- +
diff --git a/metadata/include/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm b/metadata/include/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm index 835d388..87d75ea 100644 --- a/metadata/include/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm +++ b/metadata/include/tinymce/jscripts/tiny_mce/plugins/advimage/image.htm @@ -2,13 +2,13 @@ {#advimage_dlg.dialog_title} - - - - - - - + + + + + + + @@ -29,7 +29,7 @@ -