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-19 09:52:24 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-19 09:52:24 +0300
commit4bcf1ed4cbe9bde7fd16f8ae0220c6685023fd45 (patch)
tree84b01d3a70882deea5d915037b09fcdfa6c245e5 /js/galleryview.js
parent7a0bbb2b146cc0ae285681a227cc992bd98f46eb (diff)
Remove high quality spinner so that themes can use what they want
Diffstat (limited to 'js/galleryview.js')
-rw-r--r--js/galleryview.js20
1 files changed, 5 insertions, 15 deletions
diff --git a/js/galleryview.js b/js/galleryview.js
index 5216ceb4..7dd4c13c 100644
--- a/js/galleryview.js
+++ b/js/galleryview.js
@@ -1,4 +1,4 @@
-/* global Gallery, Spinner */
+/* global Gallery */
(function ($, _, OC, t, Gallery) {
"use strict";
/**
@@ -9,20 +9,12 @@
var View = function () {
this.element = $('#gallery');
this.loadVisibleRows.loading = false;
- this.spinnerDiv = $('#loading-indicator').get(0);
- var spinnerOptions = {
- color: '#999',
- hwaccel: true
- };
- this.spinner = new Spinner(spinnerOptions).spin(this.spinnerDiv);
};
View.prototype = {
element: null,
breadcrumb: null,
requestId: -1,
- spinnerDiv: 0,
- spinner: null,
/**
* Removes all thumbnails from the view
@@ -43,10 +35,8 @@
this.clear();
if (albumPath === '') {
Gallery.showEmpty();
- this.spinner.stop(this.spinnerDiv);
} else {
Gallery.showEmptyFolder();
- this.spinner.stop(this.spinnerDiv);
Gallery.currentAlbum = albumPath;
this.breadcrumb = new Gallery.Breadcrumb(albumPath);
this.breadcrumb.setMaxWidth($(window).width() - Gallery.buttonsWidth);
@@ -94,7 +84,7 @@
}
this.clear();
- this.spinner.spin(this.spinnerDiv);
+ $('#loading-indicator').show();
if (albumPath !== Gallery.currentAlbum) {
this.loadVisibleRows.loading = false;
@@ -161,7 +151,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;
- view.spinner.stop(view.spinnerDiv);
+ $('#loading-indicator').hide();
return;
}
@@ -197,11 +187,11 @@
// No more rows to load at the moment
view.loadVisibleRows.loading = null;
- view.spinner.stop(view.spinnerDiv);
+ $('#loading-indicator').hide();
}, function () {
// Something went wrong, so kill the loader
view.loadVisibleRows.loading = null;
- view.spinner.stop(view.spinnerDiv);
+ $('#loading-indicator').hide();
});
}
// This is the safest way to do things