diff --git a/etemplate/js/et2_extension_nextmatch.js b/etemplate/js/et2_extension_nextmatch.js index 491c10ff8b..bc5c81dbbc 100644 --- a/etemplate/js/et2_extension_nextmatch.js +++ b/etemplate/js/et2_extension_nextmatch.js @@ -1867,6 +1867,8 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin // Trigger resize, so we can fit on a page this.dynheight.outerNode.css('max-width',this.div.css('max-width')); this.resize(); + // Reset height to auto (after width resize) so there's no restrictions + this.dynheight.innerNode.css('height', 'auto'); // Check for rows that aren't loaded yet, or lots of rows var range = this.controller._grid.getIndexRange(); @@ -1898,6 +1900,8 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin button = 'dialog[all]'; // Add the class, gives more reliable sizing this.div.addClass('print'); + // Show it all + $j('.egwGridView_scrollarea',this.div).css('height','auto'); } // We need more rows if(button == 'dialog[all]' || value > loaded_count) @@ -1943,10 +1947,30 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin defer.reject(); return; } - nm.controller._grid.setScrollHeight(nm.controller._grid.getAverageHeight() * (value+1)); + if(value < total) + { + // Set height to the requested number of rows, using the average height. + // We add one, in case there's some larger rows we + // try to get most of it but that's pretty hacky + nm.controller._grid.setScrollHeight(nm.controller._grid.getAverageHeight() * (value+1)); + } + // Grid needs to redraw before it can be printed, so wait window.setTimeout(jQuery.proxy(function() { dialog.destroy(); + + if(value < total) + { + // Show requested number, based on average height + nm.controller._grid.setScrollHeight(nm.controller._grid.getAverageHeight() * (value)); + // No scrollbar in print view + $j('.egwGridView_scrollarea',this.div).css('overflow-y','hidden'); + } + else + { + // Show it all + $j('.egwGridView_scrollarea',this.div).css('height','auto'); + } // Should be OK to print now defer.resolve(); },nm),ET2_GRID_INVALIDATE_TIMEOUT); @@ -1961,11 +1985,12 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin else { // Don't need more rows, limit to requested and finish - this.controller._grid.setScrollHeight(this.controller._grid.getAverageHeight() * (value+1)); + this.controller._grid.setScrollHeight(this.controller._grid.getAverageHeight() * (value)); + // No scrollbar in print view + $j('.egwGridView_scrollarea',this.div).css('overflow-y','hidden'); // Give dialog a chance to close, or it will be in the print window.setTimeout(function() {defer.resolve();}, 0); } - //this.controller._gridCallback(0, button == et2_dialog.OK_BUTTON ? value : this.controller._grid.getTotalCount()); },this), egw.lang('How many rows to print'), egw.lang('Print'), Math.min(100, total), @@ -1980,7 +2005,9 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin } else { + // Show all rows this.dynheight.innerNode.css('height', 'auto'); + $j('.egwGridView_scrollarea',this.div).css('height','auto'); } // Don't return anything, just work normally }, diff --git a/etemplate/templates/default/etemplate2.css b/etemplate/templates/default/etemplate2.css index 33096e51cb..53f03d20f3 100644 --- a/etemplate/templates/default/etemplate2.css +++ b/etemplate/templates/default/etemplate2.css @@ -477,7 +477,6 @@ These are set via javascript before printing to help tame nextmatch's layout for printing */ .et2_nextmatch.print .egwGridView_scrollarea { - height: auto !important; width: auto !important; } .et2_nextmatch.print > div { diff --git a/mail/templates/default/app.css b/mail/templates/default/app.css index cbe4869e10..e39cb40c52 100644 --- a/mail/templates/default/app.css +++ b/mail/templates/default/app.css @@ -752,7 +752,6 @@ blockquote blockquote blockquote blockquote blockquote blockquote{ height: auto !important; } html *, .td_display { - font-size: 12pt !important; border-right: none !important; border-left: none !important; } diff --git a/mail/templates/pixelegg/app.css b/mail/templates/pixelegg/app.css index 9c7158105d..46eb38a766 100755 --- a/mail/templates/pixelegg/app.css +++ b/mail/templates/pixelegg/app.css @@ -748,7 +748,6 @@ blockquote blockquote blockquote blockquote blockquote blockquote { } html *, .td_display { - font-size: 12pt !important; border-right: none !important; border-left: none !important; } diff --git a/mail/templates/pixelegg/app.less b/mail/templates/pixelegg/app.less index c78b0b07f6..aa477d9899 100755 --- a/mail/templates/pixelegg/app.less +++ b/mail/templates/pixelegg/app.less @@ -12,7 +12,6 @@ * @version $Id$ */ - @import (reference) "../../../pixelegg/less/layout_definitions.less"; @import (reference) "../../../pixelegg/less/definitions.less"; @import (less) "../default/app.css";