Return-Path: Delivered-To: apmail-incubator-jspwiki-dev-archive@minotaur.apache.org Received: (qmail 30443 invoked from network); 5 May 2010 13:49:26 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 May 2010 13:49:26 -0000 Received: (qmail 40894 invoked by uid 500); 5 May 2010 13:49:26 -0000 Delivered-To: apmail-incubator-jspwiki-dev-archive@incubator.apache.org Received: (qmail 40879 invoked by uid 500); 5 May 2010 13:49:26 -0000 Mailing-List: contact jspwiki-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-dev@incubator.apache.org Received: (qmail 40871 invoked by uid 99); 5 May 2010 13:49:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 13:49:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 13:49:24 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o45Dn25v026564 for ; Wed, 5 May 2010 13:49:02 GMT Message-ID: <13595504.20941273067342340.JavaMail.jira@thor> Date: Wed, 5 May 2010 09:49:02 -0400 (EDT) From: "Chris Haynes (JIRA)" To: jspwiki-dev@incubator.apache.org Subject: [jira] Resolved: (JSPWIKI-650) Page when printed shows entire page, not just content In-Reply-To: <26449202.19741273060865251.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JSPWIKI-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Haynes resolved JSPWIKI-650. ---------------------------------- Resolution: Not A Problem Probably caused by a Chrome 5.0.342.9 beta bug (on Linux). > Page when printed shows entire page, not just content > ----------------------------------------------------- > > Key: JSPWIKI-650 > URL: https://issues.apache.org/jira/browse/JSPWIKI-650 > Project: JSPWiki > Issue Type: Bug > Components: Default template > Affects Versions: 2.8.3 > Environment: Ubuntu 9.10+ Jetty 6. Viewing in Firefox and Chrome on both Ubuntu and Windows XP. > Reporter: Chris Haynes > Original Estimate: 1h > Remaining Estimate: 1h > > When a page is printed only the central content should be printed. There is a bug which results in the entire page, as displayed in the browser, being printed. > I have taken as authoritative Janne's 'Default Way' entry in http://www.jspwiki.org/wiki/HowToCreatePrinterFriendlyPage for how printing is supposed to work. It does, indeed, work like this after I apply the patch below. > The bug is that in templates/default/commonheader.jsp, between lines 23 and 28, the link to the style sheet 'jspwiki_print.css' is emitted BEFORE the stylesheet 'jspwiki.css'. This is wrong. The print-specific sheet should come second (it overwrites settings made by 'jspwiki.css'). > The fix is to reverse the order of these two links (and remove the duplication detailed below). > The stylesheet links are emitted AGAIN between lines 79 and 82, again in the wrong order. In my fix I have patched these duplicates out, but someone who understands the logical flow of this template ought to check to see if there was a reason for duplicating them, or if it is the first pair of links that are at lines 23 - 28 that are redundant. > A quick way to convince yourself that two copies of each stylesheet are being emitted is to use the Firebug CSS tab then open the file selector, which shows that two copies of both templates have been downloaded. As at the date of this submission this can quickly be seen at the home site http://www.jspwiki.org/ . -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.