var Pessoa=Class.create(ContentControler.prototype,
{
init:function(template,element,data){
this.sup(template,element,data,"init");
this.type="Pessoa";
},
getSupportParameters:function(){
var p={},
planos=["bronze","prata","ouro"];
p.Plano=this.data.Plano.Id==0
?1
:this.data.Plano.Id;
p.Plano=planos[p.Plano-1];
if(this.data._index!=null)
r.Numero=this.data._index+1;
p.Cidade='';
p.Sigla='';
p.PerfilUrl=PERFIL_URL+this.data.Id;
if(this.data.Enderecos!=null){
if(this.data.Enderecos.length>0){
p.Cidade=this.data.Enderecos[0].Cidade;
if(this.data.Enderecos[0].UF!=null){
p.Sigla=this.data.Enderecos[0].UF.Sigla;
}
}
}
p.FotoUrl=(this.data.Foto==null)
?window["FOTO_PERFIL_SEM_FOTO_MEDIA_"+this.data.Sexo]
:window.FOTO_URL_MEDIA.replace('${Foto}',this.data.Foto);
return p;
}
});
var Pessoas=Class.create(ContentList.prototype,
{
initProperties:function(template,element,externalInterface,data)
{
this.sup(template,element,externalInterface,data,"initProperties");
this.type="Pessoas";
this.hasMany=Pessoa;
},
montar:function()
{
this.sup("montar");
this.montarExternalInterface();
var content=$("#content"),
citizen=$("div.citizen",content),
ul=$("ul.listWrapper",content);
citizen.length
&&self.ulResize(citizen,ul);
},
montarExternalInterface:function()
{
this.externalInterface!=null&&this.externalInterface.TotalGeral!=null
&&this.externalInterface.TotalGeral.text(this.data.Total);
}
});
