diff --git a/metadata/dbms/dbms.css b/metadata/dbms/dbms.css index decd1f4..8ca6c3a 100644 --- a/metadata/dbms/dbms.css +++ b/metadata/dbms/dbms.css @@ -18,13 +18,16 @@ input,textarea { margin: 0px 0px; } + select { display: block; -moz-box-sizing: content-box; -webkit-box-sizing:content-box; - box-sizing:content-box; + /*box-sizing:content-box;*/ + box-sizing: border-box; } + /*Над всеми по Z*/ #menu { diff --git a/metadata/dbms/editrecord.js b/metadata/dbms/editrecord.js index 01b6003..83f2d2d 100644 --- a/metadata/dbms/editrecord.js +++ b/metadata/dbms/editrecord.js @@ -23,7 +23,7 @@ class EdtRec this.win=new TWin(); this.win.TWin(pageX-10,pageY-10); this.win.setSize("500px","150px"); - this.win.setContent('
'); + this.win.setContent('
'); let eDiv=document.getElementById('eDiv'+this.uid); eDiv.innerHTML = '
' @@ -346,7 +346,7 @@ class EdtRec var button = document.createElement('input'); button.setAttribute("type","button"); button.setAttribute("value","..."); - button.style.cssText="width:30px; font-size: 9pt;"; + button.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;"; button.onclick=function(thiz,nodeProp){ return function(){ thiz.callWindow(nodeProp); };}(this,nodeProp); @@ -399,6 +399,7 @@ class EdtRec }else if(vt=="i4") { + //alert("prop name = "+nodeProp.getAttribute("n")); //If there is a node "list" with the elements "CheckBox" then create them. @@ -422,6 +423,7 @@ class EdtRec opt=opt.nextSibling; } td2.appendChild( select ); + }else { var table=document.createElement('table'); @@ -432,9 +434,9 @@ class EdtRec var newCell1 = newRow.insertCell(0); //in the created line we add a column newCell1.style.cssText="padding:0px; padding-right:1px; width: 100%;"; var newCell2 = newRow.insertCell(1); //in the created line we add a column - newCell2.style.cssText="padding:0px; padding-right:1px;"; + newCell2.style.cssText="padding:0px; padding-right:1px;height:100%;"; var newCell3 = newRow.insertCell(2); //in the created line we add a column - newCell3.style.cssText="padding:0px;"; + newCell3.style.cssText="padding:0px;height:100%;"; input = document.createElement('input'); input.style.cssText="width: 100%; height:22px;"; @@ -448,7 +450,7 @@ class EdtRec button.setAttribute("type","button"); button.setAttribute("value","+"); button.setAttribute("title",_("Increase_by_1")); - button.style.cssText="height:22px;width:22px;"; + button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;"; button.onclick=function(inp){return function(){inp.value=getIntVal(inp.value)+1;}}(input); newCell2.appendChild( button ); @@ -457,7 +459,7 @@ class EdtRec button.setAttribute("type","button"); button.setAttribute("value","-"); button.setAttribute("title",_("Decrease_by_1")); - button.style.cssText="height:22px;width:22px;"; + button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;"; button.onclick=function(inp){return function(){inp.value=getIntVal(inp.value)-1;}}(input); newCell3.appendChild( button ); @@ -486,9 +488,9 @@ class EdtRec table.border=0; let newRow=table.insertRow(0); //add a row to the created table var newCell1 = newRow.insertCell(0); //in the created line we add a column - newCell1.style.cssText="padding:0px; width: 100%;"; + newCell1.style.cssText="padding:0px;padding-right:1px;width:100%;"; var newCell2 = newRow.insertCell(1); //in the created line we add a column - newCell2.style.cssText="padding:0px;"; + newCell2.style.cssText="padding:0px;height:100%;"; select = document.createElement('select'); select.style.cssText="width: 100%; height:22px; line-height: 22px;"; @@ -508,7 +510,7 @@ class EdtRec var button = document.createElement('input'); button.setAttribute("type","button"); button.setAttribute("value","..."); - button.style.cssText="width:30px; font-size: 9pt;"; + button.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;height:100%;"; button.onclick=this.onSelObj(nodeProp.getAttribute("ot"),nodeProp.getAttribute("n")); newCell2.appendChild(button); @@ -575,7 +577,7 @@ class EdtRec var button = document.createElement('input'); button.setAttribute("type","button"); button.setAttribute("value","..."); - button.style.cssText="width:30px; font-size: 9pt;"; + button.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;"; button.onclick=this.onSelObj(nodeProp.getAttribute("ot"),nodeProp.getAttribute("n")); newCell2.appendChild(button); @@ -646,14 +648,14 @@ class EdtRec btnSel.setAttribute("value","..."); btnSel.setAttribute("title",_('Upload')); - btnSel.style.cssText="width:30px; font-size: 9pt;"; + btnSel.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;"; newCell2.appendChild(btnSel); var button2 = document.createElement('input'); button2.setAttribute("type","button"); button2.setAttribute("value","X"); button2.setAttribute("title",_('Delete')); - button2.style.cssText="height:22px;width:22px;"; + button2.style.cssText="height:22px;width:22px;margin:0px;padding:0px;"; button2.onclick=function(inp,ifr){return function(){ inp.value=''; getIframeDocument(ifr).forms["form"].reset(); }}(input,ifr); newCell3.appendChild(button2); @@ -688,7 +690,7 @@ class EdtRec table.style.cssText="width:100%;border-spacing:0;border-collapse:collapse;"; //table.setAttribute("bgColor","#0000FF"); table.border=0; - newRow=table.insertRow(0); + let newRow=table.insertRow(0); var newCell1 = newRow.insertCell(0); newCell1.style.cssText="padding:0px;width: 100%;"; var newCell2 = newRow.insertCell(1); @@ -703,7 +705,7 @@ class EdtRec newCell1.appendChild( input ); var img = document.createElement('img'); - img.src='../resources/engine/images/datepicker.jpg'; + img.src='../resources/metadata/dbms/images/datepicker.jpg'; img.style.cssText="cursor: pointer;"; newCell2.appendChild(img); @@ -760,7 +762,7 @@ class EdtRec td.setAttribute("align","right"); button = document.createElement('input'); button.setAttribute("type","button"); - button.style.cssText="width: 90px;"; + button.style.cssText="margin:0px;margin-right:1px;padding:0px;"; button.setAttribute("value",_('Apply')); button.onclick=function(thiz){ return function(){ @@ -768,9 +770,10 @@ class EdtRec }; }(this); td.appendChild( button ); + button = document.createElement('input'); //Button cancel button.setAttribute("type","button"); - button.style.cssText="width: 90px;"; + button.style.cssText="margin:0px;padding:0px;"; button.setAttribute("value",_('Cancel')); //button.onclick=function f_exit(this) { alert(this.win.div); } button.onclick=function(thiz){ return function(){thiz.win.Close();};}(this); diff --git a/metadata/dbms/records.php b/metadata/dbms/records.php index 3a3541e..7a2bbb8 100644 --- a/metadata/dbms/records.php +++ b/metadata/dbms/records.php @@ -409,18 +409,18 @@ if($nd!=null) { getCdata($nd)->nodeValue=$val; } }else if($vt=='file') { - $val=getCdataValue($nodePropData); - $valSql=getSQLValue($vt, $val); - $sql_query=str_replace('${'.$nodePropData->getAttribute("n").'}',$valSql,$sql_query); + $val=getCdataValue($nodePropData); + $valSql=getSQLValue($vt, $val); + $sql_query=str_replace('${'.$nodePropData->getAttribute("n").'}',$valSql,$sql_query); //Копируем файл из './temp/' в указанную папку относительно корня сайта - $flnm = afterLast($val,'_'); + $flnm = afterLast($val,'_'); $dir = "./temp/"; if($val!='' && file_exists($dir.$flnm)) { $path= $_SERVER['DOCUMENT_ROOT'].'/'.findFirstNodeOnAttribute($currNode,"prop","n",$nodePropData->getAttribute("n"))->getAttribute("path"); - @mkdir($path);//Создаём папку если её нет + @mkdir($path); //Создаём папку если её нет if(!rename($dir.$flnm, $path.$flnm)) - sendError('Can\'t rename to "'.$path.$v.'"!'); + sendError('Can\'t rename to "'.$path.$v.'"!'); } }else { $v=getSQLValue($vt, getCdataValue($nodePropData)); @@ -524,12 +524,12 @@ if($vt=='blob') { $sql_query=str_replace('${'.$nodePropData->getAttribute("n").'}',':'.$nodePropData->getAttribute("n"),$sql_query); //Название файла запишем в указаное поле - $val=getCdataValue($nodePropData); + $val=getCdataValue($nodePropData); $cd=findFirstNodeOnAttribute($currNode,"prop","n",$nodePropData->getAttribute("n"))->getAttribute("cd"); //Имя поля с которого нужно брать название файла $nd=findFirstNodeOnAttribute($nodeProps,'prop','n',$cd); if($nd!=null) getCdata($nd)->nodeValue=$val; }else if($vt=='file') //Файл который не загружается в базу а храниться в файловой системе - { + { $val=getCdataValue($nodePropData); $valSql=getSQLValue($vt, $val); $sql_query=str_replace('${'.$nodePropData->getAttribute("n").'}',$valSql,$sql_query); @@ -541,12 +541,12 @@ $path= $_SERVER['DOCUMENT_ROOT'].'/'.findFirstNodeOnAttribute($currNode,"prop","n",$nodePropData->getAttribute("n"))->getAttribute("path"); @mkdir($path);//Создаём папку если её нет if(!rename($dir.$flnm, $path.$flnm)) - sendError('Can\'t rename to "'.$path.$v.'"!'); + sendError('Can\'t rename to "'.$path.$v.'"!'); } }else { - $val=getSQLValue($vt, getCdataValue($nodePropData)); - $sql_query=str_replace('${'.$nodePropData->getAttribute("n").'}',$val,$sql_query); + $val=getSQLValue($vt, getCdataValue($nodePropData)); + $sql_query=str_replace('${'.$nodePropData->getAttribute("n").'}',$val,$sql_query); } } $nodePropData=$nodePropData->nextSibling; @@ -1163,7 +1163,7 @@ { //$objXMLDocument->load('metadata.xml'); //$objXMLDocument->loadXML(parseGetText(file_get_contents('metadata.xml'))); - $objXMLDocument->loadXML($xmls); + $objXMLDocument->loadXML($xmls); } catch (Exception $e) { sendError($e->getMessage()); } diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js index 8e9474d..aca3887 100644 --- a/metadata/dbms/showrecord.js +++ b/metadata/dbms/showrecord.js @@ -538,7 +538,7 @@ function SRec() { var table=document.createElement('table'); table.border=0; - table.style.cssText="width:100%;table-layout:fixed;border-spacing:0;border-collapse:collapse;"; + table.style.cssText="width:100%;/*table-layout:fixed;*/border-spacing:0;border-collapse:collapse;"; newRow=table.insertRow(0); var newCell1 = newRow.insertCell(0); newCell1.style.cssText="padding:0px;width:100%;"; @@ -562,7 +562,7 @@ function SRec() var img = document.createElement('img'); - img.src='../resources/engine/images/datepicker.jpg'; + img.src='../resources/metadata/dbms/images/datepicker.jpg'; img.style.cssText="cursor: pointer;"; newCell2.appendChild(img); @@ -584,7 +584,7 @@ function SRec() { var table=document.createElement('table'); table.border=0; - table.style.cssText="width:100%;table-layout:fixed;border-spacing:0;border-collapse:collapse;"; + table.style.cssText="width:100%;/*table-layout:fixed;*/border-spacing:0;border-collapse:collapse;"; newRow=table.insertRow(0); var newCell1 = newRow.insertCell(0); newCell1.style.cssText="padding:0px;width:100%;"; @@ -608,7 +608,7 @@ function SRec() var img = document.createElement('img'); - img.src='../resources/engine/images/datepicker.jpg'; + img.src='../resources/metadata/dbms/images/datepicker.jpg'; img.style.cssText="cursor: pointer;"; newCell2.appendChild(img); @@ -685,14 +685,14 @@ function SRec() { var table=document.createElement('table'); table.border=0; - table.style.cssText="width:100%;table-layout:fixed;border-spacing:0;border-collapse:collapse;"; + table.style.cssText="width:100%;/*table-layout:fixed;*/border-spacing:0;border-collapse:collapse;"; newRow=table.insertRow(0); //We add a row in the created table. var newCell1 = newRow.insertCell(0); - newCell1.style.cssText="padding:0px;width:100%;"; + newCell1.style.cssText="padding:0px;padding-right:1px;width:100%;"; var newCell2 = newRow.insertCell(1); - newCell2.style.cssText="padding:0px;width:25px;"; + newCell2.style.cssText="padding:0px;padding-right:1px;height:100%;"; var newCell3 = newRow.insertCell(2); - newCell3.style.cssText="padding:0px;width:25px;"; + newCell3.style.cssText="padding:0px;width:25px;height:100%;"; input = document.createElement('input'); input.style.cssText="width: 100%;"; @@ -708,14 +708,14 @@ function SRec() button = document.createElement('input'); button.setAttribute("type","button"); button.setAttribute("value","+"); - button.style.cssText="height:22px;width:22px;"; + button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;"; newCell2.appendChild( button ); button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)+1; }}(input); button = document.createElement('input'); button.setAttribute("type","button"); button.setAttribute("value","-"); - button.style.cssText="height:22px;width:22px;"; + button.style.cssText="height:100%;width:22px;margin:0px;padding:0px;"; button.onclick=function(inp){return function(){ inp.value=getIntVal(inp.value)-1; }}(input); newCell3.appendChild( button ); @@ -743,7 +743,7 @@ function SRec() var table=document.createElement('table'); //table.setAttribute("bgColor","#0000FF") table.border=0; - table.style.cssText="width:100%; table-layout:fixed;border-spacing:0;border-collapse:collapse;"; + table.style.cssText="width:100%;/*table-layout:fixed;*/border-spacing:0;border-collapse:collapse;"; newRow=table.insertRow(0); //We add a row in the created table. var newCell1 = newRow.insertCell(0); newCell1.style.cssText="padding:0px; border: 0px solid #999999; width:100%;"; @@ -765,7 +765,7 @@ function SRec() button = document.createElement('input'); button.setAttribute("type","button"); button.setAttribute("value","..."); - button.style.cssText="display:block; box-sizing: border-box; width:100%; height:100%; font-size: 9pt;"; + button.style.cssText="display:block; box-sizing: border-box; margin: 0px; padding: 0px; width:100%; height:100%; font-size: 9pt;"; button.onclick=function(thiz,val1,val2){return function(){thiz.SelectObjects(val1,val2);};}(this,object,columnNode.getAttribute("n")); newCell2.appendChild(button); @@ -832,7 +832,7 @@ function SRec() button = document.createElement('input'); button.setAttribute("type","button"); button.setAttribute("value","..."); - button.style.cssText="width:30px; height:22px;"; + button.style.cssText="width:30px; height:100%;margin: 0px; padding: 0px;"; button.onclick=function(thiz,val1,val2) { return function(){thiz.SelectObjects(val1,val2);}; }(this,object,columnNode.getAttribute("n")); @@ -1476,7 +1476,7 @@ function SRec() //We run through the marked records and request their removal this.deleteRecord=function(recordid) { - if (confirm(_("Are_you_sure_you_want_to_delete_the_entries"))) + if (confirm(_("Are_you_sure_you_want_to_delete_the_entries")+'?')) { for(var i=0;i'; obj.appendChild(pBarDiv); }; @@ -911,7 +913,7 @@ function TRequest(listener) }; if(listener.applyReq==null) alert('An object can not be found the function: "applyReq()"!'); - //if(listener.name==null) alert('An object can not be found the propenty: "name"!'); + //if(listener.name==null) alert('An object can not be found the propenty: "name"!'); незачем this.winObj=listener; //private this.m_seq=0; @@ -1112,19 +1114,19 @@ function TWin(dialog) str+=''; str+=' '; str+=' '; - str+=' '; - str+=' '; - str+=' '; + str+=' '; + str+=' '; + str+=' '; str+=' '; str+=' '; - str+=' '; + str+=' '; str+=' '; - str+=' '; + str+=' '; str+=' '; str+=' '; - str+=' '; - str+=' '; - str+=' '; + str+=' '; + str+=' '; + str+=' '; str+=' '; str+='
'; diff --git a/metadata/include/tools.php b/metadata/include/tools.php index 0670534..ce1b314 100644 --- a/metadata/include/tools.php +++ b/metadata/include/tools.php @@ -190,7 +190,7 @@ function selfURL() { if(!isset($_SERVER['REQUEST_URI'])){ $suri = $_SERVER['PHP_SELF']; } else { $suri = $_SERVER['REQUEST_URI']; } - $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; + $s = empty($_SERVER["HTTPS"]) ? '' : (($_SERVER["HTTPS"] == "on") ? "s" : ""); $sp=strtolower($_SERVER["SERVER_PROTOCOL"]); $pr = substr($sp,0,strpos($sp,"/")).$s; $pt = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]); @@ -202,7 +202,7 @@ function selfDomain() { //if(!isset($_SERVER['REQUEST_URI'])) $suri = $_SERVER['PHP_SELF']; //else $suri = $_SERVER['REQUEST_URI']; - $s = empty($_SERVER["HTTPS"]) ? '' : ($_SERVER["HTTPS"] == "on") ? "s" : ""; + $s = empty($_SERVER["HTTPS"]) ? '' : (($_SERVER["HTTPS"] == "on") ? "s" : ""); $sp=strtolower($_SERVER["SERVER_PROTOCOL"]); $pr = substr($sp,0,strpos($sp,"/")).$s; $pt = ($_SERVER["SERVER_PORT"] == "80") ? "" : (":".$_SERVER["SERVER_PORT"]);