ui: Wait for i18n setup before rendering hotkeys help.

Much like 038a2c769, but for the three tabs at the top of the
`?` help overlay for keyboard shortcuts.
This commit is contained in:
Greg Price
2017-08-07 17:16:35 -07:00
committed by Tim Abbott
parent 8ab213e3e4
commit ee3ead2744
2 changed files with 7 additions and 3 deletions

View File

@@ -117,8 +117,7 @@ exports.show_failed_message_success = function (message_id) {
});
};
$(document).ready(function () {
function _setup_info_overlay() {
var info_overlay_toggle = components.toggle({
name: "info-overlay-toggle",
selected: 0,
@@ -136,7 +135,7 @@ $(document).ready(function () {
$(".informational-overlays .overlay-tabs")
.append($(info_overlay_toggle).addClass("large"));
});
}
exports.show_info_overlay = function (target) {
var overlay = $(".informational-overlays");
@@ -271,6 +270,10 @@ $(function () {
}
});
exports.initialize = function () {
i18n.ensure_i18n(_setup_info_overlay);
};
return exports;
}());

View File

@@ -269,6 +269,7 @@ $(function () {
drafts.initialize();
sent_messages.initialize();
compose.initialize();
ui.initialize();
});