src/widgets/LatestAnnotation.js
changeset 1056 3d19cbe56fcb
parent 1055 b45522b1b2af
child 1069 2409cb4cebaf
equal deleted inserted replaced
1055:b45522b1b2af 1056:3d19cbe56fcb
   112     if (this.selectable_annotations){
   112     if (this.selectable_annotations){
   113         this.onMdpEvent("AnnotationsList.refresh", function(){
   113         this.onMdpEvent("AnnotationsList.refresh", function(){
   114             _this.getWidgetAnnotations().forEach(function(_annotation){
   114             _this.getWidgetAnnotations().forEach(function(_annotation){
   115                 _annotation.off("click");
   115                 _annotation.off("click");
   116                 _annotation.on("click", function(){
   116                 _annotation.on("click", function(){
   117                     _users = this.source.users_data.filter(function(_user_data){
   117                     var _user = {},
   118                         return _user_data.username == _annotation.creator
   118                         _user_display_string = "",
   119                     })
   119                         _users = this.source.users_data.filter(function(_user_data){
       
   120                             return _user_data.username == _annotation.creator
       
   121                         });
   120                     if (_users.length == 0){
   122                     if (_users.length == 0){
   121                         _user.username = _annotation.creator;
   123                         _user.username = _annotation.creator;
   122                     }
   124                     }
   123                     else {
   125                     else {
   124                         _user = _users[0];
   126                         _user = _users[0];