diff --git a/api/js/etemplate/etemplate2.js b/api/js/etemplate/etemplate2.js index 67efe9088f..179c8e5db3 100644 --- a/api/js/etemplate/etemplate2.js +++ b/api/js/etemplate/etemplate2.js @@ -995,6 +995,10 @@ etemplate2.prototype.print = function() this.widgetContainer.iterateOver(function(_widget) { // Skip widgets from a different etemplate (home) if(_widget.getInstanceManager() != this) return; + + // Skip hidden widgets + if(jQuery(_widget.getDOMNode()).filter(':visible').length === 0) return; + var result = _widget.beforePrint(); if (typeof result == "object" && result.done) { diff --git a/api/js/framework/fw_base.js b/api/js/framework/fw_base.js index ddd14e0650..bb576576a5 100644 --- a/api/js/framework/fw_base.js +++ b/api/js/framework/fw_base.js @@ -1000,7 +1000,7 @@ var fw_base = (function(){ "use strict"; return Class.extend( // et2 available, let its widgets prepare var deferred = []; var et2_list = []; - jQuery('.et2_container',this.activeApp.tab.contDiv).each(function() { + jQuery('.et2_container',this.activeApp.tab.contentDiv).each(function() { var et2 = etemplate2.getById(this.id); if(et2 && jQuery(et2.DOMContainer).filter(':visible').length) {