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:
-rw-r--r--css/slideshow.css2
-rw-r--r--js/galleryfileaction.js2
-rw-r--r--js/galleryview.js2
-rw-r--r--js/slideshowcontrols.js23
4 files changed, 13 insertions, 16 deletions
diff --git a/css/slideshow.css b/css/slideshow.css
index ec85500e..9a2b8679 100644
--- a/css/slideshow.css
+++ b/css/slideshow.css
@@ -113,10 +113,10 @@
}
#slideshow > .play {
- display: none;
}
#slideshow > .pause {
+ display: none;
}
#slideshow > .progress {
diff --git a/js/galleryfileaction.js b/js/galleryfileaction.js
index cf222a60..04264063 100644
--- a/js/galleryfileaction.js
+++ b/js/galleryfileaction.js
@@ -126,7 +126,7 @@
* @private
*/
_startSlideshow: function (images, start) {
- galleryFileAction.slideShow.setImages(images);
+ galleryFileAction.slideShow.setImages(images, false);
var scrollTop = galleryFileAction.scrollContainer.scrollTop();
// This is only called when the slideshow is stopped
diff --git a/js/galleryview.js b/js/galleryview.js
index 5d3ae12e..23ec59eb 100644
--- a/js/galleryview.js
+++ b/js/galleryview.js
@@ -67,7 +67,7 @@
var album = Gallery.albumMap[albumPath];
var images = album.images;
var startImage = Gallery.imageMap[path];
- Gallery.slideShow(images, startImage);
+ Gallery.slideShow(images, startImage, false);
},
/**
diff --git a/js/slideshowcontrols.js b/js/slideshowcontrols.js
index face0753..f1f37172 100644
--- a/js/slideshowcontrols.js
+++ b/js/slideshowcontrols.js
@@ -49,24 +49,21 @@
* Updates the controls
*
* @param {{name:string, url: string, path: string, fallBack: string}[]} images
- * @param {bool} play
+ * @param {bool} autoPlay
*/
- update: function (images, play) {
+ update: function (images, autoPlay) {
this.images = images;
this.active = true;
- // hide arrows and play/pause when only one pic
- this.container.find('.next, .previous').toggle(this.images.length > 1);
- if (this.images.length === 1) {
- this.container.find('.play, .pause').hide();
- }
+ this.container.find('.pause').hide();
+
+ // Hide prev/next and play buttons when we only have one pic
+ this.container.find('.next, .previous, .play').toggle(this.images.length > 1);
// Hide the toggle background button until we have something to show
this.container.find('.changeBackground').hide();
- if (play) {
+ if (autoPlay) {
this._play();
- } else {
- this._pause();
}
},
@@ -87,6 +84,7 @@
* Stops the timed slideshow
*/
stop: function () {
+ this.playing = false;
this.slideshow.stop();
this.zoomablePreview.stop();
@@ -211,7 +209,7 @@
},
/**
- * Starts the times slideshow
+ * Starts the timed slideshow
*
* @private
*/
@@ -238,8 +236,7 @@
* @private
*/
_playPauseButtonToggle: function () {
- this.container.find('.pause').toggle();
- this.container.find('.play').toggle();
+ this.container.find('.play, .pause').toggle();
},
/**