--- a/swtr/static/js/swtmaker.js +++ b/swtr/static/js/swtmaker.js @@ -492,9 +492,18 @@ // create the text to displayed for each annotation from the other // attributes of the sweet/annotation createPopupText: function(annotation) { + // title var text = (annotation.title) ? '
' + annotation.comment + '
' : ''; - text += (annotation.link) ? '' + annotation.link + '
' : ''; + + // link + text += (annotation.link) ? '' + annotation.link + + '' : ''; + + // tags text += (annotation.tags) ? '' + annotation.tags + '
' : ''; // if older annotation i.e w/o comment,title etc fields @@ -563,7 +572,16 @@ }); // utilities and helper functions to go here - swtr.utils = {}; + swtr.utils = { + linkify: function(link) { + if(link.match('http')) { + return link; + } + else { + return 'http://' + link; + } + } + }; //swtr.AppView = AppView;