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 ...@@ -51,12 +51,12 @@ class @TrackChanges
undo_change: (event) => undo_change: (event) =>
event.preventDefault() event.preventDefault()
keyToUndo = 0 keyOfLatestChange = 0
@tracked_elements.each -> @tracked_elements.each ->
key = parseInt(@attr('data-cid')) key = parseInt(@attr('data-cid'))
if key > keyToUndo if key > keyOfLatestChange
keyToUndo = key keyOfLatestChange = key
ICEtracker.rejectChange('[data-cid="'+ keyToUndo + '"]') ICEtracker.rejectChange('[data-cid="'+ keyOfLatestChange + '"]')
stop_tracking_on_submit: () => stop_tracking_on_submit: () =>
@tracker.stopTracking() @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