025d1b0a by Adam Heath

Add a rivets_index data value that mirrors ${object_name}_index; this

allows for general-purpose functions to always look at the former.  It
makes data-class-even="workers:isEven" possible.
1 parent c4816f9a
...@@ -399,7 +399,7 @@ Rivets.binders = ...@@ -399,7 +399,7 @@ Rivets.binders =
399 data = {} 399 data = {}
400 data[n] = m for n, m of @view.models 400 data[n] = m for n, m of @view.models
401 data[@args[0]] = item 401 data[@args[0]] = item
402 data["#{@args[0]}_index"] = i 402 data["#{@args[0]}_index"] = data['rivets_index'] = i
403 itemEl = el.cloneNode true 403 itemEl = el.cloneNode true
404 if iterated.length > 0 404 if iterated.length > 0
405 previous = iterated[iterated.length - 1].els[0] 405 previous = iterated[iterated.length - 1].els[0]
......