$(function()
{
    var maxDropHeight = 125;
    $('#dataform .table-form > tbody > tr > th').css('width', thWidth);
    $('.picker-column-type').picker(
    {
        onUpdateSelectOption: function($option, picker)
        {
            var text = $option.text();
            var val = $option.val();
            if (!text.length && !val.length) {
                return;
            }
            var options = picker.options;
            var item = {};

            if(/:[FISD]$/.test(text))
            {
                var strArr = text.split(':');
                text = strArr[0];
                item.dtype = strArr[1];
            }

            item[options.valueKey] = val;
            item[options.textKey] = text;
            item[options.keysKey] = $option.data(options.keysKey);
            return item;
        },
        optionRender: function($option, item)
        {
            $option.attr('data-dtype', item.dtype);
        },
        selectionTextRender: function($selection, text, item)
        {
            $selection.text(text).attr('data-dtype', item.dtype);
        },
        maxDropHeight: maxDropHeight
    });
    $('#col').picker({'maxDropHeight': maxDropHeight});
    $('#resultCol').picker({'maxDropHeight': maxDropHeight});
});
