Add loading icon on avatar

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-12-14 08:29:22 +01:00 committed by Julius Härtl
parent 0f235aec1f
commit a118817a69
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 5 additions and 3 deletions

View File

@ -140,12 +140,13 @@
// If the new image loads successfully set it.
img.onload = function() {
$div.show();
$div.text('');
$div.append(img);
$div.clearimageplaceholder();
};
$div.addClass('icon-loading');
$div.show();
img.width = size;
img.height = size;
img.src = url;

View File

@ -2,7 +2,7 @@
* ownCloud
*
* @author John Molakvoæ
* @copyright 2016 John Molakvoæ <fremulon@protonmail.com>
* @copyright 2016-2017 John Molakvoæ <skjnldsv@protonmail.com>
* @author Morris Jobke
* @copyright 2013 Morris Jobke <morris.jobke@gmail.com>
*
@ -47,7 +47,7 @@
* <div id="albumart" style="background-color: hsl(123, 90%, 65%); ... ">A</div>
*
*/
/*
* Alternatively, you can use the prototype function to convert your string to hsl colors:
*
@ -156,5 +156,6 @@
this.css('text-align', '');
this.css('line-height', '');
this.css('font-size', '');
this.removeClass('icon-loading');
};
}(jQuery));