Import the Functions object where possible
Instead of using from the Window global object. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
6f54621b41
commit
3ce84326f2
@ -13,9 +13,6 @@
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"globals": {
|
||||
"Functions": "readonly"
|
||||
},
|
||||
"rules": {
|
||||
"valid-jsdoc": ["error", {
|
||||
"prefer": {
|
||||
|
||||
@ -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,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
|
||||
@ -1,15 +1,13 @@
|
||||
import $ from 'jquery';
|
||||
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
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
@ -7,10 +8,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
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
|
||||
@ -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,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
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
|
||||
*/
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
@ -7,9 +8,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 = {};
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
var designerTables = [
|
||||
{
|
||||
name: 'pdf_pages',
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview function used in this file builds history tab and generates query.
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -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,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/* This script handles PMA Drag Drop Import, loaded only when configuration is enabled.*/
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
|
||||
/**
|
||||
* Functions used in the import tab
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonActions, CommonParams } from './common.js';
|
||||
|
||||
/* global Navigation */
|
||||
@ -7,9 +8,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 = {};
|
||||
|
||||
@ -5,7 +5,7 @@ import { Navigation } from './navigation.js';
|
||||
|
||||
/* global Indexes */
|
||||
|
||||
AJAX.registerOnload('functions.js', () => AJAX.removeSubmitEvents());
|
||||
AJAX.registerOnload('main.js', () => AJAX.removeSubmitEvents());
|
||||
$(AJAX.loadEventHandler());
|
||||
|
||||
/**
|
||||
@ -26,8 +26,8 @@ AJAX.registerOnload('config.js', window.Config.on());
|
||||
|
||||
$.ajaxPrefilter(Functions.addNoCacheToAjaxRequests());
|
||||
|
||||
AJAX.registerTeardown('functions.js', Functions.off());
|
||||
AJAX.registerOnload('functions.js', Functions.on());
|
||||
AJAX.registerTeardown('main.js', Functions.off());
|
||||
AJAX.registerOnload('main.js', Functions.on());
|
||||
|
||||
$(Functions.dismissNotifications());
|
||||
$(Functions.initializeMenuResizer());
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/* global Sql */
|
||||
|
||||
@ -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,10 @@
|
||||
import $ from 'jquery';
|
||||
import CodeMirror from 'codemirror';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
import { Config } from './console/config.js';
|
||||
|
||||
/* global Functions, Navigation */
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* Console object
|
||||
|
||||
@ -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,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
import { CommonParams } from './common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -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,11 @@
|
||||
import $ from 'jquery';
|
||||
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);
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
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
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../../functions.js';
|
||||
import { CommonParams } from '../../common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
import $ from 'jquery';
|
||||
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
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview Javascript functions used in server user groups page
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
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
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
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
|
||||
*/
|
||||
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
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
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/* global ColumnType, DataTable, JQPlotChartFactory */ // js/chart.js
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* @fileoverview functions used for visualizing GIS data
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/* global Navigation */
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonActions, CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
import $ from 'jquery';
|
||||
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
|
||||
|
||||
@ -1,13 +1,12 @@
|
||||
import $ from 'jquery';
|
||||
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 */
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
import { CommonParams } from '../common.js';
|
||||
|
||||
/**
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
import $ from 'jquery';
|
||||
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 */
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from '../functions.js';
|
||||
|
||||
/**
|
||||
* SQL syntax highlighting transformation plugin js
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import $ from 'jquery';
|
||||
import { Functions } from './functions.js';
|
||||
|
||||
window.AJAX.registerOnload('u2f.js', function () {
|
||||
var $inputReg = $('#u2f_registration_response');
|
||||
|
||||
@ -145,7 +145,6 @@ class Header
|
||||
$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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -267,7 +267,6 @@ class HeaderTest extends AbstractTestCase
|
||||
['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],
|
||||
|
||||
@ -40,7 +40,6 @@ module.exports = [
|
||||
'error_report': './js/src/error_report.js',
|
||||
'export': './js/src/export.js',
|
||||
'export_output': './js/src/export_output.js',
|
||||
'functions': './js/src/functions.js',
|
||||
'gis_data_editor': './js/src/gis_data_editor.js',
|
||||
'home': './js/src/home.js',
|
||||
'import': './js/src/import.js',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user