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
77af8604
Commit
77af8604
authored
Sep 29, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Begin transplant of executeProblemScripts
parent
8956e5bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
5 deletions
+25
-5
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+8
-0
common/lib/xmodule/xmodule/js/src/jsloader.coffee
+17
-5
No files found.
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
77af8604
...
@@ -77,6 +77,10 @@ class @Problem
...
@@ -77,6 +77,10 @@ class @Problem
render
:
(
content
)
->
render
:
(
content
)
->
if
content
if
content
@
el
.
html
(
content
)
@
el
.
html
(
content
)
JavascriptLoader
.
executeModuleScripts
@
el
,
()
=>
@
setupInputTypes
()
@
bind
()
@
queueing
()
@
executeProblemScripts
()
=>
@
executeProblemScripts
()
=>
@
setupInputTypes
()
@
setupInputTypes
()
@
bind
()
@
bind
()
...
@@ -84,6 +88,10 @@ class @Problem
...
@@ -84,6 +88,10 @@ class @Problem
else
else
$
.
postWithPrefix
"
#{
@
url
}
/problem_get"
,
(
response
)
=>
$
.
postWithPrefix
"
#{
@
url
}
/problem_get"
,
(
response
)
=>
@
el
.
html
(
response
.
html
)
@
el
.
html
(
response
.
html
)
JavascriptLoader
.
executeModuleScripts
@
el
,
()
=>
@
setupInputTypes
()
@
bind
()
@
queueing
()
@
executeProblemScripts
()
=>
@
executeProblemScripts
()
=>
@
setupInputTypes
()
@
setupInputTypes
()
@
bind
()
@
bind
()
...
...
common/lib/xmodule/xmodule/js/src/jsloader.coffee
View file @
77af8604
class
@
JavascriptLoader
class
@
JavascriptLoader
###
Set of library functions that provide common interface for javascript loading
# Set of library functions that provide common interface for javascript loading
for all module types. All functionality provided by JavascriptLoader should take
# for all module types. All functionality provided by JavascriptLoader should take
place at module scope, i.e. don't run jQuery over entire page
# place at module scope, i.e. don't run jQuery over entire page
###
# executeModuleScripts:
# Scan module contents for "script_placeholder"s, then:
# 1) Fetch each script from server
# 2) Explicitly attach the script to the <head> of document
# 3) Explicitly wait for each script to be loaded
# 4) Return to callback function when all scripts loaded
@
executeModuleScripts
:
(
el
,
callback
=
null
)
->
console
.
log
(
'executeModuleScripts'
)
# setCollapsibles:
# Scan module contents for generic collapsible containers
@
setCollapsibles
:
(
el
)
=>
@
setCollapsibles
:
(
el
)
=>
###
###
el: jQuery object representing xmodule
el: jQuery object representing xmodule
...
...
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