Rename js/tbl_*.js to js/table/*.js
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
05ce6ffed4
commit
efe77cdf06
@ -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([
|
||||
|
||||
@ -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 () {
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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'] = '<ul><li>'
|
||||
. __('Each point represents a data row.')
|
||||
. '</li><li>'
|
||||
@ -524,7 +524,7 @@ $js_messages['strSameInputs'] = '<strong>'
|
||||
. '</strong>';
|
||||
$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');
|
||||
|
||||
@ -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();
|
||||
@ -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
|
||||
@ -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 () {
|
||||
$('<div id="toggle_find_div"><a id="toggle_find"></a></div>')
|
||||
.insertAfter('#find_replace_form')
|
||||
.hide();
|
||||
@ -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();
|
||||
@ -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"
|
||||
**/
|
||||
@ -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.
|
||||
*/
|
||||
@ -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
|
||||
@ -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')) {
|
||||
@ -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($('<div class="sorticon"></div>'));
|
||||
$('#versions').tablesorter({
|
||||
sortList: [[1, 0]],
|
||||
@ -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();
|
||||
@ -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',
|
||||
|
||||
@ -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',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@ -124,7 +124,7 @@ class RelationController extends AbstractController
|
||||
|
||||
$this->response->getHeader()->getScripts()->addFiles(
|
||||
[
|
||||
'tbl_relation.js',
|
||||
'table/relation.js',
|
||||
'indexes.js',
|
||||
]
|
||||
);
|
||||
|
||||
@ -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',
|
||||
]
|
||||
);
|
||||
|
||||
|
||||
@ -159,7 +159,7 @@ class StructureController extends AbstractController
|
||||
|
||||
$this->response->getHeader()->getScripts()->addFiles(
|
||||
[
|
||||
'tbl_structure.js',
|
||||
'table/structure.js',
|
||||
'indexes.js',
|
||||
]
|
||||
);
|
||||
|
||||
@ -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 .= '<td' . ' data-type="' . $type . '"' . ' data-decimals="'
|
||||
. $no_decimals . '">' . "\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 .= '<span class="default_value hide">'
|
||||
. $special_chars . '</span>';
|
||||
|
||||
2
sql.php
2
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');
|
||||
|
||||
@ -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']);
|
||||
|
||||
@ -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');
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
<th>{% trans 'Comments' %}</th>
|
||||
{%- endif %}
|
||||
<th>{% trans 'Extra' %}</th>
|
||||
{# @see tbl_structure.js, function moreOptsMenuResize() #}
|
||||
{# @see table/structure.js, function moreOptsMenuResize() #}
|
||||
{% if not db_is_system_schema and not tbl_is_view %}
|
||||
<th colspan="{{ show_icons('ActionLinksMode') ? '8' : '9' -}}
|
||||
" class="action print_ignore">{% trans 'Action' %}</th>
|
||||
|
||||
@ -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');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user