Revert "workaround for page-break-inside:avoid on Chrome, #71301"
authorMark Wells <mark@freeside.biz>
Tue, 12 Jul 2016 21:25:52 +0000 (14:25 -0700)
committerMark Wells <mark@freeside.biz>
Tue, 12 Jul 2016 21:25:52 +0000 (14:25 -0700)
This reverts commit 64aa9aa36d8b8636b4984de7d15cd7bd1a889542.

httemplate/elements/freeside.css
httemplate/elements/printtofit.js
httemplate/elements/table-grid.html
httemplate/search/elements/grouped-search/html

index 87dec3d..cc104a1 100644 (file)
@@ -342,7 +342,4 @@ div.package-marker-change_from {
   display: inline-block;
 }
 
-/* but see printtofit.js */
-.nosplit, .nosplitrows tr {
-  page-break-inside: avoid;
-}
+
index 9823602..66257fc 100644 (file)
@@ -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('<div class="nosplit autowrap" />');
-        }
-      }
     }
   };
   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?
index bf60fe0..4f42005 100644 (file)
@@ -1,4 +1,4 @@
-<TABLE CLASS="grid nosplitrows" CELLSPACING=<% $opt{cellspacing} %> CELLPADDING=<% $opt{cellpadding} %> <% $opt{bgcolor} %>>
+<TABLE CLASS="grid" CELLSPACING=<% $opt{cellspacing} %> CELLPADDING=<% $opt{cellpadding} %> <% $opt{bgcolor} %>>
 
 <%init>
 
index 2ecb688..df1471a 100644 (file)
@@ -120,7 +120,7 @@ for (my $i = 0; $i < $group_info->{num}; $i++) {
     border-spacing: 0;
   }
 </STYLE>
-<table class="grid nosplitrows">
+<table class="grid">
   <thead>
   <& /search/elements/search-html.html:header_row,
     'header'      => $opt{'header'},