diff --git a/common/templates/upload.html b/common/templates/upload.html index 33c7b0326..8d4991e56 100644 --- a/common/templates/upload.html +++ b/common/templates/upload.html @@ -5,7 +5,7 @@
- + diff --git a/common/upload.js b/common/upload.js index 638e8e528..f6b88419b 100644 --- a/common/upload.js +++ b/common/upload.js @@ -57,7 +57,7 @@ column: scope.column, reference: scope.reference }); - scope.value.url = scope.value.file.name; + scope.value.url = scope.value.filename = scope.value.file.name; scope.$apply(); } }); @@ -74,10 +74,22 @@ scope.clear = function() { scope.value.url = ""; + scope.value.filename = ""; delete scope.value.file; delete scope.value.hatracObj; scope.fileEl.val(""); }; + + scope.setFilename = function () { + var value = scope.value; + if (value) { + if (value.filename) { + return value.filename; + } else { + return value.url; + } + } + } } }; }]) diff --git a/recordedit/recordEdit.app.js b/recordedit/recordEdit.app.js index c2fae7664..66ebd2612 100644 --- a/recordedit/recordEdit.app.js +++ b/recordedit/recordEdit.app.js @@ -327,7 +327,10 @@ default: // the structure for asset type columns is an object with a 'url' property if (column.isAsset && colModel.inputType !== "disabled") { - value = { url: values[i] || "" }; + value = { + url: values[i] || "", + filename: tuple.data[column._filenameColumn.name] + }; } else { value = values[i]; }