<commit_before>class SinglePlanView extends KDView

  constructor: (options = {}, data) ->

    options.cssClass = KD.utils.curry 'single-plan', options.cssClass

    super options, data


  viewAppended : ->

    {title, cssClass, planFeatures, monthPrice, yearPrice, description} = @getOptions()

    normalizedPrice = monthPrice / 100

    name = title.toLowerCase()

    @addSubView new KDHeaderView
      type     : 'medium'
      cssClass : 'plan-title'
      title    : "<cite>#{normalizedPrice}</cite>MONTHLY"

    @addSubView new KDCustomHTMLView
      tagName  : 'p'
      cssClass : 'plan-summary'
      partial  : description

    @addSubView featuresContainer = new KDView
      tagName  : 'dl'
      cssClass : 'plan-features'

    for feature in planFeatures
      { cssClass, partial } = feature
      featuresContainer.addSubView new KDView
        cssClass : cssClass
        tagName  : 'dd'
        partial  : partial

    @addSubView new KDButtonView
      style     : 'plan-buy-button'
      title     : 'SELECT'
      callback  : => @emit 'PlanSelected', name, monthPrice, yearPrice


<commit_msg>payment: fix broken event emition<commit_after>class SinglePlanView extends KDView

  constructor: (options = {}, data) ->

    options.cssClass = KD.utils.curry 'single-plan', options.cssClass

    super options, data


  viewAppended : ->

    {title, cssClass, planFeatures, monthPrice, yearPrice, description} = @getOptions()

    normalizedPrice = monthPrice / 100

    @addSubView new KDHeaderView
      type     : 'medium'
      cssClass : 'plan-title'
      title    : "<cite>#{normalizedPrice}</cite>MONTHLY"

    @addSubView new KDCustomHTMLView
      tagName  : 'p'
      cssClass : 'plan-summary'
      partial  : description

    @addSubView featuresContainer = new KDView
      tagName  : 'dl'
      cssClass : 'plan-features'

    for feature in planFeatures
      { cssClass, partial } = feature
      featuresContainer.addSubView new KDView
        cssClass : cssClass
        tagName  : 'dd'
        partial  : partial

    @addSubView new KDButtonView
      style     : 'plan-buy-button'
      title     : 'SELECT'
      state     : { name, monthPrice, yearPrice }
      callback  : =>
        { title, monthPrice, yearPrice } = @getOptions()
        name = title.toLowerCase()
        @emit 'PlanSelected', name, monthPrice, yearPrice



{'fraction_non_alphanumeric': 0.09595959595959595, 'fraction_numerical': 0.0025252525252525255, 'mean_word_length': 2.569069069069069, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4724267', 'n_tokens_mistral': 722, 'n_tokens_neox': 681, 'n_words': 176}