<commit_before>class AppsListItemView extends KDListItemView

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

    options.type = "appstore"

    super options, data

    @thumbnail = new KDView
      cssClass : 'thumbnail'
      partial  : "<span class='logo'>#{data.name[0]}</span>"

    @thumbnail.setCss 'backgroundColor', KD.utils.getColorFromString data.name
    @setClass "waits-approve"  unless @getData().approved

    @runButton = new KDButtonView
      cssClass : 'run'
      title    : 'run'
      callback : =>
        KodingAppsController.runExternalApp @getData()
        KD.mixpanel "App run, click"

  viewAppended:->
    @setTemplate @pistachio()
    @template.update()

  pistachio:->
    """
    <figure>
      {{> @thumbnail}}
    </figure>
    <div class="appmeta clearfix">
      <h3><a href="/#{@getData().slug}">#{@getData().name}</a></h3>
      <h4>{{#(manifest.author)}}</h4>
      <div class="appdetails">
        <article>{{@utils.shortenText #(manifest.description)}}</article>
      </div>
    </div>
    <div class='bottom'>
      {{> @runButton}}
    </div>
    """<commit_msg>Apps: AppsListItemView: Override the render method to render  correctly when the JNewApp updated<commit_after>class AppsListItemView extends KDListItemView

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

    options.type = "appstore"

    super options, data

    @thumbnail = new KDView
      cssClass : 'thumbnail'
      partial  : "<span class='logo'>#{data.name[0]}</span>"

    @thumbnail.setCss 'backgroundColor', KD.utils.getColorFromString data.name
    @setClass "waits-approve"  unless @getData().approved

    @runButton = new KDButtonView
      cssClass : 'run'
      title    : 'run'
      callback : =>
        KodingAppsController.runExternalApp @getData()
        KD.mixpanel "App run, click"

  # Override KDView::render since I'm updating all the manifest at once ~ GG
  render:-> @template.update()

  viewAppended: JView::viewAppended

  pistachio:->
    """
      <figure>
        {{> @thumbnail}}
      </figure>
      <div class="appmeta clearfix">
        <h3><a href="/#{@getData().slug}">#{@getData().name}</a></h3>
        <h4>{{#(manifest.author)}}</h4>
        <div class="appdetails">
          <article>{{@utils.shortenText #(manifest.description)}}</article>
        </div>
      </div>
      <div class='bottom'>
        {{> @runButton}}
      </div>
    """
{'fraction_non_alphanumeric': 0.16302521008403362, 'fraction_numerical': 0.004201680672268907, 'mean_word_length': 2.8968903436988542, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 51, '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': '3131009', 'n_tokens_mistral': 787, 'n_tokens_neox': 758, 'n_words': 153}