fix overwriting of saved state.
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Thu, 19 Apr 2012 12:01:39 +0000 (14:01 +0200)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Thu, 19 Apr 2012 12:01:39 +0000 (14:01 +0200)
redakcja/static/js/wiki/base.js
redakcja/static/js/wiki/view_gallery.js

index 8625b11..ad2ee3a 100644 (file)
@@ -10,7 +10,7 @@
                        "perspectives": {
                                "ScanGalleryPerspective": {
                                        "show": true,
                        "perspectives": {
                                "ScanGalleryPerspective": {
                                        "show": true,
-                                       "page": 1
+                                       "page": undefined
                                },
                                "CodeMirrorPerspective": {}
                                /*
                                },
                                "CodeMirrorPerspective": {}
                                /*
index 4b74b3e..315a421 100644 (file)
@@ -55,7 +55,8 @@
 
             this.dimensions = {};
             this.zoomFactor = 1;
 
             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);
 
             this.$element = $("#side-gallery");
             this.$numberInput = $('.page-number', this.$element);