# HG changeset patch # User Mads Kiilerich # Date 1578612862 -3600 # Node ID d6efaa91e967c880d0f36052b3b91d8ae2f07436 # Parent 293cba6cec72ee00850531c7b5c184ef15b620a7 eslint: fix "is defined but never used" diff -r 293cba6cec72 -r d6efaa91e967 kallithea/public/js/base.js --- a/kallithea/public/js/base.js Fri Jan 10 00:34:22 2020 +0100 +++ b/kallithea/public/js/base.js Fri Jan 10 00:34:22 2020 +0100 @@ -386,7 +386,7 @@ success(); } }) - .fail(function(jqXHR, textStatus, errorThrown) { + .fail(function(jqXHR, textStatus) { if (textStatus == "abort") return; $target.html('ERROR: {0}'.format(textStatus)); @@ -397,7 +397,7 @@ function ajaxGET(url, success, failure) { if(failure === undefined) { - failure = function(jqXHR, textStatus, errorThrown) { + failure = function(jqXHR, textStatus) { if (textStatus != "abort") alert("Ajax GET error: " + textStatus); }; @@ -411,7 +411,7 @@ postData['_session_csrf_secret_token'] = _session_csrf_secret_token; var postData = _toQueryString(postData); if(failure === undefined) { - failure = function(jqXHR, textStatus, errorThrown) { + failure = function(jqXHR, textStatus) { if (textStatus != "abort") alert("Error posting to server: " + textStatus); }; @@ -461,7 +461,7 @@ 'follows_repository_id': follows_repository_id, '_session_csrf_secret_token': _session_csrf_secret_token } - $.post(TOGGLE_FOLLOW_URL, args, function(data){ + $.post(TOGGLE_FOLLOW_URL, args, function(){ _onSuccessFollow(target); }); return false; @@ -555,7 +555,7 @@ var $q_filter_field = $('#' + target); var F = namespace(target); - $q_filter_field.keyup(function (e) { + $q_filter_field.keyup(function () { clearTimeout(F.filterTimeout); F.filterTimeout = setTimeout(F.updateFilter, 600); }); @@ -663,7 +663,7 @@ var addlabel = TRANSLATION_MAP['Add Another Comment']; var $add = $('
{0}
'.format(addlabel)); $comment_div.append($add); - $add.children('.add-button').click(function(e) { + $add.children('.add-button').click(function() { comment_div_state($comment_div, f_path, line_no, true); }); } @@ -771,7 +771,7 @@ }); // add event handler for hide/cancel buttons - $form.find('.hide-inline-form').click(function(e) { + $form.find('.hide-inline-form').click(function() { comment_div_state($comment_div, f_path, line_no); }); @@ -788,7 +788,7 @@ function deleteComment(comment_id) { var url = AJAX_COMMENT_DELETE_URL.replace('__COMMENT_ID__', comment_id); var postData = {}; - function success(o) { + function success() { $('#comment-'+comment_id).remove(); // Ignore that this might leave a stray Add button (or have a pending form with another comment) ... } @@ -807,7 +807,7 @@ return; } - $comments.each(function(i, e){ + $comments.each(function(i){ var prev = ''; if (i > 0){ var prev_anchor = $($comments.get(i-1)).prop('id'); @@ -926,7 +926,7 @@ }); CodeMirror.modeURL = baseUrl + "/codemirror/mode/%N/%N.js"; - $('#reset').click(function(e){ + $('#reset').click(function(){ window.location=resetUrl; }); @@ -967,7 +967,7 @@ /* generate links for multi line selects that can be shown by files.html page_highlights. * This is a mouseup handler for hlcode from CodeHtmlFormatter and pygmentize */ -function getSelectionLink(e) { +function getSelectionLink() { //get selection from start/to nodes if (typeof window.getSelection != "undefined") { var s = window.getSelection(); @@ -1136,12 +1136,12 @@ ajax: { url: pyroutes.url('users_and_groups_data'), dataType: 'json', - data: function(term, page){ + data: function(term){ return { query: term }; }, - results: function (data, page){ + results: function (data){ return data; }, cache: true @@ -1160,13 +1160,13 @@ ajax: { url: pyroutes.url('users_and_groups_data'), dataType: 'json', - data: function(term, page){ + data: function(term){ return { query: term, types: 'users,groups' }; }, - results: function (data, page){ + results: function (data){ return data; }, cache: true @@ -1196,7 +1196,7 @@ } ); }, - sorter: function(query, items, searchKey) { + sorter: function(query, items) { return items; } }, @@ -1267,7 +1267,7 @@ } } -function removeReviewMember(reviewer_id, repo_name, pull_request_id){ +function removeReviewMember(reviewer_id){ var $li = $('#reviewer_{0}'.format(reviewer_id)); $li.find('div div').css("text-decoration", "line-through"); $li.find('input').prop('name', 'review_members_removed'); @@ -1283,12 +1283,12 @@ ajax: { url: pyroutes.url('users_and_groups_data'), dataType: 'json', - data: function(term, page){ + data: function(term){ return { query: term }; }, - results: function (data, page){ + results: function (data){ return data; }, cache: true @@ -1322,7 +1322,7 @@ } function ajaxActionRevokePermission(url, obj_id, obj_type, field_id, extra_data) { - function success(o) { + function success() { $('#' + field_id).remove(); } function failure(o) { @@ -1365,10 +1365,10 @@ return false; }).remove(); - $('#add_element').click(function(e){ + $('#add_element').click(function(){ $selectedselect.append($availableselect.children('option:selected')); }); - $('#remove_element').click(function(e){ + $('#remove_element').click(function(){ $availableselect.append($selectedselect.children('option:selected')); }); diff -r 293cba6cec72 -r d6efaa91e967 kallithea/public/js/graph.js --- a/kallithea/public/js/graph.js Fri Jan 10 00:34:22 2020 +0100 +++ b/kallithea/public/js/graph.js Fri Jan 10 00:34:22 2020 +0100 @@ -34,7 +34,7 @@ if (!document.createElement("canvas").getContext) this.canvas = window.G_vmlCanvasManager.initElement(this.canvas); if (!this.canvas) { // canvas creation did for some reason fail - fail silently - this.render = function(data) {}; + this.render = function() {}; return; } this.ctx = this.canvas.getContext('2d'); diff -r 293cba6cec72 -r d6efaa91e967 kallithea/templates/admin/auth/auth_settings.html --- a/kallithea/templates/admin/auth/auth_settings.html Fri Jan 10 00:34:22 2020 +0100 +++ b/kallithea/templates/admin/auth/auth_settings.html Fri Jan 10 00:34:22 2020 +0100 @@ -108,7 +108,7 @@