Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
1597bdf4
Commit
1597bdf4
authored
Sep 13, 2012
by
arjun810
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #685 from MITx/kimth/fix-widow-js
Kimth/fix widow js
parents
3164af65
a40e8eae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lms/templates/courseware/courseware.html
+6
-3
No files found.
lms/templates/courseware/courseware.html
View file @
1597bdf4
...
...
@@ -39,19 +39,22 @@
$
(
function
(){
$
(
".ui-accordion-header a, .ui-accordion-content .subtitle"
).
each
(
function
()
{
var
wordArray
=
$
(
this
).
text
().
split
(
" "
);
var
elemText
=
$
(
this
).
text
().
replace
(
/^
\s
+|
\s
+$/g
,
''
);
// Strip leading and trailing whitespace
var
wordArray
=
elemText
.
split
(
" "
);
var
finalTitle
=
""
;
if
(
$
.
isEmptyObject
(
wordArray
)
)
{
if
(
wordArray
.
length
>
0
)
{
for
(
i
=
0
;
i
<=
wordArray
.
length
-
1
;
i
++
)
{
finalTitle
+=
wordArray
[
i
];
if
(
i
==
(
wordArray
.
length
-
2
))
{
finalTitle
+=
" "
;
}
else
if
(
i
==
(
wordArray
.
length
-
1
))
{
// Do nothing
}
else
{
finalTitle
+=
" "
;
}
}
$
(
this
).
html
(
finalTitle
);
}
$
(
this
).
html
(
finalTitle
);
});
});
</script>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment