add a revert button to return scan gallery to first page for this book
authorMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Thu, 19 Apr 2012 12:24:30 +0000 (14:24 +0200)
committerMarcin Koziej <marcin.koziej@nowoczesnapolska.org.pl>
Thu, 19 Apr 2012 12:24:30 +0000 (14:24 +0200)
apps/wiki/templates/wiki/tabs/gallery_view.html
redakcja/static/icons/revert.png [new file with mode: 0644]
redakcja/static/js/wiki/view_gallery.js

index 1176797..22f98c9 100644 (file)
@@ -2,6 +2,10 @@
 <div id="side-gallery">
     <!-- gallery toolbar -->
     <div class="toolbar">
+        <button class="start-page">
+            <img src="{{STATIC_URL}}icons/revert.png"
+               alt="{% trans "Start page" %}" title="{% trans "Start page" %}"/>
+        </button>
         <button class="previous-page">
             <img src="{{STATIC_URL}}icons/go-previous.png"
                alt="{% trans "Previous" %}" title="{% trans "Previous" %}"/>
diff --git a/redakcja/static/icons/revert.png b/redakcja/static/icons/revert.png
new file mode 100644 (file)
index 0000000..de96265
Binary files /dev/null and b/redakcja/static/icons/revert.png differ
index 315a421..65a716a 100644 (file)
                 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);
             });