Created
June 19, 2013 07:08
-
-
Save anathematic/5812216 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ACC.Views.EssentialsAssessment.Index extends Backbone.View | |
template : JST['programs/essentials_assessments/index'] | |
events : => | |
"click [role=next]" : "goToX" | |
initialize : => | |
@model.Videos.on 'reset', @loadViews | |
render : => | |
$(@el).html(@template(@model.EssentialsAssessment.first().toJSON())) | |
@loadViews() | |
@ | |
loadViews : => | |
console.log($(@el).find("#videoWrapper")) | |
view = new ACC.Views.VideosIndex({model: @model}) | |
$(@el).find("#videoWrapper").html(view.render().el) | |
goToX : (event) => | |
event.preventDefault() | |
href = $(event.currentTarget).attr("href") | |
ACC.Routers.ServiceUser.navigate href, true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment