From f025dccc4fe2a38a66a6b136abcdb9c1626f2f2d Mon Sep 17 00:00:00 2001 From: Yuchen Wang Date: Sat, 7 Jan 2012 11:55:55 -0500 Subject: [PATCH] CC-1986: Configurable columns for media search Modified dataTables.ColVis.js plugin to make it work... --- .../js/datatables/plugin/AIRTIME_DEV_README | 37 +++++++++++++++++++ .../js/datatables/plugin/dataTables.ColVis.js | 8 +++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README diff --git a/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README b/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README new file mode 100644 index 000000000..f342d6044 --- /dev/null +++ b/airtime_mvc/public/js/datatables/plugin/AIRTIME_DEV_README @@ -0,0 +1,37 @@ +Before you overwrite dataTables.ColVis.js, note that we have changed a few lines +in this file. + +Running a diff between the original dataTables.ColVis.js and our modified one: + +@@ -556,7 +556,11 @@ ColVis.prototype = { + nSpan.innerHTML = text; + + $(nButton).bind( sEvent, function (e) { +- that._fnCollectionShow(); ++ if ($(".ColVis_collectionBackground").length == 0) { ++ that._fnCollectionShow(); ++ } else { ++ that._fnCollectionHide(); ++ } + e.preventDefault(); + } ); + +@@ -661,6 +665,7 @@ ColVis.prototype = { + nHidden.style.top = iDivY+"px"; + nHidden.style.left = iDivX+"px"; + nHidden.style.display = "block"; ++ nHidden.style.zIndex = "999"; + $(nHidden).css('opacity',0); + + var iWinHeight = $(window).height(), iDocHeight = $(document).height(), +@@ -668,6 +673,7 @@ ColVis.prototype = { + + nBackground.style.height = ((iWinHeight>iDocHeight)? iWinHeight : iDocHeight) +"px"; + nBackground.style.width = ((iWinWidthiDocHeight)? iWinHeight : iDocHeight) +"px"; nBackground.style.width = ((iWinWidth