Merge pull request #17919 from MauricioFauth/js-split-chunks
Create a `shared.js` file for common JS dependencies
This commit is contained in:
commit
363a353ea7
@ -13,9 +13,6 @@
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"globals": {
|
||||
"Functions": "readonly"
|
||||
},
|
||||
"rules": {
|
||||
"valid-jsdoc": ["error", {
|
||||
"prefer": {
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { Navigation } from './navigation.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* This object handles ajax requests for pages. It also
|
||||
* handles the reloading of the main menu and scripts.
|
||||
@ -436,8 +436,8 @@ const AJAX = {
|
||||
$('#modalOverlay').remove();
|
||||
}
|
||||
$('fieldset.disabled_for_expiration').removeAttr('disabled').removeClass('disabled_for_expiration');
|
||||
AJAX.fireTeardown('functions.js');
|
||||
AJAX.fireOnload('functions.js');
|
||||
AJAX.fireTeardown('main.js');
|
||||
AJAX.fireOnload('main.js');
|
||||
}
|
||||
if (typeof data.new_token !== 'undefined') {
|
||||
$('input[name=token]').val(data.new_token);
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import $ from 'jquery';
|
||||
|
||||
/* global Navigation */
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { Navigation } from './navigation.js';
|
||||
|
||||
/**
|
||||
* Holds common parameters such as server, db, table, etc
|
||||
@ -165,7 +166,7 @@ const CommonActions = {
|
||||
.trigger('click')
|
||||
.remove();
|
||||
if (typeof callback !== 'undefined') {
|
||||
window.AJAX.callback = callback;
|
||||
AJAX.callback = callback;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
@ -18,7 +20,7 @@ import { CommonParams } from '../common.js';
|
||||
*
|
||||
*/
|
||||
|
||||
window.AJAX.registerTeardown('database/central_columns.js', function () {
|
||||
AJAX.registerTeardown('database/central_columns.js', function () {
|
||||
$('.edit').off('click');
|
||||
$('.edit_save_form').off('click');
|
||||
$('.edit_cancel_form').off('click');
|
||||
@ -35,7 +37,7 @@ window.AJAX.registerTeardown('database/central_columns.js', function () {
|
||||
$('button[name=\'edit_central_columns\']').off('click');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('database/central_columns.js', function () {
|
||||
AJAX.registerOnload('database/central_columns.js', function () {
|
||||
$('#tableslistcontainer input,#tableslistcontainer select,#tableslistcontainer .default_value,#tableslistcontainer .open_enum_editor').hide();
|
||||
$('#tableslistcontainer').find('.checkall').show();
|
||||
$('#tableslistcontainer').find('.checkall_box').show();
|
||||
@ -69,8 +71,8 @@ window.AJAX.registerOnload('database/central_columns.js', function () {
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var editColumnData = editColumnList + '' + argsep + 'edit_central_columns_page=true' + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true' + argsep + 'db=' + encodeURIComponent(CommonParams.get('db')) + argsep + 'server=' + CommonParams.get('server');
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $(this);
|
||||
$.post('index.php?route=/database/central-columns', editColumnData, window.AJAX.responseHandler);
|
||||
AJAX.source = $(this);
|
||||
$.post('index.php?route=/database/central-columns', editColumnData, AJAX.responseHandler);
|
||||
});
|
||||
$('#multi_edit_central_columns').on('submit', function (event) {
|
||||
event.preventDefault();
|
||||
@ -78,8 +80,8 @@ window.AJAX.registerOnload('database/central_columns.js', function () {
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var multiColumnEditData = $('#multi_edit_central_columns').serialize() + argsep + 'multi_edit_central_column_save=true' + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true' + argsep + 'db=' + encodeURIComponent(CommonParams.get('db')) + argsep + 'server=' + CommonParams.get('server');
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $(this);
|
||||
$.post('index.php?route=/database/central-columns', multiColumnEditData, window.AJAX.responseHandler);
|
||||
AJAX.source = $(this);
|
||||
$.post('index.php?route=/database/central-columns', multiColumnEditData, AJAX.responseHandler);
|
||||
});
|
||||
$('#add_new').find('td').each(function () {
|
||||
if ($(this).attr('name') !== 'undefined') {
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
window.AJAX.registerTeardown('database/events.js', function () {
|
||||
AJAX.registerTeardown('database/events.js', function () {
|
||||
$(document).off('click', 'a.ajax.add_anchor, a.ajax.edit_anchor');
|
||||
$(document).off('click', 'a.ajax.export_anchor');
|
||||
$(document).off('click', '#bulkActionExportButton');
|
||||
@ -533,7 +535,7 @@ const DatabaseEvents = {
|
||||
}
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('database/events.js', function () {
|
||||
AJAX.registerOnload('database/events.js', function () {
|
||||
/**
|
||||
* Attach Ajax event handlers for the Add/Edit functionality.
|
||||
*/
|
||||
|
||||
@ -1,15 +1,14 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
* @fileoverview function used in QBE for DB
|
||||
* @name Database Operations
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
* @requires js/database/query_generator.js
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -19,7 +18,7 @@ import { CommonParams } from '../common.js';
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('database/multi_table_query.js', function () {
|
||||
AJAX.registerTeardown('database/multi_table_query.js', function () {
|
||||
$('.tableNameSelect').each(function () {
|
||||
$(this).off('change');
|
||||
});
|
||||
@ -27,7 +26,7 @@ window.AJAX.registerTeardown('database/multi_table_query.js', function () {
|
||||
$('#add_column_button').off('click');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('database/multi_table_query.js', function () {
|
||||
AJAX.registerOnload('database/multi_table_query.js', function () {
|
||||
var editor = Functions.getSqlEditor($('#MultiSqlquery'), {}, 'both');
|
||||
$('.CodeMirror-line').css('text-align', 'left');
|
||||
editor.setSize(-1, 50);
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
@ -7,10 +9,7 @@ import { CommonActions, CommonParams } from '../common.js';
|
||||
* @fileoverview function used in server privilege pages
|
||||
* @name Database Operations
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -26,14 +25,14 @@ import { CommonActions, CommonParams } from '../common.js';
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('database/operations.js', function () {
|
||||
AJAX.registerTeardown('database/operations.js', function () {
|
||||
$(document).off('submit', '#rename_db_form.ajax');
|
||||
$(document).off('submit', '#copy_db_form.ajax');
|
||||
$(document).off('submit', '#change_db_charset_form.ajax');
|
||||
$(document).off('click', '#drop_db_anchor.ajax');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('database/operations.js', function () {
|
||||
AJAX.registerOnload('database/operations.js', function () {
|
||||
/**
|
||||
* Ajax event handlers for 'Rename Database'
|
||||
*/
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview function used in QBE for DB
|
||||
* @name Database Operations
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -20,7 +19,7 @@ import $ from 'jquery';
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('database/qbe.js', function () {
|
||||
AJAX.registerTeardown('database/qbe.js', function () {
|
||||
$(document).off('change', 'select[name^=criteriaColumn]');
|
||||
$(document).off('change', '#searchId');
|
||||
$(document).off('click', '#saveSearch');
|
||||
@ -28,7 +27,7 @@ window.AJAX.registerTeardown('database/qbe.js', function () {
|
||||
$(document).off('click', '#deleteSearch');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('database/qbe.js', function () {
|
||||
AJAX.registerOnload('database/qbe.js', function () {
|
||||
Functions.getSqlEditor($('#textSqlquery'), {}, 'none');
|
||||
|
||||
$('#tblQbe').width($('#tblQbe').parent().width());
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview function used in QBE for DB
|
||||
* @name Database Operations
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*
|
||||
*/
|
||||
|
||||
function getFormatsText () {
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
window.AJAX.registerTeardown('database/routines.js', function () {
|
||||
AJAX.registerTeardown('database/routines.js', function () {
|
||||
$(document).off('click', 'a.ajax.add_anchor');
|
||||
$(document).off('click', 'a.ajax.edit_anchor');
|
||||
$(document).off('click', 'a.ajax.exec_anchor');
|
||||
@ -870,7 +872,7 @@ const DatabaseRoutines = {
|
||||
}
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('database/routines.js', function () {
|
||||
AJAX.registerOnload('database/routines.js', function () {
|
||||
$(document).on('click', 'a.ajax.add_anchor', function (event) {
|
||||
event.preventDefault();
|
||||
$.datepicker.initialized = false;
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
* JavaScript functions used on Database Search page
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires js/functions.js
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -20,7 +19,7 @@ import { CommonParams } from '../common.js';
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('database/search.js', function () {
|
||||
AJAX.registerTeardown('database/search.js', function () {
|
||||
$('a.browse_results').off('click');
|
||||
$('a.delete_results').off('click');
|
||||
$('#buttonGo').off('click');
|
||||
@ -32,7 +31,7 @@ window.AJAX.registerTeardown('database/search.js', function () {
|
||||
$(document).off('submit', '#db_search_form.ajax');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('database/search.js', function () {
|
||||
AJAX.registerOnload('database/search.js', function () {
|
||||
/** Hide the table link in the initial search result */
|
||||
var icon = Functions.getImage('s_tbl', '', { 'id': 'table-image' }).toString();
|
||||
$('#table-info').prepend(icon).hide();
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
@ -7,9 +9,7 @@ import { CommonParams } from '../common.js';
|
||||
* @fileoverview functions used on the database structure page
|
||||
* @name Database Structure
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @required js/functions.js
|
||||
*/
|
||||
|
||||
var DatabaseStructure = {};
|
||||
@ -28,7 +28,7 @@ window.DatabaseStructure = DatabaseStructure;
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('database/structure.js', function () {
|
||||
AJAX.registerTeardown('database/structure.js', function () {
|
||||
$(document).off('click', 'a.truncate_table_anchor.ajax');
|
||||
$(document).off('click', 'a.drop_table_anchor.ajax');
|
||||
$(document).off('click', '#real_end_input');
|
||||
@ -189,7 +189,7 @@ DatabaseStructure.fetchRealRowCount = function ($target) {
|
||||
});
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('database/structure.js', function () {
|
||||
AJAX.registerOnload('database/structure.js', function () {
|
||||
/**
|
||||
* Event handler on select of "Make consistent with central list"
|
||||
*/
|
||||
@ -208,12 +208,12 @@ window.AJAX.registerOnload('database/structure.js', function () {
|
||||
const data = $form.serialize() + argSep + 'ajax_request=true' + argSep + 'ajax_page_request=true';
|
||||
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $form;
|
||||
AJAX.source = $form;
|
||||
|
||||
$.post(
|
||||
'index.php?route=/database/structure/central-columns/make-consistent',
|
||||
data,
|
||||
window.AJAX.responseHandler
|
||||
AJAX.responseHandler
|
||||
);
|
||||
|
||||
$('#makeConsistentWithCentralListModal').modal('hide');
|
||||
@ -303,9 +303,9 @@ window.AJAX.registerOnload('database/structure.js', function () {
|
||||
var data = $form.serialize() + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true';
|
||||
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $form;
|
||||
AJAX.source = $form;
|
||||
|
||||
$.post(url, data, window.AJAX.responseHandler);
|
||||
$.post(url, data, AJAX.responseHandler);
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down the page
|
||||
*/
|
||||
window.AJAX.registerTeardown('database/tracking.js', function () {
|
||||
AJAX.registerTeardown('database/tracking.js', function () {
|
||||
$('body').off('click', '#trackedForm.ajax button[name="submit_mult"], #trackedForm.ajax input[name="submit_mult"]');
|
||||
$('body').off('click', '#untrackedForm.ajax button[name="submit_mult"], #untrackedForm.ajax input[name="submit_mult"]');
|
||||
$('body').off('click', 'a.delete_tracking_anchor.ajax');
|
||||
@ -13,7 +15,7 @@ window.AJAX.registerTeardown('database/tracking.js', function () {
|
||||
/**
|
||||
* Bind event handlers
|
||||
*/
|
||||
window.AJAX.registerOnload('database/tracking.js', function () {
|
||||
AJAX.registerOnload('database/tracking.js', function () {
|
||||
var $versions = $('#versions');
|
||||
$versions.find('tr').first().find('th').append($('<div class="sorticon"></div>'));
|
||||
$versions.tablesorter({
|
||||
@ -53,13 +55,13 @@ window.AJAX.registerOnload('database/tracking.js', function () {
|
||||
var question = window.Messages.strDeleteTrackingDataMultiple;
|
||||
$button.confirm(question, $form.attr('action'), function (url) {
|
||||
Functions.ajaxShowMessage(window.Messages.strDeletingTrackingData);
|
||||
window.AJAX.source = $form;
|
||||
$.post(url, submitData, window.AJAX.responseHandler);
|
||||
AJAX.source = $form;
|
||||
$.post(url, submitData, AJAX.responseHandler);
|
||||
});
|
||||
} else {
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, window.AJAX.responseHandler);
|
||||
AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, AJAX.responseHandler);
|
||||
}
|
||||
});
|
||||
|
||||
@ -73,8 +75,8 @@ window.AJAX.registerOnload('database/tracking.js', function () {
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var submitData = $form.serialize() + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true' + argsep + 'submit_mult=' + $button.val();
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, window.AJAX.responseHandler);
|
||||
AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, AJAX.responseHandler);
|
||||
});
|
||||
|
||||
/**
|
||||
@ -86,11 +88,11 @@ window.AJAX.registerOnload('database/tracking.js', function () {
|
||||
var question = window.Messages.strDeleteTrackingData;
|
||||
$anchor.confirm(question, $anchor.attr('href'), function (url) {
|
||||
Functions.ajaxShowMessage(window.Messages.strDeletingTrackingData);
|
||||
window.AJAX.source = $anchor;
|
||||
AJAX.source = $anchor;
|
||||
var argSep = CommonParams.get('arg_separator');
|
||||
var params = Functions.getJsConfirmCommonParam(this, $anchor.getPostData());
|
||||
params += argSep + 'ajax_page_request=1';
|
||||
$.post(url, params, window.AJAX.responseHandler);
|
||||
$.post(url, params, AJAX.responseHandler);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,8 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
window.AJAX.registerTeardown('database/triggers.js', function () {
|
||||
AJAX.registerTeardown('database/triggers.js', function () {
|
||||
$(document).off('click', 'a.ajax.add_anchor, a.ajax.edit_anchor');
|
||||
$(document).off('click', 'a.ajax.export_anchor');
|
||||
$(document).off('click', '#bulkActionExportButton');
|
||||
@ -508,7 +510,7 @@ const DatabaseTriggers = {
|
||||
}
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('database/triggers.js', function () {
|
||||
AJAX.registerOnload('database/triggers.js', function () {
|
||||
/**
|
||||
* Attach Ajax event handlers for the Add/Edit functionality.
|
||||
*/
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
var designerTables = [
|
||||
{
|
||||
name: 'pdf_pages',
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview function used in this file builds history tab and generates query.
|
||||
@ -807,7 +809,7 @@ DesignerHistory.buildQuery = function () {
|
||||
});
|
||||
};
|
||||
|
||||
window.AJAX.registerTeardown('designer/history.js', function () {
|
||||
AJAX.registerTeardown('designer/history.js', function () {
|
||||
vqbEditor = null;
|
||||
historyArray = [];
|
||||
selectField = [];
|
||||
@ -817,7 +819,7 @@ window.AJAX.registerTeardown('designer/history.js', function () {
|
||||
$('#ok_edit_where').off('click');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('designer/history.js', function () {
|
||||
AJAX.registerOnload('designer/history.js', function () {
|
||||
$('#ok_edit_rename').on('click', function () {
|
||||
DesignerHistory.edit('Rename');
|
||||
});
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
|
||||
/**
|
||||
* Initializes the data required to run Designer, then fires it up.
|
||||
@ -10,11 +11,11 @@ import $ from 'jquery';
|
||||
/* global DesignerPage */ // js/designer/page.js
|
||||
/* global designerConfig */ // templates/database/designer/main.twig
|
||||
|
||||
window.AJAX.registerTeardown('designer/init.js', function () {
|
||||
AJAX.registerTeardown('designer/init.js', function () {
|
||||
$('.trigger').off('click');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('designer/init.js', function () {
|
||||
AJAX.registerOnload('designer/init.js', function () {
|
||||
$('.trigger').on('click', function () {
|
||||
$('.panel').toggle('fast');
|
||||
$(this).toggleClass('active');
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
@ -17,12 +19,12 @@ var change = 0; // variable to track any change in designer layout.
|
||||
var showRelationLines = true;
|
||||
var alwaysShowText = false;
|
||||
|
||||
window.AJAX.registerTeardown('designer/move.js', function () {
|
||||
AJAX.registerTeardown('designer/move.js', function () {
|
||||
$(document).off('fullscreenchange');
|
||||
$('#selflink').show();
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('designer/move.js', function () {
|
||||
AJAX.registerOnload('designer/move.js', function () {
|
||||
var $content = $('#page_content');
|
||||
var $img = $('#toggleFullscreen').find('img');
|
||||
var $span = $img.siblings('span');
|
||||
@ -2026,7 +2028,7 @@ DesignerMove.enableTableEvents = function (index, element) {
|
||||
DesignerMove.enablePageContentEvents();
|
||||
};
|
||||
|
||||
window.AJAX.registerTeardown('designer/move.js', function () {
|
||||
AJAX.registerTeardown('designer/move.js', function () {
|
||||
$('#side_menu').off('mouseenter mouseleave');
|
||||
$('#key_Show_left_menu').off('click');
|
||||
$('#toggleFullscreen').off('click');
|
||||
@ -2076,7 +2078,7 @@ window.AJAX.registerTeardown('designer/move.js', function () {
|
||||
$('#page_content').off('mousemove');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('designer/move.js', function () {
|
||||
AJAX.registerOnload('designer/move.js', function () {
|
||||
$('#key_Show_left_menu').on('click', function () {
|
||||
DesignerMove.showLeftMenu(this);
|
||||
return false;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/* global DesignerOfflineDB */ // js/designer/database.js
|
||||
/* global DesignerMove */ // js/designer/move.js
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/* This script handles PMA Drag Drop Import, loaded only when configuration is enabled.*/
|
||||
@ -296,7 +298,7 @@ var DragDropImport = {
|
||||
$('.pma_sql_import_status').slideDown();
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var ext = (DragDropImport.getExtension(files[i].name));
|
||||
var hash = window.AJAX.hash(++DragDropImport.uploadCount);
|
||||
var hash = AJAX.hash(++DragDropImport.uploadCount);
|
||||
|
||||
var $sqlImportStatusDiv = $('.pma_sql_import_status div');
|
||||
$sqlImportStatusDiv.append('<li data-hash="' + hash + '">' +
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
@ -224,8 +226,8 @@ var ErrorReport = {
|
||||
'url': window.location.href,
|
||||
'exception_type': 'js'
|
||||
};
|
||||
if (window.AJAX.scriptHandler.scripts.length > 0) {
|
||||
reportData.scripts = window.AJAX.scriptHandler.scripts.map(
|
||||
if (AJAX.scriptHandler.scripts.length > 0) {
|
||||
reportData.scripts = AJAX.scriptHandler.scripts.map(
|
||||
function (script) {
|
||||
return script;
|
||||
}
|
||||
@ -259,13 +261,13 @@ var ErrorReport = {
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Automatically wraps the callback in window.AJAX.registerOnload
|
||||
* Automatically wraps the callback in AJAX.registerOnload
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
wrapAjaxOnloadCallback: function () {
|
||||
var oldOnload = window.AJAX.registerOnload;
|
||||
window.AJAX.registerOnload = function (file, func) {
|
||||
var oldOnload = AJAX.registerOnload;
|
||||
AJAX.registerOnload = function (file, func) {
|
||||
var wrappedFunction = ErrorReport.wrapFunction(func);
|
||||
oldOnload.call(this, file, wrappedFunction);
|
||||
};
|
||||
@ -288,7 +290,7 @@ var ErrorReport = {
|
||||
};
|
||||
},
|
||||
/**
|
||||
* Wraps the callback in window.AJAX.registerOnload automatically
|
||||
* Wraps the callback in AJAX.registerOnload automatically
|
||||
*
|
||||
* @return {void}
|
||||
*/
|
||||
@ -298,7 +300,7 @@ var ErrorReport = {
|
||||
}
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('error_report.js', function () {
|
||||
AJAX.registerOnload('error_report.js', function () {
|
||||
window.TraceKit.report.subscribe(ErrorReport.errorHandler);
|
||||
ErrorReport.setUpErrorReporting();
|
||||
});
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
@ -206,7 +208,7 @@ Export.deleteTemplate = function (id) {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('export.js', function () {
|
||||
AJAX.registerTeardown('export.js', function () {
|
||||
$('#plugins').off('change');
|
||||
$('input[type=\'radio\'][name=\'sql_structure_or_data\']').off('change');
|
||||
$('input[type=\'radio\'][name$=\'_structure_or_data\']').off('change');
|
||||
@ -230,7 +232,7 @@ window.AJAX.registerTeardown('export.js', function () {
|
||||
$('input[name="deleteTemplate"]').off('click');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('export.js', function () {
|
||||
AJAX.registerOnload('export.js', function () {
|
||||
$('#showsqlquery').on('click', function () {
|
||||
// Creating a dialog box similar to preview sql container to show sql query
|
||||
var modal = $('#showSqlQueryModal');
|
||||
@ -435,7 +437,7 @@ Export.toggleSaveToFile = function () {
|
||||
}
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('export.js', function () {
|
||||
AJAX.registerOnload('export.js', function () {
|
||||
Export.toggleSaveToFile();
|
||||
$('input[type=\'radio\'][name=\'output_format\']').on('change', Export.toggleSaveToFile);
|
||||
});
|
||||
@ -581,7 +583,7 @@ Export.handleAddProcCheckbox = function () {
|
||||
}
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('export.js', function () {
|
||||
AJAX.registerOnload('export.js', function () {
|
||||
/**
|
||||
* For SQL plugin, if "CREATE TABLE options" is checked/unchecked, check/uncheck each of its sub-options
|
||||
*/
|
||||
@ -865,7 +867,7 @@ Export.addAlias = function (type, name, field, value) {
|
||||
$('#alias_data tbody').append(row);
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('export.js', function () {
|
||||
AJAX.registerOnload('export.js', function () {
|
||||
$('input[type=\'radio\'][name=\'quick_or_custom\']').on('change', toggleQuickOrCustom);
|
||||
$('#format_specific_opts').find('div.format_specific_options')
|
||||
.addClass('d-none')
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
|
||||
window.AJAX.registerOnload('export_output.js', function () {
|
||||
AJAX.registerOnload('export_output.js', function () {
|
||||
$(document).on('keydown', function (e) {
|
||||
if ((e.which || e.keyCode) === 116) {
|
||||
e.preventDefault();
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Navigation } from './navigation.js';
|
||||
import { CommonActions, CommonParams } from './common.js';
|
||||
import { mysqlDocKeyword, mysqlDocBuiltin } from './modules/doc-links.js';
|
||||
|
||||
/* global Navigation */
|
||||
/* global ChartType, ColumnType, DataTable, JQPlotChartFactory */ // js/chart.js
|
||||
/* global DatabaseStructure */ // js/database/structure.js
|
||||
/* global Indexes */ // js/indexes.js
|
||||
@ -336,7 +337,7 @@ Functions.getSqlEditor = function ($textarea, options, resize, lintOptions) {
|
||||
value: 3,
|
||||
content: codemirrorEditor.isClean(),
|
||||
};
|
||||
window.AJAX.lockPageHandler(e);
|
||||
AJAX.lockPageHandler(e);
|
||||
});
|
||||
|
||||
return codemirrorEditor;
|
||||
@ -2339,7 +2340,7 @@ Functions.onloadCreateTableEvents = function () {
|
||||
var tableStructureUrl = 'index.php?route=/table/structure' + argsep + 'server=' + data.params.server +
|
||||
argsep + 'db=' + data.params.db + argsep + 'token=' + data.params.token +
|
||||
argsep + 'goto=' + encodeURIComponent('index.php?route=/database/structure') + argsep + 'table=' + data.params.table + '';
|
||||
$.get(tableStructureUrl, params12, window.AJAX.responseHandler);
|
||||
$.get(tableStructureUrl, params12, AJAX.responseHandler);
|
||||
} else {
|
||||
Functions.ajaxShowMessage(
|
||||
'<div class="alert alert-danger" role="alert">' + data.error + '</div>',
|
||||
@ -2592,7 +2593,7 @@ Functions.onloadChangePasswordEvents = function () {
|
||||
}
|
||||
|
||||
if (data.scripts) {
|
||||
window.AJAX.scriptHandler.load(data.scripts);
|
||||
AJAX.scriptHandler.load(data.scripts);
|
||||
}
|
||||
|
||||
// for this dialog, we remove the fieldset wrapping due to double headings
|
||||
@ -3668,7 +3669,7 @@ Functions.onloadLockPage = function () {
|
||||
// val-hash is the hash of default value of the field
|
||||
// so that it can be compared with new value hash
|
||||
// to check whether field was modified or not.
|
||||
$(this).data('val-hash', window.AJAX.hash($(this).val()));
|
||||
$(this).data('val-hash', AJAX.hash($(this).val()));
|
||||
});
|
||||
|
||||
// initializes lock-page elements (input types checkbox and radio buttons)
|
||||
@ -3676,7 +3677,7 @@ Functions.onloadLockPage = function () {
|
||||
$('#page_content form.lock-page input[type="checkbox"], ' +
|
||||
'#page_content form.lock-page input[type="radio"]').each(function (i) {
|
||||
$(this).data('lock-id', i);
|
||||
$(this).data('val-hash', window.AJAX.hash($(this).is(':checked')));
|
||||
$(this).data('val-hash', AJAX.hash($(this).is(':checked')));
|
||||
});
|
||||
};
|
||||
|
||||
@ -4447,3 +4448,5 @@ Functions.on = function () {
|
||||
Functions.onloadSortLinkMouseEvent();
|
||||
};
|
||||
};
|
||||
|
||||
export { Functions };
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
@ -209,7 +211,7 @@ function insertDataAndClose () {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('gis_data_editor.js', function () {
|
||||
AJAX.registerTeardown('gis_data_editor.js', function () {
|
||||
$(document).off('click', '#gis_editor input[name=\'gis_data[save]\']');
|
||||
$(document).off('submit', '#gis_editor');
|
||||
$(document).off('change', '#gis_editor input[type=\'text\']');
|
||||
@ -221,7 +223,7 @@ window.AJAX.registerTeardown('gis_data_editor.js', function () {
|
||||
$(document).off('click', '#gis_editor a.addJs.addGeom');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
AJAX.registerOnload('gis_data_editor.js', function () {
|
||||
/**
|
||||
* Prepares and insert the GIS data to the input field on clicking 'copy'.
|
||||
*/
|
||||
|
||||
@ -1,14 +1,15 @@
|
||||
import { AJAX } from './ajax.js';
|
||||
import { showGitVersion } from './modules/git-info.js';
|
||||
import { ThemesManager } from './modules/themes-manager.js';
|
||||
|
||||
window.AJAX.registerTeardown('home.js', () => {
|
||||
AJAX.registerTeardown('home.js', () => {
|
||||
const themesModal = document.getElementById('themesModal');
|
||||
if (themesModal) {
|
||||
themesModal.removeEventListener('show.bs.modal', ThemesManager.handleEvent);
|
||||
}
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('home.js', () => {
|
||||
AJAX.registerOnload('home.js', () => {
|
||||
const themesModal = document.getElementById('themesModal');
|
||||
if (themesModal) {
|
||||
themesModal.addEventListener('show.bs.modal', ThemesManager.handleEvent);
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
|
||||
/**
|
||||
* Functions used in the import tab
|
||||
@ -49,7 +51,7 @@ function matchFile (fname) {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('import.js', function () {
|
||||
AJAX.registerTeardown('import.js', function () {
|
||||
$('#plugins').off('change');
|
||||
$('#input_import_file').off('change');
|
||||
$('#select_local_import_file').off('change');
|
||||
@ -58,7 +60,7 @@ window.AJAX.registerTeardown('import.js', function () {
|
||||
$('#text_csv_enclosed').add('#text_csv_escaped').off('keyup');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('import.js', function () {
|
||||
AJAX.registerOnload('import.js', function () {
|
||||
// import_file_form validation.
|
||||
$(document).on('submit', '#import_file_form', function () {
|
||||
var radioLocalImport = $('#localFileTab');
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonActions, CommonParams } from './common.js';
|
||||
|
||||
/* global Navigation */
|
||||
@ -7,9 +9,7 @@ import { CommonActions, CommonParams } from './common.js';
|
||||
* @fileoverview function used for index manipulation pages
|
||||
* @name Table Structure
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @required js/functions.js
|
||||
*/
|
||||
|
||||
var Indexes = {};
|
||||
@ -595,8 +595,8 @@ Indexes.on = () => function () {
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var submitData = $form.serialize() + argsep + 'do_save_data=1' + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true';
|
||||
Functions.ajaxShowMessage(window.Messages.strProcessingRequest);
|
||||
window.AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, window.AJAX.responseHandler);
|
||||
AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, AJAX.responseHandler);
|
||||
});
|
||||
|
||||
$(document).on('click', '#preview_index_frm', function (event) {
|
||||
|
||||
@ -1,31 +1,33 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { Navigation } from './navigation.js';
|
||||
|
||||
/* global Indexes */
|
||||
/* global Navigation */
|
||||
|
||||
window.AJAX.registerOnload('functions.js', () => window.AJAX.removeSubmitEvents());
|
||||
$(window.AJAX.loadEventHandler());
|
||||
AJAX.registerOnload('main.js', () => AJAX.removeSubmitEvents());
|
||||
$(AJAX.loadEventHandler());
|
||||
|
||||
/**
|
||||
* Attach a generic event handler to clicks on pages and submissions of forms.
|
||||
*/
|
||||
$(document).on('click', 'a', window.AJAX.requestHandler);
|
||||
$(document).on('submit', 'form', window.AJAX.requestHandler);
|
||||
$(document).on('click', 'a', AJAX.requestHandler);
|
||||
$(document).on('submit', 'form', AJAX.requestHandler);
|
||||
|
||||
$(document).on('ajaxError', window.AJAX.getFatalErrorHandler());
|
||||
$(document).on('ajaxError', AJAX.getFatalErrorHandler());
|
||||
|
||||
window.AJAX.registerTeardown('keyhandler.js', window.KeyHandlerEvents.off());
|
||||
window.AJAX.registerOnload('keyhandler.js', window.KeyHandlerEvents.on());
|
||||
AJAX.registerTeardown('keyhandler.js', window.KeyHandlerEvents.off());
|
||||
AJAX.registerOnload('keyhandler.js', window.KeyHandlerEvents.on());
|
||||
|
||||
window.crossFramingProtection();
|
||||
|
||||
window.AJAX.registerTeardown('config.js', window.Config.off());
|
||||
window.AJAX.registerOnload('config.js', window.Config.on());
|
||||
AJAX.registerTeardown('config.js', window.Config.off());
|
||||
AJAX.registerOnload('config.js', window.Config.on());
|
||||
|
||||
$.ajaxPrefilter(Functions.addNoCacheToAjaxRequests());
|
||||
|
||||
window.AJAX.registerTeardown('functions.js', Functions.off());
|
||||
window.AJAX.registerOnload('functions.js', Functions.on());
|
||||
AJAX.registerTeardown('main.js', Functions.off());
|
||||
AJAX.registerOnload('main.js', Functions.on());
|
||||
|
||||
$(Functions.dismissNotifications());
|
||||
$(Functions.initializeMenuResizer());
|
||||
@ -34,10 +36,10 @@ $(Functions.breadcrumbScrollToTop());
|
||||
|
||||
$(Navigation.onload());
|
||||
|
||||
window.AJAX.registerTeardown('indexes.js', Indexes.off());
|
||||
window.AJAX.registerOnload('indexes.js', Indexes.on());
|
||||
AJAX.registerTeardown('indexes.js', Indexes.off());
|
||||
AJAX.registerOnload('indexes.js', Indexes.on());
|
||||
|
||||
$(() => Functions.checkNumberOfFields());
|
||||
|
||||
window.AJAX.registerTeardown('page_settings.js', window.PageSettings.off());
|
||||
window.AJAX.registerOnload('page_settings.js', window.PageSettings.on());
|
||||
AJAX.registerTeardown('page_settings.js', window.PageSettings.off());
|
||||
AJAX.registerOnload('page_settings.js', window.PageSettings.on());
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/* global Sql */
|
||||
@ -2069,7 +2071,7 @@ window.makeGrid = function (t, enableResize, enableReorder, enableVisib, enableG
|
||||
// temporarily remove ajax class so the page loader will not handle it,
|
||||
// submit and then add it back
|
||||
$link.removeClass('ajax');
|
||||
window.AJAX.requestHandler.call($link[0]);
|
||||
AJAX.requestHandler.call($link[0]);
|
||||
$link.addClass('ajax');
|
||||
$cell.data('clicks', 0);
|
||||
}, 700);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
|
||||
/**
|
||||
* Handles the resizing of a menu according to the available screen width
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
import $ from 'jquery';
|
||||
import CodeMirror from 'codemirror';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
import { Config } from './console/config.js';
|
||||
|
||||
/* global Functions, Navigation */
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* Console object
|
||||
@ -95,7 +97,7 @@ var Console = {
|
||||
'</form>'
|
||||
);
|
||||
Console.$requestForm.children('[name=token]').val(CommonParams.get('token'));
|
||||
Console.$requestForm.on('submit', window.AJAX.requestHandler);
|
||||
Console.$requestForm.on('submit', AJAX.requestHandler);
|
||||
|
||||
// Event binds shouldn't run again
|
||||
if (Console.isInitialized === false) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/* global Functions */
|
||||
import { Functions } from '../../functions.js';
|
||||
|
||||
/**
|
||||
* @link https://docs.phpmyadmin.net/en/latest/config.html#console-settings
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
const GitInfo = {
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
@ -9,27 +11,27 @@ import { CommonParams } from './common.js';
|
||||
* @requires jQuery
|
||||
*/
|
||||
|
||||
window.AJAX.registerOnload('keyhandler.js', function () {
|
||||
AJAX.registerOnload('keyhandler.js', function () {
|
||||
$('th.draggable.column_heading.pointer.marker a').on('click', function (event) {
|
||||
var orderUrlRemove = $(this).parent().find('input[name="url-remove-order"]').val();
|
||||
var orderUrlAdd = $(this).parent().find('input[name="url-add-order"]').val();
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
if (event.ctrlKey || event.altKey) {
|
||||
event.preventDefault();
|
||||
window.AJAX.source = $(this);
|
||||
AJAX.source = $(this);
|
||||
Functions.ajaxShowMessage();
|
||||
orderUrlRemove += argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true';
|
||||
$.post('index.php?route=/sql', orderUrlRemove, window.AJAX.responseHandler);
|
||||
$.post('index.php?route=/sql', orderUrlRemove, AJAX.responseHandler);
|
||||
} else if (event.shiftKey) {
|
||||
event.preventDefault();
|
||||
window.AJAX.source = $(this);
|
||||
AJAX.source = $(this);
|
||||
Functions.ajaxShowMessage();
|
||||
orderUrlAdd += argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true';
|
||||
$.post('index.php?route=/sql', orderUrlAdd, window.AJAX.responseHandler);
|
||||
$.post('index.php?route=/sql', orderUrlAdd, AJAX.responseHandler);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
window.AJAX.registerTeardown('keyhandler.js', function () {
|
||||
AJAX.registerTeardown('keyhandler.js', function () {
|
||||
$(document).off('click', 'th.draggable.column_heading.pointer.marker a');
|
||||
});
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
@ -1648,3 +1649,5 @@ Navigation.showFullName = function ($containerELem) {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export { Navigation };
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
@ -481,7 +483,7 @@ function moveRepeatingGroup (repeatingCols) {
|
||||
}
|
||||
});
|
||||
}
|
||||
window.AJAX.registerTeardown('normalization.js', function () {
|
||||
AJAX.registerTeardown('normalization.js', function () {
|
||||
$('#extra').off('click', '#selectNonAtomicCol');
|
||||
$('#splitGo').off('click');
|
||||
$('.tblFooters').off('click', '#saveSplit');
|
||||
@ -494,7 +496,7 @@ window.AJAX.registerTeardown('normalization.js', function () {
|
||||
$('#mainContent').off('click', '.pickPd');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('normalization.js', function () {
|
||||
AJAX.registerOnload('normalization.js', function () {
|
||||
var selectedCol;
|
||||
normalizeto = $('#mainContent').data('normalizeto');
|
||||
$('#extra').on('click', '#selectNonAtomicCol', function () {
|
||||
|
||||
@ -4,9 +4,7 @@ import $ from 'jquery';
|
||||
* @fileoverview function used for page-related settings
|
||||
* @name Page-related settings
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @required js/functions.js
|
||||
*/
|
||||
|
||||
function showSettings (selector) {
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript functions used in server replication page
|
||||
* @name Server Replication
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*/
|
||||
|
||||
var randomServerId = Math.floor(Math.random() * 10000000);
|
||||
@ -35,7 +35,7 @@ function updateConfig () {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('replication.js', function () {
|
||||
AJAX.registerTeardown('replication.js', function () {
|
||||
$('#db_type').off('change');
|
||||
$('#db_select').off('change');
|
||||
$('#primary_status_href').off('click');
|
||||
@ -49,7 +49,7 @@ window.AJAX.registerTeardown('replication.js', function () {
|
||||
$('#reset_replica').off('click');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('replication.js', function () {
|
||||
AJAX.registerOnload('replication.js', function () {
|
||||
$('#rep').text(confPrefix);
|
||||
$('#db_type').on('change', updateConfig);
|
||||
$('#db_select').on('change', updateConfig);
|
||||
@ -86,12 +86,12 @@ window.AJAX.registerOnload('replication.js', function () {
|
||||
var question = window.Messages.strResetReplicaWarning;
|
||||
$anchor.confirm(question, $anchor.attr('href'), function (url) {
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $anchor;
|
||||
AJAX.source = $anchor;
|
||||
var params = Functions.getJsConfirmCommonParam({
|
||||
'ajax_page_request': true,
|
||||
'ajax_request': true
|
||||
}, $anchor.getPostData());
|
||||
$.post(url, params, window.AJAX.responseHandler);
|
||||
$.post(url, params, AJAX.responseHandler);
|
||||
});
|
||||
});
|
||||
$('#button_generate_password').on('click', function () {
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
@ -116,7 +118,7 @@ const CreateDatabase = {
|
||||
var dbStructUrl = data.url;
|
||||
dbStructUrl = dbStructUrl.replace(/amp;/ig, '');
|
||||
var params = 'ajax_request=true' + CommonParams.get('arg_separator') + 'ajax_page_request=true';
|
||||
$.get(dbStructUrl, params, window.AJAX.responseHandler);
|
||||
$.get(dbStructUrl, params, AJAX.responseHandler);
|
||||
} else {
|
||||
Functions.ajaxShowMessage(data.error, false);
|
||||
}
|
||||
@ -133,12 +135,12 @@ function checkPrivilegesForDatabase () {
|
||||
});
|
||||
}
|
||||
|
||||
window.AJAX.registerTeardown('server/databases.js', function () {
|
||||
AJAX.registerTeardown('server/databases.js', function () {
|
||||
$(document).off('submit', '#dbStatsForm');
|
||||
$(document).off('submit', '#create_database_form.ajax');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('server/databases.js', function () {
|
||||
AJAX.registerOnload('server/databases.js', function () {
|
||||
$(document).on('submit', '#dbStatsForm', DropDatabases.handleEvent);
|
||||
$(document).on('submit', '#create_database_form.ajax', CreateDatabase.handleEvent);
|
||||
checkPrivilegesForDatabase();
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
|
||||
/**
|
||||
* Make columns sortable, but only for tables with more than 1 data row.
|
||||
@ -15,6 +16,6 @@ function makeColumnsSortable () {
|
||||
.append('<div class="sorticon"></div>');
|
||||
}
|
||||
|
||||
window.AJAX.registerOnload('server/plugins.js', function () {
|
||||
AJAX.registerOnload('server/plugins.js', function () {
|
||||
makeColumnsSortable();
|
||||
});
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
@ -485,7 +487,7 @@ const selectPasswordRadioWhenChangingPassword = () => {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('server/privileges.js', function () {
|
||||
AJAX.registerTeardown('server/privileges.js', function () {
|
||||
$('#fieldset_add_user_login').off('change', 'input[name=\'username\']');
|
||||
$(document).off('click', '#deleteUserCard .btn.ajax');
|
||||
$('#text_pma_change_pw').off('keyup');
|
||||
@ -507,7 +509,7 @@ window.AJAX.registerTeardown('server/privileges.js', function () {
|
||||
$(document).off('change', '#select_authentication_plugin');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('server/privileges.js', function () {
|
||||
AJAX.registerOnload('server/privileges.js', function () {
|
||||
$('#fieldset_add_user_login').on('change', 'input[name=\'username\']', AddUserLoginCheckUsername.handleEvent);
|
||||
$('#text_pma_pw').on('keyup', PasswordStrength.handleEvent);
|
||||
$('#text_pma_pw').on('input', SwitchToUseTextField.handleEvent);
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../../ajax.js';
|
||||
import { Functions } from '../../functions.js';
|
||||
import { CommonParams } from '../../common.js';
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript functions used in server status monitor page
|
||||
* @name Server Status Monitor
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*/
|
||||
|
||||
/* global firstDayOfCalendar, themeImagePath */ // templates/javascript/variables.twig
|
||||
@ -79,7 +79,7 @@ function destroyGrid () {
|
||||
monitorSettings = null;
|
||||
}
|
||||
|
||||
window.AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
var $jsDataForm = $('#js_data');
|
||||
serverTimeDiff = new Date().getTime() - $jsDataForm.find('input[name=server_time]').val();
|
||||
serverOs = $jsDataForm.find('input[name=server_os]').val();
|
||||
@ -90,7 +90,7 @@ window.AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('server/status/monitor.js', function () {
|
||||
AJAX.registerTeardown('server/status/monitor.js', function () {
|
||||
$('#emptyDialog').remove();
|
||||
$('a.popupLink').off('click');
|
||||
$('body').off('click');
|
||||
@ -98,7 +98,7 @@ window.AJAX.registerTeardown('server/status/monitor.js', function () {
|
||||
/**
|
||||
* Popup behaviour
|
||||
*/
|
||||
window.AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
$('<div></div>')
|
||||
.attr('id', 'emptyDialog')
|
||||
.appendTo('#page_content');
|
||||
@ -126,7 +126,7 @@ window.AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
});
|
||||
});
|
||||
|
||||
window.AJAX.registerTeardown('server/status/monitor.js', function () {
|
||||
AJAX.registerTeardown('server/status/monitor.js', function () {
|
||||
$('a[href="#rearrangeCharts"], a[href="#endChartEditMode"]').off('click');
|
||||
$('div.popupContent select[name="chartColumns"]').off('change');
|
||||
$('div.popupContent select[name="gridChartRefresh"]').off('change');
|
||||
@ -150,7 +150,7 @@ window.AJAX.registerTeardown('server/status/monitor.js', function () {
|
||||
destroyGrid();
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
// Show tab links
|
||||
$('div.tabLinks').show();
|
||||
$('#loadingMonitorIcon').remove();
|
||||
@ -2321,6 +2321,6 @@ window.AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
});
|
||||
|
||||
// Run the monitor once loaded
|
||||
window.AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
AJAX.registerOnload('server/status/monitor.js', function () {
|
||||
$('a[href="#pauseCharts"]').trigger('click');
|
||||
});
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../../ajax.js';
|
||||
import { Functions } from '../../functions.js';
|
||||
import { CommonParams } from '../../common.js';
|
||||
|
||||
/**
|
||||
@ -164,7 +166,7 @@ var processList = {
|
||||
}
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('server/status/processes.js', function () {
|
||||
AJAX.registerOnload('server/status/processes.js', function () {
|
||||
processList.init();
|
||||
// Bind event handler for kill_process
|
||||
$('#tableprocesslist').on(
|
||||
@ -192,7 +194,7 @@ window.AJAX.registerOnload('server/status/processes.js', function () {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('server/status/processes.js', function () {
|
||||
AJAX.registerTeardown('server/status/processes.js', function () {
|
||||
$('#tableprocesslist').off('click', 'a.kill_process');
|
||||
$('a#toggleRefresh').off('click');
|
||||
$('#id_refreshRate').off('change');
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../../ajax.js';
|
||||
import { Functions } from '../../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript functions used in server status query page
|
||||
* @name Server Status Query
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*/
|
||||
|
||||
/* global initTableSorter */ // js/server/status/sorter.js
|
||||
@ -14,7 +14,7 @@ import $ from 'jquery';
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('server/status/queries.js', function () {
|
||||
AJAX.registerTeardown('server/status/queries.js', function () {
|
||||
if (document.getElementById('serverstatusquerieschart') !== null) {
|
||||
var queryPieChart = $('#serverstatusquerieschart').data('queryPieChart');
|
||||
if (queryPieChart) {
|
||||
@ -23,7 +23,7 @@ window.AJAX.registerTeardown('server/status/queries.js', function () {
|
||||
}
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('server/status/queries.js', function () {
|
||||
AJAX.registerOnload('server/status/queries.js', function () {
|
||||
// Build query statistics chart
|
||||
var cdata = [];
|
||||
try {
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../../ajax.js';
|
||||
|
||||
/**
|
||||
*
|
||||
@ -9,14 +10,14 @@ import $ from 'jquery';
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('server/status/variables.js', function () {
|
||||
AJAX.registerTeardown('server/status/variables.js', function () {
|
||||
$('#filterAlert').off('change');
|
||||
$('#filterText').off('keyup');
|
||||
$('#filterCategory').off('change');
|
||||
$('#dontFormat').off('change');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('server/status/variables.js', function () {
|
||||
AJAX.registerOnload('server/status/variables.js', function () {
|
||||
// Filters for status variables
|
||||
var textFilter = null;
|
||||
var alertFilter = $('#filterAlert').prop('checked');
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript functions used in server user groups page
|
||||
@ -10,14 +12,14 @@ import $ from 'jquery';
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('server/user_groups.js', function () {
|
||||
AJAX.registerTeardown('server/user_groups.js', function () {
|
||||
$('#deleteUserGroupModal').off('show.bs.modal');
|
||||
});
|
||||
|
||||
/**
|
||||
* Bind event handlers
|
||||
*/
|
||||
window.AJAX.registerOnload('server/user_groups.js', function () {
|
||||
AJAX.registerOnload('server/user_groups.js', function () {
|
||||
const deleteUserGroupModal = $('#deleteUserGroupModal');
|
||||
deleteUserGroupModal.on('show.bs.modal', function (event) {
|
||||
const userGroupName = $(event.relatedTarget).data('user-group');
|
||||
@ -36,7 +38,7 @@ window.AJAX.registerOnload('server/user_groups.js', function () {
|
||||
'userGroup': userGroupName,
|
||||
'ajax_request': true,
|
||||
},
|
||||
window.AJAX.responseHandler
|
||||
AJAX.responseHandler
|
||||
);
|
||||
|
||||
$('#deleteUserGroupModal').modal('hide');
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript functions used in server variables page
|
||||
* @name Server Replication
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*/
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('server/variables.js', function () {
|
||||
AJAX.registerTeardown('server/variables.js', function () {
|
||||
$(document).off('click', 'a.editLink');
|
||||
$('#serverVariables').find('.var-name').find('a img').remove();
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('server/variables.js', function () {
|
||||
AJAX.registerOnload('server/variables.js', function () {
|
||||
var $saveLink = $('a.saveLink');
|
||||
var $cancelLink = $('a.cancelLink');
|
||||
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonActions, CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
* @fileoverview functions used wherever an sql query form is used
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires js/functions.js
|
||||
*
|
||||
* @test-module Sql
|
||||
*/
|
||||
|
||||
@ -403,7 +402,7 @@ const insertValueQuery = function () {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('sql.js', function () {
|
||||
AJAX.registerTeardown('sql.js', function () {
|
||||
$(document).off('click', 'a.delete_row.ajax');
|
||||
$(document).off('submit', '.bookmarkQueryForm');
|
||||
$('input#bkm_label').off('input');
|
||||
@ -453,7 +452,7 @@ window.AJAX.registerTeardown('sql.js', function () {
|
||||
* @name document.ready
|
||||
* @memberOf jQuery
|
||||
*/
|
||||
window.AJAX.registerOnload('sql.js', function () {
|
||||
AJAX.registerOnload('sql.js', function () {
|
||||
if (window.codeMirrorEditor || document.sqlform) {
|
||||
Sql.setShowThisQuery();
|
||||
}
|
||||
@ -808,7 +807,7 @@ window.AJAX.registerOnload('sql.js', function () {
|
||||
},
|
||||
null
|
||||
);
|
||||
window.AJAX.handleMenu.replace(data.menu);
|
||||
AJAX.handleMenu.replace(data.menu);
|
||||
}
|
||||
|
||||
if (data.params) {
|
||||
@ -923,8 +922,8 @@ window.AJAX.registerOnload('sql.js', function () {
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var submitData = $form.serialize() + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true';
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, window.AJAX.responseHandler);
|
||||
AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, AJAX.responseHandler);
|
||||
};
|
||||
|
||||
if (! $(this).is(':checked')) { // already showing all rows
|
||||
@ -1020,7 +1019,7 @@ window.AJAX.registerOnload('sql.js', function () {
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var submitData = $form.serialize() + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true' + argsep;
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $form;
|
||||
AJAX.source = $form;
|
||||
|
||||
var url;
|
||||
if (action === 'edit') {
|
||||
@ -1037,7 +1036,7 @@ window.AJAX.registerOnload('sql.js', function () {
|
||||
return;
|
||||
}
|
||||
|
||||
$.post(url, submitData, window.AJAX.responseHandler);
|
||||
$.post(url, submitData, AJAX.responseHandler);
|
||||
});
|
||||
|
||||
$(document).on('submit', '.maxRowsForm', function () {
|
||||
@ -1218,7 +1217,7 @@ Sql.checkSavedQuery = function () {
|
||||
}
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('sql.js', function () {
|
||||
AJAX.registerOnload('sql.js', function () {
|
||||
$('body').on('click', 'a.browse_foreign', function (e) {
|
||||
e.preventDefault();
|
||||
Sql.browseForeignDialog($(this));
|
||||
@ -1318,7 +1317,7 @@ Sql.initProfilingTables = function () {
|
||||
});
|
||||
};
|
||||
|
||||
window.AJAX.registerOnload('sql.js', function () {
|
||||
AJAX.registerOnload('sql.js', function () {
|
||||
Sql.makeProfilingChart();
|
||||
Sql.initProfilingTables();
|
||||
});
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview function used in table data manipulation pages
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @requires js/functions.js
|
||||
*
|
||||
*/
|
||||
|
||||
/* global extendingValidatorMessages */ // templates/javascript/variables.twig
|
||||
@ -448,7 +447,7 @@ window.verificationsAfterFieldChange = verificationsAfterFieldChange;
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/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]\']');
|
||||
@ -464,7 +463,7 @@ window.AJAX.registerTeardown('table/change.js', function () {
|
||||
* Submit Data to be inserted into the table.
|
||||
* Restart insertion with 'N' rows.
|
||||
*/
|
||||
window.AJAX.registerOnload('table/change.js', function () {
|
||||
AJAX.registerOnload('table/change.js', function () {
|
||||
if ($('#insertForm').length) {
|
||||
// validate the comment form when it is submitted
|
||||
$('#insertForm').validate();
|
||||
@ -864,7 +863,7 @@ function addNewContinueInsertionFields (event) {
|
||||
* Displays alert if data loss possible on decrease
|
||||
* of rows.
|
||||
*/
|
||||
var checkLock = $.isEmptyObject(window.AJAX.lockedTargets);
|
||||
var checkLock = $.isEmptyObject(AJAX.lockedTargets);
|
||||
if (checkLock || confirm(window.Messages.strConfirmRowChange) === true) {
|
||||
while (currRows > targetRows) {
|
||||
$('input[id^=insert_ignore]').last()
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/* global ColumnType, DataTable, JQPlotChartFactory */ // js/chart.js
|
||||
|
||||
@ -236,7 +238,7 @@ function onDataSeriesChange () {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/chart.js', function () {
|
||||
AJAX.registerTeardown('table/chart.js', function () {
|
||||
$('input[name="chartType"]').off('click');
|
||||
$('#barStackedCheckbox').off('click');
|
||||
$('#seriesColumnCheckbox').off('click');
|
||||
@ -251,7 +253,7 @@ window.AJAX.registerTeardown('table/chart.js', function () {
|
||||
$('#tblchartform').off('submit');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('table/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,9 +1,11 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/find_replace.js', function () {
|
||||
AJAX.registerTeardown('table/find_replace.js', function () {
|
||||
$('#find_replace_form').off('submit');
|
||||
$('#toggle_find').off('click');
|
||||
});
|
||||
@ -11,7 +13,7 @@ window.AJAX.registerTeardown('table/find_replace.js', function () {
|
||||
/**
|
||||
* Bind events
|
||||
*/
|
||||
window.AJAX.registerOnload('table/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();
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview functions used for visualizing GIS data
|
||||
@ -189,7 +191,7 @@ function onGisMouseWheel (event) {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/gis_visualization.js', function () {
|
||||
AJAX.registerTeardown('table/gis_visualization.js', function () {
|
||||
$(document).off('click', '#choice');
|
||||
$(document).off('dragstart', 'svg');
|
||||
$(document).off('mouseup', 'svg');
|
||||
@ -211,7 +213,7 @@ window.AJAX.registerTeardown('table/gis_visualization.js', function () {
|
||||
}
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('table/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,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
@ -6,7 +8,7 @@ import { CommonActions, CommonParams } from '../common.js';
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/operations.js', function () {
|
||||
AJAX.registerTeardown('table/operations.js', function () {
|
||||
$(document).off('submit', '#copyTable.ajax');
|
||||
$(document).off('submit', '#moveTableForm');
|
||||
$(document).off('submit', '#tableOptionsForm');
|
||||
@ -66,7 +68,7 @@ var confirmAndPost = function (linkObject, action) {
|
||||
* jQuery coding for 'Table operations'. Used on /table/operations
|
||||
* Attach Ajax Event handlers for Table operations
|
||||
*/
|
||||
window.AJAX.registerOnload('table/operations.js', function () {
|
||||
AJAX.registerOnload('table/operations.js', function () {
|
||||
/**
|
||||
* Ajax action for submitting the "Copy table"
|
||||
*/
|
||||
@ -246,8 +248,8 @@ window.AJAX.registerOnload('table/operations.js', function () {
|
||||
var argsep = CommonParams.get('arg_separator');
|
||||
var submitData = $form.serialize() + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true';
|
||||
Functions.ajaxShowMessage(window.Messages.strProcessingRequest);
|
||||
window.AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, window.AJAX.responseHandler);
|
||||
AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, AJAX.responseHandler);
|
||||
}
|
||||
|
||||
if ($('#partitionOperationRadioDrop').is(':checked')) {
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
@ -129,7 +131,7 @@ TableRelation.getDropdownValues = function ($dropdown) {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/relation.js', function () {
|
||||
AJAX.registerTeardown('table/relation.js', function () {
|
||||
$('body').off('change',
|
||||
'select[name^="destination_db"], ' +
|
||||
'select[name^="destination_table"], ' +
|
||||
@ -141,7 +143,7 @@ window.AJAX.registerTeardown('table/relation.js', function () {
|
||||
$('a.drop_foreign_key_anchor.ajax').off('click');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('table/relation.js', function () {
|
||||
AJAX.registerOnload('table/relation.js', function () {
|
||||
/**
|
||||
* Ajax event handler to fetch table/column dropdown values.
|
||||
*/
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
* @fileoverview JavaScript functions used on /table/search
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires js/functions.js
|
||||
*/
|
||||
|
||||
/* global changeValueFieldType, verifyAfterSearchFieldChange */ // js/table/change.js
|
||||
@ -48,7 +47,7 @@ TableSelect.checkIfDataTypeNumericOrDate = function (dataType) {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/select.js', function () {
|
||||
AJAX.registerTeardown('table/select.js', function () {
|
||||
$('#togglesearchformlink').off('click');
|
||||
$(document).off('submit', '#tbl_search_form.ajax');
|
||||
$('select.geom_func').off('change');
|
||||
@ -56,7 +55,7 @@ window.AJAX.registerTeardown('table/select.js', function () {
|
||||
$('body').off('change', 'select[name*="criteriaColumnOperators"]'); // Fix for bug #13778, changed 'click' to 'change'
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('table/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
|
||||
|
||||
@ -1,13 +1,13 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
* @fileoverview functions used on the table structure page
|
||||
* @name Table Structure
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires jQueryUI
|
||||
* @required js/functions.js
|
||||
*/
|
||||
|
||||
/* global Navigation */
|
||||
@ -46,7 +46,7 @@ function checkFirst () {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/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');
|
||||
@ -56,7 +56,7 @@ window.AJAX.registerTeardown('table/structure.js', function () {
|
||||
$(document).off('click', '#remove_partitioning.ajax');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('table/structure.js', function () {
|
||||
AJAX.registerOnload('table/structure.js', function () {
|
||||
// Re-initialize variables.
|
||||
window.primaryIndexes = [];
|
||||
window.indexes = [];
|
||||
@ -272,11 +272,11 @@ window.AJAX.registerOnload('table/structure.js', function () {
|
||||
|
||||
$thisAnchor.confirm(question, $thisAnchor.attr('href'), function (url) {
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $this;
|
||||
AJAX.source = $this;
|
||||
|
||||
var params = Functions.getJsConfirmCommonParam(this, $thisAnchor.getPostData());
|
||||
params += CommonParams.get('arg_separator') + 'ajax_page_request=1';
|
||||
$.post(url, params, window.AJAX.responseHandler);
|
||||
$.post(url, params, AJAX.responseHandler);
|
||||
});
|
||||
}); // end Add key
|
||||
|
||||
@ -400,9 +400,9 @@ window.AJAX.registerOnload('table/structure.js', function () {
|
||||
var submitData = $form.serialize() + argsep + 'ajax_request=true' + argsep + 'ajax_page_request=true';
|
||||
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $form;
|
||||
AJAX.source = $form;
|
||||
|
||||
$.post(this.formAction, submitData, window.AJAX.responseHandler);
|
||||
$.post(this.formAction, submitData, AJAX.responseHandler);
|
||||
});
|
||||
|
||||
/**
|
||||
@ -415,8 +415,8 @@ window.AJAX.registerOnload('table/structure.js', function () {
|
||||
function submitPartitionAction (url) {
|
||||
var params = 'ajax_request=true&ajax_page_request=true&' + $link.getPostData();
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $link;
|
||||
$.post(url, params, window.AJAX.responseHandler);
|
||||
AJAX.source = $link;
|
||||
$.post(url, params, AJAX.responseHandler);
|
||||
}
|
||||
|
||||
if ($link.is('#partition_action_DROP')) {
|
||||
@ -445,8 +445,8 @@ window.AJAX.registerOnload('table/structure.js', function () {
|
||||
'ajax_page_request' : true
|
||||
}, $link.getPostData());
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $link;
|
||||
$.post(url, params, window.AJAX.responseHandler);
|
||||
AJAX.source = $link;
|
||||
$.post(url, params, AJAX.responseHandler);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -1,10 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down the page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/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');
|
||||
@ -13,7 +15,7 @@ window.AJAX.registerTeardown('table/tracking.js', function () {
|
||||
/**
|
||||
* Bind event handlers
|
||||
*/
|
||||
window.AJAX.registerOnload('table/tracking.js', function () {
|
||||
AJAX.registerOnload('table/tracking.js', function () {
|
||||
$('#versions tr').first().find('th').append($('<div class="sorticon"></div>'));
|
||||
$('#versions').tablesorter({
|
||||
sortList: [[1, 0]],
|
||||
@ -63,13 +65,13 @@ window.AJAX.registerOnload('table/tracking.js', function () {
|
||||
var question = window.Messages.strDeleteTrackingVersionMultiple;
|
||||
$button.confirm(question, $form.attr('action'), function (url) {
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $form;
|
||||
$.post(url, submitData, window.AJAX.responseHandler);
|
||||
AJAX.source = $form;
|
||||
$.post(url, submitData, AJAX.responseHandler);
|
||||
});
|
||||
} else {
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, window.AJAX.responseHandler);
|
||||
AJAX.source = $form;
|
||||
$.post($form.attr('action'), submitData, AJAX.responseHandler);
|
||||
}
|
||||
});
|
||||
|
||||
@ -82,11 +84,11 @@ window.AJAX.registerOnload('table/tracking.js', function () {
|
||||
var question = window.Messages.strDeleteTrackingVersion;
|
||||
$anchor.confirm(question, $anchor.attr('href'), function (url) {
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $anchor;
|
||||
AJAX.source = $anchor;
|
||||
var argSep = CommonParams.get('arg_separator');
|
||||
var params = Functions.getJsConfirmCommonParam(this, $anchor.getPostData());
|
||||
params += argSep + 'ajax_page_request=1';
|
||||
$.post(url, params, window.AJAX.responseHandler);
|
||||
$.post(url, params, AJAX.responseHandler);
|
||||
});
|
||||
});
|
||||
|
||||
@ -99,11 +101,11 @@ window.AJAX.registerOnload('table/tracking.js', function () {
|
||||
var question = window.Messages.strDeletingTrackingEntry;
|
||||
$anchor.confirm(question, $anchor.attr('href'), function (url) {
|
||||
Functions.ajaxShowMessage();
|
||||
window.AJAX.source = $anchor;
|
||||
AJAX.source = $anchor;
|
||||
var argSep = CommonParams.get('arg_separator');
|
||||
var params = Functions.getJsConfirmCommonParam(this, $anchor.getPostData());
|
||||
params += argSep + 'ajax_page_request=1';
|
||||
$.post(url, params, window.AJAX.responseHandler);
|
||||
$.post(url, params, AJAX.responseHandler);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
// TODO: change the axis
|
||||
/**
|
||||
* @fileoverview JavaScript functions used on /table/search
|
||||
*
|
||||
* @requires jQuery
|
||||
* @requires js/functions.js
|
||||
**/
|
||||
|
||||
/* global Sql */
|
||||
@ -105,7 +104,7 @@ function getType (field) {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('table/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');
|
||||
@ -118,7 +117,7 @@ window.AJAX.registerTeardown('table/zoom_plot_jqplot.js', function () {
|
||||
$('div#querychart').off('jqplotDataClick');
|
||||
});
|
||||
|
||||
window.AJAX.registerOnload('table/zoom_plot_jqplot.js', function () {
|
||||
AJAX.registerOnload('table/zoom_plot_jqplot.js', function () {
|
||||
var currentChart = null;
|
||||
var searchedDataKey = null;
|
||||
var xLabel = $('#tableid_0').val();
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
|
||||
/**
|
||||
* Image upload transformations plugin js
|
||||
@ -6,7 +7,7 @@ import $ from 'jquery';
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
window.AJAX.registerOnload('transformations/image_upload.js', function () {
|
||||
AJAX.registerOnload('transformations/image_upload.js', function () {
|
||||
// Change thumbnail when image file is selected
|
||||
// through file upload dialog
|
||||
$('input.image-upload').on('change', function () {
|
||||
@ -24,6 +25,6 @@ window.AJAX.registerOnload('transformations/image_upload.js', function () {
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
window.AJAX.registerTeardown('transformations/image_upload.js', function () {
|
||||
AJAX.registerTeardown('transformations/image_upload.js', function () {
|
||||
$('input.image-upload').off('change');
|
||||
});
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
|
||||
/**
|
||||
* JSON syntax highlighting transformation plugin
|
||||
*/
|
||||
window.AJAX.registerOnload('transformations/json.js', function () {
|
||||
AJAX.registerOnload('transformations/json.js', function () {
|
||||
var $elm = $('#page_content').find('code.json');
|
||||
$elm.each(function () {
|
||||
var $json = $(this);
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
|
||||
/**
|
||||
* JSON syntax highlighting transformation plugin
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
window.AJAX.registerOnload('transformations/json_editor.js', function () {
|
||||
AJAX.registerOnload('transformations/json_editor.js', function () {
|
||||
$('textarea.transform_json_editor').each(function () {
|
||||
window.CodeMirror.fromTextArea(this, {
|
||||
lineNumbers: true,
|
||||
|
||||
@ -1,11 +1,13 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* SQL syntax highlighting transformation plugin js
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
window.AJAX.registerOnload('transformations/sql_editor.js', function () {
|
||||
AJAX.registerOnload('transformations/sql_editor.js', function () {
|
||||
$('textarea.transform_sql_editor').each(function () {
|
||||
Functions.getSqlEditor($(this), {}, 'both');
|
||||
});
|
||||
|
||||
@ -1,9 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
|
||||
/**
|
||||
* XML syntax highlighting transformation plugin
|
||||
*/
|
||||
window.AJAX.registerOnload('transformations/xml.js', function () {
|
||||
AJAX.registerOnload('transformations/xml.js', function () {
|
||||
var $elm = $('#page_content').find('code.xml');
|
||||
$elm.each(function () {
|
||||
var $json = $(this);
|
||||
|
||||
@ -1,11 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from '../ajax.js';
|
||||
|
||||
/**
|
||||
* XML editor plugin
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
window.AJAX.registerOnload('transformations/xml_editor.js', function () {
|
||||
AJAX.registerOnload('transformations/xml_editor.js', function () {
|
||||
$('textarea.transform_xml_editor').each(function () {
|
||||
window.CodeMirror.fromTextArea(this, {
|
||||
lineNumbers: true,
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
import $ from 'jquery';
|
||||
import { AJAX } from './ajax.js';
|
||||
import { Functions } from './functions.js';
|
||||
|
||||
window.AJAX.registerOnload('u2f.js', function () {
|
||||
AJAX.registerOnload('u2f.js', function () {
|
||||
var $inputReg = $('#u2f_registration_response');
|
||||
if ($inputReg.length > 0) {
|
||||
var $formReg = $inputReg.parents('form');
|
||||
|
||||
@ -139,12 +139,11 @@ class Header
|
||||
$this->scripts->addFile('vendor/jquery/jquery.validate.min.js');
|
||||
$this->scripts->addFile('vendor/jquery/jquery-ui-timepicker-addon.js');
|
||||
$this->scripts->addFile('index.php', ['route' => '/messages', 'l' => $GLOBALS['lang']]);
|
||||
$this->scripts->addFile('ajax.js');
|
||||
$this->scripts->addFile('shared.js');
|
||||
$this->scripts->addFile('keyhandler.js');
|
||||
$this->scripts->addFile('menu_resizer.js');
|
||||
$this->scripts->addFile('cross_framing_protection.js');
|
||||
$this->scripts->addFile('config.js');
|
||||
$this->scripts->addFile('functions.js');
|
||||
$this->scripts->addFile('navigation.js');
|
||||
$this->scripts->addFile('indexes.js');
|
||||
$this->scripts->addFile('common.js');
|
||||
|
||||
@ -27,7 +27,6 @@ class Text_Plain_Sql extends SQLTransformationsPlugin
|
||||
$scripts->addFile('vendor/codemirror/lib/codemirror.js');
|
||||
$scripts->addFile('vendor/codemirror/mode/sql/sql.js');
|
||||
$scripts->addFile('vendor/codemirror/addon/runmode/runmode.js');
|
||||
$scripts->addFile('functions.js');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -90,7 +90,7 @@ class Scripts
|
||||
&& ! str_contains($filename, 'runtime.js')
|
||||
&& ! str_contains($filename, 'name-conflict-fixes.js')
|
||||
&& ! str_contains($filename, 'index.php')
|
||||
&& ! str_contains($filename, 'ajax.js')
|
||||
&& ! str_contains($filename, 'shared.js')
|
||||
&& ! str_contains($filename, 'datetimepicker.js')
|
||||
&& ! str_contains($filename, 'validator-messages.js')
|
||||
&& ! str_contains($filename, 'cross_framing_protection.js');
|
||||
|
||||
@ -261,12 +261,11 @@ class HeaderTest extends AbstractTestCase
|
||||
['name' => 'vendor/jquery/jquery.validate.min.js', 'fire' => 0],
|
||||
['name' => 'vendor/jquery/jquery-ui-timepicker-addon.js', 'fire' => 0],
|
||||
['name' => 'index.php', 'fire' => 0],
|
||||
['name' => 'ajax.js', 'fire' => 0],
|
||||
['name' => 'shared.js', 'fire' => 0],
|
||||
['name' => 'keyhandler.js', 'fire' => 1],
|
||||
['name' => 'menu_resizer.js', 'fire' => 1],
|
||||
['name' => 'cross_framing_protection.js', 'fire' => 0],
|
||||
['name' => 'config.js', 'fire' => 1],
|
||||
['name' => 'functions.js', 'fire' => 1],
|
||||
['name' => 'navigation.js', 'fire' => 1],
|
||||
['name' => 'indexes.js', 'fire' => 1],
|
||||
['name' => 'common.js', 'fire' => 1],
|
||||
|
||||
@ -11,76 +11,74 @@ module.exports = [
|
||||
mode: 'none',
|
||||
devtool: 'source-map',
|
||||
entry: {
|
||||
'ajax': { import: './js/src/ajax.js', dependOn: 'common' },
|
||||
'chart': './js/src/chart.js',
|
||||
'codemirror/addon/lint/sql-lint': { import: './js/src/codemirror/addon/lint/sql-lint.js', dependOn: 'common' },
|
||||
'codemirror/addon/lint/sql-lint': './js/src/codemirror/addon/lint/sql-lint.js',
|
||||
'common': './js/src/common.js',
|
||||
'config': { import: './js/src/config.js', dependOn: 'common' },
|
||||
'console': { import: './js/src/console.js', library: { name: 'Console', type: 'window', export: 'Console' }, dependOn: 'common' },
|
||||
'config': './js/src/config.js',
|
||||
'console': { import: './js/src/console.js', library: { name: 'Console', type: 'window', export: 'Console' } },
|
||||
'cross_framing_protection': './js/src/cross_framing_protection.js',
|
||||
'datetimepicker': './js/src/datetimepicker.js',
|
||||
'database/central_columns': { import: './js/src/database/central_columns.js', dependOn: 'common' },
|
||||
'database/central_columns': './js/src/database/central_columns.js',
|
||||
'database/events': './js/src/database/events.js',
|
||||
'database/multi_table_query': { import: './js/src/database/multi_table_query.js', dependOn: 'common' },
|
||||
'database/operations': { import: './js/src/database/operations.js', dependOn: 'common' },
|
||||
'database/multi_table_query': './js/src/database/multi_table_query.js',
|
||||
'database/operations': './js/src/database/operations.js',
|
||||
'database/qbe': './js/src/database/qbe.js',
|
||||
'database/query_generator': './js/src/database/query_generator.js',
|
||||
'database/routines': './js/src/database/routines.js',
|
||||
'database/search': { import: './js/src/database/search.js', dependOn: 'common' },
|
||||
'database/structure': { import: './js/src/database/structure.js', dependOn: 'common' },
|
||||
'database/tracking': { import: './js/src/database/tracking.js', dependOn: 'common' },
|
||||
'database/search': './js/src/database/search.js',
|
||||
'database/structure': './js/src/database/structure.js',
|
||||
'database/tracking': './js/src/database/tracking.js',
|
||||
'database/triggers': './js/src/database/triggers.js',
|
||||
'designer/database': './js/src/designer/database.js',
|
||||
'designer/history': './js/src/designer/history.js',
|
||||
'designer/init': './js/src/designer/init.js',
|
||||
'designer/move': { import: './js/src/designer/move.js', dependOn: 'common' },
|
||||
'designer/move': './js/src/designer/move.js',
|
||||
'designer/objects': './js/src/designer/objects.js',
|
||||
'designer/page': './js/src/designer/page.js',
|
||||
'drag_drop_import': { import: './js/src/drag_drop_import.js', dependOn: 'common' },
|
||||
'error_report': { import: './js/src/error_report.js', dependOn: 'common' },
|
||||
'export': { import: './js/src/export.js', dependOn: 'common' },
|
||||
'drag_drop_import': './js/src/drag_drop_import.js',
|
||||
'error_report': './js/src/error_report.js',
|
||||
'export': './js/src/export.js',
|
||||
'export_output': './js/src/export_output.js',
|
||||
'functions': { import: './js/src/functions.js', dependOn: 'common' },
|
||||
'gis_data_editor': { import: './js/src/gis_data_editor.js', dependOn: 'common' },
|
||||
'home': { import: './js/src/home.js', dependOn: 'common' },
|
||||
'gis_data_editor': './js/src/gis_data_editor.js',
|
||||
'home': './js/src/home.js',
|
||||
'import': './js/src/import.js',
|
||||
'indexes': { import: './js/src/indexes.js', dependOn: 'common' },
|
||||
'indexes': './js/src/indexes.js',
|
||||
'jqplot/plugins/jqplot.byteFormatter': './js/src/jqplot/plugins/jqplot.byteFormatter.js',
|
||||
'jquery.sortable-table': './js/src/jquery.sortable-table.js',
|
||||
'keyhandler': './js/src/keyhandler.js',
|
||||
'main': './js/src/main.js',
|
||||
'makegrid': { import: './js/src/makegrid.js', dependOn: 'common' },
|
||||
'makegrid': './js/src/makegrid.js',
|
||||
'menu_resizer': './js/src/menu_resizer.js',
|
||||
'multi_column_sort': { import: './js/src/multi_column_sort.js', dependOn: 'common' },
|
||||
'multi_column_sort': './js/src/multi_column_sort.js',
|
||||
'name-conflict-fixes': './js/src/name-conflict-fixes.js',
|
||||
'navigation': { import: './js/src/navigation.js', dependOn: 'common' },
|
||||
'normalization': { import: './js/src/normalization.js', dependOn: 'common' },
|
||||
'navigation': './js/src/navigation.js',
|
||||
'normalization': './js/src/normalization.js',
|
||||
'page_settings': './js/src/page_settings.js',
|
||||
'replication': './js/src/replication.js',
|
||||
'server/databases': { import: './js/src/server/databases.js', dependOn: 'common' },
|
||||
'server/databases': './js/src/server/databases.js',
|
||||
'server/plugins': './js/src/server/plugins.js',
|
||||
'server/privileges': { import: './js/src/server/privileges.js', dependOn: 'common' },
|
||||
'server/status/monitor': { import: './js/src/server/status/monitor.js', dependOn: 'common' },
|
||||
'server/status/processes': { import: './js/src/server/status/processes.js', dependOn: 'common' },
|
||||
'server/privileges': './js/src/server/privileges.js',
|
||||
'server/status/monitor': './js/src/server/status/monitor.js',
|
||||
'server/status/processes': './js/src/server/status/processes.js',
|
||||
'server/status/queries': './js/src/server/status/queries.js',
|
||||
'server/status/sorter': './js/src/server/status/sorter.js',
|
||||
'server/status/variables': './js/src/server/status/variables.js',
|
||||
'server/user_groups': './js/src/server/user_groups.js',
|
||||
'server/variables': { import: './js/src/server/variables.js', dependOn: 'common' },
|
||||
'server/variables': './js/src/server/variables.js',
|
||||
'setup/ajax': './js/src/setup/ajax.js',
|
||||
'setup/scripts': './js/src/setup/scripts.js',
|
||||
'shortcuts_handler': { import: './js/src/shortcuts_handler.js', dependOn: 'common' },
|
||||
'sql': { import: './js/src/sql.js', dependOn: 'common' },
|
||||
'shortcuts_handler': './js/src/shortcuts_handler.js',
|
||||
'sql': './js/src/sql.js',
|
||||
'table/change': './js/src/table/change.js',
|
||||
'table/chart': './js/src/table/chart.js',
|
||||
'table/find_replace': './js/src/table/find_replace.js',
|
||||
'table/gis_visualization': './js/src/table/gis_visualization.js',
|
||||
'table/operations': { import: './js/src/table/operations.js', dependOn: 'common' },
|
||||
'table/relation': { import: './js/src/table/relation.js', dependOn: 'common' },
|
||||
'table/select': { import: './js/src/table/select.js', dependOn: 'common' },
|
||||
'table/structure': { import: './js/src/table/structure.js', dependOn: 'common' },
|
||||
'table/tracking': { import: './js/src/table/tracking.js', dependOn: 'common' },
|
||||
'table/zoom_plot_jqplot': { import: './js/src/table/zoom_plot_jqplot.js', dependOn: 'common' },
|
||||
'table/operations': './js/src/table/operations.js',
|
||||
'table/relation': './js/src/table/relation.js',
|
||||
'table/select': './js/src/table/select.js',
|
||||
'table/structure': './js/src/table/structure.js',
|
||||
'table/tracking': './js/src/table/tracking.js',
|
||||
'table/zoom_plot_jqplot': './js/src/table/zoom_plot_jqplot.js',
|
||||
'transformations/image_upload': './js/src/transformations/image_upload.js',
|
||||
'transformations/json': './js/src/transformations/json.js',
|
||||
'transformations/json_editor': './js/src/transformations/json_editor.js',
|
||||
@ -96,6 +94,11 @@ module.exports = [
|
||||
},
|
||||
optimization: {
|
||||
runtimeChunk: 'single',
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
name: 'shared',
|
||||
minSize: 1,
|
||||
},
|
||||
},
|
||||
externals: {
|
||||
jquery: 'jQuery',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user