Moar work

This commit is contained in:
Julius Haertl
2016-08-15 11:29:11 +02:00
parent 0e7a71787f
commit c958f9b37c
25 changed files with 616 additions and 414 deletions

View File

@@ -2,17 +2,15 @@ app.directive('avatar', function() {
'use strict';
return {
restrict: 'A',
scope: false,
link: function(scope, elm, attr) {
return attr.$observe('user', function() {
if (attr.user) {
var url = OC.generateUrl('/avatar/{user}/{size}',
{user: attr.user, size: Math.ceil(attr.size * window.devicePixelRatio)});
var inner = '<img src="'+url+'" />';
elm.html(inner);
//elm.avatar(attr.user, attr.size);
scope: true,
link: function(scope, element, attr){
attr.$observe('displayname', function(value){
console.log(value);
if(value!==undefined) {
$(element).avatar(value, 32);
}
});
}
};
});