From e52e534f38ba50e0ad8d6a51dec57073891eba19 Mon Sep 17 00:00:00 2001 From: Max Guglielmi Date: Tue, 30 Sep 2014 19:19:12 +1000 Subject: [PATCH] Code formatting --- src/tablefilter_all.js | 232 ++++++++++++++++++++++++----------------- 1 file changed, 134 insertions(+), 98 deletions(-) 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