CC-2950: Tell users if they are running an out-of-date version or not
- make latest version download link open in a new window - show yellow upgrade icon when 2 verions back - show red icon when more than 2 versions back
This commit is contained in:
parent
40ebc9602d
commit
595f857166
1 changed files with 10 additions and 3 deletions
|
@ -8,9 +8,9 @@ function getContent() {
|
||||||
var msg = "";
|
var msg = "";
|
||||||
if(isUpToDate()) {
|
if(isUpToDate()) {
|
||||||
msg = "You are running the latest version";
|
msg = "You are running the latest version";
|
||||||
} else if(diff <= 2) {
|
} else if(diff == 1) {
|
||||||
msg = "New version available: " + link;
|
msg = "New version available: " + link;
|
||||||
} else if(diff == 3) {
|
} else if(diff == 2) {
|
||||||
msg = "This version will soon be obsolete.<br/>Please upgrade to " + link;
|
msg = "This version will soon be obsolete.<br/>Please upgrade to " + link;
|
||||||
} else {
|
} else {
|
||||||
msg = "This version is no longer supported.<br/>Please upgrade to " + link;
|
msg = "This version is no longer supported.<br/>Please upgrade to " + link;
|
||||||
|
@ -44,7 +44,7 @@ function getLatestVersion() {
|
||||||
* Returns the download link to latest release in HTML
|
* Returns the download link to latest release in HTML
|
||||||
*/
|
*/
|
||||||
function getLatestLink() {
|
function getLatestLink() {
|
||||||
return "<a href='" + $("#version-link").html() + "'>" + getLatestVersion() + "</a>";
|
return "<a href='' onclick='openLatestLink();'>" + getLatestVersion() + "</a>";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -58,6 +58,13 @@ function isUpToDate() {
|
||||||
return (diff == 0 && current == latest) || diff < 0;
|
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
|
* Sets up the tooltip for version notification
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue