summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/views/new_workout_view.js.coffee
blob: 026e91573261e75160255e989b3fffafab643e35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class Stronglifters.NewWorkoutView extends Stronglifters.Autoview
  @viewName "new-workout-view"

  initialize: (options) ->
    @$el.find('div[name]').each (index, fieldset) ->
      view = new Stronglifters.NewSetView
        el: $(fieldset)

class Stronglifters.NewSetView extends Backbone.View
  events:
    'click .skip': 'removeSet'

  removeSet: (event) ->
    event.preventDefault()
    @remove()