Skip to content

Commit

Permalink
Going backwards in time...
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Rodriguez committed Nov 18, 2015
1 parent aaeae47 commit 3e9eee9
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 16 deletions.
1 change: 1 addition & 0 deletions common/test/acceptance/pages/lms/course_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def ensure_skip_link_sends_focus_to_container(self):
Checks to make sure the skip link skips to its href
and the container receives focus.
"""
from nose.tools import set_trace; set_trace()
skip_link = self.q(css=".nav-skip")
skip_url = skip_link.attrs('href')[0]
skip_id = skip_url.split('/')[-1]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ def test_cohorted_search_user_staff_all_content(self):
self._goto_staff_page().set_staff_view_mode('Staff')
self.courseware_search_page.search_for_term(self.visible_to_all_html)
assert self.visible_to_all_html in self.courseware_search_page.search_results.html[0]
# from nose.tools import set_trace; set_trace()
self.courseware_search_page.clear_search()
self.courseware_search_page.search_for_term(self.group_a_and_b_html)
assert self.group_a_and_b_html in self.courseware_search_page.search_results.html[0]
Expand Down
2 changes: 1 addition & 1 deletion lms/static/js/search/course/views/search_results_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define([
return SearchResultsView.extend({

el: '#courseware-search-results',
contentElement: '#content',
contentElement: '#course-content',
resultsTemplateId: '#course_search_results-tpl',
loadingTemplateId: '#search_loading-tpl',
errorTemplateId: '#search_error-tpl',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ define([
return SearchResultsView.extend({

el: '#dashboard-search-results',
contentElement: '#content, #profile-sidebar',
contentElement: '#my-courses, #profile-sidebar',
resultsTemplateId: '#dashboard_search_results-tpl',
loadingTemplateId: '#search_loading-tpl',
errorTemplateId: '#search_error-tpl',
Expand Down
17 changes: 6 additions & 11 deletions lms/static/js/spec/search/search_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,9 @@ define([
function beforeEachHelper(SearchResultsView) {
appendSetFixtures(
'<section id="courseware-search-results"></section>' +
'<section id="content"></section>' +
'<section id="course-content"></section>' +
'<section id="dashboard-search-results"></section>' +
'<section id="content"></section>'
'<section id="my-courses"></section>'
);

TemplateHelpers.installTemplates([
Expand Down Expand Up @@ -674,14 +674,14 @@ define([
loadFixtures('js/fixtures/search/course_search_form.html');
appendSetFixtures(
'<section id="courseware-search-results"></section>' +
'<section id="content"></section>'
'<section id="course-content"></section>'
);
loadTemplates.call(this);

var courseId = 'a/b/c';
CourseSearchFactory(courseId);
spyOn(Backbone.history, 'navigate');
this.$contentElement = $('#content');
this.$contentElement = $('#course-content');
this.$searchResults = $('#courseware-search-results');
});

Expand All @@ -700,20 +700,15 @@ define([

beforeEach(function () {
loadFixtures('js/fixtures/search/dashboard_search_form.html');
// appendSetFixtures(
// '<section id="dashboard-search-results"></section>' +
// '<section id="my-courses"></section>'
// );
appendSetFixtures(
'<section id="dashboard-search-results"></section>' +
'<section id="content"></section>'
'<section id="my-courses"></section>'
);
loadTemplates.call(this);
DashboardSearchFactory();

spyOn(Backbone.history, 'navigate');
// this.$contentElement = $('#my-courses');
this.$contentElement = $('#content');
this.$contentElement = $('#my-courses');
this.$searchResults = $('#dashboard-search-results');
});

Expand Down
2 changes: 2 additions & 0 deletions lms/templates/courseware/courseware-chromeless.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<%static:css group='style-student-notes'/>
% endif

<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>

<%include file="../discussion/_js_head_dependencies.html" />
${fragment.head_html()}
</%block>
Expand Down
2 changes: 2 additions & 0 deletions lms/templates/courseware/courseware.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
<%static:css group='style-student-notes'/>
% endif

<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>

<%include file="../discussion/_js_head_dependencies.html" />
${fragment.head_html()}
</%block>
Expand Down
3 changes: 2 additions & 1 deletion lms/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

<%block name="pagetitle">${_("Dashboard")}</%block>
<%block name="bodyclass">view-dashboard is-authenticated</%block>
<%block name="nav_skip">#my-courses</%block>

<%block name="header_extras">
% for template_name in ["donation"]:
Expand Down Expand Up @@ -74,7 +75,7 @@
</div>

<section class="container dashboard" id="dashboard-main">
<section class="my-courses" id="my-content">
<section class="my-courses" id="my-courses">
<header class="wrapper-header-courses">
<h2 class="header-courses">${_("My Courses")}</h2>
</header>
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
% if not disable_window_wrap:
<div class="window-wrap" dir="${static.dir_rtl()}">
% endif
<a class="nav-skip" href="#content">${_("Skip to main content")}</a>
<a class="nav-skip" href="<%block name="nav_skip">#content</%block>">${_("Skip to main content")}</a>

% if not disable_header:
<%include file="${header_file}" />
Expand Down
2 changes: 1 addition & 1 deletion lms/templates/main_django.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<body class="{% block bodyclass %}{% endblock %} lang_{{LANGUAGE_CODE}}">
<div class="window-wrap" dir="${static.dir_rtl()}">
<a class="nav-skip" href="#content">{% trans "Skip to main content" %}</a>
<a class="nav-skip" href="{% block nav_skip %}#content{% endblock %}">{% trans "Skip to main content" %}</a>
{% with course=request.course %}
{% if IS_EDX_DOMAIN %}
{% include "navigation-edx.html" %}
Expand Down
1 change: 1 addition & 0 deletions lms/templates/ux/reference/teams-base.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ <h2><span class="provider">PlantsX:</span> GAR_123 Wild Life</h2>
<%block name="headextra">
<%static:css group='style-course-vendor'/>
<%static:css group='style-course'/>
<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>
</%block>

<%block name="js_extra">
Expand Down
1 change: 1 addition & 0 deletions lms/templates/ux/reference/teams-create.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ <h2><span class="provider">PlantsX:</span> GAR_123 Wild Life</h2>
<%block name="headextra">
<%static:css group='style-course-vendor'/>
<%static:css group='style-course'/>
<%block name="nav_skip">${"#seq_content" if section_title else "#course-content"}</%block>
</%block>

<%block name="js_extra">
Expand Down

0 comments on commit 3e9eee9

Please sign in to comment.