|
@@ -438,11 +438,15 @@
|
|
|
var target_id = this.tables[tname]['target_id'];
|
|
|
var num_files = this.getNumFiles(category);
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if (cardinality && cardinality == 1 && target_id && num_files == 1) {
|
|
|
- $('#' + target_id).val(files[0].file_id);
|
|
|
+ if (target_id) {
|
|
|
+
|
|
|
+ var fids = files[0].file_id;
|
|
|
+
|
|
|
+ var i;
|
|
|
+ for (i = 1; i < num_files; i++) {
|
|
|
+ fids = fids + "|" + files[i].file_id;
|
|
|
+ }
|
|
|
+ $('#' + target_id).val(fids);
|
|
|
}
|
|
|
}
|
|
|
|