From 80e36303ffac5fd044dfb716ace347a617ea2a2c Mon Sep 17 00:00:00 2001 From: Carl Hughes Date: Mon, 22 Apr 2013 16:44:30 +0100 Subject: [PATCH] Added menuPlacement configuration. Allowing users to provide a function for the menus placement, the menu is passed into the users function. --- jquery.mediaTable.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/jquery.mediaTable.js b/jquery.mediaTable.js index 4b3dad5..153acbb 100644 --- a/jquery.mediaTable.js +++ b/jquery.mediaTable.js @@ -110,7 +110,12 @@ http://www.consulenza-web.com/2012/01/mediatable-jquery-plugin/ // Setup menu title (handler) wdg.$menu.$header.text(wdg.cfg.menuTitle); - wdg.$table.before(wdg.$menu); + + if (wdg.cfg.menuPlacement) { + wdg.cfg.menuPlacement(wdg.$menu); + } else { + wdg.$table.before(wdg.$menu); + } // Bind screen change events to update checkbox status of displayed fields. $(window).bind('orientationchange resize',function(){ @@ -261,6 +266,7 @@ http://www.consulenza-web.com/2012/01/mediatable-jquery-plugin/ // Teach the widget to create a toggle menu to declare column's visibility menu: true, menuTitle: 'Columns:', + menuPlacement: false, t:'e'},arguments[0]); // -- default configuration block --