server_plugins.js 1.2 KB

123456789101112131415161718192021222324252627282930
  1. /* vim: set expandtab sw=4 ts=4 sts=4: */
  2. /**
  3. * Functions used in server plugins pages
  4. */
  5. var pma_theme_image; // filled in server_plugins.php
  6. AJAX.registerOnload('server_plugins.js', function() {
  7. // Add tabs
  8. $('#pluginsTabs').tabs({
  9. // Tab persistence
  10. cookie: { name: 'pma_serverStatusTabs', expires: 1 },
  11. show: function(event, ui) {
  12. // Fixes line break in the menu bar when the page overflows and scrollbar appears
  13. $('#topmenu').menuResizer('resize');
  14. // 'Plugins' tab is too high due to hiding of 'Modules' by negative left position,
  15. // hide tabs by changing display to fix it
  16. $(ui.panel).closest('.ui-tabs').find('> div').not(ui.panel).css('display', 'none');
  17. $(ui.panel).css('display', 'block');
  18. }
  19. });
  20. // Make columns sortable, but only for tables with more than 1 data row
  21. var $tables = $('#plugins_plugins table:has(tbody tr + tr)');
  22. $tables.tablesorter({
  23. sortList: [[0,0]],
  24. widgets: ['zebra']
  25. });
  26. $tables.find('thead th')
  27. .append('<img class="sortableIcon" src="' + pma_theme_image + 'cleardot.gif" alt="">');
  28. });