diff options
Diffstat (limited to 'app/assets/javascripts/tree.js')
-rw-r--r-- | app/assets/javascripts/tree.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/assets/javascripts/tree.js b/app/assets/javascripts/tree.js index 947246b2fbb..58bff370fa5 100644 --- a/app/assets/javascripts/tree.js +++ b/app/assets/javascripts/tree.js @@ -8,7 +8,7 @@ export default class TreeView { this.initKeyNav(); // Code browser tree slider // Make the entire tree-item row clickable, but not if clicking another link (like a commit message) - $('.tree-content-holder .tree-item').on('click', function(e) { + $('.tree-content-holder .tree-item').on('click', function (e) { const $clickedEl = $(e.target); const path = $('.tree-item-file-name a', this).attr('href'); if (!$clickedEl.is('a') && !$clickedEl.is('.str-truncated')) { @@ -20,15 +20,13 @@ export default class TreeView { } }); // Show the "Loading commit data" for only the first element - $('span.log_loading') - .first() - .removeClass('hide'); + $('span.log_loading').first().removeClass('hide'); } initKeyNav() { const li = $('tr.tree-item'); let liSelected = null; - return $('body').keydown(e => { + return $('body').keydown((e) => { let next, path; if ($('input:focus').length > 0 && (e.which === 38 || e.which === 40)) { return false; |