From ee970925207c809bad59913c5975ae2bf85bdd99 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 14 Oct 2020 11:48:57 -0600 Subject: [PATCH] Etemplate: Fix extra rows stayed hidden after printing --- api/js/etemplate/et2_extension_nextmatch.js | 8 ++++---- api/js/etemplate/et2_extension_nextmatch.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/api/js/etemplate/et2_extension_nextmatch.js b/api/js/etemplate/et2_extension_nextmatch.js index 58e3f1753f..85d9688446 100644 --- a/api/js/etemplate/et2_extension_nextmatch.js +++ b/api/js/etemplate/et2_extension_nextmatch.js @@ -2114,8 +2114,8 @@ var et2_nextmatch = /** @class */ (function (_super) { } // Use CSS to hide all but the requested rows // Prevents us from showing more than requested, if actual height was less than average - nm_1.print_row_selector = ".egwGridView_grid > tbody > tr:not(:nth-child(-n+" + rows + "))"; - egw.css(nm_1.print_row_selector, 'display: none'); + nm_1.print.row_selector = ".egwGridView_grid > tbody > tr:not(:nth-child(-n+" + rows + "))"; + egw.css(nm_1.print.row_selector, 'display: none'); // No scrollbar in print view jQuery('.egwGridView_scrollarea', this.div).css('overflow-y', 'hidden'); // Show it all @@ -2138,8 +2138,8 @@ var et2_nextmatch = /** @class */ (function (_super) { jQuery('.egwGridView_scrollarea', this.div).css('height', 'auto'); // Use CSS to hide all but the requested rows // Prevents us from showing more than requested, if actual height was less than average - this.print_row_selector = ".egwGridView_grid > tbody > tr:not(:nth-child(-n+" + rows + "))"; - egw.css(this.print_row_selector, 'display: none'); + this.print.row_selector = ".egwGridView_grid > tbody > tr:not(:nth-child(-n+" + rows + "))"; + egw.css(this.print.row_selector, 'display: none'); // No scrollbar in print view jQuery('.egwGridView_scrollarea', this.div).css('overflow-y', 'hidden'); // Give dialog a chance to close, or it will be in the print diff --git a/api/js/etemplate/et2_extension_nextmatch.ts b/api/js/etemplate/et2_extension_nextmatch.ts index 05a470d742..1aa11245f1 100644 --- a/api/js/etemplate/et2_extension_nextmatch.ts +++ b/api/js/etemplate/et2_extension_nextmatch.ts @@ -2827,8 +2827,8 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 } // Use CSS to hide all but the requested rows // Prevents us from showing more than requested, if actual height was less than average - nm.print_row_selector = ".egwGridView_grid > tbody > tr:not(:nth-child(-n+" + rows + "))"; - egw.css(nm.print_row_selector, 'display: none'); + nm.print.row_selector = ".egwGridView_grid > tbody > tr:not(:nth-child(-n+" + rows + "))"; + egw.css(nm.print.row_selector, 'display: none'); // No scrollbar in print view jQuery('.egwGridView_scrollarea', this.div).css('overflow-y', 'hidden'); @@ -2857,8 +2857,8 @@ export class et2_nextmatch extends et2_DOMWidget implements et2_IResizeable, et2 // Use CSS to hide all but the requested rows // Prevents us from showing more than requested, if actual height was less than average - this.print_row_selector = ".egwGridView_grid > tbody > tr:not(:nth-child(-n+" + rows + "))"; - egw.css(this.print_row_selector, 'display: none'); + this.print.row_selector = ".egwGridView_grid > tbody > tr:not(:nth-child(-n+" + rows + "))"; + egw.css(this.print.row_selector, 'display: none'); // No scrollbar in print view jQuery('.egwGridView_scrollarea', this.div).css('overflow-y', 'hidden');