MMNL#41309 Mogelijkheid om meldingen op meerdere Disciplines objecten te doen
svn path=/Website/trunk/; revision=36514
This commit is contained in:
@@ -56,6 +56,7 @@ function model_mld_stdmelding()
|
||||
"dbs": "ins_srtdiscipline.ins_srtdiscipline_key",
|
||||
"label": L("lcl_mld_vakgroeptype"),
|
||||
"typ": "key",
|
||||
"insertonly": true,
|
||||
"foreign" : {
|
||||
"tbl": "(SELECT ins_srtdiscipline_key"
|
||||
+ " , ins_srtdiscipline_omschrijving srtdiscipline_oms"
|
||||
@@ -82,7 +83,6 @@ function model_mld_stdmelding()
|
||||
},
|
||||
"required": (mode == "edit")
|
||||
},
|
||||
|
||||
"notfrontend": {
|
||||
"dbs": "mld_stdmelding_notfrontend",
|
||||
"typ": "check0",
|
||||
@@ -150,7 +150,7 @@ function model_mld_stdmelding()
|
||||
"typ": "check0",
|
||||
"label": L("lcl_mld_planbaar")
|
||||
},
|
||||
"subject": {
|
||||
"subjectlist": {
|
||||
"dbs": "mld_stdmelding_subject",
|
||||
"typ": "key",
|
||||
"label": L("lcl_mld_subject"),
|
||||
@@ -402,7 +402,8 @@ function model_mld_stdmelding()
|
||||
"key": "key",
|
||||
"desc": "oms",
|
||||
"extravalue": "ev1",
|
||||
"order": "3"
|
||||
"order": "3",
|
||||
"emptyisrealvalue": true
|
||||
},
|
||||
"emptyoption": null
|
||||
},
|
||||
@@ -427,7 +428,7 @@ function model_mld_stdmelding()
|
||||
"_upload": {
|
||||
"dbs": "",
|
||||
"label": L("lcl_mld_symbol_upload"),
|
||||
"typ": "button",
|
||||
"typ": "button2",
|
||||
"defaultvalue": L("lcl_mld_browse_upload")
|
||||
},
|
||||
"_limitlabel": {
|
||||
@@ -447,6 +448,11 @@ function model_mld_stdmelding()
|
||||
"obj": "MLD_T_UITVOERTIJD",
|
||||
"typ": "processingtime",
|
||||
"label": L("lcl_mld_uitvoertijd_normaal")
|
||||
},
|
||||
"enddateempty": {
|
||||
"dbs": "mld_stdmelding_enddate_empty",
|
||||
"typ": "check0",
|
||||
"label": L("lcl_mld_enddate_empty")
|
||||
}
|
||||
};
|
||||
|
||||
@@ -464,6 +470,8 @@ function model_mld_stdmelding()
|
||||
this.hook_pre_edit = function(obj, fld, scf_params)
|
||||
{
|
||||
scf_params.layout.block[0].label += " " +obj.id ;
|
||||
if (obj.id == -1)
|
||||
obj.canrefer = {id:-1, name:null};
|
||||
obj.canrefer = translate_canrefer(obj.canrefer, null);
|
||||
var srtdisc_key = null;
|
||||
var disc_key = null;
|
||||
@@ -481,9 +489,9 @@ function model_mld_stdmelding()
|
||||
var oRs = Oracle.Execute(sql);
|
||||
stdm_info.directklaar = oRs("mld_stdmelding_directklaar").Value;
|
||||
oRs.Close();
|
||||
fld.limitcatalogue.foreign.tbl = limitcatalogue_foreign(stdm_info);
|
||||
}
|
||||
|
||||
fld.limitcatalogue.foreign.tbl = limitcatalogue_foreign(stdm_info);
|
||||
var proturl = protectQS.create("../shared/BijlagenForm.asp?module=MLDS" + (mode == "show"? "&reado=1" : ""));
|
||||
|
||||
%>
|
||||
@@ -499,7 +507,7 @@ function model_mld_stdmelding()
|
||||
this.hook_pre_show = function(obj, fld, scf_params)
|
||||
{
|
||||
scf_params.layout.block[0].label += " " +obj.id ;
|
||||
obj.canrefer = translate_canrefer(obj.canrefer, null);
|
||||
obj.canrefer = (obj.canrefer.id != 0 ? translate_canrefer(obj.canrefer, null) : null);
|
||||
}
|
||||
|
||||
// ? deze functie als parameter aan foreign/multiselect meegeven?
|
||||
@@ -604,10 +612,5 @@ function model_mld_stdmelding()
|
||||
+ " ORDER BY UPPER(d.ins_discipline_omschrijving))";
|
||||
return tbl;
|
||||
}
|
||||
|
||||
function objectdiscipline_foreign()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
%>
|
||||
@@ -45,6 +45,14 @@ var this_params = {
|
||||
"service",
|
||||
"objecttype",
|
||||
"expires"
|
||||
],
|
||||
"orderby": [
|
||||
"disciplinetype",
|
||||
"discipline",
|
||||
"description",
|
||||
"issuegroup",
|
||||
"costtype",
|
||||
"service"
|
||||
]
|
||||
},
|
||||
"edit": {
|
||||
@@ -66,6 +74,7 @@ var this_params = {
|
||||
"hidden": false,
|
||||
"buttons": [],
|
||||
"fields": [
|
||||
"disciplinetype",
|
||||
"discipline",
|
||||
"description",
|
||||
"sequence",
|
||||
@@ -95,7 +104,7 @@ var this_params = {
|
||||
"blockid": "mldHand",
|
||||
"label": L("lcl_mld_stdbehandeling"),
|
||||
"fields": [
|
||||
"subject",
|
||||
"subjectlist",
|
||||
"freetext",
|
||||
"closingtext",
|
||||
"checksimmilar",
|
||||
@@ -123,7 +132,8 @@ var this_params = {
|
||||
"ordertypemandatory",
|
||||
"ordertype",
|
||||
"autoorder",
|
||||
"limitcatalogue"
|
||||
"limitcatalogue",
|
||||
"enddateempty"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -142,7 +152,6 @@ var this_params = {
|
||||
"label": "Niet tonen",
|
||||
"hidden": true,
|
||||
"fields": [
|
||||
"disciplinetype",
|
||||
"_limitlabel"
|
||||
]
|
||||
}
|
||||
@@ -152,6 +161,8 @@ var this_params = {
|
||||
|
||||
if (stdmld_key > -1)
|
||||
{
|
||||
this_params.wrap = {"frames": [] };
|
||||
|
||||
var sql = "SELECT s.ins_srtdiscipline_ins"
|
||||
+ " FROM mld_stdmelding m"
|
||||
+ " , ins_tab_discipline d"
|
||||
@@ -163,13 +174,18 @@ if (stdmld_key > -1)
|
||||
var oRs = Oracle.Execute(sql);
|
||||
if (!oRs.eof)
|
||||
{
|
||||
this_params.wrap = {
|
||||
"frames": [{ url: "mld_stdmelding_srtinst.asp?mode=list&issuetype={0}",
|
||||
autfunction: "WEB_MLDMGT"
|
||||
}]
|
||||
}
|
||||
this_params.wrap.frames.push({ url: "mld_stdmelding_srtinst.asp?mode=list&issuetype={0}",
|
||||
autfunction: "WEB_MLDMGT"
|
||||
});
|
||||
}
|
||||
oRs.Close();
|
||||
|
||||
if (user.checkAutorisation("WEB_MLDMGT", true))
|
||||
{
|
||||
this_params.wrap.frames.push({ url: "../mld/mld_stdmsrtruimte_search_list.asp?embedded=1&stdmelding_key=" + stdmld_key,
|
||||
autfuncton: "WEB_MLDMGT"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
scaffolding(this_model, this_params);
|
||||
|
||||
@@ -6,7 +6,7 @@ function init_stdmelding()
|
||||
{
|
||||
$("#disciplinetype").change( change_disciplinetype );
|
||||
$("#discipline").change( change_discipline );
|
||||
$("#_upload").click( Upload );
|
||||
$("#_upload").addClass("stdmsymbol_button").click( Upload );
|
||||
|
||||
var init_srtdisc_key = (srtdisc_key ? srtdisc_key : 0);
|
||||
var init_disc_key = (disc_key ? disc_key : -1);
|
||||
|
||||
@@ -208,8 +208,8 @@ switch (req_info)
|
||||
+ " FROM mld_stdmelding m"
|
||||
+ " , mld_v_aanwezigdiscipline d"
|
||||
+ " WHERE m.mld_ins_discipline_key = d.ins_discipline_key"
|
||||
+ (parent_key != -1 ? " AND d.ins_srtdiscipline_key IN (" + parent_key.join(",") + ")" : "")
|
||||
+ (child_key != -1 ? " AND m.mld_ins_discipline_key IN (" + child_key.join(",") + ")" : "")
|
||||
+ (parent_key.length ? " AND d.ins_srtdiscipline_key IN (" + parent_key.join(",") + ")" : "")
|
||||
+ (child_key.length ? " AND m.mld_ins_discipline_key IN (" + child_key.join(",") + ")" : "")
|
||||
+ " ORDER BY d.ins_discipline_omschrijving ASC"
|
||||
+ " , m.mld_stdmelding_omschrijving ASC";
|
||||
break;
|
||||
|
||||
@@ -505,6 +505,7 @@ function scf_RWFIELDTR(model, fld, val, key, params)
|
||||
FCLTselector(fld, sql, { label: field.label,
|
||||
initKey: (val==0 || val ? val : null), // een key=0 moet ook kunnen!
|
||||
emptyOption: canmultiadd?null:emptyOption,
|
||||
emptyIsRealValue: (foreign.emptyisrealvalue?foreign.emptyisrealvalue:null),
|
||||
emptyKey: (field.typ=="key"?-1:""),
|
||||
readonly: (foreign.readonly?foreign.readonly:false),
|
||||
required: params.required,
|
||||
@@ -575,6 +576,7 @@ function scf_RWFIELDTR(model, fld, val, key, params)
|
||||
RWCHECKBOXTR(fld, "fldcheck", field.label, val);
|
||||
else if (field.typ == "processingtime")
|
||||
{
|
||||
val = (val ? val : {unit: -1, duration: null});
|
||||
sql = "SELECT 'U', " + safe.quoted_sql(L("lcl_mld_hours")) + " FROM DUAL"
|
||||
+ " UNION SELECT 'D', " + safe.quoted_sql(L("lcl_mld_days")) + " FROM DUAL"
|
||||
+ " ORDER BY 2";
|
||||
@@ -625,6 +627,10 @@ function scf_RWFIELDTR(model, fld, val, key, params)
|
||||
{
|
||||
scf_BUTTONTR(fld, field, params);
|
||||
}
|
||||
else if (field.typ == "button2")
|
||||
{
|
||||
scf_BUTTONSPAN(fld, field, params);
|
||||
}
|
||||
else if (field.typ == "div")
|
||||
{
|
||||
scf_DIV(fld, field, params);
|
||||
@@ -704,6 +710,15 @@ function scf_BUTTONTR(fld, field, params)
|
||||
+'</td><td><button id="'+fld+'" name="'+fld+'">'+field.defaultvalue+'</button></td></tr></div>');
|
||||
}
|
||||
|
||||
function scf_BUTTONSPAN(fld, field, params)
|
||||
{
|
||||
Response.Write('<tr><td class="label">'
|
||||
+'<label for="'+fld+'">'+(field.label?field.label+':':'')+'</label>'
|
||||
+'</td>'
|
||||
+'<td><span id="'+fld+'" name="'+fld+'" class="readonly button" type="button" title="'+field.label+'" onclick="">'+field.defaultvalue+'</span></td>'
|
||||
+'</tr>');
|
||||
}
|
||||
|
||||
function scf_DIV(fld, field, params)
|
||||
{
|
||||
Response.Write('<div id="'+fld+'" name="'+fld+'">'+field.defaultvalue+'</div>');
|
||||
|
||||
@@ -294,7 +294,13 @@ function scaffolding_show(model, scf_params)
|
||||
if (inArray(fld, fld_arr_all))
|
||||
{
|
||||
var field = model.fields[fld];
|
||||
scf_ROFIELDTR(model, fld, xxx_data[fld], key);
|
||||
if (field.foreign && field.foreign.emptyisrealvalue)
|
||||
{
|
||||
model.fields[fld].foreign.readonly = true;
|
||||
scf_RWFIELDTR(model, fld, xxx_data[fld], key);
|
||||
}
|
||||
else
|
||||
scf_ROFIELDTR(model, fld, xxx_data[fld], key);
|
||||
}
|
||||
}
|
||||
BLOCK_END();
|
||||
|
||||
@@ -1701,6 +1701,9 @@ ResultsetTable.formatValue = function (val, params) //datatype, decimals)
|
||||
val = "";
|
||||
return val;
|
||||
}
|
||||
case "processingtime": { val = val["duration"] + " " + (val["unit"]=="U"?L("lcl_mld_hours"):L("lcl_mld_days"));
|
||||
return val;
|
||||
}
|
||||
case "currency": return safe.curr(val);
|
||||
case "float" : return safe.displayfloat(val, params.decimals);
|
||||
case "number" : return val;
|
||||
|
||||
Reference in New Issue
Block a user