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