X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/f938afb8ab4cb091d12e0ef0311eaea14b774798..b5f8d214ba00903379f8716ef563f19743a120b6:/redakcja/static/js/wiki/view_gallery.js diff --git a/redakcja/static/js/wiki/view_gallery.js b/redakcja/static/js/wiki/view_gallery.js index aa39e15f..9630afb5 100644 --- a/redakcja/static/js/wiki/view_gallery.js +++ b/redakcja/static/js/wiki/view_gallery.js @@ -65,7 +65,7 @@ event.preventDefault(); self.setPage($(this).val()); }); - + $('.previous-page', this.$element).click(function(){ self.setPage(parseInt(self.$numberInput.val(),10) - 1); }); @@ -139,6 +139,7 @@ ScanGalleryPerspective.prototype.setPage = function(newPage){ newPage = normalizeNumber(newPage, this.doc.galleryImages.length); + $('#imagesCount').html("/"+this.doc.galleryImages.length); this.$numberInput.val(newPage); this.config().page = newPage; $('.gallery-image img', this.$element).attr('src', this.doc.galleryImages[newPage - 1]); @@ -224,6 +225,9 @@ $.wiki.Perspective.prototype.onEnter.call(this); + $('.vsplitbar').not('.active').trigger('click'); + $(".vsplitbar-title").html("↓ GALERIA ↓"); + this.doc.refreshGallery({ success: function(doc, data){ self.$image.show(); @@ -248,4 +252,4 @@ $.wiki.ScanGalleryPerspective = ScanGalleryPerspective; -})(jQuery); \ No newline at end of file +})(jQuery);