d7965f97 by Michael Richards

Merge branch 'master' into move-formatters-outside-config

2 parents efa6fe0e 5938aeaa
......@@ -122,11 +122,12 @@ class Rivets.View
type = attribute.name.replace bindingRegExp, ''
pipes = (pipe.trim() for pipe in attribute.value.split '|')
context = (ctx.trim() for ctx in pipes.shift().split '>')
path = context.shift().split /(\.|:)/
path = context.shift()
splitPath = path.split /\.|:/
options.formatters = pipes
model = @models[path.shift()]
options.bypass = path.shift() is ':'
keypath = path.join()
model = @models[splitPath.shift()]
options.bypass = path.indexOf(":") != -1
keypath = splitPath.join()
if dependencies = context.shift()
options.dependencies = dependencies.split /\s+/
......@@ -153,17 +154,19 @@ class Rivets.View
bindEvent = (el, event, fn) ->
# Check to see if addEventListener is available.
if window.addEventListener
el.addEventListener event, fn
el.addEventListener event, fn, false
else
# Assume we are in IE and use attachEvent.
event = "on" + event
el.attachEvent event, fn
unbindEvent = (el, event, fn) ->
# Check to see if addEventListener is available.
if window.removeEventListener
el.removeEventListener event, fn
el.removeEventListener event, fn, false
else
# Assume we are in IE and use attachEvent.
event = "on" + event
el.detachEvent event, fn
# Returns the current input value for the specified element.
......