X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/73ef2b8442dc95f8b7279de812c30ac8626d5f39..f469680f323a7a4c9cfe894b5af13d4357f7bca4:/redakcja/static/js/wiki/view_gallery.js?ds=inline

diff --git a/redakcja/static/js/wiki/view_gallery.js b/redakcja/static/js/wiki/view_gallery.js
index 4b74b3e8..65a716af 100644
--- a/redakcja/static/js/wiki/view_gallery.js
+++ b/redakcja/static/js/wiki/view_gallery.js
@@ -55,7 +55,8 @@
 
             this.dimensions = {};
             this.zoomFactor = 1;
-            this.config().page = CurrentDocument.galleryStart;
+	    if (this.config().page == undefined)
+		this.config().page = CurrentDocument.galleryStart;
             this.$element = $("#side-gallery");
             this.$numberInput = $('.page-number', this.$element);
 
@@ -71,6 +72,10 @@
                 self.setPage($(this).val());
             });
                     
+	    $('.start-page', this.$element).click(function(){
+		self.setPage(CurrentDocument.galleryStart);
+	    });
+
             $('.previous-page', this.$element).click(function(){
                 self.setPage(parseInt(self.$numberInput.val(),10) - 1);
             });