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
c8964b80
Commit
c8964b80
authored
Sep 29, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create jsloader.coffee
parent
7750bb47
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
common/lib/xmodule/xmodule/html_module.py
+4
-1
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+1
-0
common/lib/xmodule/xmodule/js/src/html/display.coffee
+4
-4
common/lib/xmodule/xmodule/js/src/jsloader.coffee
+3
-0
No files found.
common/lib/xmodule/xmodule/html_module.py
View file @
c8964b80
...
...
@@ -17,7 +17,10 @@ log = logging.getLogger("mitx.courseware")
class
HtmlModule
(
XModule
):
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/html/display.coffee'
)]}
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/src/jsloader.coffee'
),
resource_string
(
__name__
,
'js/src/html/display.coffee'
)
]
}
js_module_name
=
"HTMLModule"
def
get_html
(
self
):
...
...
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
c8964b80
...
...
@@ -27,6 +27,7 @@ class @Problem
@
$
(
'section.action input.save'
).
click
@
save
# Collapsibles
JavascriptLoader
.
setCollapsibles
()
@
$
(
'.longform'
).
hide
();
@
$
(
'.shortform'
).
append
(
'<a href="#" class="full">See full output</a>'
);
@
$
(
'.collapsible section'
).
hide
();
...
...
common/lib/xmodule/xmodule/js/src/html/display.coffee
View file @
c8964b80
class
@
HTMLModule
constructor
:
(
@
element
)
->
@
el
=
$
(
@
element
)
@
setCollapsibles
()
@
el
=
$
(
@
element
)
JavascriptLoader
.
setCollapsibles
()
@
setCollapsibles
()
$
:
(
selector
)
->
$
(
selector
,
@
el
)
...
...
@@ -23,4 +24,4 @@ class @HTMLModule
toggleHint
:
(
event
)
=>
event
.
preventDefault
()
$
(
event
.
target
).
parent
().
siblings
().
slideToggle
()
$
(
event
.
target
).
parent
().
parent
().
toggleClass
(
'open'
)
\ No newline at end of file
$
(
event
.
target
).
parent
().
parent
().
toggleClass
(
'open'
)
common/lib/xmodule/xmodule/js/src/jsloader.coffee
0 → 100644
View file @
c8964b80
class
@
JavascriptLoader
@
setCollapsibles
:
->
console
.
log
(
'setCollapsibles!'
)
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