TODO: mostrar hora de saída.
%STARTINCLUDE%
%ADDTOHEAD{text="<style>
#tem-gente .aberto {
  background: #383;
  color: #FFF;
  margin-top: -10px;
  padding: 10px 15px;
  border-radius: 15px;
  border: 8px solid #FFF;
  box-shadow: 2px 2px 15px rgba(0,0,0,0.7);
  font-size: 80%;
}
#tem-gente .aberto strong {
  display: block;
  text-align: center;
  font-size: 300%;
}
#tem-gente .fechado {
  padding: 10px 15px;
  background: rgba(0,0,0,0.1);
  border-radius: 5px;
  border: 2px solid #FFF;
  box-shadow: 1px 1px 5px rgba(0,0,0,0.4);
}
#tem-gente form {
  transition: 2s;
  max-height: 0px;
  overflow: hidden;
}
#tem-gente:hover form {
  transition: 0.8s;
  max-height: 120px;
}
#tem-gente form strong {
  display: block;
}
#tem-gente [type=\"submit\"] {
  display: block;
  width: 100%;
  font-size: 133%;
  font-weight: bold;
  padding: 3px 0;
}
</style>"}%
<script>
%INCLUDE{QuandoFechaJS}%
var genteNaSede = [%FORMATLIST{
  "%INCLUDE{Main.ToDentro}%"
  split="\n"
  pattern="\*\s*([^-\s]+)\s*"
  format="'$percntFORMFIELD{\"FirstName\" topic=\"$1\"}$percnt'"
  separator=", "
  sort="alpha"
  unique="on"
}%];
var ultimo = genteNaSede.pop();
function temGente(data) {
  if ( data.numPess > 0 ) {
    var txt = ( data.numPess == 1 )? 'Existe uma pessoa na sede' : 'Existem '+data.numPess+' pessoas na sede';
    if ( genteNaSede.length > 0 ) txt += ': <span>'+genteNaSede.join(', ')+' e '+ultimo+'</span>';
    else if ( ultimo ) txt += ': <span>'+ultimo+'</span>';
    txt += '.';
    var info = $('<p class="aberto"> <strong>Aberto</strong> '+txt+' <span id="fecha"></span></p>');
  } else {
    var info = $('<p class="fechado"> A sede está vazia no momento. <a href="/Agenda">Acompanhe a nossa agenda!</a></p>');
  }
  info.prependTo('#tem-gente');
  quandoFecha(data.numPess, data.fechaEm);
}
</script>
<script src="/bin/tem-gente?type=json&callback=temGente" async></script>
%STOPINCLUDE%
  • Local EDIT_TEMPLATE = pattern
  • Local SKIN = pattern
Topic revision: r3 - 20 Jul 2014, AurelioAHeckert
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Raulwiki? Send feedback