]*>|"+atype+">$", "g")
- xml_text = serializer.serializeToString(annos[i]).replace(ann_expr, "");
+ annos.each(function (i, elem) {
+ xml_text = serializer.serializeToString(elem).replace(ann_expr, "");
xml2html({
xml: "" + xml_text + "",
success: function(xml_text){
@@ -97,11 +137,13 @@
elem.sortby = $(elem).text().trim();
$(elem).append(""+ xml_text.replace("&", "&", "g").replace("<", "<", "g") +"
")
anno_list.push(elem);
+ $(".src", elem).click(function() { self.goToAnnotation(self, this); });
counter--;
if (!counter) {
anno_list.sort(function(a, b){return a.sortby.localeCompare(b.sortby);});
- self.$annos.append(anno_list);
+ for (i in anno_list)
+ self.$annos.append(anno_list[i]);
self.$spinner.hide();
self.$annos.show();
}
@@ -115,7 +157,7 @@
self.$error.show();
}
});
- }
+ });
}
}