diff --git a/init/index.js b/init/index.js index 96a093b..e08457a 100755 --- a/init/index.js +++ b/init/index.js @@ -99,7 +99,7 @@ botoesIni = [ "target": "_self" },{ "img":"applications-development-web.png", - "href": "../admin", + "href": "../admin1", "titulo":$trad(3,g_traducao_init), "subtitulo": $trad("3a",g_traducao_init), "fa": "cogs", diff --git a/ogc/dicionario.js b/ogc/dicionario.js index 96b5b4f..5fa1e08 100755 --- a/ogc/dicionario.js +++ b/ogc/dicionario.js @@ -96,8 +96,8 @@ g_traducao_ogc = en : "", es : "" }], - "1" : [{ - pt : "", + "filtro" : [{ + pt : "Filtro", en : "", es : "" }] diff --git a/ogc/index.js b/ogc/index.js index d8a48be..f6dcb42 100755 --- a/ogc/index.js +++ b/ogc/index.js @@ -1,7 +1,7 @@ function listaDoNivelMenu(templateMenus,templateGrupos,templateSubGrupos,templateCamadas){ var r = function(retorno) { var menus = retorno.data, - nmenus = menus.length, i = 0, s = [], camadasRaiz, dataMenu, htmlMenus, grupos; + nmenus = menus.length, i = 0, s = [], camadasRaiz, dataMenu, htmlMenus, grupos, temp; for(i=0; i---" + + Mustache.to_html( + "{{#grupos}}" + $("#templateFiltroGrupo").html() + "{{/grupos}}", + {"grupos":g} + ) + ); + //monta a lista de grupos if(g){ htmlGrupos = Mustache.to_html( "{{#grupos}}" + templateGrupos + "{{/grupos}}", {"grupos":g} ); + } $("#gruposMenu"+retorno.data.idmenu).html(htmlGrupos); + //monta os subgrupos for (i = 0; i < c; i++) { subgrupos = gr[i].subgrupos; id_n1 = gr[i]["id_n1"]; - nsubgrupos = subgrupos.length; j = 0; for( j = 0; j < nsubgrupos; j++){ @@ -295,4 +312,19 @@ function listaCompleta(onde){ }; //cpJSON vem de class_php.js cpJSON.call("../classesphp/mapa_controle.php?map_file=&funcao=pegaTodosTemas&g_sid=&idioma=pt", "foo", r); +} +function filtraGrupo(obj,idPainel){ + $("#" + idPainel + " .grupo").each( + function(i,el){ + if(obj.value == ""){ + $(el).show(); + } + else { + $(el).hide(); + } + } + ); + if(obj.value != ""){ + $("#"+obj.value).show(); + } } \ No newline at end of file diff --git a/ogc/index.php b/ogc/index.php index d16faaa..803bdc2 100755 --- a/ogc/index.php +++ b/ogc/index.php @@ -93,31 +93,41 @@ include "../init/head.php";
- {{{camadas}}} -
- Aguarde -
+ {{{camadas}}} + +
+ + +
+ +
+ Aguarde +
+