Switch Template to use builder. Wire outlets in Template.

This commit is contained in:
Nathan Sobo
2011-12-27 18:21:00 -06:00
parent 43ddb6b16a
commit 08c1d33836
4 changed files with 45 additions and 28 deletions

View File

@@ -25,12 +25,7 @@ class Builder
_.map(@document, (x) -> x.toHtml()).join('')
toFragment: ->
fragment = $(@toHtml())
fragment.find('[outlet]').each ->
elt = $(this)
outletName = elt.attr('outlet')
fragment[outletName] = elt
fragment
$(@toHtml())
tag: (name, args...) ->
options = @extractOptions(args)