Add handling of twitter avatars: if they do not load, then a default image will be used
This commit is contained in:
		
							parent
							
								
									f20e1d9c54
								
							
						
					
					
						commit
						78f6523068
					
				
					 4 changed files with 77 additions and 60 deletions
				
			
		|  | @ -4352,6 +4352,27 @@ quayApp.directive('buildProgress', function () { | |||
| }); | ||||
| 
 | ||||
| 
 | ||||
| quayApp.directive('twitterView', function () { | ||||
|   var directiveDefinitionObject = { | ||||
|     priority: 0, | ||||
|     templateUrl: '/static/directives/twitter-view.html', | ||||
|     replace: false, | ||||
|     transclude: true, | ||||
|     restrict: 'C', | ||||
|     scope: { | ||||
|       'avatarUrl': '@avatarUrl', | ||||
|       'authorName': '@authorName', | ||||
|       'authorUser': '@authorUser', | ||||
|       'messageUrl': '@messageUrl', | ||||
|       'messageDate': '@messageDate' | ||||
|     }, | ||||
|     controller: function($scope, $element) { | ||||
|     } | ||||
|   }; | ||||
|   return directiveDefinitionObject; | ||||
| }); | ||||
| 
 | ||||
| 
 | ||||
| quayApp.directive('notificationView', function () { | ||||
|   var directiveDefinitionObject = { | ||||
|     priority: 0, | ||||
|  | @ -4747,6 +4768,18 @@ quayApp.directive('tagSpecificImagesView', function () { | |||
| }); | ||||
| 
 | ||||
| 
 | ||||
| quayApp.directive('fallbackSrc', function () { | ||||
|   return { | ||||
|     restrict: 'A', | ||||
|     link: function postLink(scope, element, attributes) { | ||||
|       element.bind('error', function() { | ||||
|         angular.element(this).attr("src", attributes.fallbackSrc); | ||||
|       }); | ||||
|     } | ||||
|   }; | ||||
| }); | ||||
| 
 | ||||
| 
 | ||||
| // Note: ngBlur is not yet in Angular stable, so we add it manaully here.
 | ||||
| quayApp.directive('ngBlur', function() { | ||||
|   return function( scope, elem, attrs ) { | ||||
|  |  | |||
		Reference in a new issue