Skip to content

Commit

Permalink
[phonegap#318] added slideDown and slideUp transitions to the update …
Browse files Browse the repository at this point in the history
…prompt

Former-commit-id: 52b6141
  • Loading branch information
hermwong committed Apr 8, 2015
1 parent 8c2a18a commit d284b39
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 4 additions & 2 deletions www/index.html
Expand Up @@ -226,7 +226,8 @@
});

global.jQuery("#updateLater").click(function() {
hideUpdateOverlay();
//hideUpdateOverlay();
overlayBackgroundHandler();
});

global.jQuery("#updateNow").click(function() {
Expand All @@ -236,7 +237,8 @@
} else {
updateApp();
}
hideUpdateOverlay();
//hideUpdateOverlay();
overlayBackgroundHandler();
});

initSettings();
Expand Down
13 changes: 12 additions & 1 deletion www/js/updater.js
Expand Up @@ -2,18 +2,29 @@ function displayUpdateAvailablePrompt() {
global.jQuery("#updateOverlayTitle").text("Update Available");
global.jQuery("#updateOverlayPrompt").text("A new version of the PhoneGap Desktop App is available.");
global.jQuery("#updateNow").text("Update");
global.jQuery("#updateOverlay").addClass("animated slideInDown");
global.jQuery("#updateOverlay").show();
global.jQuery("#overlay-bg").show();
}

function displayInstallUpdatePrompt() {
global.jQuery("#updateOverlayTitle").text("Update Downloaded");
global.jQuery("#updateOverlayPrompt").text("Install the downloaded update and restart PhoneGap Desktop.");
global.jQuery("#updateNow").text("Restart");
global.jQuery("#updateOverlay").show();
global.jQuery("#updateOverlay").addClass("animated slideInDown");
global.jQuery("#updateOverlay").show();
global.jQuery("#overlay-bg").show();
}

function hideUpdateOverlay() {
global.jQuery("#updateOverlay").removeClass("animated slideInDown");
global.jQuery("#updateOverlay").addClass("animated slideOutUp");
global.jQuery("#updateOverlay").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd onanimationend animationend", hideUpdateOverlayAnimationEnd);
}

function hideUpdateOverlayAnimationEnd() {
global.jQuery("#updateOverlay").hide();
global.jQuery("#updateOverlay").removeClass("animated slideOutUp");
}

function restartApp () {
Expand Down

0 comments on commit d284b39

Please sign in to comment.