Commit 9e3ab6a5a610a9822043ef59dc37117f4739a308
1 parent
aef281e1
Exists in
master
and in
7 other branches
--no commit message
Showing
2 changed files
with
16 additions
and
4 deletions
Show diff stats
admin/html/editormapfile.html
@@ -113,10 +113,12 @@ if(screen.availWidth > 700) | @@ -113,10 +113,12 @@ if(screen.availWidth > 700) | ||
113 | {document.getElementById("divGeral").style.width = "700px";} | 113 | {document.getElementById("divGeral").style.width = "700px";} |
114 | var letras = "Todos A B C D E F G H I J K L M N O P Q R S T U V X Y Z _ 1 2 3 4 5 6 7 8 9".split(" "), | 114 | var letras = "Todos A B C D E F G H I J K L M N O P Q R S T U V X Y Z _ 1 2 3 4 5 6 7 8 9".split(" "), |
115 | nletras = letras.length, | 115 | nletras = letras.length, |
116 | - letraAtual = "Todos", | 116 | + letraAtual = "", |
117 | i, | 117 | i, |
118 | ins = ""; | 118 | ins = ""; |
119 | - | 119 | +if(i3GEO.util.pegaCookie("I3GEOletraAdmin")){ |
120 | + letraAtual = i3GEO.util.pegaCookie("I3GEOletraAdmin"); | ||
121 | +} | ||
120 | ins += "<p>Filtrar: " + | 122 | ins += "<p>Filtrar: " + |
121 | "<select id='selFiltro' onchange='filtraLetra(\""+letraAtual+"\")' >" + | 123 | "<select id='selFiltro' onchange='filtraLetra(\""+letraAtual+"\")' >" + |
122 | "<option value='' >----</option>"+ | 124 | "<option value='' >----</option>"+ |
@@ -139,10 +141,12 @@ for(i=0;i<nletras;i++){ | @@ -139,10 +141,12 @@ for(i=0;i<nletras;i++){ | ||
139 | document.getElementById("letras").innerHTML = ins; | 141 | document.getElementById("letras").innerHTML = ins; |
140 | 142 | ||
141 | function filtraLetra(letra){ | 143 | function filtraLetra(letra){ |
144 | + | ||
142 | letraAtual = letra; | 145 | letraAtual = letra; |
143 | document.getElementById("tabela").innerHTML = "<span style=color:red >Aguarde...</span>"; | 146 | document.getElementById("tabela").innerHTML = "<span style=color:red >Aguarde...</span>"; |
144 | if(letra == "Todos") | 147 | if(letra == "Todos") |
145 | {letra = "";} | 148 | {letra = "";} |
149 | + i3GEO.util.insereCookie("I3GEOletraAdmin",letra); | ||
146 | core_pegaMapfiles("montaArvore()",letra,document.getElementById("selFiltro").value); | 150 | core_pegaMapfiles("montaArvore()",letra,document.getElementById("selFiltro").value); |
147 | } | 151 | } |
148 | cabecalhoGeral("cabecalhoPrincipal","editormapfile"); | 152 | cabecalhoGeral("cabecalhoPrincipal","editormapfile"); |
admin/js/editormapfile.js
@@ -140,13 +140,16 @@ Inicializa a árvore de edição | @@ -140,13 +140,16 @@ Inicializa a árvore de edição | ||
140 | */ | 140 | */ |
141 | function initMenu() | 141 | function initMenu() |
142 | { | 142 | { |
143 | + if(!letraAtual){ | ||
144 | + letraAtual = ""; | ||
145 | + } | ||
143 | ativaBotaoAdicionaMapfile("adiciona"); | 146 | ativaBotaoAdicionaMapfile("adiciona"); |
144 | ativaBotaoVerificarOrfaos("semmapfiles"); | 147 | ativaBotaoVerificarOrfaos("semmapfiles"); |
145 | 148 | ||
146 | core_carregando("ativa"); | 149 | core_carregando("ativa"); |
147 | core_carregando("buscando temas..."); | 150 | core_carregando("buscando temas..."); |
148 | core_ativaPainelAjuda("ajuda","botaoAjuda"); | 151 | core_ativaPainelAjuda("ajuda","botaoAjuda"); |
149 | - core_pegaMapfiles("montaArvore()"); | 152 | + core_pegaMapfiles("montaArvore()",letraAtual); |
150 | } | 153 | } |
151 | function ativaBotaoVerificarOrfaos(idBotao) | 154 | function ativaBotaoVerificarOrfaos(idBotao) |
152 | { | 155 | { |
@@ -225,7 +228,12 @@ function montaArvore() | @@ -225,7 +228,12 @@ function montaArvore() | ||
225 | tree = new YAHOO.widget.TreeView("tabela"); | 228 | tree = new YAHOO.widget.TreeView("tabela"); |
226 | tree.setDynamicLoad(loadNodeData, 0); | 229 | tree.setDynamicLoad(loadNodeData, 0); |
227 | var root = tree.getRoot(); | 230 | var root = tree.getRoot(); |
228 | - var tempNode = new YAHOO.widget.TextNode('', root, false); | 231 | + if(letraAtual == ""){ |
232 | + var tempNode = new YAHOO.widget.TextNode('Todos', root, false); | ||
233 | + } | ||
234 | + else{ | ||
235 | + var tempNode = new YAHOO.widget.TextNode(letraAtual, root, false); | ||
236 | + } | ||
229 | tempNode.isLeaf = true; | 237 | tempNode.isLeaf = true; |
230 | core_carregando("desativa"); | 238 | core_carregando("desativa"); |
231 | } | 239 | } |