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
cbd602b4
Commit
cbd602b4
authored
Sep 29, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving toggle code. wip
parent
c8964b80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
18 deletions
+24
-18
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+0
-16
common/lib/xmodule/xmodule/js/src/jsloader.coffee
+24
-2
No files found.
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
cbd602b4
...
...
@@ -28,11 +28,6 @@ class @Problem
# Collapsibles
JavascriptLoader
.
setCollapsibles
()
@
$
(
'.longform'
).
hide
();
@
$
(
'.shortform'
).
append
(
'<a href="#" class="full">See full output</a>'
);
@
$
(
'.collapsible section'
).
hide
();
@
$
(
'.full'
).
click
@
toggleFull
@
$
(
'.collapsible header a'
).
click
@
toggleHint
# Dynamath
@
$
(
'input.math'
).
keyup
(
@
refreshMath
)
...
...
@@ -341,17 +336,6 @@ class @Problem
element
.
CodeMirror
.
save
()
if
element
.
CodeMirror
.
save
@
answers
=
@
inputs
.
serialize
()
toggleFull
:
(
event
)
=>
$
(
event
.
target
).
parent
().
siblings
().
slideToggle
()
$
(
event
.
target
).
parent
().
parent
().
toggleClass
(
'open'
)
text
=
$
(
event
.
target
).
text
()
==
'See full output'
?
'Hide output'
:
'See full output'
$
(
this
).
text
(
text
)
toggleHint
:
(
event
)
=>
event
.
preventDefault
()
$
(
event
.
target
).
parent
().
siblings
().
slideToggle
()
$
(
event
.
target
).
parent
().
parent
().
toggleClass
(
'open'
)
inputtypeSetupMethods
:
'text-input-dynamath'
:
(
element
)
=>
...
...
common/lib/xmodule/xmodule/js/src/jsloader.coffee
View file @
cbd602b4
class
@
JavascriptLoader
@
setCollapsibles
:
->
console
.
log
(
'setCollapsibles!'
)
###
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
()
@
toggleFull
:
(
event
)
=>
$
(
event
.
target
).
parent
().
siblings
().
slideToggle
()
$
(
event
.
target
).
parent
().
parent
().
toggleClass
(
'open'
)
text
=
$
(
event
.
target
).
text
()
==
'See full output'
?
'Hide output'
:
'See full output'
$
(
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