mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-18 19:48:53 +00:00
(js) Set height/width of gravatar's image
This commit is contained in:
@@ -16,9 +16,11 @@
|
||||
restrict: 'AE',
|
||||
replace: true,
|
||||
required: 'email',
|
||||
template: '<img ng-src="{{url}}" />',
|
||||
template: '<img ng-src="{{url}}"/>',
|
||||
link: function(scope, element, attrs) {
|
||||
var size = attrs.size;
|
||||
element.attr('width', size);
|
||||
element.attr('height', size);
|
||||
attrs.$observe('email', function(value) {
|
||||
if (!value) { return; }
|
||||
scope.url = Gravatar(value, size);
|
||||
|
||||
Reference in New Issue
Block a user