function createMenu()
{
var content = '
';
content += '
';
content += '
';
$('content_id_0').innerHTML = content;
}
function listOrganizations()
{
var listOrganizationsResult = function(data)
{
var tmp = $('organizationList');
if (tmp)
tmp.parentNode.removeChild(tmp);
for (var i = 0; i < data.length; i++)
{
data[i]['nome'] = '' + data[i]['nome'] + '';
data[i]['tr_attributes'] = new Array();
data[i]['tr_attributes']['class'] = "linha" + i%2;;
data[i]['tr_attributes']['className'] = "linha" + i%2;;
}
var tableHeader = new Array();
tableHeader['nome'] = 'Organização';
tableHeader['descricao'] = 'Descrição';
var tableAtributes = new Array();
tableAtributes['id'] = "organizationList";
tableAtributes['class'] = 'organizationList';
tableAtributes['className'] = 'organizationList';
var table = $('organizationList');
if (table)
table.parentNode.removeChild(table);
$('content_id_0').appendChild(constructTable(tableHeader, data, tableAtributes));
};
objOrganization.list(listOrganizationsResult, {});
}
function loadAddOrganizationUI()
{
var valoresSimNao = new Array();
valoresSimNao['S'] = 'Sim';
valoresSimNao['N'] = 'Não';
var content;
content = 'Adicionar Organização
';
content += '';
content += '';
content += '';
var divLB = $('lbContent');
divLB.innerHTML = content;
$('nome').focus();
objOrganization.generateUpdateTable({}, divLB);
}
function clickLoadOrganization(link, organizationID)
{
if ($('orgchartMenu_' + organizationID))
return;
refreshAreas[organizationID] = null;
refreshEmployees[organizationID] = null;
var border_id = create_border(link.innerHTML);
var divNewOrganization = $('content_id_' + border_id);
createOrganizationLayout(organizationID, divNewOrganization);
}