Commit bbd902f8 by Giulio Gratta

Last Changes before Merge

- Change variable name to make it more clear
parent 68ce6ed1
......@@ -51,12 +51,12 @@ class @TrackChanges
undo_change: (event) =>
event.preventDefault()
keyToUndo = 0
keyOfLatestChange = 0
@tracked_elements.each ->
key = parseInt(@attr('data-cid'))
if key > keyToUndo
keyToUndo = key
ICEtracker.rejectChange('[data-cid="'+ keyToUndo + '"]')
if key > keyOfLatestChange
keyOfLatestChange = key
ICEtracker.rejectChange('[data-cid="'+ keyOfLatestChange + '"]')
stop_tracking_on_submit: () =>
@tracker.stopTracking()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment