diff --git a/admin1/dicionario/core.js b/admin1/dicionario/core.js index ff3c95c..a07d902 100755 --- a/admin1/dicionario/core.js +++ b/admin1/dicionario/core.js @@ -351,8 +351,8 @@ i3GEOadmin.core.dicionario = { en : "", es : "" } ], - '' : [ { - pt : "", + 'filtro' : [ { + pt : "Filtro", en : "", es : "" } ], diff --git a/admin1/usuarios/operacoes/index.js b/admin1/usuarios/operacoes/index.js index c77304c..40b6e4e 100755 --- a/admin1/usuarios/operacoes/index.js +++ b/admin1/usuarios/operacoes/index.js @@ -88,13 +88,13 @@ function pegaOperacoes(){ } ); ondeListaOperacoes.html(html); - //indice + //filtro html = Mustache.to_html( - "{{#data}}" + $("#indiceTpl").html() + "{{/data}}", + "{{#data}}" + $("#templateFiltro").html() + "{{/data}}", {"data":json["operacoes"]} ); - //indice lateral - $("#indice").html(html); + $("#filtro").html("" + html); + //monta um template para o modal de inclusao de nova operacao html = Mustache.to_html( $("#templateOperacoes").html(), @@ -220,3 +220,18 @@ function salvarOperacao(id_operacao){ } ); } +function filtra(obj,id){ + $("#" + id + " .panel").each( + function(i,el){ + if(obj.value == ""){ + $(el).show(); + } + else { + $(el).hide(); + } + } + ); + if(obj.value != ""){ + $("#"+obj.value).show(); + } +} diff --git a/admin1/usuarios/operacoes/index.php b/admin1/usuarios/operacoes/index.php index 52c02ce..cd6aa86 100755 --- a/admin1/usuarios/operacoes/index.php +++ b/admin1/usuarios/operacoes/index.php @@ -16,7 +16,7 @@ include "../../head.php";
-
+
- - -
- -