From dd0a3f17ea4493e6293b3817144da4d34ecb9b4c Mon Sep 17 00:00:00 2001 From: Igor I Date: Mon, 25 Mar 2024 20:27:33 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=81=D0=BB=D0=B5=D0=B4=D0=BE?= =?UTF-8?q?=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metadata/dbms/editrecord.js | 7 ++++--- metadata/dbms/showrecord.js | 8 +++++++- metadata/dbms/tools.js | 3 ++- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/metadata/dbms/editrecord.js b/metadata/dbms/editrecord.js index 229f834..ad7af25 100644 --- a/metadata/dbms/editrecord.js +++ b/metadata/dbms/editrecord.js @@ -8,10 +8,11 @@ function setPropVal(uid,id,c,p){ var ERec_mas = new Array(); //List of all ERec objects (TODO then you better come up with something). -class EdtRec +class EdtRec extends TWin { - constructor(caption) + constructor(caption,dialog,path) { + super(dialog,path); this.uid=getUID(); this.record_id=null; @@ -19,6 +20,7 @@ class EdtRec this.win.BuildGUI(pageX-10,pageY-10); this.win.setSize("500px","150px"); this.win.setContent('
'); + this.win.obj=this; let eDiv=document.getElementById('eDiv'+this.uid); eDiv.innerHTML = '
' @@ -26,7 +28,6 @@ class EdtRec this.caption=caption; if(this.caption!='') this.win.setCaption(this.caption); - this.win.obj=this; this.win.hide(false); this.name="name"+this.uid; diff --git a/metadata/dbms/showrecord.js b/metadata/dbms/showrecord.js index b3aa7e1..bcb6a60 100644 --- a/metadata/dbms/showrecord.js +++ b/metadata/dbms/showrecord.js @@ -13,8 +13,9 @@ var SRec_mas = new Array(); //List of all objects "EdtRec" (then something bette class SRec extends TWin { - constructor() + constructor(dialog,path) { + super(dialog,path); this.win=null; this.rwin=null; @@ -45,6 +46,11 @@ class SRec extends TWin this.onUpdate=null; //For call set function this.onInsert=null; //For call set function + + + //TODO сделать наследование из класса TWin + this.parent=null; //родительское окно + this.childs=new Array(); //Подчинёные окна } applyReq(req,fn,node,xmldoc) diff --git a/metadata/dbms/tools.js b/metadata/dbms/tools.js index a2c436d..6d5ec1d 100644 --- a/metadata/dbms/tools.js +++ b/metadata/dbms/tools.js @@ -1373,6 +1373,8 @@ class TWin { constructor(dialog,path) { + this.uid=getUID(); //Уникальныйидентификатор + this.dialog=dialog; //Показывать окно как диалог (без возможности изменения размеров) if(typeof path !== 'undefined') this.path=path; @@ -1399,7 +1401,6 @@ class TWin this.ca=null; this.co=null; this.shadow = false; //Показывать ли тень вокруг окошка - this.uid=getUID(); //Уникальныйидентификатор this.pBarCnt=0; //Прогресс бар this.pBarDiv=null; //Прогресс бар