diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-02-20 13:37:23 +0100 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-02-20 13:37:23 +0100 |
commit | 20b740f8e4674ab16f44127bc809a35b8db24910 (patch) | |
tree | cd0793b8d7f51efc0de3db6b242b79bdfe4ef585 /core/js/jquery.avatar.js | |
parent | 92d57cb5a7de41e576c9cbd3fae70e9802561187 (diff) | |
download | nextcloud-server-20b740f8e4674ab16f44127bc809a35b8db24910.tar.gz nextcloud-server-20b740f8e4674ab16f44127bc809a35b8db24910.zip |
do not show display name on mobile when profile picture is present
Diffstat (limited to 'core/js/jquery.avatar.js')
-rw-r--r-- | core/js/jquery.avatar.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/core/js/jquery.avatar.js b/core/js/jquery.avatar.js index 6012eccfad6..02a40c088b4 100644 --- a/core/js/jquery.avatar.js +++ b/core/js/jquery.avatar.js @@ -39,10 +39,15 @@ * This will behave like the first example, but it will hide the avatardiv, if * it will display the default placeholder. undefined is the ie8fix from * example 4 and can be either true, or false/undefined, to be ignored. + * + * 6. $('.avatardiv').avatar('jdoe', 128, undefined, true, callback); + * This will behave like the above example, but it will call the function + * defined in callback after the avatar is placed into the DOM. + * */ (function ($) { - $.fn.avatar = function(user, size, ie8fix, hidedefault) { + $.fn.avatar = function(user, size, ie8fix, hidedefault, callback) { if (typeof(size) === 'undefined') { if (this.height() > 0) { size = this.height(); @@ -91,6 +96,9 @@ $div.html('<img src="'+url+'">'); } } + if(typeof callback === 'function') { + callback(); + } }); }); }; |