<fim-prefix><fim-middle>t expandtab sw=4 ts=4 sts=4: */
/**
 * @fileoverview   events handling from normalization page
 * @name            normalization
 *
 * @requires    jQuery
 */

/**
 * AJAX scripts for normalization.ph<fix-suffix>p
 *
 */

var normalizeto = '1nf';
var primary_key;
var data_parsed = null;
function appendHtmlColumnsList()
{
    $.get(
        "normalization.php",
        {
            "token": PMA_commonParams.get('token'),
            "ajax_request": true,
            "db": PMA_commonParams.get('db'),
            "table": PMA_commonParams.get('table'),
            "getColumns": true
        },
        function(data) {
            if (data.success === true) {
                $('select[name=makeAtomic]').html(data.message);
            }
        }
    );
}
function goTo3NFStep1(newTables)
{
    if (Object.keys(newTables).length === 1) {
        newTables = [PMA_commonParams.get('table')];
    }
    $.post(
        "normalization.php",
        {
            "token": PMA_commonParams.get('token'),
            "ajax_request": true,
            "db": PMA_commonParams.get('db'),
            "tables": newTables,
            "step": '3.1'
        }, function(data) {
            $("#page_content").find("h3").html(PMA_messages.str3NFNormalization);
            $("#mainContent").find("legend").html(data.legendText);
            $("#mainContent").find("h4").html(data.headText);
            $("#mainContent").find("p").html(data.subText);
            $("#mainContent").find("#extra").html(data.extra);
            $("#extra").find("form").each(function() {
                var form_id = $(this).attr('id');
                var colname = $(this).data('colname');
                $("#" + form_id + " input[v<|endoftext|>