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
ba1a5aab
Commit
ba1a5aab
authored
May 10, 2012
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused JavaScript on the page bottom
parent
65ab3c05
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
templates/coffee/src/modules/sequence.coffee
+5
-1
templates/courseware.html
+2
-4
templates/main.html
+0
-2
No files found.
templates/coffee/src/modules/sequence.coffee
View file @
ba1a5aab
...
...
@@ -11,9 +11,10 @@ class @Sequence
bind
:
->
@
element
.
bind
'contentChanged'
,
@
toggleArrows
@
$
(
'#sequence-list a'
).
click
@
goto
@
$
(
'.sequence-nav li a'
).
hover
@
navHover
buildNavigation
:
->
$
.
each
@
elements
,
(
index
,
item
)
-
>
$
.
each
@
elements
,
(
index
,
item
)
=
>
link
=
$
(
'<a>'
).
attr
class
:
"seq_
#{
item
.
type
}
_inactive"
,
'data-element'
:
index
+
1
title
=
$
(
'<p>'
).
html
(
item
.
title
)
list_item
=
$
(
'<li>'
).
append
(
link
.
append
(
title
))
...
...
@@ -45,6 +46,9 @@ class @Sequence
@
position
=
new_position
@
element
.
trigger
'contentChanged'
navHover
:
(
event
)
=>
$
(
event
.
target
).
siblings
().
toggleClass
(
"shown"
)
goto
:
(
event
)
=>
event
.
preventDefault
()
new_position
=
$
(
event
.
target
).
data
(
'element'
)
...
...
templates/courseware.html
View file @
ba1a5aab
...
...
@@ -7,12 +7,10 @@
</
%
block>
<
%
block
name=
"js_extra"
>
##Is there a reason this isn't in header_extra? Is it important that the javascript is at the bottom of the generated document?
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
<script
type=
"text/javascript"
>
$
(
function
()
{
$
{
init
}
});
document
.
write
(
'
\
x3Cscript type="text/javascript" src="'
+
document
.
location
.
protocol
+
'//www.youtube.com/player_api">
\
x3C/script>'
);
</script>
</
%
block>
...
...
templates/main.html
View file @
ba1a5aab
...
...
@@ -113,7 +113,6 @@
<script
type=
"text/javascript"
src=
"${static.url('js/jquery.leanModal.min.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/jquery.qtip.min.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/jquery.cookie.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/video_player.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/schematic.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/cktsim.js')}"
></script>
<script
type=
"text/javascript"
src=
"${static.url('js/jquery.scrollTo-1.4.2-min.js')}"
></script>
...
...
@@ -121,7 +120,6 @@
document
.
write
(
'
\
x3Cscript type="text/javascript" src="'
+
document
.
location
.
protocol
+
'//www.youtube.com/player_api">
\
x3C/script>'
);
</script>
<
%
block
name=
"js_extra"
/>
</body>
</html>
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