diff -r f201499f2dd8 -r 66ae5723b2de web/res/metadataplayer/Segments.js --- a/web/res/metadataplayer/Segments.js Thu Feb 14 16:21:16 2013 +0100 +++ b/web/res/metadataplayer/Segments.js Thu Feb 28 11:37:18 2013 +0100 @@ -22,7 +22,7 @@ + '
'; IriSP.Widgets.Segments.prototype.annotationTemplate = - '
' @@ -98,6 +98,17 @@ .click(function() { _annotation.trigger("click"); }) + .on("dragstart", function(e) { + var url = (typeof _annotation.url !== "undefined" + ? _annotation.url + : (document.location.href.replace(/#.*$/,'') + '#id=' + _annotation.id)); + e.originalEvent.dataTransfer.setData("text/x-iri-title",_annotation.title); + e.originalEvent.dataTransfer.setData("text/x-iri-description",_annotation.description); + e.originalEvent.dataTransfer.setData("text/x-iri-uri",url); + if (typeof _annotation.thumbnail !== "undefined" && _annotation.thumbnail) { + e.originalEvent.dataTransfer.setData("text/x-iri-image",_annotation.thumbnail); + } + }) .appendTo(list_$) _annotation.on("select", function() { _this.$segments.each(function() {