Adding jQplot package and its plugins and tablesorter are as module in js files and removed from php files.

Signed-Off-By: Piyush Vijay <piyushvijay.1997@gmail.com>
This commit is contained in:
Piyush Vijay 2018-07-08 22:56:12 +05:30
parent 2c643597fd
commit 63a54d14f3
10 changed files with 21 additions and 36 deletions

View File

@ -1,9 +1,8 @@
import { $ } from '../utils/extend_jquery';
import 'updated-jqplot';
import '../../../node_modules/updated-jqplot/dist/plugins/jqplot.pieRenderer';
import '../../../node_modules/updated-jqplot/dist/plugins/jqplot.highlighter';
import '../../../node_modules/updated-jqplot/dist/plugins/jqplot.enhancedPieLegendRenderer';
window.test2 = $;
import 'updated-jqplot/dist/plugins/jqplot.pieRenderer';
import 'updated-jqplot/dist/plugins/jqplot.highlighter';
import 'updated-jqplot/dist/plugins/jqplot.enhancedPieLegendRenderer';
/**
* Chart type enumerations

View File

@ -4,7 +4,7 @@
* Module import
*/
import { $ } from '../../utils/extend_jquery';
import 'tablesorter';
import '../../plugins/jquery/jquery.tablesorter';
// TODO: tablesorter shouldn't sort already sorted columns
/**
* @access public

View File

@ -1,5 +1,11 @@
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Module import
*/
import { $ } from './utils/extend_jquery';
import './plugins/jquery/jquery.tablesorter';
/**
* @package PhpMyAdmin
*

View File

@ -5,13 +5,13 @@ import { $ } from './utils/extend_jquery';
import 'updated-jqplot';
import './plugins/jquery/jquery.sortableTable';
import '../../node_modules/updated-jqplot/dist/plugins/jqplot.pieRenderer.js';
import '../../node_modules/updated-jqplot/dist/plugins/jqplot.enhancedPieLegendRenderer.js';
import '../../node_modules/updated-jqplot/dist/plugins/jqplot.canvasTextRenderer.js';
import '../../node_modules/updated-jqplot/dist/plugins/jqplot.canvasAxisLabelRenderer.js';
import '../../node_modules/updated-jqplot/dist/plugins/jqplot.dateAxisRenderer.js';
import '../../node_modules/updated-jqplot/dist/plugins/jqplot.highlighter.js';
import '../../node_modules/updated-jqplot/dist/plugins/jqplot.cursor.js';
import 'updated-jqplot/dist/plugins/jqplot.pieRenderer.js';
import 'updated-jqplot/dist/plugins/jqplot.enhancedPieLegendRenderer.js';
import 'updated-jqplot/dist/plugins/jqplot.canvasTextRenderer.js';
import 'updated-jqplot/dist/plugins/jqplot.canvasAxisLabelRenderer.js';
import 'updated-jqplot/dist/plugins/jqplot.dateAxisRenderer.js';
import 'updated-jqplot/dist/plugins/jqplot.highlighter.js';
import 'updated-jqplot/dist/plugins/jqplot.cursor.js';
import './plugins/jqplot/jqplot.byteFormatter';
import { getOsDetail } from './functions/Server/ServerStatusMonitor';
@ -2011,7 +2011,6 @@ export function onload3 () {
/* Saves the monitor to localstorage */
function saveMonitor () {
var gridCopy = {};
$.each(runtime.charts, function (key, elem) {
gridCopy[key] = {};
gridCopy[key].nodes = elem.nodes;

View File

@ -4,7 +4,7 @@
* Module import
*/
import { $ } from './utils/JqueryExtended';
import 'tablesorter';
import './plugins/jquery/jquery.tablesorter';
import { PMA_Messages as messages } from './variables/export_variables';
$(function () {

View File

@ -3,6 +3,7 @@
/**
* Module import
*/
import { $ } from './utils/extend_jquery';
import { editVariable } from './functions/Server/ServerVariables';
/**

View File

@ -49,7 +49,6 @@ class ServerPluginsController extends Controller
$header = $this->response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('vendor/jquery/jquery.tablesorter.js');
$scripts->addFile('server_plugins');
/**

View File

@ -72,18 +72,7 @@ if ($response->isAjax()) {
*/
$header = $response->getHeader();
$scripts = $header->getScripts();
// $scripts->addFile('vendor/jquery/jquery.tablesorter.js');
// $scripts->addFile('vendor/jquery/jquery.sortableTable.js');
// for charting
// $scripts->addFile('vendor/jqplot/jquery.jqplot.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.pieRenderer.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.enhancedPieLegendRenderer.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.canvasTextRenderer.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.dateAxisRenderer.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.highlighter.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.cursor.js');
// $scripts->addFile('jqplot/plugins/jqplot.byteFormatter.js');
$scripts->addFile('vendor/jquery/jquery.tablesorter.js');
$scripts->addFile('server_status_monitor');
$scripts->addFile('server_status_sorter');

View File

@ -23,13 +23,6 @@ $response = Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
// for charting
// $scripts->addFile('chart.js');
// $scripts->addFile('vendor/jqplot/jquery.jqplot.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.pieRenderer.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.highlighter.js');
// $scripts->addFile('vendor/jqplot/plugins/jqplot.enhancedPieLegendRenderer.js');
// $scripts->addFile('vendor/jquery/jquery.tablesorter.js');
$scripts->addFile('server_status_sorter');
$scripts->addFile('server_status_queries');

View File

@ -38,8 +38,7 @@ $response = Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('server_status_variables');
$scripts->addFile('vendor/jquery/jquery.tablesorter.js');
$scripts->addFile('server_status_sorter.js');
$scripts->addFile('server_status_sorter');
$response->addHTML('<div>');
$response->addHTML($serverStatusData->getMenuHtml());