FSN#44507: (PDA) Bijlagen toevoegen herzien

svn path=/Website/branches/v2017.2/; revision=35668
This commit is contained in:
Jos Groot Lipman
2017-10-12 13:18:40 +00:00
parent 2bfc7fefb0
commit 3b1a92d842
3 changed files with 19 additions and 3 deletions

View File

@@ -87,7 +87,8 @@ function model_orders(opdr_key, params)
joinfield: "mld_opdr_key"
},
"custom_fields" : { model: new model_custom_fields(this, new model_mld_kenmerk('O', { internal: true }), { pNiveau: "O", readman: true, readuse: true }),
joinfield: "flexparentkey"
joinfield: "flexparentkey",
"enable_update": true
},
"tracking": {
model: new model_tracking(['opdracht']),
@@ -350,6 +351,12 @@ function model_orders(opdr_key, params)
var opdr_key = the_key;
if (opdr_key == -1)
abort_with_warning("PUT needs record key in url.");
if (params.custom_fields_only)
{
var mldtrack = api2.process_includes(params, this, jsondata, opdr_key);
return { key: opdr_key };
}
if (!jsondata.id) jsondata.id = opdr_key; // huidige key altijd in jsondata
//
this._pre_analyze_fields(params, jsondata);
@@ -1094,7 +1101,9 @@ function model_orders(opdr_key, params)
+ " mld_srtkenmerk t"
+ " WHERE m.mld_srtkenmerk_key = t.mld_srtkenmerk_key"
+ " AND m.mld_kenmerk_key = "; /* wordt in saveFlexkenmerken uitgebreid */
// TODO: deze saveFlexKenmerken moet via de standaard includes door model_custom_fields opgelost worden
// pas echter op: die verwacht een properyid voor elk kenmerk terwijl saveFlexKenmerken (nog) een 'id' verwacht
// In het bijzonder wordt in d:\Apps\Facilitor\Branch20172\CUST\ASLE\Appl ook nog de 'id' gezet!
var flextrack =
saveFlexKenmerken(opdr_key, { kenmerkTable: "mld_kenmerkopdr",
kenmerkParentKey : "mld_opdr_key",

View File

@@ -66,6 +66,11 @@ function ajaxUpload(file, attachmentId, fileSpan, inputEl) {
progressEventHandler: onProgress.bind(progressSpan)
})
.done(function(result) {
if ("success" in result && !result.success)
{
FcltMgr.alert(result.message);
return;
}
addInlineAttachmentMarkup(file);
//progressSpan.progressbar( 'value', 100 ).remove();
fileSpan.find('input.token').val(result.attachment.token)

View File

@@ -273,7 +273,9 @@ function listKenmerk(sql, module, key, props)
"R": "rooms"
},
"BEZ": "visitors",
"MLD": "issues",
"MLD": { "M": "issues",
"O": "orders"
},
"PRS": { "P": "persons"
},
"INS": { "I": "inspections",