From: Mark Wells Date: Tue, 12 Jul 2016 21:26:07 +0000 (-0700) Subject: Revert "workaround for page-break-inside:avoid on Chrome, #71301" X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=fe92beb1b4322f86815a83491723b07aca2f9b93 Revert "workaround for page-break-inside:avoid on Chrome, #71301" This reverts commit 66eb3662102dbf92ac40fb8889c9c5051fd1ed29. --- diff --git a/httemplate/elements/freeside.css b/httemplate/elements/freeside.css index 3a6239e4b..8ad724a4f 100644 --- a/httemplate/elements/freeside.css +++ b/httemplate/elements/freeside.css @@ -313,7 +313,3 @@ td.label { color: #ff0000; } -/* but see printtofit.js */ -.nosplit, .nosplitrows tr { - page-break-inside: avoid; -} diff --git a/httemplate/elements/printtofit.js b/httemplate/elements/printtofit.js index 98236026e..66257fca8 100644 --- a/httemplate/elements/printtofit.js +++ b/httemplate/elements/printtofit.js @@ -1,30 +1,13 @@ $().ready(function() { - // yuck - var isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor); var beforePrint = function() { if ($('body').width() > 0) { // 7.5 inches * 96 DPI; maybe make the width a user pref? var maxwidth = 7.5 * 96; $('body').css('zoom', maxwidth / $('body').width()); - if (isChrome) { - // Chrome doesn't respect page-break-* styles on table rows/cells, - // so wrap the contents of table cells with a block element - // ref. Chromium bug #99124, #87828, #59193 - // should be fixed with Chrome 53 - var nosplits = $('.nosplitrows td'); - if (nosplits.length > 0) { - nosplits.wrapInner('
'); - } - } } }; var afterPrint = function() { $('body').css('zoom', 1); - // get the direct children of the wrapper divs. - var nosplits = $('div.autowrap >'); - if (nosplits.length > 0) { - nosplits.unwrap(); - } } if (window.matchMedia) { // chrome, most importantly; also IE10? diff --git a/httemplate/elements/table-grid.html b/httemplate/elements/table-grid.html index bf60fe03e..4f4200570 100644 --- a/httemplate/elements/table-grid.html +++ b/httemplate/elements/table-grid.html @@ -1,4 +1,4 @@ - CELLPADDING=<% $opt{cellpadding} %> <% $opt{bgcolor} %>> +
CELLPADDING=<% $opt{cellpadding} %> <% $opt{bgcolor} %>> <%init> diff --git a/httemplate/search/elements/grouped-search/html b/httemplate/search/elements/grouped-search/html index 2ecb68815..df1471a52 100644 --- a/httemplate/search/elements/grouped-search/html +++ b/httemplate/search/elements/grouped-search/html @@ -120,7 +120,7 @@ for (my $i = 0; $i < $group_info->{num}; $i++) { border-spacing: 0; } -
+
<& /search/elements/search-html.html:header_row, 'header' => $opt{'header'},