From 14bd9f367ed01cb56bdf82356f7ab55bfffb17d4 Mon Sep 17 00:00:00 2001 From: Marcin Koziej Date: Thu, 19 Apr 2012 14:01:39 +0200 Subject: [PATCH] fix overwriting of saved state. --- redakcja/static/js/wiki/base.js | 2 +- redakcja/static/js/wiki/view_gallery.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/redakcja/static/js/wiki/base.js b/redakcja/static/js/wiki/base.js index 8625b112..ad2ee3a9 100644 --- a/redakcja/static/js/wiki/base.js +++ b/redakcja/static/js/wiki/base.js @@ -10,7 +10,7 @@ "perspectives": { "ScanGalleryPerspective": { "show": true, - "page": 1 + "page": undefined }, "CodeMirrorPerspective": {} /* diff --git a/redakcja/static/js/wiki/view_gallery.js b/redakcja/static/js/wiki/view_gallery.js index 4b74b3e8..315a421b 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); -- 2.20.1