46dbe672 by Adam Heath

Find the binder when parsing the attribute value expression; this isn't

useful yet; later commits will then be able to inspect the binder for
various features.
1 parent f1a9565d
...@@ -33,7 +33,10 @@ class Rivets.Binding ...@@ -33,7 +33,10 @@ class Rivets.Binding
33 constructor: (@el, @type, @model, @keypath, options) -> 33 constructor: (@el, @type, @model, @keypath, options) ->
34 @options = (options ||= {}) 34 @options = (options ||= {})
35 35
36 [@binder, @args] = findBinder(type) 36 [@binder, @args] = if options.binder
37 [options.binder, options.args]
38 else
39 findBinder type
37 @formatters = options.formatters || [] 40 @formatters = options.formatters || []
38 41
39 # Applies all the current formatters to the supplied value and returns the 42 # Applies all the current formatters to the supplied value and returns the
...@@ -184,6 +187,7 @@ defaultExpressionParser = (view, node, type, models, value) -> ...@@ -184,6 +187,7 @@ defaultExpressionParser = (view, node, type, models, value) ->
184 bypass: path.indexOf(':') != -1 187 bypass: path.indexOf(':') != -1
185 bindContext: models 188 bindContext: models
186 parsingSupport = Rivets.config.adapter.parsingSupport 189 parsingSupport = Rivets.config.adapter.parsingSupport
190 [options.binder, options.args] = findBinder type
187 firstPart = if parsingSupport 191 firstPart = if parsingSupport
188 splitPath[0] 192 splitPath[0]
189 else 193 else
......