diff --git a/db_structure.php b/db_structure.php
index 8be37f095b..67af9f9f10 100644
--- a/db_structure.php
+++ b/db_structure.php
@@ -74,7 +74,7 @@ if ($response->isAjax() && ! empty($_REQUEST['favorite_table'])) {
} else {
$response->getHeader()->getScripts()->addFiles([
'database/structure.js',
- 'tbl_change.js',
+ 'table/change.js',
]);
$response->addHTML($controller->index([
diff --git a/js/functions.js b/js/functions.js
index 4d7ad3cb45..6b7c54a790 100644
--- a/js/functions.js
+++ b/js/functions.js
@@ -135,7 +135,7 @@ Functions.addDatepicker = function ($thisElement, type, options) {
showAnim: '',
beforeShow: function (input, inst) {
// Remember that we came from the datepicker; this is used
- // in tbl_change.js by verificationsAfterFieldChange()
+ // in table/change.js by verificationsAfterFieldChange()
$thisElement.data('comes_from', 'datepicker');
if ($(input).closest('.cEdit').length > 0) {
setTimeout(function () {
diff --git a/js/gis_data_editor.js b/js/gis_data_editor.js
index fac3e9fc1f..db73243d0a 100644
--- a/js/gis_data_editor.js
+++ b/js/gis_data_editor.js
@@ -6,7 +6,7 @@
*
*/
-/* global addZoomPanControllers, loadSVG, selectVisualization, styleOSM, zoomAndPan */ // js/tbl_gis_visualization.js
+/* global addZoomPanControllers, loadSVG, selectVisualization, styleOSM, zoomAndPan */ // js/table/gis_visualization.js
/* global pmaThemeImage */ // js/messages.php
// eslint-disable-next-line no-unused-vars
@@ -102,7 +102,7 @@ function loadJSAndGISEditor (value, field, type, inputName) {
var smallScripts = ['js/vendor/jquery/jquery.svg.js',
'js/vendor/jquery/jquery.mousewheel.js',
'js/vendor/jquery/jquery.event.drag-2.2.js',
- 'js/tbl_gis_visualization.js'];
+ 'js/table/gis_visualization.js'];
for (var i = 0; i < smallScripts.length; i++) {
script = document.createElement('script');
diff --git a/js/messages.php b/js/messages.php
index 6149f080c8..b02de19d1c 100644
--- a/js/messages.php
+++ b/js/messages.php
@@ -490,7 +490,7 @@ $js_messages['strNoTdSelected'] = __('No dependencies selected!');
/* For server/variables.js */
$js_messages['strSave'] = __('Save');
-/* For tbl_select.js */
+/* For table/select.js */
$js_messages['strHideSearchCriteria'] = __('Hide search criteria');
$js_messages['strShowSearchCriteria'] = __('Show search criteria');
$js_messages['strRangeSearch'] = __('Range search');
@@ -499,11 +499,11 @@ $js_messages['strColumnMin'] = __('Column minimum:');
$js_messages['strMinValue'] = __('Minimum value:');
$js_messages['strMaxValue'] = __('Maximum value:');
-/* For tbl_find_replace.js */
+/* For table/find_replace.js */
$js_messages['strHideFindNReplaceCriteria'] = __('Hide find and replace criteria');
$js_messages['strShowFindNReplaceCriteria'] = __('Show find and replace criteria');
-/* For tbl_zoom_plot_jqplot.js */
+/* For table/zoom_plot_jqplot.js */
$js_messages['strDisplayHelp'] = '
- '
. __('Each point represents a data row.')
. '
- '
@@ -524,7 +524,7 @@ $js_messages['strSameInputs'] = ''
. '';
$js_messages['strDataPointContent'] = __('Data point content');
-/* For tbl_change.js */
+/* For table/change.js */
$js_messages['strIgnore'] = __('Ignore');
$js_messages['strCopy'] = __('Copy');
$js_messages['strX'] = __('X');
diff --git a/js/tbl_change.js b/js/table/change.js
similarity index 99%
rename from js/tbl_change.js
rename to js/table/change.js
index 26c97d19f8..a3a5ea4825 100644
--- a/js/tbl_change.js
+++ b/js/table/change.js
@@ -306,7 +306,7 @@ function verificationsAfterFieldChange (urlField, multiEdit, theType) {
/**
* Unbind all event handlers before tearing down a page
*/
-AJAX.registerTeardown('tbl_change.js', function () {
+AJAX.registerTeardown('table/change.js', function () {
$(document).off('click', 'span.open_gis_editor');
$(document).off('click', 'input[name^=\'insert_ignore_\']');
$(document).off('click', 'input[name=\'gis_data[save]\']');
@@ -322,7 +322,7 @@ AJAX.registerTeardown('tbl_change.js', function () {
* Submit Data to be inserted into the table.
* Restart insertion with 'N' rows.
*/
-AJAX.registerOnload('tbl_change.js', function () {
+AJAX.registerOnload('table/change.js', function () {
if ($('#insertForm').length) {
// validate the comment form when it is submitted
$('#insertForm').validate();
diff --git a/js/tbl_chart.js b/js/table/chart.js
similarity index 99%
rename from js/tbl_chart.js
rename to js/table/chart.js
index 524692cd7e..6040439eaf 100644
--- a/js/tbl_chart.js
+++ b/js/table/chart.js
@@ -237,7 +237,7 @@ function onDataSeriesChange () {
/**
* Unbind all event handlers before tearing down a page
*/
-AJAX.registerTeardown('tbl_chart.js', function () {
+AJAX.registerTeardown('table/chart.js', function () {
$('input[name="chartType"]').off('click');
$('input[name="barStacked"]').off('click');
$('input[name="chkAlternative"]').off('click');
@@ -252,7 +252,7 @@ AJAX.registerTeardown('tbl_chart.js', function () {
$('#tblchartform').off('submit');
});
-AJAX.registerOnload('tbl_chart.js', function () {
+AJAX.registerOnload('table/chart.js', function () {
// handle manual resize
$('#resizer').on('resizestop', function () {
// make room so that the handle will still appear
diff --git a/js/tbl_find_replace.js b/js/table/find_replace.js
similarity index 92%
rename from js/tbl_find_replace.js
rename to js/table/find_replace.js
index 7d12165f8b..9470ca7e5d 100644
--- a/js/tbl_find_replace.js
+++ b/js/table/find_replace.js
@@ -1,7 +1,7 @@
/**
* Unbind all event handlers before tearing down a page
*/
-AJAX.registerTeardown('tbl_find_replace.js', function () {
+AJAX.registerTeardown('table/find_replace.js', function () {
$('#find_replace_form').off('submit');
$('#toggle_find').off('click');
});
@@ -9,7 +9,7 @@ AJAX.registerTeardown('tbl_find_replace.js', function () {
/**
* Bind events
*/
-AJAX.registerOnload('tbl_find_replace.js', function () {
+AJAX.registerOnload('table/find_replace.js', function () {
$('')
.insertAfter('#find_replace_form')
.hide();
diff --git a/js/tbl_gis_visualization.js b/js/table/gis_visualization.js
similarity index 98%
rename from js/tbl_gis_visualization.js
rename to js/table/gis_visualization.js
index b488349f0c..da07fb739e 100644
--- a/js/tbl_gis_visualization.js
+++ b/js/table/gis_visualization.js
@@ -191,7 +191,7 @@ function getRelativeCoords (e) {
/**
* Unbind all event handlers before tearing down a page
*/
-AJAX.registerTeardown('tbl_gis_visualization.js', function () {
+AJAX.registerTeardown('table/gis_visualization.js', function () {
$(document).off('click', '#choice');
$(document).off('mousewheel', '#placeholder');
$(document).off('dragstart', 'svg');
@@ -208,7 +208,7 @@ AJAX.registerTeardown('tbl_gis_visualization.js', function () {
$('.vector').off('mousemove').off('mouseout');
});
-AJAX.registerOnload('tbl_gis_visualization.js', function () {
+AJAX.registerOnload('table/gis_visualization.js', function () {
// If we are in GIS visualization, initialize it
if ($('#gis_div').length > 0) {
initGISVisualization();
diff --git a/js/tbl_operations.js b/js/table/operations.js
similarity index 99%
rename from js/tbl_operations.js
rename to js/table/operations.js
index 84312fad14..af3a96ca6c 100644
--- a/js/tbl_operations.js
+++ b/js/table/operations.js
@@ -1,7 +1,7 @@
/**
* Unbind all event handlers before tearing down a page
*/
-AJAX.registerTeardown('tbl_operations.js', function () {
+AJAX.registerTeardown('table/operations.js', function () {
$(document).off('submit', '#copyTable.ajax');
$(document).off('submit', '#moveTableForm');
$(document).off('submit', '#tableOptionsForm');
@@ -16,7 +16,7 @@ AJAX.registerTeardown('tbl_operations.js', function () {
* jQuery coding for 'Table operations'. Used on tbl_operations.php
* Attach Ajax Event handlers for Table operations
*/
-AJAX.registerOnload('tbl_operations.js', function () {
+AJAX.registerOnload('table/operations.js', function () {
/**
*Ajax action for submitting the "Copy table"
**/
diff --git a/js/tbl_relation.js b/js/table/relation.js
similarity index 98%
rename from js/tbl_relation.js
rename to js/table/relation.js
index baa526ccf4..56cc24e355 100644
--- a/js/tbl_relation.js
+++ b/js/table/relation.js
@@ -121,7 +121,7 @@ TableRelation.getDropdownValues = function ($dropdown) {
/**
* Unbind all event handlers before tearing down a page
*/
-AJAX.registerTeardown('tbl_relation.js', function () {
+AJAX.registerTeardown('table/relation.js', function () {
$('body').off('change',
'select[name^="destination_db"], ' +
'select[name^="destination_table"], ' +
@@ -133,7 +133,7 @@ AJAX.registerTeardown('tbl_relation.js', function () {
$('a.drop_foreign_key_anchor.ajax').off('click');
});
-AJAX.registerOnload('tbl_relation.js', function () {
+AJAX.registerOnload('table/relation.js', function () {
/**
* Ajax event handler to fetch table/column dropdown values.
*/
diff --git a/js/tbl_select.js b/js/table/select.js
similarity index 98%
rename from js/tbl_select.js
rename to js/table/select.js
index 60b97f81c8..41a89d2e9d 100644
--- a/js/tbl_select.js
+++ b/js/table/select.js
@@ -6,7 +6,7 @@
* @requires js/functions.js
*/
-/* global changeValueFieldType */ // js/tbl_change.js
+/* global changeValueFieldType */ // js/table/change.js
/* global openGISEditor, gisEditorLoaded, loadJSAndGISEditor, loadGISEditor */ // js/gis_data_editor.js
var TableSelect = {};
@@ -46,7 +46,7 @@ TableSelect.checkIfDataTypeNumericOrDate = function (dataType) {
/**
* Unbind all event handlers before tearing down a page
*/
-AJAX.registerTeardown('tbl_select.js', function () {
+AJAX.registerTeardown('table/select.js', function () {
$('#togglesearchformlink').off('click');
$(document).off('submit', '#tbl_search_form.ajax');
$('select.geom_func').off('change');
@@ -54,7 +54,7 @@ AJAX.registerTeardown('tbl_select.js', function () {
$('body').off('change', 'select[name*="criteriaColumnOperators"]'); // Fix for bug #13778, changed 'click' to 'change'
});
-AJAX.registerOnload('tbl_select.js', function () {
+AJAX.registerOnload('table/select.js', function () {
/**
* Prepare a div containing a link, otherwise it's incorrectly displayed
* after a couple of clicks
diff --git a/js/tbl_structure.js b/js/table/structure.js
similarity index 99%
rename from js/tbl_structure.js
rename to js/table/structure.js
index 8301024caa..8be0671c5d 100644
--- a/js/tbl_structure.js
+++ b/js/table/structure.js
@@ -46,7 +46,7 @@ function checkFirst () {
/**
* Unbind all event handlers before tearing down a page
*/
-AJAX.registerTeardown('tbl_structure.js', function () {
+AJAX.registerTeardown('table/structure.js', function () {
$(document).off('click', 'a.drop_column_anchor.ajax');
$(document).off('click', 'a.add_key.ajax');
$(document).off('click', '#move_columns_anchor');
@@ -57,7 +57,7 @@ AJAX.registerTeardown('tbl_structure.js', function () {
$(document).off('click', '#remove_partitioning.ajax');
});
-AJAX.registerOnload('tbl_structure.js', function () {
+AJAX.registerOnload('table/structure.js', function () {
// Re-initialize variables.
primaryIndexes = [];
indexes = [];
@@ -471,7 +471,7 @@ AJAX.registerOnload('tbl_structure.js', function () {
});
/** Handler for "More" dropdown in structure table rows */
-AJAX.registerOnload('tbl_structure.js', function () {
+AJAX.registerOnload('table/structure.js', function () {
var windowwidth = $(window).width();
if (windowwidth > 768) {
if (! $('#fieldsForm').hasClass('HideStructureActions')) {
diff --git a/js/tbl_tracking.js b/js/table/tracking.js
similarity index 97%
rename from js/tbl_tracking.js
rename to js/table/tracking.js
index 8b4587a601..7d2d943ada 100644
--- a/js/tbl_tracking.js
+++ b/js/table/tracking.js
@@ -1,7 +1,7 @@
/**
* Unbind all event handlers before tearing down the page
*/
-AJAX.registerTeardown('tbl_tracking.js', function () {
+AJAX.registerTeardown('table/tracking.js', function () {
$('body').off('click', '#versionsForm.ajax button[name="submit_mult"], #versionsForm.ajax input[name="submit_mult"]');
$('body').off('click', 'a.delete_version_anchor.ajax');
$('body').off('click', 'a.delete_entry_anchor.ajax');
@@ -10,7 +10,7 @@ AJAX.registerTeardown('tbl_tracking.js', function () {
/**
* Bind event handlers
*/
-AJAX.registerOnload('tbl_tracking.js', function () {
+AJAX.registerOnload('table/tracking.js', function () {
$('#versions tr:first th').append($(''));
$('#versions').tablesorter({
sortList: [[1, 0]],
diff --git a/js/tbl_zoom_plot_jqplot.js b/js/table/zoom_plot_jqplot.js
similarity index 99%
rename from js/tbl_zoom_plot_jqplot.js
rename to js/table/zoom_plot_jqplot.js
index 75e8d12ee0..659e6a7cef 100644
--- a/js/tbl_zoom_plot_jqplot.js
+++ b/js/table/zoom_plot_jqplot.js
@@ -98,7 +98,7 @@ function getType (field) {
/**
* Unbind all event handlers before tearing down a page
*/
-AJAX.registerTeardown('tbl_zoom_plot_jqplot.js', function () {
+AJAX.registerTeardown('table/zoom_plot_jqplot.js', function () {
$('#tableid_0').off('change');
$('#tableid_1').off('change');
$('#tableid_2').off('change');
@@ -111,7 +111,7 @@ AJAX.registerTeardown('tbl_zoom_plot_jqplot.js', function () {
$('div#querychart').off('jqplotDataClick');
});
-AJAX.registerOnload('tbl_zoom_plot_jqplot.js', function () {
+AJAX.registerOnload('table/zoom_plot_jqplot.js', function () {
var currentChart = null;
var searchedDataKey = null;
var xLabel = $('#tableid_0').val();
diff --git a/libraries/classes/Controllers/Table/ChartController.php b/libraries/classes/Controllers/Table/ChartController.php
index b10b83cfe4..e256b20c54 100644
--- a/libraries/classes/Controllers/Table/ChartController.php
+++ b/libraries/classes/Controllers/Table/ChartController.php
@@ -97,7 +97,7 @@ class ChartController extends AbstractController
$this->response->getHeader()->getScripts()->addFiles(
[
'chart.js',
- 'tbl_chart.js',
+ 'table/chart.js',
'vendor/jqplot/jquery.jqplot.js',
'vendor/jqplot/plugins/jqplot.barRenderer.js',
'vendor/jqplot/plugins/jqplot.canvasAxisLabelRenderer.js',
diff --git a/libraries/classes/Controllers/Table/GisVisualizationController.php b/libraries/classes/Controllers/Table/GisVisualizationController.php
index c9f2178ade..015945b49e 100644
--- a/libraries/classes/Controllers/Table/GisVisualizationController.php
+++ b/libraries/classes/Controllers/Table/GisVisualizationController.php
@@ -174,7 +174,7 @@ class GisVisualizationController extends AbstractController
[
'vendor/openlayers/OpenLayers.js',
'vendor/jquery/jquery.svg.js',
- 'tbl_gis_visualization.js',
+ 'table/gis_visualization.js',
]
);
diff --git a/libraries/classes/Controllers/Table/RelationController.php b/libraries/classes/Controllers/Table/RelationController.php
index 6aa8a3acde..d1e239c0cc 100644
--- a/libraries/classes/Controllers/Table/RelationController.php
+++ b/libraries/classes/Controllers/Table/RelationController.php
@@ -124,7 +124,7 @@ class RelationController extends AbstractController
$this->response->getHeader()->getScripts()->addFiles(
[
- 'tbl_relation.js',
+ 'table/relation.js',
'indexes.js',
]
);
diff --git a/libraries/classes/Controllers/Table/SearchController.php b/libraries/classes/Controllers/Table/SearchController.php
index a0c24ddcc3..e25c9475b1 100644
--- a/libraries/classes/Controllers/Table/SearchController.php
+++ b/libraries/classes/Controllers/Table/SearchController.php
@@ -202,7 +202,7 @@ class SearchController extends AbstractController
$this->response
->getHeader()
->getScripts()
- ->addFile('tbl_find_replace.js');
+ ->addFile('table/find_replace.js');
if (isset($_POST['replace'])) {
$this->replaceAction();
@@ -219,8 +219,8 @@ class SearchController extends AbstractController
[
'makegrid.js',
'sql.js',
- 'tbl_select.js',
- 'tbl_change.js',
+ 'table/select.js',
+ 'table/change.js',
'vendor/jquery/jquery.uitablefilter.js',
'gis_data_editor.js',
]
@@ -257,8 +257,8 @@ class SearchController extends AbstractController
'vendor/jqplot/plugins/jqplot.dateAxisRenderer.js',
'vendor/jqplot/plugins/jqplot.highlighter.js',
'vendor/jqplot/plugins/jqplot.cursor.js',
- 'tbl_zoom_plot_jqplot.js',
- 'tbl_change.js',
+ 'table/zoom_plot_jqplot.js',
+ 'table/change.js',
]
);
diff --git a/libraries/classes/Controllers/Table/StructureController.php b/libraries/classes/Controllers/Table/StructureController.php
index aac263766f..31c00dffec 100644
--- a/libraries/classes/Controllers/Table/StructureController.php
+++ b/libraries/classes/Controllers/Table/StructureController.php
@@ -159,7 +159,7 @@ class StructureController extends AbstractController
$this->response->getHeader()->getScripts()->addFiles(
[
- 'tbl_structure.js',
+ 'table/structure.js',
'indexes.js',
]
);
diff --git a/libraries/classes/InsertEdit.php b/libraries/classes/InsertEdit.php
index 66dab9289f..6adab2a2d4 100644
--- a/libraries/classes/InsertEdit.php
+++ b/libraries/classes/InsertEdit.php
@@ -2187,7 +2187,7 @@ class InsertEdit
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('vendor/jquery/additional-methods.js');
- $scripts->addFile('tbl_change.js');
+ $scripts->addFile('table/change.js');
if (! defined('TESTSUITE')) {
include ROOT_PATH . 'tbl_change.php';
exit;
@@ -3309,7 +3309,7 @@ class InsertEdit
}
$html_output .= '
| ' . "\n";
- // Will be used by js/tbl_change.js to set the default value
+ // Will be used by js/table/change.js to set the default value
// for the "Continue insertion" feature
$html_output .= ''
. $special_chars . '';
diff --git a/sql.php b/sql.php
index 3080ac71a0..087f931be4 100644
--- a/sql.php
+++ b/sql.php
@@ -44,7 +44,7 @@ PageSettings::showGroup('Browse');
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('vendor/jquery/jquery.uitablefilter.js');
-$scripts->addFile('tbl_change.js');
+$scripts->addFile('table/change.js');
$scripts->addFile('indexes.js');
$scripts->addFile('gis_data_editor.js');
$scripts->addFile('multi_column_sort.js');
diff --git a/tbl_addfield.php b/tbl_addfield.php
index 8e5a59108e..321e9f5eb4 100644
--- a/tbl_addfield.php
+++ b/tbl_addfield.php
@@ -35,7 +35,7 @@ $dbi = $container->get(DatabaseInterface::class);
$header = $response->getHeader();
$scripts = $header->getScripts();
-$scripts->addFile('tbl_structure.js');
+$scripts->addFile('table/structure.js');
// Check parameters
Util::checkParameters(['db', 'table']);
diff --git a/tbl_change.php b/tbl_change.php
index 9db9765239..312ede0b4d 100644
--- a/tbl_change.php
+++ b/tbl_change.php
@@ -85,7 +85,7 @@ $comments_map = $insertEdit->getCommentsMap($db, $table);
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('sql.js');
-$scripts->addFile('tbl_change.js');
+$scripts->addFile('table/change.js');
$scripts->addFile('vendor/jquery/additional-methods.js');
$scripts->addFile('gis_data_editor.js');
diff --git a/tbl_operations.php b/tbl_operations.php
index 7b26cbafb2..0c8511736d 100644
--- a/tbl_operations.php
+++ b/tbl_operations.php
@@ -50,7 +50,7 @@ $pma_table = new Table($table, $db);
$header = $response->getHeader();
$scripts = $header->getScripts();
-$scripts->addFile('tbl_operations.js');
+$scripts->addFile('table/operations.js');
/**
* Runs common work
diff --git a/tbl_replace.php b/tbl_replace.php
index 57ab02e626..2c1e9aa03b 100644
--- a/tbl_replace.php
+++ b/tbl_replace.php
@@ -539,7 +539,7 @@ if (! empty($return_to_sql_query)) {
}
$scripts->addFile('vendor/jquery/additional-methods.js');
-$scripts->addFile('tbl_change.js');
+$scripts->addFile('table/change.js');
$active_page = $goto_include;
diff --git a/tbl_tracking.php b/tbl_tracking.php
index 9e383bcdd8..ff2074e95a 100644
--- a/tbl_tracking.php
+++ b/tbl_tracking.php
@@ -25,7 +25,7 @@ $response = Response::getInstance();
$header = $response->getHeader();
$scripts = $header->getScripts();
$scripts->addFile('vendor/jquery/jquery.tablesorter.js');
-$scripts->addFile('tbl_tracking.js');
+$scripts->addFile('table/tracking.js');
define('TABLE_MAY_BE_ABSENT', true);
require ROOT_PATH . 'libraries/tbl_common.inc.php';
diff --git a/templates/table/structure/display_structure.twig b/templates/table/structure/display_structure.twig
index c6a3d518a2..cbe6939fd9 100644
--- a/templates/table/structure/display_structure.twig
+++ b/templates/table/structure/display_structure.twig
@@ -28,7 +28,7 @@
| {% trans 'Comments' %} |
{%- endif %}
{% trans 'Extra' %} |
- {# @see tbl_structure.js, function moreOptsMenuResize() #}
+ {# @see table/structure.js, function moreOptsMenuResize() #}
{% if not db_is_system_schema and not tbl_is_view %}
{% trans 'Action' %} |
diff --git a/view_operations.php b/view_operations.php
index fa87ffaa19..0f9766ee7f 100644
--- a/view_operations.php
+++ b/view_operations.php
@@ -38,7 +38,7 @@ $pma_table = new Table($GLOBALS['table'], $GLOBALS['db']);
$header = $response->getHeader();
$scripts = $header->getScripts();
-$scripts->addFile('tbl_operations.js');
+$scripts->addFile('table/operations.js');
/** @var Template $template */
$template = $containerBuilder->get('template');