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
0b8058d8
Commit
0b8058d8
authored
Oct 17, 2013
by
Giulio Gratta
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1377 from edx/giulio/ICE-undo
Tweaking ICE undo feature
parents
e53c1f5f
db802fb5
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 @
0b8058d8
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
=
$
(
@
).
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