// The example XML is as follows:
// <links><link title="Jo's Birthday" link="/media/DiaryDocs/2012/9/25/Jo Holiday.jpg" type="internal" newwindow="1" repository="Local Site Path" /></links>
var _filedisplay = '';
var _title;
var _url;
var _filexml = eventdialogjs.currentCalEventDetailObj.eventFiles;
if (_filexml.length > 0) {
$(_filexml).find('link').each(function () {
$.each(this.attributes, function (i, attrib) {
if (attrib.name == 'title') {
_title = attrib.value;
}
if (attrib.name == 'link') {
_url = attrib.value;
}
});
_filedisplay += '<a href="' + _url + '" target="_blank">' + _title + '</a> ';
console.log('Files: ', _filedisplay);
});
$('#file-list').html(_filedisplay);
}
//javascript/5286