Bug 1059756 - Add a link to Loop's help page in the gear menu. r=MattN

This commit is contained in:
Romain Gauthier
2014-11-24 09:57:44 +00:00
parent f48f5131ea
commit 5855770b17
7 changed files with 67 additions and 1 deletions

View File

@@ -281,6 +281,13 @@ loop.panel = (function(_, mozL10n) {
}
},
handleHelpEntry: function(event) {
event.preventDefault();
var helloSupportUrl = navigator.mozLoop.getLoopPref('support_url');
window.open(helloSupportUrl);
window.close();
},
_isSignedIn: function() {
return !!navigator.mozLoop.userProfile;
},
@@ -318,7 +325,10 @@ loop.panel = (function(_, mozL10n) {
mozL10n.get("settings_menu_item_signin"),
onClick: this.handleClickAuthEntry,
displayed: navigator.mozLoop.fxAEnabled,
icon: this._isSignedIn() ? "signout" : "signin"})
icon: this._isSignedIn() ? "signout" : "signin"}),
SettingsDropdownEntry({label: mozL10n.get("help_label"),
onClick: this.handleHelpEntry,
icon: "help"})
)
)
);