diff --git a/metadata/dbms/editrecord.js b/metadata/dbms/editrecord.js
index 240b758..29a2cd0 100644
--- a/metadata/dbms/editrecord.js
+++ b/metadata/dbms/editrecord.js
@@ -355,7 +355,7 @@ class EdtRec
button.setAttribute("value","...");
button.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;";
button.onclick=function(thiz,nodeProp){ return function(){
- thiz.callWindow(nodeProp);
+ thiz.callWindowF(nodeProp);
};}(this,nodeProp);
newCell2.appendChild( button );
@@ -529,11 +529,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){
+ button.onclick=function(thiz,val){
return function(){
- thiz.SelectObjects(val1,val2);
+ thiz.SelectObjects(val);
};
- }(this,nodeProp.getAttribute("ot"),nodeProp.getAttribute("n"));
+ }(this,nodeProp.getAttribute("n"));
newCell2.appendChild(button);
td2.appendChild( table );
@@ -601,7 +601,7 @@ class EdtRec
button.setAttribute("type","button");
button.setAttribute("value","...");
button.style.cssText="width:30px;font-size:9pt;margin:0px;padding:0px;";
- button.onclick=function(thiz,val1,val2){return function(){thiz.SelectObjects(val1,val2);};}(this,nodeProp.getAttribute("ot"),nodeProp.getAttribute("n"));
+ button.onclick=function(thiz,val){return function(){thiz.SelectObjects(val);};}(this,nodeProp.getAttribute("n"));
newCell2.appendChild(button);
td2.appendChild( table );
@@ -918,39 +918,22 @@ class EdtRec
//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)
+ SelectObjects(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/properties/prop[@n='"+propname+"']/type");
- if(node!=null){
- settings=getXMLNodeSerialisation(node);
- }
-
- rec.callData(rec.f_TypeName,settings);
- /*if(rec.request.callServer(ScriptName,''))
- {
- rec.showProgressBar();
- }*/
+ let nodeProp=findNodeOnPath(this.nodeMetadata, "type/properties/prop[@n='"+propname+"']");
+ if(nodeProp!=null)
+ this.callWindowF(nodeProp);
}
//Call the ShowRecord window with the parameters for the filter (not just the object name).
- callWindow(nodeProp)
+ callWindowF(nodeProp)
{
- let xmlString="";
+ let settings="";
let TypeName="";
let nT=findNode(nodeProp, "type");
if(nT!=null)
{
- xmlString=getXMLNodeSerialisation(nT);
+ settings=getXMLNodeSerialisation(nT);
TypeName = nT.getAttribute("n");
}else
{
@@ -959,23 +942,26 @@ class EdtRec
//Write to XML string from GUI
while(true)
{
- let sub1=BeforeFirst(xmlString,"${");
+ let sub1=BeforeFirst(settings,"${");
if(sub1==null) break;
- let sub2=AfterFirst(xmlString,"}");
+ let sub2=AfterFirst(settings,"}");
if(sub2==null) break;
- let val=BeforeFirst(AfterFirst(xmlString,"${"),"}");
+ let val=BeforeFirst(AfterFirst(settings,"${"),"}");
let obj=document.getElementById("prop_"+this.uid+"_"+val);
if(obj!=null){
- xmlString=sub1+obj.value+sub2;
+ settings=sub1+obj.value+sub2;
}else{
- xmlString=sub1+sub2;
+ settings=sub1+sub2;
}
}
let rec=new SRec();
+ rec.opener=this;
rec.create();
- rec.f_Settings=xmlString;
+ rec.f_State=1;
+ rec.f_PropName=nodeProp.getAttribute("n");
+ rec.f_Settings=settings;
rec.f_TypeName=TypeName;
rec.win.setLeftTop(pageX-250,pageY-10);
rec.win.setParent(this.win);
@@ -1247,11 +1233,11 @@ class EdtRec
let node=findFirstNodeOnAttribute(this.nodeMetadata,'prop','n',prop_id);
if(node!==null)
{
- getCdata(node).nodeValue=id;
let name=node.getAttribute("FieldCaption");
+ getCdata(node).nodeValue=id;
//We request data from the server to fill in the comments on the id of the record.
let prop=document.getElementById("prop_"+this.uid+"_"+prop_id);
- if(prop!==null) prop.value=id;
+ if(prop!==null) prop.value = id;
//Request a comment on the record id from the server
let xml = '';
if(filter!=''){
diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js
index d08fc15..79870fa 100644
--- a/metadata/dbms/showrecord.js
+++ b/metadata/dbms/showrecord.js
@@ -422,9 +422,7 @@ class SRec
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+'_'+column_n);
- if(prop!==null) {
- prop.value = id;
- }
+ if(prop!==null) prop.value = id;
//Request a comment on the record id from the server
let xml = '';
if(filter!=''){
@@ -880,7 +878,7 @@ class SRec
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;";
- button.onclick=function(thiz,val1,val2){return function(){thiz.SelectObjects(val1,val2);};}(this,object,columnNode.getAttribute("n"));
+ button.onclick=function(thiz,val){return function(){thiz.SelectObjects(val);};}(this,columnNode.getAttribute("n"));
newCell2.appendChild(button);
//I collect values from XML and inserting a request to the server (to fill out the dropdown).
@@ -950,9 +948,9 @@ class SRec
button.setAttribute("type","button");
button.setAttribute("value","...");
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"));
+ button.onclick=function(thiz,val)
+ { return function(){thiz.SelectObjects(val);};
+ }(this,columnNode.getAttribute("n"));
newCell2.appendChild(button);
//If the field is filled then we request the field header by its id
@@ -1375,35 +1373,56 @@ 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)
+ SelectObjects(propname)
{
+ let nodeColu=findNodeOnPath(this.nodeMetadata, "type/objects-list/filter/column[@n='"+propname+"']");
+ if(nodeColu!=null)
+ this.callWindowF(nodeColu);
+ }
+
+ //Call the ShowRecord window with the parameters for the filter (not just the object name).
+ callWindowF(nodeColu)
+ {
+ let settings="";
+ let TypeName="";
+ let nT=findNode(nodeColu, "type");
+ if(nT!=null)
+ {
+ settings=getXMLNodeSerialisation(nT);
+ TypeName = nT.getAttribute("n");
+ }else
+ {
+ TypeName=nodeColu.getAttribute("object");
+ }
+ //Write to XML string from GUI
+ while(true)
+ {
+ let sub1=BeforeFirst(settings,"${");
+ if(sub1==null) break;
+ let sub2=AfterFirst(settings,"}");
+ if(sub2==null) break;
+ let val=BeforeFirst(AfterFirst(settings,"${"),"}");
+ let obj=document.getElementById("filter_"+this.uid+"_"+val);
+ if(obj!=null){
+ settings=sub1+obj.value+sub2;
+ }else{
+ settings=sub1+sub2;
+ }
+ }
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.f_State=1; TODO then finish the job
+ //rec.f_PropName=nodeColu.getAttribute("n");
+ rec.f_Settings=settings;
+ rec.f_TypeName=TypeName;
+ 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);
+ if(rec.request.callServer(ScriptName,''))
+ {
+ rec.showProgressBar();
}
-
- 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
@@ -1426,9 +1445,9 @@ class SRec
//wishWin = window.open("showrecord.html?name="+typeName,typeName,"width=800,height=600,menubar=no,location=no,resizable=yes,scrollbars=yes");
let rec=new SRec();
rec.create();
+ //rec.f_State=1; not used
+ //rec.f_PropName=propname; not used
rec.f_Settings=xmlString;
- //rec.f_State=state;
- //rec.f_PropName=propname;
rec.f_TypeName=typeName;
rec.win.setLeftTop(pageX-250,pageY-10);
rec.win.setParent(this.win);
diff --git a/metadata/qrcode.js b/metadata/qrcode.js
index 5507c15..68f6121 100644
--- a/metadata/qrcode.js
+++ b/metadata/qrcode.js
@@ -378,7 +378,7 @@ var QRCode;
var _oContext = this._oContext;
var _htOption = this._htOption;
- var nCount = oQRCode.getModuleCount();
+ var nCount = oQRCode.getModuleCount()+2;
var nWidth = _htOption.width / nCount;
var nHeight = _htOption.height / nCount;
var nRoundedWidth = Math.round(nWidth);
@@ -389,7 +389,9 @@ var QRCode;
for (var row = 0; row < nCount; row++) {
for (var col = 0; col < nCount; col++) {
- var bIsDark = oQRCode.isDark(row, col);
+ var bIsDark;
+ if(row==0 || row==nCount-1 || col==0 || col==nCount-1) bIsDark = false;
+ else bIsDark = oQRCode.isDark(row-1, col-1);
var nLeft = col * nWidth;
var nTop = row * nHeight;
_oContext.strokeStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
@@ -397,7 +399,7 @@ var QRCode;
_oContext.fillStyle = bIsDark ? _htOption.colorDark : _htOption.colorLight;
_oContext.fillRect(nLeft, nTop, nWidth, nHeight);
- // 안티 앨리어싱 방지 처리
+ // обработка сглаживания
_oContext.strokeRect(
Math.floor(nLeft) + 0.5,
Math.floor(nTop) + 0.5,