Skip to content

Commit

Permalink
Merge pull request #542 from raccoongang/calypso-ginkgo-stage-91
Browse files Browse the repository at this point in the history
Change popup text and disable hide <body> on blur
  • Loading branch information
maximst authored Aug 23, 2018
2 parents 2c3a677 + fa4b587 commit 325cd9b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions lms/djangoapps/courseware/views/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from django.views.decorators.csrf import ensure_csrf_cookie
from django.views.generic import View
from django.utils.translation import ugettext as _
from opaque_keys.edx.keys import CourseKey
from opaque_keys.edx.keys import CourseKey, UsageKey
from web_fragments.fragment import Fragment

from edxmako.shortcuts import render_to_response, render_to_string
Expand Down Expand Up @@ -597,7 +597,9 @@ def check_prerequisite(request, course_id):
'location': prereq[0],
}
)
msg = _('Subsection blocked by <a href="{}">this</a> prerequisite.').format(url)
descriptor = modulestore().get_item(UsageKey.from_string(prereq[0]))
name = descriptor.display_name_with_default
msg = _('In order to proceed, you must successfully complete section "<a href="{}">{}</a>" first.').format(url, name)
return JsonResponse({'next': False, 'msg': msg, 'url': url})

next_url = reverse(
Expand Down
10 changes: 5 additions & 5 deletions lms/templates/courseware/courseware.html
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,10 @@
}
});

$(window).focus(function() {
$("body").show();
}).blur(function() {
$("body").hide();
});
// $(window).focus(function() {
// $("body").show();
// }).blur(function() {
// $("body").hide();
// });
});
</script>

0 comments on commit 325cd9b

Please sign in to comment.