Skip to content
Snippets Groups Projects
Commit 44258f52 authored by Markus Escher's avatar Markus Escher
Browse files

RecordContainer fix: Document_entity -> change ID field to UID

parent 94051aab
No related branches found
No related tags found
No related merge requests found
......@@ -122,7 +122,7 @@
</dependencies>
</entityIncomingField>
<entityField>
<name>ID</name>
<name>UID</name>
<fieldName>UID</fieldName>
</entityField>
<entityField>
......@@ -146,7 +146,7 @@
<onUpdate>%aditoprj%/entity/Document_entity/recordcontainers/jdito/onUpdate.js</onUpdate>
<onDelete>%aditoprj%/entity/Document_entity/recordcontainers/jdito/onDelete.js</onDelete>
<recordFields>
<element>ID.value</element>
<element>UID.value</element>
<element>NAME.value</element>
<element>SIZE.value</element>
<element>DATE_EDIT.value</element>
......
......@@ -2,7 +2,7 @@ import("system.vars");
import("system.db");
import("Document_lib");
var id = vars.get("$field.ID");
var id = vars.get("$field.UID");
var parentId = "";
var fileName = vars.get("$field.NAME");
var description = vars.get("$field.DESCRIPTION");
......
......@@ -15,7 +15,7 @@ function DocumentUtil(){
/**
* Utility function to download all selected or open documents.
* Selected documents will be checked with $local.uids.
* Open documents will be checked with $field.id.
* Open documents will be checked with $field.UID.
* Documents will be downloaded with neon.doanload
*/
DocumentUtil.downloadSelectedDocuments = function() {
......@@ -37,8 +37,8 @@ DocumentUtil.downloadSelectedDocuments = function() {
}
}
// Download open file
else if(vars.exists("$field.ID") && vars.get("$field.ID") != '') {
var id = vars.get("$field.ID");
else if(vars.exists("$field.UID") && vars.get("$field.UID") != '') {
var id = vars.get("$field.UID");
var name = vars.get("$field.NAME");
var binaryContent = db.getBinaryContent(id, alias);
if(binaryContent != null && binaryContent != '')
......@@ -66,9 +66,9 @@ DocumentUtil.deleteCurrentDocument = function() {
* @return {String} the filename or empty String
*/
DocumentUtil.getFilenameFromUpload = function(pUploadValue) {
var result = pUploadValue.split(";");
if(result.length > 0)
return result[0];
var res = pUploadValue.split(";");
if(res.length > 0)
return res[0];
else
return '';
}
......@@ -82,9 +82,9 @@ DocumentUtil.getFilenameFromUpload = function(pUploadValue) {
* @return {String} the filedata or empty String
*/
DocumentUtil.getBindataFromUpload = function(pUploadValue) {
var result = pUploadValue.split(";");
if(result.length > 1)
return result[1];
var res = pUploadValue.split(";");
if(res.length > 1)
return res[1];
else
return '';
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment