diff -r 37a4566bb7ee -r c472984db275 src/widgets/Segments.js --- a/src/widgets/Segments.js Wed Apr 03 15:40:58 2013 +0200 +++ b/src/widgets/Segments.js Wed Apr 03 15:44:17 2013 +0200 @@ -22,7 +22,7 @@ + '
'; IriSP.Widgets.Segments.prototype.annotationTemplate = - '
' @@ -98,18 +98,15 @@ .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_$) + .appendTo(list_$); + IriSP.attachDndData(_el, { + title: _annotation.title, + description: _annotation.description, + uri: (typeof _annotation.url !== "undefined" + ? _annotation.url + : (document.location.href.replace(/#.*$/,'') + '#id=' + _annotation.id)), + image: _annotation.thumbnail + }); _annotation.on("select", function() { _this.$segments.each(function() { var _segment = IriSP.jQuery(this);