Poprawienie przycisku "wersja do druku"
authorŁukasz Rekucki <lrekucki@gmail.com>
Fri, 9 Oct 2009 10:08:15 +0000 (12:08 +0200)
committerŁukasz Rekucki <lrekucki@gmail.com>
Fri, 9 Oct 2009 10:08:15 +0000 (12:08 +0200)
apps/api/handlers/library_handlers.py
project/static/js/views/html.js

index d7438a1..f1b683f 100644 (file)
@@ -216,7 +216,7 @@ class DocumentHTMLHandler(BaseHandler):
     allowed_methods = ('GET')
 
     @hglibrary
     allowed_methods = ('GET')
 
     @hglibrary
-    def read(self, request, docid, lib, stylesheet='partial'):
+    def read(self, request, docid, lib, stylesheet='full'):
         """Read document as html text"""
         try:
             revision = request.GET.get('revision', 'latest')
         """Read document as html text"""
         try:
             revision = request.GET.get('revision', 'latest')
index ebdf90a..a6d519c 100644 (file)
@@ -44,8 +44,14 @@ var HTMLView = View.extend({
 
         if(this.$printLink) this.$printLink.unbind();
         this._super();
 
         if(this.$printLink) this.$printLink.unbind();
         this._super();
+
         this.$printLink = $('.html-print-link', this.element);
 
         this.$printLink = $('.html-print-link', this.element);
 
+        if(this.$printLink) {
+            var base = this.$printLink.attr('ui:baseref');
+            this.$printLink.attr('href', base + "?revision=" + this.model.get('revision'));
+        }
+
         this.element.bind('click', this.itemClicked.bind(this));
     },
   
         this.element.bind('click', this.itemClicked.bind(this));
     },