window.designerController = 'userdesignerfield.ivp';

function selectAll(radio, cb) {
    cb.removeAttr('checked');
    $('input.permission').each(function(i, e) { $(e).attr('checked', false); });
    radio.each(function(i, e) { $(e).attr('checked', true); });
    return false;
}

function editField(id) {
    var url = id ? 'userfield.ivp/view/' + id : 'userfield.ivp/create';
    openDialog(url, 'field', { width: 800, height: 490 });
    return false;
}

function loadFields(reload) {
    if (reload || !$.trim($('#tableholder').html())) {
        $('#tableholder').load(base + 'userfield.ivp/list', { reset: true }, function() {
            initTable();
        });
    }
    return false;
}