FCLT#57817 Klikken op titelbalk Meldingkenmerken laat hidden velden zien
svn path=/Website/branches/v2019.1/; revision=42590
This commit is contained in:
@@ -67,22 +67,6 @@ function model_mld_kenmerk(niveau, params)
|
||||
"typ": "varchar",
|
||||
"defaultvalue": (isOpdrachtKenmerk ? "O" : "")
|
||||
},
|
||||
"ordertype": {
|
||||
"dbs": "mld_typeopdr_key",
|
||||
"label": L("mld_typeopdr"),
|
||||
"typ": "key",
|
||||
"foreign": {
|
||||
"tbl": "(select mld_typeopdr_key"
|
||||
+ " , mld_typeopdr_omschrijving"
|
||||
+ " from mld_typeopdr"
|
||||
+ " order by mld_typeopdr_upper asc)",
|
||||
"key": "mld_typeopdr_key",
|
||||
"desc": "mld_typeopdr_omschrijving"
|
||||
},
|
||||
"required": isOpdrachtKenmerk, // alleen voor OPDR verplicht
|
||||
"defaultvalue": null,
|
||||
"showtransit": true
|
||||
},
|
||||
"sequence": {
|
||||
"dbs": "mld_kenmerk_volgnummer",
|
||||
"label": L("mgt_kenmerk_volgnummer"),
|
||||
@@ -117,18 +101,6 @@ function model_mld_kenmerk(niveau, params)
|
||||
"LOV": buildStatusList(niveau),
|
||||
"emptyoption": null
|
||||
},
|
||||
"obligationfill": {
|
||||
"dbs": "mld_kenmerk_obligation_fill",
|
||||
"label": L("mgt_kenmerk_obligation_fill"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"hltproperty": {
|
||||
"dbs": "mld_kenmerk_onderbreken",
|
||||
"label": L("mld_kenmerk_onderbreken"),
|
||||
"typ": "key",
|
||||
"LOV": buildHltPropList(),
|
||||
"emptyoption": null
|
||||
},
|
||||
"readonly": {
|
||||
"dbs": "mld_kenmerk_toonbaar",
|
||||
"label": (isOpdrachtKenmerk ? L("mgt_kenmerk_toonbaar") : L("lcl_mld_kenmerk_readonly") ),
|
||||
@@ -159,7 +131,7 @@ function model_mld_kenmerk(niveau, params)
|
||||
}
|
||||
};
|
||||
|
||||
var fields_ext = {
|
||||
var fields_mld = {
|
||||
"mld_issuetype": {
|
||||
"dbs": "view_mld_kenmerk.mld_mld_stdmelding_key",
|
||||
"label": L("mld_stdmelding_key"),
|
||||
@@ -219,11 +191,38 @@ function model_mld_kenmerk(niveau, params)
|
||||
}
|
||||
};
|
||||
|
||||
if (isOpdrachtKenmerk)
|
||||
this.fields = fields_main;
|
||||
else
|
||||
this.fields = object_merge({}, fields_ext, fields_main);
|
||||
var fields_opd = {
|
||||
"ordertype": {
|
||||
"dbs": "mld_typeopdr_key",
|
||||
"label": L("mld_typeopdr"),
|
||||
"typ": "key",
|
||||
"foreign": {
|
||||
"tbl": "(select mld_typeopdr_key"
|
||||
+ " , mld_typeopdr_omschrijving"
|
||||
+ " from mld_typeopdr"
|
||||
+ " order by mld_typeopdr_upper asc)",
|
||||
"key": "mld_typeopdr_key",
|
||||
"desc": "mld_typeopdr_omschrijving"
|
||||
},
|
||||
"required": isOpdrachtKenmerk, // alleen voor OPDR verplicht
|
||||
"defaultvalue": null,
|
||||
"showtransit": true
|
||||
},
|
||||
"obligationfill": {
|
||||
"dbs": "mld_kenmerk_obligation_fill",
|
||||
"label": L("mgt_kenmerk_obligation_fill"),
|
||||
"typ": "check0"
|
||||
},
|
||||
"hltproperty": {
|
||||
"dbs": "mld_kenmerk_onderbreken",
|
||||
"label": L("mld_kenmerk_onderbreken"),
|
||||
"typ": "key",
|
||||
"LOV": buildHltPropList(),
|
||||
"emptyoption": null
|
||||
}
|
||||
};
|
||||
|
||||
this.fields = object_merge({}, (isOpdrachtKenmerk ? fields_opd : fields_mld), fields_main);
|
||||
|
||||
function object_merge()
|
||||
{
|
||||
@@ -255,6 +254,7 @@ function model_mld_kenmerk(niveau, params)
|
||||
this.hook_pre_edit = function (obj, fld)
|
||||
{
|
||||
delete this.fields.filled;
|
||||
delete this.fields.issuepropertytypename;
|
||||
delete this.fields.attributetype;
|
||||
%>
|
||||
<script>
|
||||
@@ -265,6 +265,13 @@ function model_mld_kenmerk(niveau, params)
|
||||
<%
|
||||
}
|
||||
|
||||
this.hook_pre_show = function (obj, fld)
|
||||
{
|
||||
delete this.fields.filled;
|
||||
delete this.fields.issuepropertytypename;
|
||||
delete this.fields.attributetype;
|
||||
}
|
||||
|
||||
this.hook_pre_post = function (params, obj)
|
||||
{
|
||||
switch (obj.level)
|
||||
|
||||
@@ -272,21 +272,6 @@ var model_params = {
|
||||
"default",
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"blockid": "mldHidden",
|
||||
"label": L("lcl_mld_hidden_fields"),
|
||||
"hidden": true,
|
||||
"fields": [
|
||||
"filled",
|
||||
"issuepropertytypename",
|
||||
"attributetype",
|
||||
"issuetype",
|
||||
"ordertype",
|
||||
"obligationfill",
|
||||
"hltproperty",
|
||||
show_hidden_level
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -305,15 +290,6 @@ if (isOpdrachtKenmerk)
|
||||
"required"
|
||||
]
|
||||
};
|
||||
// Verwijder 2 velden uit het hidden blok.
|
||||
model_params.layout.block[1].fields.splice(sharedIndexOf("obligationfill", model_params.layout.block[1].fields), 1);
|
||||
model_params.layout.block[1].fields.splice(sharedIndexOf("hltproperty", model_params.layout.block[1].fields), 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Meldingkenmerk heeft obligationfill en hltproperty niet nodig.
|
||||
model_params.layout.block[0].fields.splice(sharedIndexOf("obligationfill", model_params.layout.block[0].fields), 1);
|
||||
model_params.layout.block[0].fields.splice(sharedIndexOf("hltproperty", model_params.layout.block[0].fields), 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user