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
1fad68b5
Commit
1fad68b5
authored
Sep 25, 2013
by
Giulio Gratta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding ICE undo feature
parent
dbfc38df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
common/lib/xmodule/xmodule/js/src/peergrading/track_changes.coffee
+5
-4
No files found.
common/lib/xmodule/xmodule/js/src/peergrading/track_changes.coffee
View file @
1fad68b5
class
@
TrackChanges
reset_button_sel
:
'.reset-changes'
undo_button_sel
:
'.undo-change'
tracked_
elements_sel
:
'span.del,
span.ins'
tracked_
changes_sel
:
'.track-changes span.del, .track-changes
span.ins'
tracked_feedback_sel
:
'.feedback-area.track-changes'
submit_button_sel
:
'.submit-button'
tracker
:
null
...
...
@@ -11,7 +11,7 @@ class @TrackChanges
@
reset_button
=
@
$
(
@
reset_button_sel
)
@
undo_button
=
@
$
(
@
undo_button_sel
)
@
submit_button
=
@
$
(
@
submit_button_sel
)
@
tracked_
elements
=
@
$
(
@
tracked_element
s_sel
)
@
tracked_
changes
=
@
$
(
@
tracked_change
s_sel
)
@
tracked_feedback
=
@
$
(
@
tracked_feedback_sel
)
@
reset_button
.
click
@
reset_changes
...
...
@@ -52,8 +52,9 @@ class @TrackChanges
undo_change
:
(
event
)
=>
event
.
preventDefault
()
keyOfLatestChange
=
0
@
tracked_elements
.
each
->
key
=
parseInt
(
@
attr
(
'data-cid'
))
@
tracked_changes
=
@
$
(
@
tracked_changes_sel
)
@
tracked_changes
.
each
->
key
=
parseInt
(
$
(
@
).
attr
(
'data-cid'
))
if
key
>
keyOfLatestChange
keyOfLatestChange
=
key
@
tracker
.
rejectChange
(
'[data-cid="'
+
keyOfLatestChange
+
'"]'
)
...
...
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