diff --git a/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js b/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js
index 6087bb6a2..1032a83f7 100644
--- a/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js
+++ b/airtime_mvc/public/js/airtime/dashboard/versiontooltip.js
@@ -8,9 +8,9 @@ function getContent() {
var msg = "";
if(isUpToDate()) {
msg = "You are running the latest version";
- } else if(diff <= 2) {
+ } else if(diff == 1) {
msg = "New version available: " + link;
- } else if(diff == 3) {
+ } else if(diff == 2) {
msg = "This version will soon be obsolete.
Please upgrade to " + link;
} else {
msg = "This version is no longer supported.
Please upgrade to " + link;
@@ -44,7 +44,7 @@ function getLatestVersion() {
* Returns the download link to latest release in HTML
*/
function getLatestLink() {
- return "" + getLatestVersion() + "";
+ return "" + getLatestVersion() + "";
}
/**
@@ -58,6 +58,13 @@ function isUpToDate() {
return (diff == 0 && current == latest) || diff < 0;
}
+/**
+ * Opens the link in a new window
+ */
+function openLatestLink() {
+ window.open($("#version-link").html());
+}
+
/**
* Sets up the tooltip for version notification
*/