From e7a659a690eaa5a28184ea85a75c084641ff31a1 Mon Sep 17 00:00:00 2001 From: abijah Date: Wed, 29 Jul 2009 01:41:34 +0000 Subject: [PATCH] Added a print media CSS file, and fixed the jqGrid print problem of truncating the table to a single page. Also, used the opportunity to disable printing of the side menu and the debug toolkit, as well as some more jqGrid cleanup. git-svn-id: file:///svn-source/pmgr/branches/yafr_20090716@403 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/views/layouts/default.ctp | 1 + site/webroot/css/print.css | 46 ++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 site/webroot/css/print.css diff --git a/site/views/layouts/default.ctp b/site/views/layouts/default.ctp index f394601..22f33ce 100644 --- a/site/views/layouts/default.ctp +++ b/site/views/layouts/default.ctp @@ -33,6 +33,7 @@ echo $html->meta('icon') . "\n"; echo $html->css('cake.generic') . "\n"; echo $html->css('layout') . "\n"; + echo $html->css('print', null, array('media' => 'print')) . "\n"; echo $html->css('sidemenu') . "\n"; //echo $html->css('jquery/base/ui.all') . "\n"; //echo $html->css('jquery/smoothness/ui.all') . "\n"; diff --git a/site/webroot/css/print.css b/site/webroot/css/print.css new file mode 100644 index 0000000..be93c35 --- /dev/null +++ b/site/webroot/css/print.css @@ -0,0 +1,46 @@ +/************************************************************ + ************************************************************ + * Styles for media type: print + */ + +/* No need for the menu */ +table#layout td#sidecolumn + { display: none; } + +/* No need for the debug kit */ +div#debug-kit-toolbar + { display: none; } + +/* In fact, no need for any debug stuff */ +.debug + { display: none; } + + +/************************************************************ + * Grid display + */ + +/* Grid are not to be truncated when printing, so + * set overflow to visible for necessary selectors. + */ +div#content, div.grid_bdiv + { overflow: visible ! important } + +div.grid_hdiv + { border-bottom: 3px double #000; } + +/* The header is generally useless, except for the , + * as well as the footer navtable. The pagination buttons + * are of no use, nor is the selbox to set # of rows. + */ +.GridHeader td, +div.scroll .navtable, +div.scroll .pgbuttons, +div.scroll select.selbox + { display: none; } + +/* The "page N / M" input box... make it look like normal text */ +div.scroll input[type='text'] { + border: none; + background: transparent; +}