| 1 | 596,597c596,614 |
|---|
| 2 | < // url |
|---|
| 3 | < newItem.url = mods.m::location.m::url.text().toString(); |
|---|
| 4 | --- |
|---|
| 5 | > // attachments and url |
|---|
| 6 | > for each(var url in mods.m::location.m::url) { |
|---|
| 7 | > var value = url.text().toString(); |
|---|
| 8 | > if (url.@access == "raw object") { |
|---|
| 9 | > var filetitle; |
|---|
| 10 | > if (url.@displayLabel){ |
|---|
| 11 | > filetitle = url.@displayLabel; |
|---|
| 12 | > } else { |
|---|
| 13 | > filetitle = "Attachment"; |
|---|
| 14 | > } |
|---|
| 15 | > if (value.substr(-4,4)==".pdf") { |
|---|
| 16 | > newItem.attachments.push({url:value, mimeType:"application/pdf", title:filetitle, downloadable:true}); |
|---|
| 17 | > } else { |
|---|
| 18 | > newItem.attachments.push({url:value, title:filetitle, downloadable:true}); |
|---|
| 19 | > } |
|---|
| 20 | > } else { |
|---|
| 21 | > newItem.url = value; |
|---|
| 22 | > } |
|---|
| 23 | > } |
|---|