From 651925889ca81dadf344d6bc412373eb5f3801fc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Rekucki?= Date: Fri, 9 Oct 2009 12:08:15 +0200 Subject: [PATCH] Poprawienie przycisku "wersja do druku" --- apps/api/handlers/library_handlers.py | 2 +- project/static/js/views/html.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/api/handlers/library_handlers.py b/apps/api/handlers/library_handlers.py index d7438a18..f1b683fd 100644 --- a/apps/api/handlers/library_handlers.py +++ b/apps/api/handlers/library_handlers.py @@ -216,7 +216,7 @@ class DocumentHTMLHandler(BaseHandler): 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') diff --git a/project/static/js/views/html.js b/project/static/js/views/html.js index ebdf90af..a6d519c9 100644 --- a/project/static/js/views/html.js +++ b/project/static/js/views/html.js @@ -44,8 +44,14 @@ var HTMLView = View.extend({ if(this.$printLink) this.$printLink.unbind(); this._super(); + 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)); }, -- 2.20.1