diff -r 288135d65fc2 -r 6030bef81a51 web/res/metadataplayer/Annotation.js --- a/web/res/metadataplayer/Annotation.js Fri Mar 29 18:08:26 2013 +0100 +++ b/web/res/metadataplayer/Annotation.js Wed Apr 10 15:50:26 2013 +0200 @@ -34,7 +34,7 @@ + '
' + '
' + '{{#show_social}}
{{/show_social}}' - + '

{{#show_annotation_type}} » {{/show_annotation_type}} ' + + '

{{#show_annotation_type}} » {{/show_annotation_type}} ' + '( - )

' + '

{{l10n.excerpt_from}} ' + '( - )

' @@ -167,16 +167,15 @@ this.source.getAnnotations().on("found", highlightTitleAndDescription); this.source.getAnnotations().on("not-found", highlightTitleAndDescription); this.source.getAnnotations().on("search-cleared", highlightTitleAndDescription); - this.$.find("[draggable]").on("dragstart", function(e) { - var url = (typeof currentAnnotation.url !== "undefined" - ? currentAnnotation.url - : (document.location.href.replace(/#.*$/,'') + '#id=' + currentAnnotation.id)); - e.originalEvent.dataTransfer.setData("text/x-iri-title",currentAnnotation.title); - e.originalEvent.dataTransfer.setData("text/x-iri-description",currentAnnotation.description); - e.originalEvent.dataTransfer.setData("text/x-iri-uri",url); - if (typeof currentAnnotation.thumbnail !== "undefined" && currentAnnotation.thumbnail) { - e.originalEvent.dataTransfer.setData("text/x-iri-image",currentAnnotation.thumbnail); - } + IriSP.attachDndData(this.$.find("h3"), function() { + return { + title: currentAnnotation.title, + description: currentAnnotation.description, + image: currentAnnotation.thumbnail, + uri: (typeof currentAnnotation.url !== "undefined" + ? currentAnnotation.url + : (document.location.href.replace(/#.*$/,'') + '#id=' + currentAnnotation.id)) + } }); }