<commit_before>import _ from 'underscore';
import $ from 'jquery';

export default function() {
  var template = $($('#template').html());
  var select = $('table td').eq(0);
  select.append(template);

  var saveButtonTemplate = $($('#save-button-template').html());
  var btnSubmit = $('#btnSubmit');
  saveButtonTemplate.insertBefore(btnSubmit);

  var saveButtonTemplate = $($('#new-button-template').html());
  var saveSubmit = $('#saveSubmit');
  saveButtonTemplate.insertBefore(saveSubmit);

  var deleteButtonTemplate = $($('#delete-button-template').html());
  var saveBtn = $('#saveSubmit');
  deleteButtonTemplate.insertBefore(saveBtn);

  var noteTemplate = $($('#note-template').html());
  var headerSelect = $('h1');
  noteTemplate.insertAfter(headerSelect);

  var clearFormTemplate = $($('#clear-form-template').html());
  var clearFormSelector = $('input').eq(0);
  clearFormTemplate.insertAfter(clearFormSelector);

  $('#clear-form').on('click', function(e) {
    // Clear the form by not passing in a report variable to loadFormFields.
    loadFormFields();
  });

  // Bind Field Name input boxes event handler
  var inputs = $('input').filter(function() {
    return this.id.indexOf('tt') !== -1;
  });

  inputs.off('click');
  inputs.on('click', psDialog);
  inputs.css({visibility: 'visible'});

  $('#btnDelete').makeConfReqButton();

  // Load saved user and global list reports.
  var reports = [];

  $.when($.get('/ws/schema/table/U_DEF_AUTOLOADER_LISTS?q=usersdcid==' + psData.userDCID + '&projection=*'), $.get('/ws/schema/table/U_DEF_GLOBAL_LISTS?projection=*')).done(function(userReportsData, globalReportsData) {
    var autoloaderTableName = userReportsData[0]['name'].toLowerCase();
    var userReports = userReportsData[0]['record'];
<commit_msg>Don't show the fields pop-up when a user clicks on the field name input<commit_after>import _ from 'underscore';
import $ from 'jquery';

export default function() {
  var template = $($('#template').html());
  var select = $('table td').eq(0);
  select.append(template);

  var saveButtonTemplate = $($('#save-button-template').html());
  var btnSubmit = $('#btnSubmit');
  saveButtonTemplate.insertBefore(btnSubmit);

  var newButtonTemplate = $($('#new-button-template').html());
  var saveSubmit = $('#saveSubmit');
  newButtonTemplate.insertBefore(saveSubmit);

  var deleteButtonTemplate = $($('#delete-button-template').html());
  var saveBtn = $('#saveSubmit');
  deleteButtonTemplate.insertBefore(saveBtn);

  var noteTemplate = $($('#note-template').html());
  var headerSelect = $('h1');
  noteTemplate.insertAfter(headerSelect);

  var clearFormTemplate = $($('#clear-form-template').html());
  var clearFormSelector = $('input').eq(0);
  clearFormTemplate.insertAfter(clearFormSelector);

  $('#clear-form').on('click', function(e) {
    // Clear the form by not passing in a report variable to loadFormFields.
    loadFormFields();
  });

  // Bind Field Name input boxes event handler
  var inputs = $('input').filter(function() {
    return this.id.indexOf('tt') !== -1;
  });

  inputs.off('click');
  inputs.css({visibility: 'visible'});

  $('#btnDelete').makeConfReqButton();

  // Load saved user and global list reports.
  var reports = [];

  $.when($.get('/ws/schema/table/U_DEF_AUTOLOADER_LISTS?q=usersdcid==' + psData.userDCID + '&projection=*'), $.get('/ws/schema/table/U_DEF_GLOBAL_LISTS?projection=*')).done(function(userReportsData, globalReportsData) {
    var autoloaderTableName = userReportsData[0]['name'].toLowerCase();
    var userReports = userReportsData[0]['record'];

{'fraction_non_alphanumeric': 0.18569042316258352, 'fraction_numerical': 0.0033407572383073497, 'mean_word_length': 5.216262975778546, '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': '6435423', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1079, 'n_words': 223}