mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-08 05:17:15 +00:00
(js) Set height/width of gravatar's image
This commit is contained in:
1 parent
6a835c745f
commit
11cf483e2c
1 file changed
+3
-1
@@ -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