Commit 021f86a9 by Tom Giannattasio

Merge pull request #669 from MITx/feature/kfiedler/widows

Added widow fix for subtitles too
parents f253186e 2b9268ad
...@@ -119,11 +119,12 @@ section.course-index { ...@@ -119,11 +119,12 @@ section.course-index {
margin-bottom: 0; margin-bottom: 0;
line-height: 1.3; line-height: 1.3;
span.subtitle { &.subtitle {
color: #666; color: #666;
font-size: 13px; font-size: 13px;
font-weight: normal; font-weight: normal;
display: block; display: block;
margin: 0;
} }
} }
......
...@@ -9,11 +9,8 @@ ...@@ -9,11 +9,8 @@
% for section in chapter['sections']: % for section in chapter['sections']:
<li class="${'active' if 'active' in section and section['active'] else ''} ${'graded' if 'graded' in section and section['graded'] else ''}"> <li class="${'active' if 'active' in section and section['active'] else ''} ${'graded' if 'graded' in section and section['graded'] else ''}">
<a href="${reverse('courseware_section', args=[course_id, chapter['url_name'], section['url_name']])}"> <a href="${reverse('courseware_section', args=[course_id, chapter['url_name'], section['url_name']])}">
<p>${section['display_name']} <p>${section['display_name']}</p>
<span class="subtitle"> <p class="subtitle">${section['format']} ${"due " + section['due'] if 'due' in section and section['due'] != '' else ''}</p>
${section['format']} ${"due " + section['due'] if 'due' in section and section['due'] != '' else ''}
</span>
</p>
</a> </a>
</li> </li>
% endfor % endfor
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
var $$course_id = "${course.id}"; var $$course_id = "${course.id}";
$(function(){ $(function(){
$(".ui-accordion-header a").each(function() { $(".ui-accordion-header a, .ui-accordion-content .subtitle").each(function() {
var wordArray = $(this).text().split(" "); var wordArray = $(this).text().split(" ");
var finalTitle = ""; var finalTitle = "";
for (i=0;i<=wordArray.length-1;i++) { for (i=0;i<=wordArray.length-1;i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment