Remove some globals from .eslintrc.json file
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
parent
f7addc22e4
commit
4c0bb9474d
@ -15,12 +15,8 @@
|
||||
"jquery": true
|
||||
},
|
||||
"globals": {
|
||||
"Cookies": "readonly",
|
||||
"Functions": "readonly",
|
||||
"Messages": "readonly",
|
||||
"Navigation": "readonly",
|
||||
"OpenLayers": "readonly",
|
||||
"Sql": "readonly"
|
||||
"Messages": "readonly"
|
||||
},
|
||||
"rules": {
|
||||
"valid-jsdoc": ["error", {
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* This object handles ajax requests for pages. It also
|
||||
* handles the reloading of the main menu and scripts.
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* Holds common parameters such as server, db, table, etc
|
||||
*
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
window.AJAX.registerTeardown('database/events.js', function () {
|
||||
$(document).off('click', 'a.ajax.add_anchor, a.ajax.edit_anchor');
|
||||
$(document).off('click', 'a.ajax.export_anchor');
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* @fileoverview function used in server privilege pages
|
||||
* @name Database Operations
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
window.AJAX.registerTeardown('database/routines.js', function () {
|
||||
$(document).off('click', 'a.ajax.add_anchor');
|
||||
$(document).off('click', 'a.ajax.edit_anchor');
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* @fileoverview functions used on the database structure page
|
||||
* @name Database Structure
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
window.AJAX.registerTeardown('database/triggers.js', function () {
|
||||
$(document).off('click', 'a.ajax.add_anchor, a.ajax.edit_anchor');
|
||||
$(document).off('click', 'a.ajax.export_anchor');
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* global Navigation */
|
||||
/* global isStorageSupported */ // js/config.js
|
||||
/* global ChartType, ColumnType, DataTable, JQPlotChartFactory */ // js/chart.js
|
||||
/* global DatabaseStructure */ // js/database/structure.js
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* @fileoverview function used for index manipulation pages
|
||||
* @name Table Structure
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
/* global Indexes */
|
||||
/* global Navigation */
|
||||
|
||||
window.AJAX.registerOnload('functions.js', () => window.AJAX.removeSubmitEvents());
|
||||
$(window.AJAX.loadEventHandler());
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
/* global Sql */
|
||||
/* global firstDayOfCalendar */ // templates/javascript/variables.twig
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* @implements EventListener
|
||||
*/
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* Export privileges modal handler
|
||||
*
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* @test-module Sql
|
||||
*/
|
||||
|
||||
/* global Navigation */
|
||||
/* global isStorageSupported */ // js/config.js
|
||||
/* global makeGrid */ // js/makegrid.js
|
||||
/* global themeImagePath */ // templates/javascript/variables.twig
|
||||
@ -49,7 +50,7 @@ Sql.autoSave = function (query) {
|
||||
if (isStorageSupported('localStorage')) {
|
||||
window.localStorage.setItem(key, query);
|
||||
} else {
|
||||
Cookies.set(key, query, { path: window.CommonParams.get('rootPath') });
|
||||
window.Cookies.set(key, query, { path: window.CommonParams.get('rootPath') });
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -72,8 +73,8 @@ Sql.showThisQuery = function (db, table, query) {
|
||||
window.localStorage.showThisQuery = 1;
|
||||
window.localStorage.showThisQueryObject = JSON.stringify(showThisQueryObject);
|
||||
} else {
|
||||
Cookies.set('showThisQuery', 1, { path: window.CommonParams.get('rootPath') });
|
||||
Cookies.set('showThisQueryObject', JSON.stringify(showThisQueryObject), { path: window.CommonParams.get('rootPath') });
|
||||
window.Cookies.set('showThisQuery', 1, { path: window.CommonParams.get('rootPath') });
|
||||
window.Cookies.set('showThisQueryObject', JSON.stringify(showThisQueryObject), { path: window.CommonParams.get('rootPath') });
|
||||
}
|
||||
};
|
||||
|
||||
@ -117,7 +118,7 @@ Sql.autoSaveWithSort = function (query) {
|
||||
if (isStorageSupported('localStorage')) {
|
||||
window.localStorage.setItem('autoSavedSqlSort', query);
|
||||
} else {
|
||||
Cookies.set('autoSavedSqlSort', query, { path: window.CommonParams.get('rootPath') });
|
||||
window.Cookies.set('autoSavedSqlSort', query, { path: window.CommonParams.get('rootPath') });
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -131,7 +132,7 @@ Sql.clearAutoSavedSort = function () {
|
||||
if (isStorageSupported('localStorage')) {
|
||||
window.localStorage.removeItem('autoSavedSqlSort');
|
||||
} else {
|
||||
Cookies.set('autoSavedSqlSort', '', { path: window.CommonParams.get('rootPath') });
|
||||
window.Cookies.set('autoSavedSqlSort', '', { path: window.CommonParams.get('rootPath') });
|
||||
}
|
||||
};
|
||||
|
||||
@ -304,8 +305,8 @@ const insertQuery = function (queryType) {
|
||||
if (isStorageSupported('localStorage') &&
|
||||
typeof window.localStorage.getItem(key) === 'string') {
|
||||
setQuery(window.localStorage.getItem(key));
|
||||
} else if (Cookies.get(key, { path: window.CommonParams.get('rootPath') })) {
|
||||
setQuery(Cookies.get(key, { path: window.CommonParams.get('rootPath') }));
|
||||
} else if (window.Cookies.get(key, { path: window.CommonParams.get('rootPath') })) {
|
||||
setQuery(window.Cookies.get(key, { path: window.CommonParams.get('rootPath') }));
|
||||
} else {
|
||||
Functions.ajaxShowMessage(Messages.strNoAutoSavedQuery);
|
||||
}
|
||||
@ -476,7 +477,7 @@ window.AJAX.registerOnload('sql.js', function () {
|
||||
Sql.clearAutoSavedSort();
|
||||
}
|
||||
// If sql query with sort for current table is stored, change sort by key select value
|
||||
var sortStoredQuery = useLocalStorageValue ? window.localStorage.autoSavedSqlSort : Cookies.get('autoSavedSqlSort', { path: window.CommonParams.get('rootPath') });
|
||||
var sortStoredQuery = useLocalStorageValue ? window.localStorage.autoSavedSqlSort : window.Cookies.get('autoSavedSqlSort', { path: window.CommonParams.get('rootPath') });
|
||||
if (typeof sortStoredQuery !== 'undefined' && sortStoredQuery !== $('select[name="sql_query"]').val() && $('select[name="sql_query"] option[value="' + sortStoredQuery + '"]').length !== 0) {
|
||||
$('select[name="sql_query"]').val(sortStoredQuery).trigger('change');
|
||||
}
|
||||
@ -1206,7 +1207,7 @@ Sql.checkSavedQuery = function () {
|
||||
if (isStorageSupported('localStorage') &&
|
||||
typeof window.localStorage.getItem(key) === 'string') {
|
||||
Functions.ajaxShowMessage(Messages.strPreviousSaveQuery);
|
||||
} else if (Cookies.get(key, { path: window.CommonParams.get('rootPath') })) {
|
||||
} else if (window.Cookies.get(key, { path: window.CommonParams.get('rootPath') })) {
|
||||
Functions.ajaxShowMessage(Messages.strPreviousSaveQuery);
|
||||
}
|
||||
};
|
||||
|
||||
@ -1,3 +1,5 @@
|
||||
/* global Navigation */
|
||||
|
||||
/**
|
||||
* Unbind all event handlers before tearing down a page
|
||||
*/
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* @required js/functions.js
|
||||
*/
|
||||
|
||||
/* global Navigation */
|
||||
/* global sprintf */ // js/vendor/sprintf.js
|
||||
|
||||
/**
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
* @requires js/functions.js
|
||||
**/
|
||||
|
||||
/* global Sql */
|
||||
/* global changeValueFieldType, verifyAfterSearchFieldChange */ // js/table/change.js
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user