From: Ɓukasz Rekucki Date: Fri, 9 Oct 2009 10:08:15 +0000 (+0200) Subject: Poprawienie przycisku "wersja do druku" X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/651925889ca81dadf344d6bc412373eb5f3801fc?ds=sidebyside Poprawienie przycisku "wersja do druku" --- 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)); },