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
65b3f583
Commit
65b3f583
authored
Sep 29, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jsloader works at module-level
parent
cbd602b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+1
-1
common/lib/xmodule/xmodule/js/src/jsloader.coffee
+9
-9
No files found.
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
65b3f583
...
...
@@ -27,7 +27,7 @@ class @Problem
@
$
(
'section.action input.save'
).
click
@
save
# Collapsibles
JavascriptLoader
.
setCollapsibles
()
JavascriptLoader
.
setCollapsibles
(
@
el
)
# Dynamath
@
$
(
'input.math'
).
keyup
(
@
refreshMath
)
...
...
common/lib/xmodule/xmodule/js/src/jsloader.coffee
View file @
65b3f583
...
...
@@ -3,14 +3,15 @@ class @JavascriptLoader
Set of library functions that provide common interface for javascript loading
for all module types
###
@
setCollapsibles
:
()
=>
console
.
log
(
$
(
'.collapsible section'
))
$
(
'.longform'
).
hide
();
$
(
'.shortform'
).
append
(
'<a href="#" class="full">See full output</a>'
);
$
(
'.collapsible section'
).
hide
();
$
(
'.full'
).
click
@
toggleFull
$
(
'.collapsible header a'
).
click
@
toggleHint
@
toggleHint
()
@
setCollapsibles
:
(
el
)
=>
###
el: jQuery object representing xmodule
###
el
.
find
(
'.longform'
).
hide
();
el
.
find
(
'.shortform'
).
append
(
'<a href="#" class="full">See full output</a>'
);
el
.
find
(
'.collapsible section'
).
hide
();
el
.
find
(
'.full'
).
click
@
toggleFull
el
.
find
(
'.collapsible header a'
).
click
@
toggleHint
@
toggleFull
:
(
event
)
=>
$
(
event
.
target
).
parent
().
siblings
().
slideToggle
()
...
...
@@ -19,7 +20,6 @@ class @JavascriptLoader
$
(
this
).
text
(
text
)
@
toggleHint
:
(
event
)
=>
console
.
log
(
'toggleHint'
)
event
.
preventDefault
()
$
(
event
.
target
).
parent
().
siblings
().
slideToggle
()
$
(
event
.
target
).
parent
().
parent
().
toggleClass
(
'open'
)
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