diff --git a/src/tablefilter_all.js b/src/tablefilter_all.js index c499608d..0dfee753 100644 --- a/src/tablefilter_all.js +++ b/src/tablefilter_all.js @@ -4431,53 +4431,61 @@ TF.prototype = { this.popUpFltElms = this.popUpFltElmCache || []; this.popUpFltAdjustToContainer = true; + function onClick(e){ + var evt = e || window.event, + colIndex = parseInt(this.getAttribute('ci')); + + o.CloseAllPopupFilters(colIndex); + o.TogglePopupFilter(colIndex); + + if(o.popUpFltAdjustToContainer){ + var popUpDiv = o.popUpFltElms[colIndex], + header = o.GetHeaderElement(colIndex), + headerWidth = header.clientWidth * 0.95; + if(!tf_isNotIE){ + var headerLeft = tf_ObjPosition( + header, [header.nodeName])[0]; + popUpDiv.style.left = (headerLeft) + 'px'; + } + popUpDiv.style.width = parseInt(headerWidth) + 'px'; + } + tf_CancelEvent(evt); + tf_StopEvent(evt); + } + var o = this; for(var i=0; i