Bug fixes on nextmatch printing

- fix loaded rows check
 - fix hidden etemplate check
This commit is contained in:
Nathan Gray 2015-01-27 20:48:06 +00:00
parent 16a64c879d
commit 2be34b4b53
2 changed files with 4 additions and 2 deletions

View File

@ -1849,7 +1849,7 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin
// Check for rows that aren't loaded yet, or lots of rows
var range = this.controller._grid.getIndexRange();
this.old_height = this.controller._grid._scrollHeight;
var loaded_count = range.bottom - range.top;
var loaded_count = range.bottom - range.top +1;
var total = this.controller._grid.getTotalCount();
if(loaded_count != total ||
this.controller._grid.getTotalCount() > 100)

View File

@ -935,9 +935,11 @@ etemplate2.print = function(_app)
for(var i = 0; i < et2.length; i++)
{
// Skip hidden templates
if(!jQuery(et2[i].DOMContainer).filter(':visible')) continue;
if(!jQuery(et2[i].DOMContainer).filter(':visible').length) continue;
et2[i].widgetContainer.iterateOver(function(_widget) {
// Skip widgets from a different etemplate (home)
if(_widget.getInstanceManager() != et2[i]) return;
var result = _widget.beforePrint();
if (typeof result == "object" && result.done)
{