Merge pull request #8374 from vcooley/fix/close-aside-on-modal-in
Modals now close map, wiki, and chat asides when they are displayed
This commit is contained in:
@ -150,6 +150,11 @@ window.common = (function(global) {
|
|||||||
window.ga('send', 'event', 'Challenge', 'load', common.gaName);
|
window.ga('send', 'event', 'Challenge', 'load', common.gaName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$('.modal').on('show.bs.modal', function() {
|
||||||
|
$('.gitter-chat-embed, .wiki-aside, .map-aside')
|
||||||
|
.addClass('is-collapsed');
|
||||||
|
});
|
||||||
|
|
||||||
$('#complete-courseware-dialog').on('hidden.bs.modal', function() {
|
$('#complete-courseware-dialog').on('hidden.bs.modal', function() {
|
||||||
if (common.editor.focus) {
|
if (common.editor.focus) {
|
||||||
common.editor.focus();
|
common.editor.focus();
|
||||||
@ -176,6 +181,15 @@ window.common = (function(global) {
|
|||||||
$('#complete-courseware-dialog').modal('show');
|
$('#complete-courseware-dialog').modal('show');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#show-solution').on('click', function() {
|
||||||
|
$('#complete-courseware-dialog').modal('hide');
|
||||||
|
$('#nav-wiki-btn').click();
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#challenge-help-btn').on('click', function() {
|
||||||
|
$('.wiki-aside, .map-aside, #chat-embed-main').addClass('is-collapsed');
|
||||||
|
});
|
||||||
|
|
||||||
$('#help-ive-found-a-bug-wiki-article').on('click', function() {
|
$('#help-ive-found-a-bug-wiki-article').on('click', function() {
|
||||||
window.open(
|
window.open(
|
||||||
'https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/' +
|
'https://github.com/FreeCodeCamp/FreeCodeCamp/wiki/' +
|
||||||
|
Reference in New Issue
Block a user