From c793b998a75b2073409c6f0d33bc88f5e7a80be0 Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sat, 30 Mar 2019 08:16:21 +0100 Subject: [PATCH] ESLINT fixes Make eslint green for CI Signed-off-by: William Desportes --- js/console.js | 2 +- js/db_operations.js | 2 +- js/designer/move.js | 12 ++++++------ js/makegrid.js | 2 +- js/multi_column_sort.js | 2 +- js/sql.js | 4 ++-- js/u2f.js | 12 ++++++------ 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/js/console.js b/js/console.js index b657bdaa00..74ab018fca 100644 --- a/js/console.js +++ b/js/console.js @@ -281,7 +281,7 @@ var PMA_console = { PMA_console.setConfig('Mode', 'show'); var pmaConsoleHeight = Math.max(92, PMA_console.config.Height); - pmaConsoleHeight = Math.min(PMA_console.config.Height, (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight)-25); + pmaConsoleHeight = Math.min(PMA_console.config.Height, (window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight) - 25); PMA_console.$consoleContent.css({ display:'block' }); if (PMA_console.$consoleToolbar.hasClass('collapsed')) { PMA_console.$consoleToolbar.removeClass('collapsed'); diff --git a/js/db_operations.js b/js/db_operations.js index b65733d896..3c408d89ba 100644 --- a/js/db_operations.js +++ b/js/db_operations.js @@ -108,7 +108,7 @@ AJAX.registerOnload('db_operations.js', function () { * Change tables columns visible only if change tables is checked */ $('#span_change_all_tables_columns_collations').hide(); - $('#checkbox_change_all_tables_collations').on('click', function() { + $('#checkbox_change_all_tables_collations').on('click', function () { $('#span_change_all_tables_columns_collations').toggle(); }); diff --git a/js/designer/move.js b/js/designer/move.js index 23eace268f..b2ca6b4272 100644 --- a/js/designer/move.js +++ b/js/designer/move.js @@ -1943,9 +1943,9 @@ AJAX.registerTeardown('designer/move.js', function () { $('#cancel_close_option').off('click'); $('#ok_new_rel_panel').off('click'); $('#cancel_new_rel_panel').off('click'); - $("#page_content").off('mouseup'); - $("#page_content").off('mousedown'); - $("#page_content").off('mousemove'); + $('#page_content').off('mouseup'); + $('#page_content').off('mousedown'); + $('#page_content').off('mousemove'); }); AJAX.registerOnload('designer/move.js', function () { @@ -2110,13 +2110,13 @@ AJAX.registerOnload('designer/move.js', function () { $('input#cancel_new_rel_panel').click(function () { document.getElementById('layer_new_relation').style.display = 'none'; }); - $("#page_content").on('mousedown', function(e) { + $('#page_content').on('mousedown', function(e) { MouseDown(e); }); - $("#page_content").on('mouseup', function(e) { + $('#page_content').on('mouseup', function(e) { MouseUp(e); }); - $("#page_content").on('mousemove', function(e) { + $('#page_content').on('mousemove', function(e) { MouseMove(e); }); }); diff --git a/js/makegrid.js b/js/makegrid.js index 81f0450554..50f77e93ee 100644 --- a/js/makegrid.js +++ b/js/makegrid.js @@ -824,7 +824,7 @@ function PMA_makegrid (t, enableResize, enableReorder, enableVisib, enableGridEd }); } // if some text is written in textbox automatically unmark the null checkbox and if it is emptied again mark the checkbox. - $(g.cEdit).find('.edit_box').on('input', function() { + $(g.cEdit).find('.edit_box').on('input', function () { if ($(g.cEdit).find('.edit_box').val() !== '') { $checkbox.prop('checked', false); } else { diff --git a/js/multi_column_sort.js b/js/multi_column_sort.js index 88b3807cca..cc9b92150f 100644 --- a/js/multi_column_sort.js +++ b/js/multi_column_sort.js @@ -58,7 +58,7 @@ function removeColumnFromMultiSort (target, parent) { AJAX.registerOnload('keyhandler.js', function () { $('th.draggable.column_heading.pointer.marker a').on('click', function (event) { var url = $(this).parent().find('input').val(); - var argsep = PMA_commonParams.get('arg_separator') + var argsep = PMA_commonParams.get('arg_separator'); if (event.ctrlKey || event.altKey) { event.preventDefault(); var params = removeColumnFromMultiSort(url, $(this).parent()); diff --git a/js/sql.js b/js/sql.js index 02a3dff037..40c54f7cb9 100644 --- a/js/sql.js +++ b/js/sql.js @@ -293,8 +293,8 @@ AJAX.registerOnload('sql.js', function () { }); $('.table_results .column_heading a').each(function () { - //Don't copy ordering number text within tag - textArea.value += $(this).clone().find('small').remove().end().text() + '\t'; + // Don't copy ordering number text within tag + textArea.value += $(this).clone().find('small').remove().end().text() + '\t'; }); textArea.value += '\n'; diff --git a/js/u2f.js b/js/u2f.js index 12c815d17e..47f3e8d701 100644 --- a/js/u2f.js +++ b/js/u2f.js @@ -6,12 +6,12 @@ AJAX.registerOnload('u2f.js', function () { if ($inputReg.length > 0) { var $formReg = $inputReg.parents('form'); $formReg.find('input[type=submit]').hide(); - setTimeout(function() { + setTimeout(function () { // A magic JS function that talks to the USB device. This function will keep polling for the USB device until it finds one. var request = JSON.parse($inputReg.attr('data-request')); - u2f.register(request.appId, [request], JSON.parse($inputReg.attr('data-signatures')), function(data) { + u2f.register(request.appId, [request], JSON.parse($inputReg.attr('data-signatures')), function (data) { // Handle returning error data - if(data.errorCode && data.errorCode !== 0) { + if (data.errorCode && data.errorCode !== 0) { if (data.errorCode === 5) { PMA_ajaxShowMessage(PMA_messages.strU2FTimeout, false); } else { @@ -32,14 +32,14 @@ AJAX.registerOnload('u2f.js', function () { if ($inputAuth.length > 0) { var $formAuth = $inputAuth.parents('form'); $formAuth.find('input[type=submit]').hide(); - setTimeout(function() { + setTimeout(function () { // Magic JavaScript talking to your HID // appid, challenge, authenticateRequests var request = JSON.parse($inputAuth.attr('data-request')); var handles = [request[0].keyHandle]; - u2f.sign(request[0].appId, request[0].challenge, request, function(data) { + u2f.sign(request[0].appId, request[0].challenge, request, function (data) { // Handle returning error data - if(data.errorCode && data.errorCode !== 0) { + if (data.errorCode && data.errorCode !== 0) { if (data.errorCode === 5) { PMA_ajaxShowMessage(PMA_messages.strU2FTimeout, false); } else {