updated to v2

This commit is contained in:
Tony Tam
2012-07-11 09:57:27 -07:00
parent a2c1c18f75
commit d2eb882e52
278 changed files with 46216 additions and 11130 deletions

View File

@@ -0,0 +1,14 @@
class ResourceView extends Backbone.View
initialize: ->
render: ->
$(@el).html(Handlebars.templates.resource(@model))
# Render each operation
@addOperation operation for operation in @model.operationsArray
@
addOperation: (operation) ->
# Render an operation and add it to operations li
operationView = new OperationView({model: operation, tagName: 'li', className: 'endpoint'})
$('.endpoints', $(@el)).append operationView.render().el