Commit efa5ac15621e79b2f6b83b0d77f50b5c44f2df50

  • avatar
  • arvind
  • Tue Sep 09 19:17:51 IST 2014
Show the annotations of a image in the linked-data area, under the
gallery view.
  
786786
787787 var GalleryView = Backbone.View.extend({
788788 el: $("#gallery"),
789 events: {
790 "click img":"onImgClick"
791 },
789792 initialize: function() {
790793 this.template = _.template($("#gallery-item-template").html());
794 this.cover_template = _.template($("#ocd-item-cover-template").html());
791795 this.render();
792796 },
793797 render: function() {
811811 }
812812 $(this.el).html('');
813813
814 },
815 onImgClick: function(e){
816 var swts = swtr.LDs.filter(function(k) {
817 if(k.get('where') == $(e.currentTarget).attr('src')) {
818 return k;
819 }
820 });
821 anno.makeAnnotatable($(e.currentTarget)[0]);
822 _.each(swts, function(swt) {
823 var anno_obj = swt.get('how');
824 anno_obj['editable'] = false;
825 anno.addAnnotation(anno_obj);
826 });
827 this.$(".annotorious-item-unfocus").css("opacity", '0.6');
814828 }
815829 });
816830