<commit_before>/**
 * Cell used for showing and allowing the editing of an AmountEntry
 *
 * Copyright 2015 <NAME>
 */

var $ = require('jquery'),
    AmountEntryCell = require('./AmountEntryCell');

var EditableAmountCell = AmountEntryCell.extend({
   className: function() {
      return this.model.get('amount').get() === 0 ? 'zero' : '';
   },
   _renderContent: function() {
      var elem = $('<input />').attr({
         type: 'text',
         value: this.model.get('amount').readable()
      });

      return $('<div>').append(elem.clone()).html();
   }
});

module.exports = EditableAmountCell;<commit_msg>Allow EditableAmountCell to use parent's className function<commit_after>/**
 * Cell used for showing and allowing the editing of an AmountEntry
 *
 * Copyright 2015 <NAME>
 */

var $ = require('jquery'),
    AmountEntryCell = require('./AmountEntryCell');

var EditableAmountCell = AmountEntryCell.extend({
   _renderContent: function() {
      var elem = $('<input />').attr({
         type: 'text',
         value: this.model.get('amount').readable()
      });

      return $('<div>').append(elem.clone()).html();
   }
});

module.exports = EditableAmountCell;
{'fraction_non_alphanumeric': 0.17288135593220338, 'fraction_numerical': 0.007627118644067797, 'mean_word_length': 3.406716417910448, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5383815', 'n_tokens_mistral': 354, 'n_tokens_neox': 336, 'n_words': 83}