diff -r 37a4566bb7ee -r c472984db275 src/widgets/Annotation.js
--- a/src/widgets/Annotation.js Wed Apr 03 15:40:58 2013 +0200
+++ b/src/widgets/Annotation.js Wed Apr 03 15:44:17 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))
+ }
});
}