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
3136d2b4
Commit
3136d2b4
authored
Feb 04, 2013
by
Arthur Barrett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed target used for span event.
parent
435fd05e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
common/lib/xmodule/xmodule/js/src/annotatable/display.coffee
+12
-7
No files found.
common/lib/xmodule/xmodule/js/src/annotatable/display.coffee
View file @
3136d2b4
...
...
@@ -32,15 +32,17 @@ class @Annotatable
onSpanEvent
:
(
fn
)
->
(
e
)
=>
span_id
=
e
.
target
.
getAttribute
(
'data-span-id'
)
span_el
=
e
.
currentTarget
span_id
=
span_el
.
getAttribute
(
'data-span-id'
)
discussion_id
=
@
getDiscussionId
(
span_id
)
discussion_el
=
@
getDiscussionEl
(
discussion_id
)
span
=
{
id
:
span_id
,
el
:
e
.
target
id
:
span_id
el
:
span_el
}
discussion
=
{
id
:
discussion_id
,
el
:
@
getDiscussionEl
(
discussion_id
)
id
:
discussion_id
el
:
discussion_el
}
fn
.
call
this
,
span
,
discussion
...
...
@@ -48,10 +50,13 @@ class @Annotatable
@
scrollToDiscussion
(
discussion
.
el
)
onEnterSpan
:
(
span
,
discussion
)
->
$
(
@
discussionSelector
,
@
el
).
not
(
discussion
.
el
).
toggleClass
(
'opaque'
,
true
)
@
focusDiscussion
(
discussion
.
el
,
true
)
onLeaveSpan
:
(
span
,
discussion
)
->
$
(
@
discussionSelector
,
@
el
).
not
(
discussion
.
el
).
toggleClass
(
'opaque'
,
false
)
@
focusDiscussion
(
discussion
.
el
,
false
)
focusDiscussion
:
(
el
,
state
)
->
$
(
@
discussionSelector
,
@
el
).
not
(
el
).
toggleClass
(
'opaque'
,
state
)
scrollToDiscussion
:
(
el
)
->
complete
=
@
makeHighlighter
(
el
)
...
...
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