From 71cbd109c49c1f6a27a9b4247976bcabcbecc011 Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Tue, 15 May 2018 02:30:26 -0400 Subject: [PATCH] Various fixes. Fixed issue where news button could not be tabbed to when news UI is active. Fixed incorrect java version sorting (now behaves as intended). --- app/assets/js/assetguard.js | 10 +++++----- app/assets/js/scripts/landing.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/assets/js/assetguard.js b/app/assets/js/assetguard.js index 3f098d5d9f..ca55089ee5 100644 --- a/app/assets/js/assetguard.js +++ b/app/assets/js/assetguard.js @@ -1019,22 +1019,22 @@ class AssetGuard extends EventEmitter { // Same version, give priority to JRE. if(a.execPath.toLowerCase().indexOf('jdk') > -1){ - return 1 + return b.execPath.toLowerCase().indexOf('jdk') > -1 ? 0 : 1 } else { - return b.execPath.toLowerCase().indexOf('jdk') > -1 ? 0 : -1 + return -1 } } else { - return a.version.build > b.version.build ? 1 : -1 + return a.version.build > b.version.build ? -1 : 1 } } else { - return a.version.update > b.version.update ? 1 : -1 + return a.version.update > b.version.update ? -1 : 1 } } else { - return a.version.major > b.version.major ? 1 : -1 + return a.version.major > b.version.major ? -1 : 1 } }) diff --git a/app/assets/js/scripts/landing.js b/app/assets/js/scripts/landing.js index 2e8ca21691..c6d7714dcb 100644 --- a/app/assets/js/scripts/landing.js +++ b/app/assets/js/scripts/landing.js @@ -737,7 +737,7 @@ document.getElementById('newsButton').onclick = () => { $("#newsContainer *").attr('tabindex', '-1') } else { $("#landingContainer *").attr('tabindex', '-1') - $("#newsContainer, #newsContainer *").removeAttr('tabindex') + $("#newsContainer, #newsContainer *, #lower, #lower #center *").removeAttr('tabindex') } slide_(!newsActive) newsActive = !newsActive