Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fix #5062: Update notification is no longer modal #5085

Merged
merged 4 commits into from
Sep 18, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/brackets.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ define(function (require, exports, module) {
// check once a day, plus 2 minutes,
// as the check will skip if the last check was not -24h ago
window.setInterval(UpdateNotification.checkForUpdate, 86520000);
UpdateNotification.checkForUpdate();

// Check for updates on App Ready
AppInit.appReady(function () {
UpdateNotification.checkForUpdate();
});
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/styles/brackets_patterns_override.less
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@
.modal-backdrop {
opacity: 0;
}
.modal-backdrop:last-child {
.last-backdrop {
/* Only show the last modal backdrop */
opacity: 0.5;
}
Expand Down
8 changes: 4 additions & 4 deletions src/utils/UpdateNotification.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ define(function (require, exports, module) {

var Dialogs = require("widgets/Dialogs"),
DefaultDialogs = require("widgets/DefaultDialogs"),
NativeApp = require("utils/NativeApp"),
PreferencesManager = require("preferences/PreferencesManager"),
Strings = require("strings"),
StringUtils = require("utils/StringUtils"),
Global = require("utils/Global"),
NativeApp = require("utils/NativeApp"),
StringUtils = require("utils/StringUtils"),
Strings = require("strings"),
UpdateDialogTemplate = require("text!htmlContent/update-dialog.html"),
UpdateListTemplate = require("text!htmlContent/update-list.html");

Expand Down Expand Up @@ -329,7 +329,7 @@ define(function (require, exports, module) {

// Append locale to version info URL
_versionInfoURL = brackets.config.update_info_url + brackets.getLocale() + ".json";

// Define public API
exports.checkForUpdate = checkForUpdate;
});
9 changes: 7 additions & 2 deletions src/widgets/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ define(function (require, exports, module) {

// Remove the dialog instance from the DOM.
$dlg.remove();
$(".modal-backdrop:last").addClass("last-backdrop");

// Remove our global keydown handler.
KeyBindingManager.removeGlobalKeydownHook(keydownHook);
Expand All @@ -273,7 +274,9 @@ define(function (require, exports, module) {
_dismissDialog($dlg, $(this).attr("data-button-id"));
});
}


$(".last-backdrop").removeClass("last-backdrop");

// Run the dialog
$dlg
.modal({
Expand All @@ -283,7 +286,9 @@ define(function (require, exports, module) {
})
// Updates the z-index of the modal dialog and the backdrop
.css("z-index", zIndex + 1)
.next().css("z-index", zIndex);
.next()
.css("z-index", zIndex)
.addClass("last-backdrop");

zIndex += 2;

Expand Down