Skip to content

Commit

Permalink
Merge branch 'develop' into pyup/update-psycopg2-binary-2.8.5-to-2.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneycb committed Sep 7, 2020
2 parents a4f10d5 + 1cfc5f3 commit 0ff6db3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
10 changes: 6 additions & 4 deletions codewof/static/js/question_types/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,15 @@ function scroll_to_element(containerId, element) {
// For use by the tutorials
var container = $('#' + containerId);
var contWidth = container.width();
var elemLeft = $(element).offset().left - container.offset().left;
var contLeft = container.offset().left;
var elemLeft = $(element).offset().left - contLeft; // wrt container
var elemWidth = element.width();
var isInView = (elemLeft >= 0 && ((elemLeft + elemWidth) <= contWidth));
var isInView = elemLeft >= 0 && (elemLeft + elemWidth) <= contWidth;

if (!isInView) {
var scrollLeftValue = element.offset().left;
container.scrollLeft(scrollLeftValue);
container.scrollLeft(0);
var scrollTo = $(element).offset().left - contLeft;
container.scrollLeft(scrollTo);
}
}

Expand Down
1 change: 1 addition & 0 deletions codewof/templates/style/language-statistics.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ <h2 class="mt-3">
{% endblock content %}

{% block css %}
{{ block.super }}
<link href="{% static 'css/style_checker.css' %}" rel="stylesheet">
{% endblock css %}
1 change: 1 addition & 0 deletions codewof/templates/style/language.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ <h3>Your code</h3>
{% endblock content_container %}

{% block css %}
{{ block.super }}
<link href="{% static 'css/style_checker.css' %}" rel="stylesheet">
{% endblock css %}

Expand Down
2 changes: 1 addition & 1 deletion requirements/local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ pydocstyle==5.1.1
factory-boy==2.12.0 # https://github.com/FactoryBoy/factory_boy

django-debug-toolbar==2.2 # https://github.com/jazzband/django-debug-toolbar
django-extensions==3.0.7 # https://github.com/django-extensions/django-extensions
django-extensions==3.0.8 # https://github.com/django-extensions/django-extensions
pytest-django==3.9.0 # https://github.com/pytest-dev/pytest-django

0 comments on commit 0ff6db3

Please sign in to comment.