Fixed images used fadein even if loaded from cache
This commit is contained in:
parent
1610659910
commit
c6be637d53
2 changed files with 6 additions and 5 deletions
1
TODO
1
TODO
|
@ -16,7 +16,6 @@ first major release.
|
||||||
http://svn.apache.org/repos/asf/httpd/httpd/trunk/README
|
http://svn.apache.org/repos/asf/httpd/httpd/trunk/README
|
||||||
- misc: add spinner to forms such as registration, login, settings...
|
- misc: add spinner to forms such as registration, login, settings...
|
||||||
- misc: improve throbber appearance
|
- misc: improve throbber appearance
|
||||||
- misc: try not to fade in images that are already in browser cache
|
|
||||||
|
|
||||||
- post notes
|
- post notes
|
||||||
- "add note" in sidebar creates new note in the middle of image
|
- "add note" in sidebar creates new note in the middle of image
|
||||||
|
|
|
@ -25,10 +25,12 @@ App.Util = function(_, jQuery, marked, promise) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadImagesNicely($img) {
|
function loadImagesNicely($img) {
|
||||||
$img.css('opacity', '0');
|
if (!$img.get(0).complete) {
|
||||||
$img.bind('load', function() {
|
$img.css('opacity', '0');
|
||||||
$img.animate({opacity: 1}, 'fast');
|
$img.bind('load', function() {
|
||||||
});
|
$img.animate({opacity: 1}, 'fast');
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function promiseTemplate(templateName) {
|
function promiseTemplate(templateName) {
|
||||||
|
|
Loading…
Reference in a new issue