<commit_before>var cdb = require('cartodb.js');
var TypeGuessingTogglerView = require('../../create/footer/type_guessing_toggler_view');

/**
 * Footer view for the add layer modal.
 */
module.exports = cdb.core.View.extend({

  initialize: function() {
    this.elder('initialize');
    this._template = cdb.templates.getTemplate('new_common/dialogs/map/add_layer/footer');
    this._typeGuessingTogglerView = new TypeGuessingTogglerView({
      model: this.model
    });
    this._initBinds();
  },

  // implements cdb.ui.common.Dialog.prototype.render
  render: function() {
    this.clearSubViews();

    this.$el.html(
      this._template({
        canUpload: this.model.canUpload(),
        listing: this.model.get('listing')
      })
    );

    this.$('.js-footer-info').append(this._typeGuessingTogglerView.render().$el);

    return this;
  },<commit_msg>Add subview's DOM before injecting to document<commit_after>var $ = require('jquery');
var cdb = require('cartodb.js');
var TypeGuessingTogglerView = require('../../create/footer/type_guessing_toggler_view');

/**
 * Footer view for the add layer modal.
 */
module.exports = cdb.core.View.extend({

  initialize: function() {
    this.elder('initialize');
    this._template = cdb.templates.getTemplate('new_common/dialogs/map/add_layer/footer');
    this._typeGuessingTogglerView = new TypeGuessingTogglerView({
      model: this.model
    });
    this._initBinds();
  },

  // implements cdb.ui.common.Dialog.prototype.render
  render: function() {
    this.clearSubViews();

    var $el = $(
      this._template({
        canUpload: this.model.canUpload(),
        listing: this.model.get('listing')
      })
    );
    $el.find('.js-footer-info').append(this._typeGuessingTogglerView.render().el);
    this.$el.html($el);

    return this;
  },
{'fraction_non_alphanumeric': 0.15859030837004406, 'fraction_numerical': 0.0, 'mean_word_length': 3.4101941747572817, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4672971', 'n_tokens_mistral': 602, 'n_tokens_neox': 576, 'n_words': 90}