Koha/koha-tmpl/intranet-tmpl/prog/css/print.css
Owen Leonard a9836864dc Bug 16575: Irregular behaviour using window.print() followed by window.location.href
This patch updates the OPAC and staff client carts to use CSS to
control print output, removing a print parameter which was passed to the
script.

Currently, when you click "Print" on the OPAC basket, it navigates to
a new page and initiates window.print() followed by a
window.location.href change again. Unfortunately, due to differences in
IE, Chrome, and FF, it will either show the print options, navigate away
without showing them, or refuse to navigate away after printing. By
changing to using print CSS, we don't navigate away from the basket in
the first place, so we prevent this irregular behavior.

TEST PLAN

1) Apply the patch
2) Create an OPAC basket by clicking "Add to cart" on multiple items
3) Using Chrome, IE, and Firefox (of any version), click the "Print"
   button
4) You should see the relevant print menu without the OPAC basket
   re-loading in any way.
5) After printing is complete, you should still be on the OPAC basket
   pop-up
6) Perform the same tests in the staff client

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2018-07-19 16:12:56 +00:00

359 lines
5.4 KiB
CSS

a:link {
color : #000066;
text-decoration: none;
}
a:visited {
color : #000066;
text-decoration: none;
}
a:hover {
color : #993300;
text-decoration: none;
}
body {
background-color : #FFF;
color : #333333;
font-family : arial, geneva, sans-serif;
font-size : 14px;
margin : 0px 0px 0px 0px;
}
caption {
color : #000066;
font-size : 18px;
font-weight : bold;
margin-top : 5px;
text-align : left;
}
form {
margin : 0px;
padding : 0px;
}
h1
{
color : #000066;
font-size : 22px;
font-weight : bold;
margin-bottom : 3px;
margin-top : 3px;
}
h1#logo {
display: none;
}
h2 {
color : #000066;
font-size : 20px;
font-weight : bold;
margin-bottom : 3px;
margin-top : 3px;
}
h3 {
color : #000066;
font-size : 18px;
font-weight : bold;
margin-bottom : 3px;
margin-top : 3px;
}
h4 {
color : #000066;
font-size : 16px;
font-weight : bold;
margin-bottom : 3px;
margin-top : 3px;
}
h5 {
color : #000066;
font-size : 15px;
font-weight : bold;
margin-bottom : 1px;
margin-top : 1px;
}
h6 {
color : #000066;
font-size : 14px;
font-weight : bold;
margin-bottom : 1px;
margin-top : 1px;
}
table {
background-color : #FFFFFF;
border-bottom : 1px solid #CCCCCC;
border-collapse : collapse;
border-left : 1px solid #CCCCCC;
margin : 3px 0px 5px 0px;
padding : 0px;
width : 99%;
}
table.list {
background-color : #FFFFFF;
border : 0;
border-collapse : collapse;
margin : 3px 0px 5px 0px;
padding : 0px;
width : 99%;
}
td {
background-color : #FFF;
border-bottom : 1px solid #CCCCCC;
border-right : 1px solid #CCCCCC;
border-top : 0;
border-left : 0;
font-size : 12px;
padding : 5px 5px 5px 5px;
}
td:last-child {
background-color : #FFF;
border-bottom : 1px solid #CCCCCC;
border-right : 0px solid #CCCCCC;
border-top : 0;
border-left : 0;
font-size : 12px;
padding : 5px 5px 5px 5px;
}
table.list th {
background-color : #FFFFFF;
border-top : 0;
border-left : 0;
text-align: left;
font-size: 12px;
font-weight: bold;
padding: 5px;
width : 25%;
}
th {
background-color : #E9E9E9;
border-bottom : 1px solid #CCCCCC;
border-right : 1px solid #CCCCCC;
border-top : 0;
border-left : 0;
font-size : 14px;
font-weight : bold;
padding : 5px 5px 5px 5px;
}
th:last-child {
background-color : #E9E9E9;
border-bottom : 1px solid #CCCCCC;
border-right : 0px solid #CCCCCC;
border-top : 0;
border-left : 0;
font-size : 14px;
font-weight : bold;
padding : 5px 5px 5px 5px;
}
td.input, div.form td, div.details td {
border-bottom : 1px solid #CCCCCC;
border-left : 0px;
border-right : 0px;
color : #000000;
line-height : 1.5em;
padding : 4px;
text-align : left;
}
td.label, div.form th, div.details th {
background-color : #FFF;
border-bottom : 1px solid #CCCCCC;
border-left : 1px solid #CCCCCC;
border-right : 0px;
border-top : 0px;
color : #000088;
font-weight : bold;
line-height : 1.5em;
padding : 4px;
text-align : right;
vertical-align : top;
}
tr.highlight {
background-color: #CCCCCC;
}
.error {
font-weight: bold;
}
.ex {
font-family : "Courier New", Courier, monospace;
}
.inline {
display : inline;
}
tr.overdue {
font-weight : bold;
}
tfoot {
font-weight : bold;
}
tfoot td, tfoot td:last-child {
background-color : #EEEEEE;
border-right : 1px solid #666666;
border-bottom : 1px solid #666666;
}
td.credit, td.debit, td.sum {
font-family : "Courier New", Courier, monospace;
text-align : right;
}
td.debit {
color : #990000;
}
#receipt {
background-color : #FFFFFF;
font-family : serif;
font-size : .9em;
margin : 0 0px 0px 0;
padding : 0px;
position : relative;
}
#receipt a:link {
color : #000066;
text-decoration: none;
}
#receipt a:visited {
color : #000066;
text-decoration: none;
}
#receipt a:hover {
color : #993300;
text-decoration: none;
}
#receipt caption {
color : #000000;
font-weight : bold;
margin-top : 5px;
text-align : left;
}
#receipt div.table {
background-color : transparent;
font-weight: normal;
}
#receipt h3, #receipt caption, #receipt h4 {
background-color : transparent;
color : #000000;
font-size : 1em;
font-weight : bold;
margin-bottom : 3px;
margin-top : 3px;
}
#receipt table {
background-color : transparent;
border : 0;
border-collapse : collapse;
width : auto;
}
#receipt td, #receipt th {
background-color : transparent;
border : 0;
font-size : 1em;
font-weight : normal;
padding : 1px;
}
#receipt th {
font-weight : bold;
text-align : left;
}
#breadcrumbs,
#toplevelnav,
#login,
#header,
#header_search,
#toolbar,
#changelanguage,
#menu,
.gradient,
div.yui-b,
.noprint,
form#sortbyform,
#cartDetails,
fieldset.action,
.list-actions,
.print,
.ui-tabs-nav,
.cart-controls {
display: none;
}
div#yui-main div.yui-b,
.ui-tabs .ui-tabs-panel,
.ui-tabs .ui-tabs-hide {
display : block !important;
}
.yui-t1 #yui-main div.yui-b,
.yui-t2 #yui-main div.yui-b,
.yui-t7 #yui-main div.yui-b {
margin-left : 0;
}
fieldset {
border : 0;
}
#cataloguing_additem_itemlist {
overflow : visible !important;
}
#catalogue_detail_marc_preview,
p#upload_image
{
display: none;
}
th {
text-align: left;
}
#cart_basket .container,
#cart_basket table,
#cart_basket tr,
#cart_basket th,
#cart_basket td,
#cart_basket .sorting_asc,
#cart_basket .sorting,
#cart_basket .sorting_desc,
#cart_basket .sorting_disabled,
#cart_basket tbody tr:nth-child(2n+1) td {
background: transparent none;
border: 0;
}
#cart_basket tr {
border-collapse: collapse;
border-bottom: 1px solid #DDD;
}
.container {
width:100%;
}