Subversion Repositories oidplus

Rev

Go to most recent revision | View as "text/javascript" | Blame | Last modification | View Log | RSS feed

  1. /**
  2. *       UI Layout Callback: resizeDataTables
  3. *
  4. *       DataTables plugin homepage: http://datatables.net
  5. *
  6. *       This callback is used when a layout-pane contains 1 or more DataTable objects:
  7. *       - when the DataTable is a 'child' of the pane; or
  8. *       - when the DataTable is a 'descendant' of the pane - ie, inside other elements
  9. *
  10. *       Assign this callback to the pane.onresize event.
  11. *       If the layout is inside a tab-panel, _also_ bind to tabs.show()
  12. *
  13. *       SAMPLE:
  14. *       $("#elem").tabs({ show: $.layout.callbacks.resizeDataTables });
  15. *       $("body").layout({ center__onresize: $.layout.callbacks.resizeDataTables });
  16. *
  17. *       Version:        1.0 - 2012-07-06
  18. *       Author:         Robert Brower (atomofthought@yahoo.com)
  19. *       @preserve       jquery.layout.resizeDataTables-1.0.js
  20. */
  21. (function(a){a.layout.callbacks.resizeDataTables=function(e,b){var c=b.jquery?b[0]:b.panel;a(c).is(":visible")&&a(a.fn.dataTable.fnTables(!0)).each(function(b,d){a.contains(c,d)&&a(d).dataTable().fnAdjustColumnSizing()})}})(jQuery);