diff --git a/APPL/API2/model_alg_kenmerk.inc b/APPL/API2/model_alg_kenmerk.inc
index d63246ec10..5a6720c41b 100644
--- a/APPL/API2/model_alg_kenmerk.inc
+++ b/APPL/API2/model_alg_kenmerk.inc
@@ -122,7 +122,7 @@ function model_alg_kenmerk(niveau)
"label": L("mgt_srtkenmerk_nmax"),
"typ": "number"
},
- "attributedomain": {
+ "domain": {
"dbs": "fac_kenmerkdomein_key",
"label": L("mgt_kenmerkdomein_key"),
"typ": "key",
@@ -130,7 +130,7 @@ function model_alg_kenmerk(niveau)
"filter": "exact",
"LOVinit": ""
},
- "default": {
+ "propertydefault": {
"dbs": "alg_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
diff --git a/APPL/API2/model_bes_kenmerk.inc b/APPL/API2/model_bes_kenmerk.inc
index e10b46bf21..5b7c6b90c3 100644
--- a/APPL/API2/model_bes_kenmerk.inc
+++ b/APPL/API2/model_bes_kenmerk.inc
@@ -47,7 +47,7 @@ function model_bes_kenmerk()
},
"filter": "exact"
},
- "propertytype": {
+ "orderpropertytype": {
"dbs": "bes_srtkenmerk_key",
"label": L("mgt_srtkenmerk_key"),
"typ": "key",
@@ -165,6 +165,43 @@ function model_bes_kenmerk()
};
+ function buildBESKenmerkNiveauList()
+ {
+ return "D;"+L("bes_ins_discipline_key")
+ + ";G;"+L("bes_srtgroep")
+ + ";S;"+L("bes_srtdeel");
+ }
+
+
+ this.hook_pre_edit = function (obj, fld)
+ {
+ if (obj.id == -1)
+ {
+ fld.orderarticlegroup.foreign.where = "bes_srtgroep_key IS NULL";
+ fld.orderarticle.foreign.where = "bes_srtdeel_key IS NULL"; // Geen artikelen ophalen: zijn er veel te veel.
+ }
+ %>
+
+ <%
+ }
+
+ this.hook_pre_post = function (params, jsondata)
+ {
+ var checkdata = { module: "bes",
+ srtkenmerk: true,
+ key: jsondata.propertytype,
+ value: jsondata.propertydefault
+ };
+ checkSrtkenmerkValue(checkdata);
+ if (checkdata.err != "")
+ abort_with_warning(checkdata.err);
+
+ jsondata.propertydefault = checkdata.value;
+ }
+
+
var ext_sql = "(SELECT DISTINCT"
+ " B.bes_kenmerk_key"
+ " , S.bes_srtkenmerk_omschrijving"
diff --git a/APPL/API2/model_bes_kenmerkbestel.inc b/APPL/API2/model_bes_kenmerkbestel.inc
index 69283ab235..1dc64d2089 100644
--- a/APPL/API2/model_bes_kenmerkbestel.inc
+++ b/APPL/API2/model_bes_kenmerkbestel.inc
@@ -49,7 +49,7 @@ function model_bes_kenmerkbestel()
"LOVinit": "",
"defaultvalue": null
},
- "propertytype": {
+ "orderpropertytype": {
"dbs": "bes_srtkenmerk_key",
"label": L("mgt_srtkenmerk_key"),
"typ": "key",
@@ -109,7 +109,7 @@ function model_bes_kenmerkbestel()
"label": L("mgt_kenmerk_toonbaar"),
"typ": "check"
},
- "default": {
+ "propertydefault": {
"dbs": "bes_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
@@ -129,6 +129,30 @@ function model_bes_kenmerkbestel()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ %>
+
+ <%
+ }
+
+ this.hook_pre_post = function (params, jsondata)
+ {
+ var checkdata = { module: "bes",
+ srtkenmerk: true,
+ key: jsondata.propertytype,
+ value: jsondata.propertydefault
+ };
+ checkSrtkenmerkValue(checkdata);
+ if (checkdata.err != "")
+ abort_with_warning(checkdata.err);
+
+ jsondata.propertydefault = checkdata.value;
+ }
+
+
this.REST_GET = generic_REST_GET(this, {
"GET": {
"tables": [
diff --git a/APPL/API2/model_bes_srtkenmerk.inc b/APPL/API2/model_bes_srtkenmerk.inc
index 0c84494d11..bde4b8d1ae 100644
--- a/APPL/API2/model_bes_srtkenmerk.inc
+++ b/APPL/API2/model_bes_srtkenmerk.inc
@@ -42,7 +42,7 @@ function model_bes_srtkenmerk()
"translate": true,
"filter": "like"
},
- "propertytype": {
+ "attributetype": {
"dbs": "bes_srtkenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -86,6 +86,19 @@ function model_bes_srtkenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var kenmerktype = (obj.attributetype ? obj.attributetype.id : "");
+ fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
+ %>
+
+ <%
+ }
+
+
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
diff --git a/APPL/API2/model_bez_kenmerk.inc b/APPL/API2/model_bez_kenmerk.inc
index 60dd96b1b4..53a4674d2c 100644
--- a/APPL/API2/model_bez_kenmerk.inc
+++ b/APPL/API2/model_bez_kenmerk.inc
@@ -15,10 +15,10 @@
function model_bez_kenmerk()
{
+ this.records_name = "visitorproperties";
+ this.record_name = "visitorproperty";
this.table = "bez_kenmerk";
this.primary = "bez_kenmerk_key";
- this.records_name = "bez_kenmerks";
- this.record_name = "bez_kenmerk";
this.soft_delete = "bez_kenmerk_verwijder";
this.autfunction = "WEB_PRSSYS";
this.record_title = L("mgt_kenmerk");
@@ -28,7 +28,7 @@ function model_bez_kenmerk()
this.fields = {
"id": {
"dbs": "bez_kenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -59,7 +59,7 @@ function model_bez_kenmerk()
"typ": "varchar",
"translate": true
},
- "property_type": {
+ "attributetype": {
"dbs": "bez_kenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -74,7 +74,7 @@ function model_bez_kenmerk()
"LOV": buildVerplichtingList(),
"emptyoption": null
},
- "property_group": {
+ "group": {
"dbs": "bez_kenmerk_groep",
"label": L("mgt_kenmerk_groep"),
"typ": "key",
@@ -120,7 +120,7 @@ function model_bez_kenmerk()
"filter": "exact",
"LOVinit": ""
},
- "default": {
+ "propertydefault": {
"dbs": "bez_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
@@ -134,6 +134,19 @@ function model_bez_kenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var kenmerktype = (obj.property_type ? obj.attributetype.id : "");
+ fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
+ %>
+
+ <%
+ }
+
+
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
diff --git a/APPL/API2/model_cad_label.inc b/APPL/API2/model_cad_label.inc
index 515388b7dd..1307910087 100644
--- a/APPL/API2/model_cad_label.inc
+++ b/APPL/API2/model_cad_label.inc
@@ -11,14 +11,15 @@
Notes:
*/
%>
+
<%
function model_cad_label()
{
+ this.records_name = "graphiclabels";
+ this.record_name = "graphiclabel";
this.table = "cad_label";
this.primary = "cad_label_key";
- this.records_name = "cad_labels";
- this.record_name = "cad_label";
this.autfunction = "WEB_CADMGT";
this.record_title = L("cad_label");
this.records_title = L("cad_label_m");
@@ -27,7 +28,7 @@ function model_cad_label()
this.fields = {
"id": {
"dbs": "cad_label_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -39,7 +40,7 @@ function model_cad_label()
"typ": "varchar",
"translate": true
},
- "view_name": {
+ "viewname": {
"dbs": "cad_label_view",
"label": L("cad_label_view"),
"typ": "varchar",
@@ -64,23 +65,23 @@ function model_cad_label()
"foreign": "fac_functie",
"LOVinit": ""
},
- "type_place": {
+ "position": {
"dbs": "plaats.waar",
"label": L("cad_label_type_waar"),
"typ": "varchar",
"hidden_fld": true,
- "LOV": type_place_LOV(),
+ "LOV": buildCadPositionLOV(),
"filter": "exact"
},
- "type_situation": {
+ "situation": {
"dbs": "plaats.situatie",
"label": L("cad_label_type_situatie"),
"typ": "varchar",
"hidden_fld": true,
- "LOV": type_situation_LOV(),
+ "LOV": buildCadSituationLOV(),
"filter": "exact"
},
- "label_type": {
+ "labeltype": {
"dbs": "cad_label_type",
"label": L("cad_label_type"),
"typ": "number",
@@ -135,6 +136,19 @@ function model_cad_label()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var labeltype = obj.labeltype;
+ var situatie = (labeltype & 4 ? "scenario" : "actueel");
+
+ %>
+
+ <%
+ }
+
+
var ext_sql = "(SELECT BITAND(cad_label_type, 27) waar"
+ " , BITAND(cad_label_type, 4) situatie"
+ " , cad_label_key"
@@ -150,20 +164,5 @@ function model_cad_label()
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this);
-
-
- function type_place_LOV()
- {
- return "1;" + L("cad_label_type_bi_rui")
- + ";9;" + L("cad_label_type_bi_wp")
- + ";17;" + L("cad_label_type_bi_obj")
- + ";2;" + L("cad_label_type_bu_ts")
- + ";18;" + L("cad_label_type_bu_obj");
- }
- function type_situation_LOV()
- {
- return "0;" + L("cad_label_type_si_act")
- + ";4;" + L("cad_label_type_si_sce");
- }
}
%>
\ No newline at end of file
diff --git a/APPL/API2/model_cad_legenda.inc b/APPL/API2/model_cad_legenda.inc
index cb2b7a4a10..5835ee8611 100644
--- a/APPL/API2/model_cad_legenda.inc
+++ b/APPL/API2/model_cad_legenda.inc
@@ -16,8 +16,8 @@
function model_cad_legenda()
{
- this.records_name = "legendas";
- this.record_name = "legenda";
+ this.records_name = "graphiclegendas";
+ this.record_name = "graphiclegenda";
this.table = "cad_legenda";
this.primary = "cad_legenda_key";
this.autfunction = "WEB_CADMGT";
@@ -28,7 +28,7 @@ function model_cad_legenda()
this.fields = {
"id": {
"dbs": "cad_legenda_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -52,7 +52,7 @@ function model_cad_legenda()
this.includes = {
"cad_values": {
"model": new model_cad_legendawaarde(),
- "joinfield": "legendas"
+ "joinfield": "graphiclegenda"
}
};
diff --git a/APPL/API2/model_cad_legendawaarde.inc b/APPL/API2/model_cad_legendawaarde.inc
index 9da1a40678..096848a803 100644
--- a/APPL/API2/model_cad_legendawaarde.inc
+++ b/APPL/API2/model_cad_legendawaarde.inc
@@ -15,10 +15,10 @@
function model_cad_legendawaarde()
{
+ this.records_name = "graphiclegendavalues";
+ this.record_name = "graphiclegendavalue";
this.table = "cad_legendawaarde";
this.primary = "cad_legendawaarde_key";
- this.records_name = "cad_legendawaardes";
- this.record_name = "cad_legendawaarde";
this.autfunction = "WEB_CADMGT";
this.record_title = L("cad_legendawaarde");
this.records_title = L("cad_legendawaarde_m");
@@ -27,13 +27,13 @@ function model_cad_legendawaarde()
this.fields = {
"id": {
"dbs": "cad_legendawaarde_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "cad_s_cad_legendawaarde_key"
},
- "legendas": {
+ "graphiclegenda": {
"dbs": "cad_legenda_key",
"label": L("cad_legenda"),
"typ": "key",
@@ -68,7 +68,7 @@ function model_cad_legendawaarde()
this.list = {
"columns": [
"id",
- "legendas",
+ "graphiclegenda",
"name",
"description",
"rgb"
diff --git a/APPL/API2/model_cad_thema.inc b/APPL/API2/model_cad_thema.inc
index fceaf05e0d..bc6d58c091 100644
--- a/APPL/API2/model_cad_thema.inc
+++ b/APPL/API2/model_cad_thema.inc
@@ -11,14 +11,15 @@
Notes: TODO: JGL: Ik ben er nog niet helemaal uit hoe de bitjes netjes op te lossen
*/
%>
+
<%
function model_cad_thema()
{
+ this.records_name = "graphicthemes";
+ this.record_name = "graphictheme";
this.table = "cad_thema";
this.primary = "cad_thema_key";
- this.records_name = "cad_themas";
- this.record_name = "cad_thema";
this.autfunction = "WEB_CADMGT";
this.record_title = L("cad_thema");
this.records_title = L("cad_thema_m");
@@ -27,7 +28,7 @@ function model_cad_thema()
this.fields = {
"id": {
"dbs": "cad_thema_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -40,13 +41,13 @@ function model_cad_thema()
"translate": true,
"filter": "like"
},
- "view_name": {
+ "viewname": {
"dbs": "cad_thema_view",
"label": L("cad_label_view"),
"typ": "varchar",
"filter": "like"
},
- "legendas": {
+ "graphiclegenda": {
"dbs": "cad_legenda_key",
"label": L("cad_legenda"),
"typ": "key",
@@ -66,23 +67,23 @@ function model_cad_thema()
"foreign": "fac_functie",
"LOVinit": ""
},
- "type_place": {
+ "position": {
"dbs": "plaats.waar",
"label": L("cad_label_type_waar"),
"typ": "varchar",
"hidden_fld": true,
- "LOV": type_place_LOV(),
+ "LOV": buildCadPositionLOV(),
"filter": "exact"
},
- "type_situation": {
+ "situation": {
"dbs": "plaats.situatie",
"label": L("cad_label_type_situatie"),
"typ": "varchar",
"hidden_fld": true,
- "LOV": type_situation_LOV(),
+ "LOV": buildCadSituationLOV(),
"filter": "exact"
},
- "thema_type": {
+ "themetype": {
"dbs": "cad_thema_type",
"label": L("cad_label_type"),
"typ": "number",
@@ -149,7 +150,7 @@ function model_cad_thema()
}
]
},
- "thema_url": {
+ "themeurl": {
"dbs": "cad_thema_onclick_url",
"label": L("cad_thema_onclick_url"),
"typ": "varchar"
@@ -169,6 +170,16 @@ function model_cad_thema()
};
+ this.hook_pre_put = function(params, jsondata, key)
+ { // update
+ refresh_legenda(jsondata);
+ }
+ this.hook_pre_post = function(params, jsondata)
+ { // insert
+ refresh_legenda(jsondata);
+ }
+
+
var ext_sql = "(SELECT BITAND(cad_thema_type, 27) waar"
+ " , BITAND(cad_thema_type, 4) situatie"
+ " , cad_thema_key"
@@ -182,20 +193,5 @@ function model_cad_thema()
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
this.REST_DELETE = generic_REST_DELETE(this);
-
-
- function type_place_LOV()
- {
- return "1;" + L("cad_label_type_bi_rui")
- + ";9;" + L("cad_label_type_bi_wp")
- + ";17;" + L("cad_label_type_bi_obj")
- + ";2;" + L("cad_label_type_bu_ts")
- + ";18;" + L("cad_label_type_bu_obj");
- }
- function type_situation_LOV()
- {
- return "0;" + L("cad_label_type_si_act")
- + ";4;" + L("cad_label_type_si_sce");
- }
}
%>
\ No newline at end of file
diff --git a/APPL/API2/model_cnt_disc_params.inc b/APPL/API2/model_cnt_disc_params.inc
index 1c8da47a5c..176cb6a3b9 100644
--- a/APPL/API2/model_cnt_disc_params.inc
+++ b/APPL/API2/model_cnt_disc_params.inc
@@ -14,27 +14,27 @@
<%
model_cnt_disc_params =
{
- "table": "cnt_disc_params",
- "primary": "cnt_disc_params_key",
"records_name": "cnt_disc_params",
"record_name": "cnt_disc_params",
+ "table": "cnt_disc_params",
+ "primary": "cnt_disc_params_key",
"autfunction": "WEB_CNTMGT",
"fields": {
"id": {
"dbs": "cnt_disc_params_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"seq": "cnt_s_cnt_disc_params_key"
},
- "cnt_ins_discipline_key": {
+ "contractdiscipline": {
"dbs": "cnt_ins_discipline_key",
"label": "Foreign key",
"typ": "key",
"hidden_fld": true
},
- "invoice_type": {
+ "contracttype": {
"dbs": "cnt_srtcontract_type",
"label": L("cnt_discipline_cnt_disckey"),
"typ": "key",
@@ -45,7 +45,7 @@ model_cnt_disc_params =
"desc": "cnt_typecontract_omschrijving"
}
},
- "invoice_schedule": {
+ "schedule": {
"dbs": "cnt_disc_params_factuurschema",
"label": L("cnt_discipline_factuurschema"),
"typ": "check0"
diff --git a/APPL/API2/model_cnt_kenmerk.inc b/APPL/API2/model_cnt_kenmerk.inc
index 2eab3658e9..33c512e061 100644
--- a/APPL/API2/model_cnt_kenmerk.inc
+++ b/APPL/API2/model_cnt_kenmerk.inc
@@ -15,10 +15,10 @@
function model_cnt_kenmerk()
{
+ this.records_name = "contractproperties";
+ this.record_name = "contractproperty";
this.table = "cnt_kenmerk";
this.primary = "cnt_kenmerk_key";
- this.records_name = "cnt_kenmerks";
- this.record_name = "cnt_kenmerk";
this.soft_delete = "cnt_kenmerk_verwijder";
this.autfunction = "WEB_CNTMGT";
this.record_title = L("cnt_kenmerk");
@@ -28,14 +28,14 @@ function model_cnt_kenmerk()
this.fields = {
"id": {
"dbs": "cnt_kenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "cnt_s_cnt_kenmerk_key",
"readonly": true
},
- "property_key": {
+ "contractpropertytype": {
"dbs": "cnt_srtkenmerk_key",
"label": L("mgt_srtkenmerk_key"),
"typ": "key",
@@ -54,7 +54,7 @@ function model_cnt_kenmerk()
"LOVinit": "",
"friendlyname": true
},
- "property_type": {
+ "attributetypehide": {
"dbs": "cnt_srtkenmerk.cnt_srtkenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -62,7 +62,7 @@ function model_cnt_kenmerk()
"LOV": buildKenmerktypeLOV(),
"filter": "exact"
},
- "contract_type": {
+ "contractdiscipline": {
"dbs": "cnt_srtcontract_key",
"label": L("cnt_srtcontract_key"),
"typ": "key",
@@ -79,7 +79,7 @@ function model_cnt_kenmerk()
"filter": "exact",
"LOVinit": ""
},
- "cnt_kenmerk_niveau": {
+ "level": {
"dbs": "cnt_kenmerk_niveau",
"label": L("mgt_kenmerk_niveau"),
"typ": "varchar",
@@ -93,7 +93,7 @@ function model_cnt_kenmerk()
"typ": "number",
"required": true
},
- "cnt_kenmerk_locatiekolom": {
+ "location": {
"dbs": "cnt_kenmerk_locatiekolom",
"label": L("ins_kenmerk_locatiekolom"),
"typ": "varchar",
@@ -106,7 +106,7 @@ function model_cnt_kenmerk()
"LOV": buildVerplichtingList(),
"emptyoption": null
},
- "property_group": {
+ "group": {
"dbs": "cnt_kenmerk_groep",
"label": L("mgt_kenmerk_groep"),
"typ": "key",
@@ -119,7 +119,7 @@ function model_cnt_kenmerk()
"label": L("mgt_kenmerk_toonbaar"),
"typ": "check"
},
- "default": {
+ "propertydefault": {
"dbs": "cnt_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
@@ -139,6 +139,16 @@ function model_cnt_kenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ %>
+
+ <%
+ }
+
+
this.REST_GET = generic_REST_GET(this, {
"GET": {
"tables": [ "cnt_srtkenmerk"],
diff --git a/APPL/API2/model_cnt_srtkenmerk.inc b/APPL/API2/model_cnt_srtkenmerk.inc
index 5f6e96d5f6..82fdcafc24 100644
--- a/APPL/API2/model_cnt_srtkenmerk.inc
+++ b/APPL/API2/model_cnt_srtkenmerk.inc
@@ -15,10 +15,10 @@
function model_cnt_srtkenmerk()
{
+ this.records_name = "contractpropertytypes";
+ this.record_name = "contractpropertytype";
this.table = "cnt_srtkenmerk";
this.primary = "cnt_srtkenmerk_key";
- this.records_name = "cnt_srtkenmerks";
- this.record_name = "cnt_srtkenmerk";
this.soft_delete = "cnt_srtkenmerk_verwijder";
this.autfunction = "WEB_CNTMGT";
this.record_title = L("mgt_srtkenmerk");
@@ -28,7 +28,7 @@ function model_cnt_srtkenmerk()
this.fields = {
"id": {
"dbs": "cnt_srtkenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -42,7 +42,7 @@ function model_cnt_srtkenmerk()
"required": true,
"filter": "like"
},
- "property_type": {
+ "attributetype": {
"dbs": "cnt_srtkenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -92,6 +92,18 @@ function model_cnt_srtkenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var kenmerktype = (obj.attributetype ? obj.attributetype.id : "");
+ fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
+ %>
+
+ <%
+ }
+
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
diff --git a/APPL/API2/model_faq_kenmerk.inc b/APPL/API2/model_faq_kenmerk.inc
index 4e2b200ee0..17449b373a 100644
--- a/APPL/API2/model_faq_kenmerk.inc
+++ b/APPL/API2/model_faq_kenmerk.inc
@@ -15,10 +15,10 @@
function model_faq_kenmerk()
{
+ this.records_name = "knowledgeproperties";
+ this.record_name = "knowledgeproperty";
this.table = "faq_kenmerk";
this.primary = "faq_kenmerk_key";
- this.records_name = "faq_kenmerks";
- this.record_name = "faq_kenmerk";
this.soft_delete = "faq_kenmerk_verwijder";
this.autfunction = "WEB_FAQMGT";
this.record_title = L("mgt_kenmerk");
@@ -28,7 +28,7 @@ function model_faq_kenmerk()
this.fields = {
"id": {
"dbs": "faq_kenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"filter": "exact",
"seq": "faq_s_faq_kenmerk_key"
@@ -58,7 +58,7 @@ function model_faq_kenmerk()
"typ": "varchar",
"translate": true
},
- "property_type": {
+ "attributetype": {
"dbs": "faq_kenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -72,7 +72,7 @@ function model_faq_kenmerk()
"LOV": buildVerplichtingList(),
"emptyoption": null
},
- "property_groep": {
+ "group": {
"dbs": "faq_kenmerk_groep",
"label": L("mgt_kenmerk_groep"),
"typ": "key",
@@ -118,7 +118,7 @@ function model_faq_kenmerk()
"filter": "exact",
"LOVinit": ""
},
- "default": {
+ "propertydefault": {
"dbs": "faq_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
@@ -132,6 +132,18 @@ function model_faq_kenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var kenmerktype = (obj.attributetype ? obj.attributetype.id : "");
+ fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
+ %>
+
+ <%
+ }
+
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
diff --git a/APPL/API2/model_fin_kenmerk.inc b/APPL/API2/model_fin_kenmerk.inc
index 76d8308a44..c3348769a9 100644
--- a/APPL/API2/model_fin_kenmerk.inc
+++ b/APPL/API2/model_fin_kenmerk.inc
@@ -15,10 +15,10 @@
function model_fin_kenmerk()
{
+ this.records_name = "invoiceproperties";
+ this.record_name = "invoiceproperty";
this.table = "fin_kenmerk";
this.primary = "fin_kenmerk_key";
- this.records_name = "fin_kenmerks";
- this.record_name = "fin_kenmerk";
this.soft_delete = "fin_kenmerk_verwijder";
this.autfunction = "WEB_PRSSYS";
this.record_title = L("fin_kenmerk");
@@ -27,7 +27,7 @@ function model_fin_kenmerk()
this.fields = {
"id": {
"dbs": "fin_kenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -58,14 +58,14 @@ function model_fin_kenmerk()
"typ": "varchar",
"translate": true
},
- "property_type": {
+ "attributetype": {
"dbs": "fin_kenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
"required": true,
"LOV": buildKenmerktypeLOV()
},
- "kenmerk_type": {
+ "propertytype": {
"dbs": "fin_kenmerk_type",
"label": L("fin_kenmerk_type"),
"typ": "varchar",
@@ -79,7 +79,7 @@ function model_fin_kenmerk()
"LOV": buildVerplichtingList(),
"emptyoption": null
},
- "property_groep": {
+ "group": {
"dbs": "fin_kenmerk_groep",
"label": L("mgt_kenmerk_groep"),
"typ": "key",
@@ -117,7 +117,7 @@ function model_fin_kenmerk()
"label": L("mgt_srtkenmerk_nmax"),
"typ": "number"
},
- "domein": {
+ "domain": {
"dbs": "fac_kenmerkdomein_key",
"label": L("fac_kenmerkdomein_key"),
"typ": "key",
@@ -125,7 +125,7 @@ function model_fin_kenmerk()
"filter": "exact",
"LOVinit": ""
},
- "default": {
+ "propertydefault": {
"dbs": "fin_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
@@ -139,6 +139,19 @@ function model_fin_kenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var kenmerktype = (obj.attributetype ? obj.attributetype.id : "");
+ fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
+ %>
+
+ <%
+ }
+
+
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
diff --git a/APPL/API2/model_ins_kenmerk.inc b/APPL/API2/model_ins_kenmerk.inc
index 3f560d5eb9..ac336e9ee5 100644
--- a/APPL/API2/model_ins_kenmerk.inc
+++ b/APPL/API2/model_ins_kenmerk.inc
@@ -16,10 +16,10 @@
function model_ins_kenmerk(fnparams)
{
+ this.records_name = "objectproperties";
+ this.record_name = "objectproperty";
this.table = "ins_kenmerk";
this.primary = "ins_kenmerk_key";
- this.records_name = "ins_kenmerks";
- this.record_name = "ins_kenmerk";
this.soft_delete = "ins_kenmerk_verwijder";
this.autfunction = "WEB_INSMGT";
this.record_title = L("ins_kenmerk");
@@ -29,14 +29,14 @@ function model_ins_kenmerk(fnparams)
this.fields = {
"id": {
"dbs": "ins_kenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "ins_s_ins_kenmerk_key",
"readonly": true
},
- "property_key": {
+ "objectpropertytype": {
"dbs": "ins_srtkenmerk_key",
"label": L("mgt_srtkenmerk_key"),
"typ": "key",
@@ -52,7 +52,7 @@ function model_ins_kenmerk(fnparams)
},
"filter": "exact"
},
- "object_discipline": {
+ "objectdiscipline": {
"dbs": "ins_v_allsrtinstallatie.ins_discipline_key",
"label": L("ins_srtinstallatie_discipline"),
"typ": "key",
@@ -63,7 +63,7 @@ function model_ins_kenmerk(fnparams)
"desc": "ins_discipline_omschrijving"
}
},
- "object_group": {
+ "objectgroup": {
"dbs": "ins_v_allsrtinstallatie.ins_srtgroep_key",
"label": L("ins_srtinstallatie_srtgroep"),
"typ": "key",
@@ -73,7 +73,7 @@ function model_ins_kenmerk(fnparams)
"desc": "ins_srtgroep_omschrijving"
}
},
- "object_type": {
+ "objecttype": {
"dbs": "ins_v_allsrtinstallatie.ins_srtdeel_key",
"label": L("ins_srtinstallatie_srtdeel"),
"typ": "key",
@@ -83,9 +83,9 @@ function model_ins_kenmerk(fnparams)
"desc": "ins_srtdeel_omschrijving"
}
},
- "object_key": {
+ "objecthide": {
"dbs": "ins_srtinstallatie_key",
- "label": "ins_srtinstallatie_key",
+ "label": L("lcl_ins_object"),
"typ": "key",
"hidden_fld": true,
"required": true,
@@ -103,7 +103,7 @@ function model_ins_kenmerk(fnparams)
"LOV": fill_ins_niveau_LOV(),
"defaultvalue": "C"
},
- "edit_level": {
+ "editlevel": {
"dbs": "ins_kenmerk_bewerkniveau",
"label": L("ins_kenmerk_bewerkniveau"),
"typ": "varchar",
@@ -125,7 +125,7 @@ function model_ins_kenmerk(fnparams)
"LOV": fill_verplicht_LOV(),
"emptyoption": L("lcl_mld_niet_verplicht")
},
- "property_group": {
+ "group": {
"dbs": "ins_kenmerk_groep",
"label": L("ins_kenmerk_groep"),
"typ": "key",
@@ -156,7 +156,7 @@ function model_ins_kenmerk(fnparams)
"label": L("ins_kenmerk_locatiekolom"),
"typ": "varchar"
},
- "default": {
+ "propertydefault": {
"dbs": "ins_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
@@ -178,24 +178,36 @@ function model_ins_kenmerk(fnparams)
this.list = {
"columns": ["id",
- "property_key",
+ "objectpropertytype",
"sequence",
"required",
- "property_group"
+ "propertygroup"
]
};
this.search = {
"autosearch": true,
"filters": ["level",
- "object_discipline",
- "object_group",
- "object_type",
- "property_key"
+ "objectdiscipline",
+ "objectgroup",
+ "objecttype",
+ "objectpropertytype"
]
};
this.edit = { modal: true};
+ if (mode != "save")
+ {
+ this.hook_pre_edit = function (obj, fld)
+ {
+ %>
+
+ <%
+ }
+ }
+
// Server side code!
//
@@ -205,13 +217,13 @@ function model_ins_kenmerk(fnparams)
var gparams = { GET: { } };
if (niveau == "C")
{
- this.list.columns.splice(2, 0, "object_key");
- delete this.fields.object_discipline;
- delete this.fields.object_group;
- delete this.fields.object_type;
- delete this.fields.edit_level;
+ this.list.columns.splice(2, 0, "objecthide");
+ delete this.fields.objectdiscipline;
+ delete this.fields.objectgroup;
+ delete this.fields.objecttype;
+ delete this.fields.editlevel;
delete this.fields.measurement;
- this.fields.object_key.label = L("ins_srtcontrole");
+ this.fields.objecthide.label = L("ins_srtcontrole");
this.record_title = L("ins_srtcontrole_kenmerk");
this.records_title = L("ins_srtcontrole_kenmerk_m");
gparams.GET = {wheres: [ "ins_kenmerk.ins_kenmerk_niveau = " + safe.quoted_sql(niveau)
@@ -223,9 +235,9 @@ function model_ins_kenmerk(fnparams)
{ //kenmerk_niveau: D | G | S
// Toevoegen extra kolommen voor niet-inspectie kenmerken.
// NB: Standaard in this.list opnemen en bij niveau=C verwijderen geeft fout op niet bestaande ins_discipline_key etc.
- this.list.columns.splice(2, 0, "object_type");
- this.list.columns.splice(2, 0, "object_group");
- this.list.columns.splice(2, 0, "object_discipline");
+ this.list.columns.splice(2, 0, "objecttype");
+ this.list.columns.splice(2, 0, "objectgroup");
+ this.list.columns.splice(2, 0, "objectdiscipline");
//
this.record_title = L("ins_kenmerk");
this.records_title = L("ins_kenmerk_m");
diff --git a/APPL/API2/model_ins_srtkenmerk.inc b/APPL/API2/model_ins_srtkenmerk.inc
index ca1f3530ff..ccde37ff94 100644
--- a/APPL/API2/model_ins_srtkenmerk.inc
+++ b/APPL/API2/model_ins_srtkenmerk.inc
@@ -15,10 +15,10 @@
function model_ins_srtkenmerk()
{
+ this.records_name = "objectpropertytypes";
+ this.record_name = "objectpropertytype";
this.table = "ins_srtkenmerk";
this.primary = "ins_srtkenmerk_key";
- this.records_name = "ins_srtkenmerks";
- this.record_name = "ins_srtkenmerk";
this.soft_delete = "ins_srtkenmerk_verwijder";
this.autfunction = "WEB_INSMGT";
this.record_title = L("mgt_srtkenmerk");
@@ -28,7 +28,7 @@ function model_ins_srtkenmerk()
this.fields = {
"id": {
"dbs": "ins_srtkenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -42,7 +42,7 @@ function model_ins_srtkenmerk()
"translate": true,
"filter": "like"
},
- "property_type": {
+ "attributetype": {
"dbs": "ins_srtkenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -92,6 +92,19 @@ function model_ins_srtkenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var kenmerktype = (obj.attributetype ? obj.attributetype.id : "");
+ fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
+ %>
+
+ <%
+ }
+
+
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
diff --git a/APPL/API2/model_mld_kenmerk.inc b/APPL/API2/model_mld_kenmerk.inc
index fcf287779a..bbf20421d5 100644
--- a/APPL/API2/model_mld_kenmerk.inc
+++ b/APPL/API2/model_mld_kenmerk.inc
@@ -18,10 +18,10 @@
function model_mld_kenmerk()
{
+ this.records_name = "issueproperties";
+ this.record_name = "issueproperty";
this.table = "mld_kenmerk";
this.primary = "mld_kenmerk_key";
- this.records_name = "mld_kenmerks";
- this.record_name = "mld_kenmerk";
this.soft_delete = "mld_kenmerk_verwijder";
this.autfunction = "WEB_MLDMGT";
this.record_title = L("mld_kenmerk");
@@ -31,7 +31,7 @@ function model_mld_kenmerk()
this.fields = {
"id": {
"dbs": "mld_kenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -46,7 +46,7 @@ function model_mld_kenmerk()
"hidden_fld": true,
"defaultvalue": "O"
},
- "type": {
+ "issuepropertytype": {
"dbs": "mld_srtkenmerk_key",
"label": L("mgt_srtkenmerk_key"),
"typ": "key",
@@ -65,7 +65,7 @@ function model_mld_kenmerk()
"LOVinit": "",
"friendlyname": true
},
- "order_type": {
+ "ordertype": {
"dbs": "mld_typeopdr_key",
"label": L("mld_typeopdr"),
"typ": "key",
@@ -94,7 +94,7 @@ function model_mld_kenmerk()
"LOV": buildGroepsverplichtingList(),
"defaultvalue": "0"
},
- "mld_kenmerk_locatiekolom": {
+ "location": {
"dbs": "mld_kenmerk_locatiekolom",
"label": L("mld_kenmerk_locatiekolom"),
"typ": "varchar",
@@ -107,7 +107,7 @@ function model_mld_kenmerk()
"LOV": buildVerplichtingList(),
"emptyoption": null
},
- "required_status": {
+ "requiredstatus": {
"dbs": "mld_kenmerk_verplicht_status",
"label": L("mld_kenmerk_verplicht_status"),
"typ": "key",
@@ -125,7 +125,7 @@ function model_mld_kenmerk()
"typ": "memo",
"translate": true
},
- "mld_stdmelding_key": {
+ "call": {
"dbs": "mld_stdmelding_key",
"label": L("mld_stdmelding_key"),
"typ": "key",
@@ -158,6 +158,16 @@ function model_mld_kenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ %>
+
+ <%
+ }
+
+
this.REST_GET = generic_REST_GET(this, {
"GET": {
"wheres": ["mld_kenmerk_niveau = 'O'"]
diff --git a/APPL/API2/model_mld_srtkenmerk.inc b/APPL/API2/model_mld_srtkenmerk.inc
index 59ad5538bf..108b7d4b5b 100644
--- a/APPL/API2/model_mld_srtkenmerk.inc
+++ b/APPL/API2/model_mld_srtkenmerk.inc
@@ -15,10 +15,10 @@
function model_mld_srtkenmerk()
{
+ this.records_name = "issuepropertytypes";
+ this.record_name = "issuepropertytype";
this.table = "mld_srtkenmerk";
this.primary = "mld_srtkenmerk_key";
- this.records_name = "mld_srtkenmerks";
- this.record_name = "mld_srtkenmerk";
this.soft_delete = "mld_srtkenmerk_verwijder";
this.autfunction = "WEB_MLDMGT";
this.record_title = L("mgt_srtkenmerk");
@@ -28,7 +28,7 @@ function model_mld_srtkenmerk()
this.fields = {
"id": {
"dbs": "mld_srtkenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -42,7 +42,7 @@ function model_mld_srtkenmerk()
"translate": true,
"filter": "like"
},
- "property_type": {
+ "attributetype": {
"dbs": "mld_srtkenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -92,6 +92,18 @@ function model_mld_srtkenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var kenmerktype = (obj.attributetype ? obj.attributetype.id : "");
+ fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
+ %>
+
+ <%
+ }
+
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
diff --git a/APPL/API2/model_prs_kenmerk.inc b/APPL/API2/model_prs_kenmerk.inc
index 158e864b21..618b5608fe 100644
--- a/APPL/API2/model_prs_kenmerk.inc
+++ b/APPL/API2/model_prs_kenmerk.inc
@@ -12,13 +12,14 @@
*/
%>
<%
+var niveau = getQParam("level"); // [ B | A | P | C ]
function model_prs_kenmerk(niveau)
{
+ this.records_name = "basisproperties";
+ this.record_name = "basisproperty";
this.table = "prs_kenmerk";
this.primary = "prs_kenmerk_key";
- this.records_name = "prs_kenmerks";
- this.record_name = "prs_kenmerk";
this.soft_delete = "prs_kenmerk_verwijder";
this.autfunction = "WEB_PRSSYS";
this.record_title = L("mgt_kenmerk") + " " + get_prs_naam(niveau);
@@ -28,13 +29,13 @@ function model_prs_kenmerk(niveau)
this.fields = {
"id": {
"dbs": "prs_kenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "prs_s_prs_kenmerk_key"
},
- "prs_kenmerk_niveau": {
+ "level": {
"dbs": "prs_kenmerk_niveau",
"label": L("mgt_kenmerk_niveau"),
"typ": "varchar",
@@ -67,7 +68,7 @@ function model_prs_kenmerk(niveau)
"typ": "varchar",
"translate": true
},
- "property_type": {
+ "attributetype": {
"dbs": "prs_kenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -81,7 +82,7 @@ function model_prs_kenmerk(niveau)
"LOV": buildVerplichtingList(),
"emptyoption": null
},
- "property_group": {
+ "group": {
"dbs": "prs_kenmerk_groep",
"label": L("mgt_kenmerk_groep"),
"typ": "key",
@@ -137,7 +138,7 @@ function model_prs_kenmerk(niveau)
"filter": "exact",
"LOVinit": ""
},
- "default": {
+ "propertydefault": {
"dbs": "prs_kenmerk_default",
"label": L("mgt_kenmerk_default"),
"typ": "memo",
@@ -151,6 +152,31 @@ function model_prs_kenmerk(niveau)
};
+ function fill_prs_niveau_LOV()
+ {
+ return "B;"+L("lcl_company")
+ + ";A;"+L("lcl_department")
+ + ";P;"+L("lcl_person")
+ + ";C;"+L("lcl_contact");
+ }
+
+
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var kenmerktype = (obj.attributetype ? obj.attributetype.id : "");
+ fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
+
+ if (obj.id != -1)
+ fld.position.foreign.readonly = true;
+ %>
+
+ <%
+ }
+
+
var gparams = {"GET": {}};
if (niveau)
{
diff --git a/APPL/API2/model_res_kenmerk.inc b/APPL/API2/model_res_kenmerk.inc
index 32b60dc05d..0098428407 100644
--- a/APPL/API2/model_res_kenmerk.inc
+++ b/APPL/API2/model_res_kenmerk.inc
@@ -14,10 +14,10 @@
<%
function model_res_kenmerk()
{
+ this.records_name = "bookingproperties";
+ this.record_name = "bookingproperty";
this.table = "res_kenmerk";
this.primary = "res_kenmerk_key";
- this.records_name = "res_kenmerks";
- this.record_name = "res_kenmerk";
this.soft_delete = "res_kenmerk_verwijder";
this.autfunction = "WEB_RESMGT";
this.record_title = L("res_kenmerk");
@@ -27,22 +27,22 @@ function model_res_kenmerk()
this.fields = {
"id": {
"dbs": "res_kenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
"seq": "res_s_res_kenmerk_key"
},
- "type": {
+ "bookingpropertytype": {
"dbs": "res_srtkenmerk_key",
"label": L("res_srtkenmerk_key"),
"typ": "key",
"required": true,
"foreign": {
- "tbl": "(select RES_SRTKENMERK_KEY, RES_SRTKENMERK_OMSCHRIJVING"
- + " from RES_SRTKENMERK"
- + " where RES_SRTKENMERK_VERWIJDER IS NULL"
- + " order by res_srtkenmerk_omschrijving asc)",
+ "tbl": "(SELECT res_srtkenmerk_key, res_srtkenmerk_omschrijving"
+ + " FROM res_srtkenmerk"
+ + " WHERE res_srtkenmerk_verwijder is null"
+ + " ORDER BY res_srtkenmerk_omschrijving ASC)",
"key": "res_srtkenmerk_key",
"desc": "res_srtkenmerk_omschrijving"
},
@@ -64,7 +64,7 @@ function model_res_kenmerk()
"typ": "number",
"required": true
},
- "res_activiteit_key": {
+ "bookingactivity": {
"dbs": "res_activiteit_key",
"label": L("res_activiteit_key"),
"typ": "key",
@@ -100,7 +100,7 @@ function model_res_kenmerk()
"label": L("res_kenmerk_toonbaar"),
"typ": "check"
},
- "default": {
+ "propertydefault": {
"dbs": "res_kenmerk_default",
"label": L("res_kenmerk_default"),
"typ": "memo",
@@ -120,6 +120,25 @@ function model_res_kenmerk()
};
+ function buildVerplichtingList()
+ { // LOV waarden voor required.
+ var s = ";" + L("res_kenmerk_verplicht_0")
+ + ";1;" + L("res_kenmerk_verplicht_1")
+ + ";2;" + L("res_kenmerk_verplicht_2");
+ return s;
+ }
+
+ function buildGroepsverplichtingList()
+ { // LOV waarden voor group.
+ var s = "0;";
+ for (var i=1; i<=9; i++)
+ {
+ s = s + ";" + i + ";" + L("res_kenmerk_groep") + " " + i;
+ }
+ return s;
+ }
+
+
this.REST_GET = generic_REST_GET(this, this.gparams);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
diff --git a/APPL/API2/model_res_srtkenmerk.inc b/APPL/API2/model_res_srtkenmerk.inc
index cdd4283cf4..af667fc027 100644
--- a/APPL/API2/model_res_srtkenmerk.inc
+++ b/APPL/API2/model_res_srtkenmerk.inc
@@ -14,10 +14,10 @@
<%
function model_res_srtkenmerk()
{
+ this.records_name = "bookingpropertytypes";
+ this.record_name = "bookingpropertytype";
this.table = "res_srtkenmerk";
this.primary = "res_srtkenmerk_key";
- this.records_name = "res_srtkenmerks";
- this.record_name = "res_srtkenmerk";
this.soft_delete = "res_srtkenmerk_verwijder";
this.autfunction = "WEB_RESMGT";
this.record_title = L("mgt_srtkenmerk");
@@ -26,7 +26,7 @@ function model_res_srtkenmerk()
this.fields = {
"id": {
"dbs": "res_srtkenmerk_key",
- "label": "Key",
+ "label": L("lcl_key"),
"typ": "key",
"required": true,
"filter": "exact",
@@ -41,7 +41,7 @@ function model_res_srtkenmerk()
"translate": true,
"filter": "like"
},
- "property_type": {
+ "attributetype": {
"dbs": "res_srtkenmerk_kenmerktype",
"label": L("mgt_srtkenmerk_kenmerktype"),
"typ": "varchar",
@@ -85,6 +85,19 @@ function model_res_srtkenmerk()
};
+ this.hook_pre_edit = function (obj, fld)
+ {
+ var kenmerktype = (obj.attributetype ? obj.attributetype.id : "");
+ fld.attributetype.LOV = buildKenmerktypeLOV(kenmerktype);
+ %>
+
+ <%
+ }
+
+
this.REST_GET = generic_REST_GET(this);
this.REST_POST = generic_REST_POST(this);
this.REST_PUT = generic_REST_PUT(this);
diff --git a/APPL/MGT/bes_kenmerk.asp b/APPL/MGT/bes_kenmerk.asp
index 197ae8a0a1..30fac551c7 100644
--- a/APPL/MGT/bes_kenmerk.asp
+++ b/APPL/MGT/bes_kenmerk.asp
@@ -6,49 +6,20 @@
<%
var this_model = new model_bes_kenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
- if (obj.id == -1)
- {
- fld.orderarticlegroup.foreign.where = "bes_srtgroep_key IS NULL";
- fld.orderarticle.foreign.where = "bes_srtdeel_key IS NULL"; // Geen artikelen ophalen: zijn er veel te veel.
- }
-%>
-
-<%
-}
-
-this_model.hook_pre_post = function (params, jsondata)
-{
- var checkdata = { module: "bes",
- srtkenmerk: true,
- key: jsondata.propertytype,
- value: jsondata.propertydefault
- };
- checkSrtkenmerkValue(checkdata);
- if (checkdata.err != "")
- abort_with_warning(checkdata.err);
-
- jsondata.propertydefault = checkdata.value;
-}
-
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"requires": { js: ["../mgt/bes_kenmerk.js"] },
"filters": [
- "propertytype",
+ "orderpropertytype",
"orderdiscipline"
]
},
"list": {
"columns": [
"id",
- "propertytype",
+ "orderpropertytype",
"sequence",
"level",
"orderdiscipline",
@@ -66,13 +37,4 @@ scaffolding(this_model,
},
"print": {}
});
-
-
- function buildBESKenmerkNiveauList()
- {
- return "D;"+L("bes_ins_discipline_key")
- + ";G;"+L("bes_srtgroep")
- + ";S;"+L("bes_srtdeel");
- }
-
%>
diff --git a/APPL/MGT/bes_kenmerkbestel.asp b/APPL/MGT/bes_kenmerkbestel.asp
index 10018f746c..6f50f6e07a 100644
--- a/APPL/MGT/bes_kenmerkbestel.asp
+++ b/APPL/MGT/bes_kenmerkbestel.asp
@@ -6,35 +6,12 @@
<%
var this_model = new model_bes_kenmerkbestel();
-this_model.hook_pre_edit = function (obj, fld)
-{
-%>
-
-<%
-}
-
-this_model.hook_pre_post = function (params, jsondata)
-{
- var checkdata = { module: "bes",
- srtkenmerk: true,
- key: jsondata.propertytype,
- value: jsondata.default
- };
- checkSrtkenmerkValue(checkdata);
- if (checkdata.err != "")
- abort_with_warning(checkdata.err);
-
- jsondata.default = checkdata.value;
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "propertytype",
+ "orderpropertytype",
"orderdiscipline"
]
},
@@ -42,7 +19,7 @@ scaffolding(this_model,
"columns": [
"id",
"orderdiscipline",
- "propertytype",
+ "orderpropertytype",
"sequence",
"required"
]
diff --git a/APPL/MGT/bes_srtkenmerk.asp b/APPL/MGT/bes_srtkenmerk.asp
index bf7b1edaee..308f02e978 100644
--- a/APPL/MGT/bes_srtkenmerk.asp
+++ b/APPL/MGT/bes_srtkenmerk.asp
@@ -7,18 +7,6 @@
<%
var this_model = new model_bes_srtkenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
- var kenmerktype = (obj.propertytype ? obj.propertytype.id : "");
- fld.propertytype.LOV = buildKenmerktypeLOV(kenmerktype);
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
diff --git a/APPL/MGT/bez_kenmerk.asp b/APPL/MGT/bez_kenmerk.asp
index 6981135e9f..dc19dd82b9 100644
--- a/APPL/MGT/bez_kenmerk.asp
+++ b/APPL/MGT/bez_kenmerk.asp
@@ -6,24 +6,12 @@
<%
var this_model = new model_bez_kenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
- var kenmerktype = (obj.property_type ? obj.property_type.id : "");
- fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "property_type"
+ "attributetype"
]
},
"list": {
@@ -31,7 +19,7 @@ scaffolding(this_model,
"id",
"sequence",
"name",
- "property_type"
+ "attributetype"
]
},
"edit": {
diff --git a/APPL/MGT/cad_label.asp b/APPL/MGT/cad_label.asp
index cab2a7641f..c08a2e8f68 100644
--- a/APPL/MGT/cad_label.asp
+++ b/APPL/MGT/cad_label.asp
@@ -13,40 +13,27 @@
*/
%>
-
<%
var this_model = new model_cad_label();
-this_model.hook_pre_edit = function (obj, fld)
-{
- var labeltype = obj.cad_label_type;
- var situatie = (labeltype & 4 ? "scenario" : "actueel");
-
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "view_name",
- "type_place",
- "type_situation"
+ "viewname",
+ "position",
+ "situation"
]
},
"list": {
"columns": [
"id",
"name",
- "view_name",
- "type_place",
- "type_situation"
+ "viewname",
+ "position",
+ "situation"
]
}
});
diff --git a/APPL/MGT/cad_legendawaarde.asp b/APPL/MGT/cad_legendawaarde.asp
index 0b74378c6d..764d2c0357 100644
--- a/APPL/MGT/cad_legendawaarde.asp
+++ b/APPL/MGT/cad_legendawaarde.asp
@@ -22,7 +22,7 @@ scaffolding(this_model,
"search": {
"autosearch": true,
"filters": [
- "legendas"
+ "graphiclegenda"
]
}
});
diff --git a/APPL/MGT/cad_thema.asp b/APPL/MGT/cad_thema.asp
index 46d1b34864..36c7a6f7ec 100644
--- a/APPL/MGT/cad_thema.asp
+++ b/APPL/MGT/cad_thema.asp
@@ -13,38 +13,28 @@
*/
%>
-
<%
var this_model = new model_cad_thema();
-this_model.hook_pre_put = function(params, jsondata, key)
-{ // update
- refresh_legenda(jsondata);
-}
-this_model.hook_pre_post = function(params, jsondata)
-{ // insert
- refresh_legenda(jsondata);
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
"name",
- "legendas",
- "type_place",
- "type_situation"
+ "graphiclegenda",
+ "position",
+ "situation"
]
},
"list": {
"columns": [
"id",
"name",
- "legendas",
- "type_place",
- "type_situation"
+ "graphiclegenda",
+ "position",
+ "situation"
]
},
"wrap": {
@@ -86,7 +76,7 @@ scaffolding(this_model,
+ " , waarde"
+ " , " + rndSQL
+ " , waarde"
- + " FROM " + data.view_name
+ + " FROM " + data.viewname
Oracle.Execute(sql);
data.legenda = legenda_key;
@@ -101,16 +91,16 @@ scaffolding(this_model,
+ " , cad_legendawaarde_value"
+ " , cad_legendawaarde_rgb"
+ " , cad_legendawaarde_omschr"
- + " ) SELECT DISTINCT " + data.legendas
+ + " ) SELECT DISTINCT " + data.graphiclegenda
+ " , waarde"
+ " , " + rndSQL
+ " , waarde"
- + " FROM " + data.view_name + " thv"
+ + " FROM " + data.viewname + " thv"
+ " WHERE waarde IS NOT NULL "
+ " AND NOT EXISTS (SELECT cl.cad_legendawaarde_value"
+ " FROM cad_legendawaarde cl"
+ " WHERE cl.cad_legendawaarde_value = thv.waarde"
- + " AND cl.cad_legenda_key = " + data.legendas
+ + " AND cl.cad_legenda_key = " + data.graphiclegenda
+ " )";
Oracle.Execute(sql);
}
diff --git a/APPL/MGT/cnt_kenmerk.asp b/APPL/MGT/cnt_kenmerk.asp
index d162226fbb..252cbf1dde 100644
--- a/APPL/MGT/cnt_kenmerk.asp
+++ b/APPL/MGT/cnt_kenmerk.asp
@@ -18,32 +18,23 @@
<%
var this_model = new model_cnt_kenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "property_key",
- "contract_type",
- "property_type"
+ "contractpropertytype",
+ "contractdiscipline",
+ "attributetypehide"
]
},
"list": {
"columns": [
"id",
- "contract_type",
- "property_key",
+ "contractdiscipline",
+ "contractpropertytype",
"sequence",
- "property_type"
+ "attributetypehide"
]
},
"print": {}
diff --git a/APPL/MGT/cnt_srtkenmerk.asp b/APPL/MGT/cnt_srtkenmerk.asp
index 833ca9daef..87aba09459 100644
--- a/APPL/MGT/cnt_srtkenmerk.asp
+++ b/APPL/MGT/cnt_srtkenmerk.asp
@@ -18,24 +18,12 @@
<%
var this_model = new model_cnt_srtkenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
- var kenmerktype = (obj.property_type ? obj.property_type.id : "");
- fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "property_type",
+ "attributetype",
"name"
]
},
@@ -43,7 +31,7 @@ scaffolding(this_model,
"columns": [
"id",
"name",
- "property_type"
+ "attributetype"
]
},
"edit": {
diff --git a/APPL/MGT/faq_kenmerk.asp b/APPL/MGT/faq_kenmerk.asp
index 3b7f59b6be..1561f7d9f8 100644
--- a/APPL/MGT/faq_kenmerk.asp
+++ b/APPL/MGT/faq_kenmerk.asp
@@ -18,24 +18,12 @@
<%
var this_model = new model_faq_kenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
- var kenmerktype = (obj.property_type ? obj.property_type.id : "");
- fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "property_type"
+ "attributetype"
]
},
"list": {
@@ -43,7 +31,7 @@ scaffolding(this_model,
"id",
"name",
"sequence",
- "property_type"
+ "attributetype"
]
},
"edit": {
diff --git a/APPL/MGT/fin_kenmerk.asp b/APPL/MGT/fin_kenmerk.asp
index 2901a9d7c3..b7e703a0ac 100644
--- a/APPL/MGT/fin_kenmerk.asp
+++ b/APPL/MGT/fin_kenmerk.asp
@@ -18,24 +18,12 @@
<%
var this_model = new model_fin_kenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
- var kenmerktype = (obj.property_type ? obj.property_type.id : "");
- fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "property_type"
+ "attributetype"
]
},
"list": {
@@ -43,7 +31,7 @@ scaffolding(this_model,
"id",
"name",
"sequence",
- "property_type"
+ "attributetype"
]
},
"edit": {
diff --git a/APPL/MGT/ins_kenmerk.asp b/APPL/MGT/ins_kenmerk.asp
index 9f6f097e0a..5639256612 100644
--- a/APPL/MGT/ins_kenmerk.asp
+++ b/APPL/MGT/ins_kenmerk.asp
@@ -9,19 +9,6 @@ kenmerk_params.niveau = getQParam("inspectie", "");
var this_model = new model_ins_kenmerk(kenmerk_params);
-if (mode != "save")
-{
- this_model.hook_pre_edit = function (obj, fld)
- {
-%>
-
-<%
- }
-}
-
-
scaffolding(this_model,
{
"search": {
diff --git a/APPL/MGT/ins_srtkenmerk.asp b/APPL/MGT/ins_srtkenmerk.asp
index 297716a47e..9fb01f25df 100644
--- a/APPL/MGT/ins_srtkenmerk.asp
+++ b/APPL/MGT/ins_srtkenmerk.asp
@@ -7,24 +7,12 @@
<%
var this_model = new model_ins_srtkenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
- var kenmerktype = (obj.property_type ? obj.property_type.id : "");
- fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "property_type",
+ "attributetype",
"name"
]
},
@@ -32,7 +20,7 @@ scaffolding(this_model,
"columns": [
"id",
"name",
- "property_type"
+ "attributetype"
]
},
"edit": {
diff --git a/APPL/MGT/mgt_tools.inc b/APPL/MGT/mgt_tools.inc
index 1e3456c8c3..73380df863 100644
--- a/APPL/MGT/mgt_tools.inc
+++ b/APPL/MGT/mgt_tools.inc
@@ -317,4 +317,19 @@ function buildStatusList()
return statusList;
}
+function buildCadPositionLOV()
+ {
+ return "1;" + L("cad_label_type_bi_rui")
+ + ";9;" + L("cad_label_type_bi_wp")
+ + ";17;" + L("cad_label_type_bi_obj")
+ + ";2;" + L("cad_label_type_bu_ts")
+ + ";18;" + L("cad_label_type_bu_obj");
+ }
+
+function buildCadSituationLOV()
+ {
+ return "0;" + L("cad_label_type_si_act")
+ + ";4;" + L("cad_label_type_si_sce");
+ }
+
%>
\ No newline at end of file
diff --git a/APPL/MGT/mld_kenmerk.asp b/APPL/MGT/mld_kenmerk.asp
index 86961da143..ae6a7ebb93 100644
--- a/APPL/MGT/mld_kenmerk.asp
+++ b/APPL/MGT/mld_kenmerk.asp
@@ -18,31 +18,22 @@
<%
var this_model = new model_mld_kenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "type",
- "order_type"
+ "issuepropertytype",
+ "ordertype"
]
},
"list": {
"columns": [
"id",
- "type",
- "order_type",
+ "issuepropertytype",
+ "ordertype",
"sequence",
- "property_group",
+ "group",
"required"
]
},
diff --git a/APPL/MGT/mld_srtkenmerk.asp b/APPL/MGT/mld_srtkenmerk.asp
index 03632ef72c..81ff3687fd 100644
--- a/APPL/MGT/mld_srtkenmerk.asp
+++ b/APPL/MGT/mld_srtkenmerk.asp
@@ -18,24 +18,12 @@
<%
var this_model = new model_mld_srtkenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
- var kenmerktype = (obj.property_type ? obj.property_type.id : "");
- fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
-%>
-
-<%
-}
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "property_type",
+ "attributetype",
"name"
]
},
@@ -43,7 +31,7 @@ scaffolding(this_model,
"columns": [
"id",
"name",
- "property_type"
+ "attributetype"
]
},
"edit": {
diff --git a/APPL/MGT/prs_kenmerk.asp b/APPL/MGT/prs_kenmerk.asp
index 5ab851d8a5..0bf70572ca 100644
--- a/APPL/MGT/prs_kenmerk.asp
+++ b/APPL/MGT/prs_kenmerk.asp
@@ -5,40 +5,23 @@
<%
-var niveau = getQParam("prs_kenmerk_niveau"); // [ B | A | P | C ]
var this_model = new model_prs_kenmerk(niveau);
-this_model.hook_pre_edit = function (obj, fld)
-{
- var kenmerktype = (obj.property_type ? obj.property_type.id : "");
- fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
-
- if (obj.id != -1)
- fld.position.foreign.readonly = true;
-%>
-
-<%
-}
-
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "property_type"
+ "attributetype"
]
},
"list": {
"columns": [
"id",
- "prs_kenmerk_niveau",
+ "level",
"name",
"sequence",
- "property_type"
+ "attributetype"
]
},
"edit": {
@@ -46,16 +29,7 @@ scaffolding(this_model,
},
"print": {},
"transit": {
- "prs_kenmerk_niveau": niveau
+ "level": niveau
}
});
-
-
- function fill_prs_niveau_LOV()
- {
- return "B;"+L("lcl_company")
- + ";A;"+L("lcl_department")
- + ";P;"+L("lcl_person")
- + ";C;"+L("lcl_contact");
- }
%>
diff --git a/APPL/MGT/res_kenmerk.asp b/APPL/MGT/res_kenmerk.asp
index f8f731d71f..6206c36cb3 100644
--- a/APPL/MGT/res_kenmerk.asp
+++ b/APPL/MGT/res_kenmerk.asp
@@ -11,37 +11,17 @@ scaffolding(this_model,
"search": {
"autosearch": true,
"filters": [
- "type",
- "res_activiteit_key"
+ "bookingpropertytype",
+ "bookingactivity"
]
},
"list": {
"columns": [
"id",
- "type",
+ "bookingpropertytype",
"sequence",
- "res_activiteit_key"
+ "bookingactivity"
]
}
});
-
-
- function buildVerplichtingList()
- { // LOV waarden voor required.
- var s = ";" + L("res_kenmerk_verplicht_0")
- + ";1;" + L("res_kenmerk_verplicht_1")
- + ";2;" + L("res_kenmerk_verplicht_2");
- return s;
- }
-
- function buildGroepsverplichtingList()
- { // LOV waarden voor group.
- var s = "0;";
- for (var i=1; i<=9; i++)
- {
- s = s + ";" + i + ";" + L("res_kenmerk_groep") + " " + i;
- }
- return s;
- }
-
%>
\ No newline at end of file
diff --git a/APPL/MGT/res_srtkenmerk.asp b/APPL/MGT/res_srtkenmerk.asp
index f3489d443a..c0b9285135 100644
--- a/APPL/MGT/res_srtkenmerk.asp
+++ b/APPL/MGT/res_srtkenmerk.asp
@@ -7,25 +7,12 @@
<%
var this_model = new model_res_srtkenmerk();
-this_model.hook_pre_edit = function (obj, fld)
-{
- var kenmerktype = (obj.property_type ? obj.property_type.id : "");
- fld.property_type.LOV = buildKenmerktypeLOV(kenmerktype);
-%>
-
-<%
-}
-
-
scaffolding(this_model,
{
"search": {
"autosearch": true,
"filters": [
- "property_type",
+ "attributetype",
"name"
]
},
@@ -33,7 +20,7 @@ scaffolding(this_model,
"columns": [
"id",
"name",
- "property_type"
+ "attributetype"
]
},
"edit": {