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

Commit 0e3fa80

Browse files
committed
Merge pull request #3014 from TuckerWhitehouse/master
Fix About Dialog Contributors (Issue 3012 from Pull 2934)
2 parents 4e44a07 + 2029905 commit 0e3fa80

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

src/help/HelpCommandHandlers.js

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,6 @@ define(function (require, exports, module) {
4545
var buildInfo;
4646

4747

48-
/**
49-
* @private
50-
* Gets a data structure that has the information for all the contributors of Brackets.
51-
* The information is fetched from brackets.config.contributors_url using the github API.
52-
* @return {$.Promise} jQuery Promise object that is resolved or rejected after the information is fetched.
53-
*/
54-
function _getContributorsInformation() {
55-
var result = new $.Deferred();
56-
57-
$.getJSON(brackets.config.contributors_url)
58-
.done(function (data) {
59-
result.resolve(data);
60-
}).fail(function () {
61-
result.reject();
62-
});
63-
64-
return result.promise();
65-
}
66-
67-
6848
function _handleCheckForUpdates() {
6949
UpdateNotification.checkForUpdate(true);
7050
}
@@ -93,13 +73,15 @@ define(function (require, exports, module) {
9373
}, Strings);
9474

9575
Dialogs.showModalDialogUsingTemplate(Mustache.render(AboutDialogTemplate, templateVars));
76+
77+
// Get containers
78+
var $dlg = $(".about-dialog.instance");
79+
var $contributors = $dlg.find(".about-contributors");
9680

9781
// Get all the project contributors and add them to the dialog
98-
_getContributorsInformation().done(function (contributorsInfo) {
82+
$.getJSON(brackets.config.contributors_url).done(function (contributorsInfo) {
9983

10084
// Populate the contributors data
101-
var $dlg = $(".about-dialog.instance");
102-
var $contributors = $dlg.find(".about-contributors");
10385
var totalContributors = contributorsInfo.length;
10486
var contributorsCount = 0;
10587

@@ -130,6 +112,9 @@ define(function (require, exports, module) {
130112
}
131113
}
132114
});
115+
}).fail(function () {
116+
$dlg.find(".about-spinner").css("display", "none");
117+
$contributors.html(Mustache.render("<p class='dialog-message'>{{ABOUT_TEXT_LINE6}}</p>", Strings));
133118
});
134119
}
135120

src/nls/root/strings.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ define({
280280
"ABOUT_TEXT_LINE3" : "Notices, terms and conditions pertaining to third party software are located at <a class=\"clickable-link\" data-href=\"http://www.adobe.com/go/thirdparty/\">http://www.adobe.com/go/thirdparty/</a> and incorporated by reference herein.",
281281
"ABOUT_TEXT_LINE4" : "Documentation and source at <a class=\"clickable-link\" data-href=\"https://github.com/adobe/brackets/\">https://github.com/adobe/brackets/</a>",
282282
"ABOUT_TEXT_LINE5" : "Made with \u2764 and JavaScript by:",
283+
"ABOUT_TEXT_LINE6" : "Lots of people (but we're having trouble loading that data right now).",
283284
"UPDATE_NOTIFICATION_TOOLTIP" : "There's a new build of {APP_NAME} available! Click here for details.",
284285
"UPDATE_AVAILABLE_TITLE" : "Update Available",
285286
"UPDATE_MESSAGE" : "Hey, there's a new build of {APP_NAME} available. Here are some of the new features:",

0 commit comments

Comments
 (0)