Re: Printer friendly pages

"Fredrik Jervfors" <[email protected]>
Newsgroups gmane.mail.squirrelmail.devel
Message-ID <[email protected]>
>> What we could do already is to remove the printer friendly files from
>> "/src/" and use "/src/read_body.php" with another CSS to provide the
>> clean look needed for printing. Unfortunately I don't have time to do
>> this myself. Volunteers, please step up!
>
> The pure-css print function is finished here and it was quite easy. Of
> course it has a *but*, that's why I didn't commit it. It works, but: only
> for JavaScript-enabled browsers.
>
> Basically what I've done is replaced the "View Printable Version" with a
> "Print" link that pops up your browser print window. This is nothing more
> than the two lines of JS that currently power the Print button in the
> printer friendly popup. It works because that JS puts the focus on the
> right frame and then calls the print command on it.
>
> I'm enthusiastic about it because it replaces a significant amount of
> code and files with just a handful lines of new stuff. So only open
> question to me is what to do when there's no JavaScript.
>
> Currently I'm thinking along this line. When no Javascript, then:
>
>
> - The Print link is a link to same read_body with a print=1 parameter
> attached and a target="_blank". - Read_body opens in a new window and near
> the top is a box that says: Use File->Print in your browser to print this
> message. of course that box is also hidden with css from the actual print.
>
>
> That seems to me the best way to support both JS and non_JS browsers
> without having to keep a large infrastructure just for the (increasingly
> more rare) non-JS browsers.
>
> Comments welcome. I'll probably continue with implementing this sometime
> soon.
>
> I've looked into a way to use the print CSS to just hide or get rid of
> the left frame when print is invoked on webmail.php, but couldn't get it
> done. If someone gets that working, then that would of course also be
> great.

Sounds like a good approach. I've seen your commits, but I haven't tested
it yet. Nice work, Thijs!

Sincerely,
Fredrik

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.