This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Tue Nov 04 08:08:43 -0800 2008 | |
| |
README.mkdn | ||
| |
Rakefile | Tue Nov 04 08:08:43 -0800 2008 | |
| |
init.rb | Fri Nov 07 05:08:35 -0800 2008 | |
| |
install.rb | Tue Nov 04 08:08:43 -0800 2008 | |
| |
lib/ | ||
| |
public/ | Fri Nov 07 05:09:15 -0800 2008 | |
| |
test/ | ||
| |
uninstall.rb | Tue Nov 04 08:08:43 -0800 2008 |
README.mkdn
FindAtTableField
O que é?
É um filtro para tabelas( tabelas em HTML e não Banco de Dados) utilizando prototype.
Clique aqui para ver alguns exemplos
Dependências
- Não possui dependências
Como utilizar?
Primeiramente instale o plugin no seu projeto
ruby script/plugin install git://github.com/marcosgz/find_at_table.git
Adicione os javascripts na sua view:
<%= javascript_include_tag :defaults %>
<%= javascript_include_tag 'find_at_table' %>
Adicione o código abaixo na sua view:
<%= find_at_table_field("field_name", "table_id") %>
Para funcionar corretamente é necessário utilizar as tags <thead> </thead> e <tbody> </tbody>. Exemplo:
<table id="table_id">
<thead>
<tr>
<th>Name</th>
<th>Age</th>
</tr>
</thead>
<tbody>
<tr>
<td>Homer Simpson</td>
<td>36</td>
</tr>
<tr>
<td>Bart Simpson</td>
<td>14</td>
</tr>
</tbody>
</table>
Algumas opções:
- Desativar a atualização dinamica da tabela (É necessário apertar ENTER para que o filtro seja executado, Default => true);
Exemplo:
<%= find_at_table_field("field_name", "table_id",{:dynamic => false }) %>
- Alterar a frequencia do observer (Default => 1);
Exemplo:
<%= find_at_table_field("field_name", "table_id",{:frequency => 3}) %>
- Selecionar as colunas da tabela para o filtro (Defauld => "all" );
Exemplo:
Procurar na primeira coluna da tabela:
<%= find_at_table_field("field_name", "table_id",{:columns => 0}) %>
Procurar na primeira e terceira coluna da tabela:
<%= find_at_table_field("field_name", "table_id",{:columns => [0,2]}) %>
Procurar em todas as colunas da tabela:
<%= find_at_table_field("field_name", "table_id",{:columns => "all"}) %>
Procurar entre primeira e a terceira coluna:
<%= find_at_table_field("field_name", "table_id",{:columns => (0..2)}) %>
Quem está trabalhando no projeto?
- Marcos G. Zimmermann (Autor e desenvolvedor)
- Rodrigo Pinto (Refactory man)








