Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-09-10 00:44:34 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-13 03:41:12 +0300
commit2473cb2add71d48507d2c8d0870ae5714a21cf27 (patch)
tree5a9b2d39d7bf3b8e4a1f118be6b60ab27f99a8b8 /js/galleryview.js
parent1b9bc81a5611ff33a2e9a3726d3d033cd56b20ea (diff)
Add spinning feedback at the bottom of loading rows
Fixes #130
Diffstat (limited to 'js/galleryview.js')
-rw-r--r--js/galleryview.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/js/galleryview.js b/js/galleryview.js
index 93339fde..95118f0d 100644
--- a/js/galleryview.js
+++ b/js/galleryview.js
@@ -83,6 +83,7 @@
}
this.clear();
+ $('#loading-indicator').show();
if (albumPath !== Gallery.currentAlbum) {
this.loadVisibleRows.loading = false;
@@ -100,8 +101,7 @@
// Loading rows without blocking the execution of the rest of the script
setTimeout(function () {
this.loadVisibleRows.activeIndex = 0;
- this.loadVisibleRows(Gallery.albumMap[Gallery.currentAlbum],
- Gallery.currentAlbum);
+ this.loadVisibleRows(Gallery.albumMap[Gallery.currentAlbum], Gallery.currentAlbum);
}.bind(this), 0);
},
@@ -164,6 +164,7 @@
// If we've reached the end of the album, we kill the loader
if (!(album.viewedItems < album.subAlbums.length + album.images.length)) {
view.loadVisibleRows.loading = null;
+ $('#loading-indicator').hide();
return;
}
@@ -181,10 +182,6 @@
if (view.requestId === row.requestId) {
return row.getDom().then(function (dom) {
- // defer removal of loading class to trigger CSS3 animation
- _.defer(function () {
- dom.removeClass('loading');
- });
if (Gallery.currentAlbum !== path) {
view.loadVisibleRows.loading = null;
return; //throw away the row if the user has navigated away in the
@@ -203,9 +200,11 @@
// No more rows to load at the moment
view.loadVisibleRows.loading = null;
+ $('#loading-indicator').hide();
}, function () {
// Something went wrong, so kill the loader
view.loadVisibleRows.loading = null;
+ $('#loading-indicator').hide();
});
}
// This is the safest way to do things