summaryrefslogtreecommitdiffstats
path: root/core/js/jquery.avatar.js
Commit message (Collapse)AuthorAgeFilesLines
* Move jQuery plugins into modules and add them to the bundleChristoph Wurst2019-01-291-146/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use empty alt tag for avatars since there is always the name next to itJoas Schilling2018-08-261-0/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use small loading indicator for avatars smaller than 32pxJulius Härtl2018-07-251-1/+5
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Remove show() function since we always show the avatar containerJulius Härtl2018-01-081-4/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Also do callback on the failing functionRoeland Jago Douma2017-12-191-0/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix fallback when image loading failsJulius Härtl2017-12-191-46/+27
| | | | | | | | | | | | | | | With the new avatar endpoint there is no difference between unknown users and errors when generating the placeholder avatar. Therefore the avatar function will now show the old placeholder if both a user and displayname was given as parameters. In case there is no displayname provided we cannot build the proper placeholder so the unknown user placeholder is shown. The displayname is not required for the avatar anymore, so we can get rid of the old code path for placeholders. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Still call callback once avatar is loadedRoeland Jago Douma2017-12-191-0/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add loading icon on avatarJohn Molakvoæ (skjnldsv)2017-12-191-1/+2
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Since we now always generate an avatar do not load the placeholderRoeland Jago Douma2017-12-191-5/+0
| | | | | | | The js and php code differ ever so slightly. So having the placeholder for a second and then the image is just weird. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add empty alt text to avatars as they are decorative next to usernamesJan-Christoph Borchardt2017-09-291-2/+2
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Don't show placeholder when we have loaded the avatar imageRoeland Jago Douma2017-09-261-0/+1
| | | | | | | Fixes #6618 Else it shows up as background to transparent avatars Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Extract setting the avatar for the unknown user to its own functionDaniel Calviño Sánchez2017-09-201-4/+7
| | | | Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Use "?" instead of user ID as seed for the image placeholderDaniel Calviño Sánchez2017-09-201-1/+1
| | | | | | | | | | The seed of the image placeholder is needed to generate the background color of the image, but as the background color is later overriden any seed could be used. When no text is explicitly given the seed is used as text too, so there is no need to pass the user ID and simply using "?" as seed is enough. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Unify appearance of avatars for undefined and unknown usersDaniel Calviño Sánchez2017-09-201-0/+1
| | | | | | | | | | | | | | When calling the jQuery avatar plugin with a user that did not exist (that is, users for which "/avatar/{user}/{size}" return a JSON response with an empty "displayname" value) "?" on a grey background was shown. However, if the jQuery avatar plugin was called with an undefined JavaScript value then "?" was shown on a bluish background. This commit unifies both cases to use the grey background. The unit tests were also modified to ensure that the grey background is used in both cases. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
* Fix testsRoeland Jago Douma2017-03-291-2/+6
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow avatars for full numeric usersRoeland Jago Douma2017-03-291-0/+3
| | | | | | | | | | Fixes #4087 Because of fancy javascript if a full numeric uid was used javascript would convert this to an int. Now we just convert everything to a string first. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* use ? instead of X for avatar name fallbackJan-Christoph Borchardt2016-11-221-3/+3
| | | | Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
* Cache avatars properlyRoeland Jago Douma2016-08-301-4/+19
| | | | | * Set proper caching headers for avatars (15 minutes) * For our own avatar use some extra logic to invalidate when we update
* core: Fix typos (found by codespell)Stefan Weil2016-04-041-2/+2
| | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Show default placeholder if avatar image can't be fetchedMorris Jobke2016-01-201-2/+5
| | | | | * fixes owncloud/documents#601 * ref #14564
* [Avatars] JS should not load same avatar twiceRoeland Jago Douma2015-12-041-19/+40
| | | | | | | | | Old code first dit an ajax request to the avatar. Then a new image object with the same src was created and since we do not cache avatars yet :( this resulted in 2 sequential requests to the exact same URL Now if you set the displayname it will first set the placeholder and then load the avatar in the background. Only once this time!
* Added js tests for jquery.avatarRoeland Jago Douma2015-09-141-1/+1
| | | | * Ceil avatar request size
* Remove requesttoken for avatarsLukas Reschke2015-08-231-2/+2
| | | | First step for https://github.com/owncloud/core/issues/11915
* Color avatars of non-existing users gray and display X insteadJoas Schilling2015-03-131-1/+3
|
* use high resolution avatars on highdpi screensRobin Appelman2014-04-041-3/+3
|
* Replace OC.Router.generate() with OC.generateUrl()Thomas Müller2014-03-021-20/+21
|
* do not show display name on mobile when profile picture is presentJan-Christoph Borchardt2014-02-201-1/+9
|
* Fix broken users page when a username consists of digits only, fixes #5560Arthur Schiwon2013-10-251-1/+1
|
* Renamed current placeholder jquery plugin to imageplaceholderVincent Petry2013-10-231-3/+3
| | | | | This is to prevent conflicts with jquery libs that handle text placeholders in IE8
* Hide defaultavatar in #header and don't darken proper avatars in #headerkondou2013-10-041-5/+15
|
* Base defaultavatar text on displaynamekondou2013-09-281-1/+5
| | | | Fix #4876
* Clean up avatars and preliminary use JSON->rawlist.phpkondou2013-09-051-10/+10
|
* Have login-checks and CSRF checkskondou2013-09-051-1/+1
|
* Fix unwanted caching in IE8kondou2013-09-031-3/+11
|
* Better naming than "ava" & "data", cache timeout, use ↵kondou2013-09-011-7/+9
| | | | OC.Router.registerLoadedCallback()
* Add a description for $.avatar() and remove TODOs @raghunayyar fixedkondou2013-08-311-0/+27
|
* Deal with OC.Router.generate()kondou2013-08-311-4/+4
|
* Sanitize displayname, respect data @ $element, fix routename, clean after ↵kondou2013-08-311-2/+11
| | | | cropping, updateAvatar with displayname
* Finish cropper, Get rid of TODOs, Improve \OCP\Avatar and "fix" unitestskondou2013-08-301-12/+12
|
* Use defaultavatarskondou2013-08-291-0/+37