Commit fe04b077a3b9f5bd945aedbda5bb4b28b585715f
1 parent
e2677e9a
Exists in
master
and in
7 other branches
Rerformulçaõ da estrutura dos códigos e inclusão de opções de busca de esquemas,…
… tabelas e colunas no sistema de metadados estatísticos
Showing
8 changed files
with
1189 additions
and
1191 deletions
Show diff stats
admin/html/estat_variavel.html
admin/js/core.js
| ... | ... | @@ -903,60 +903,64 @@ record - objeto record |
| 903 | 903 | |
| 904 | 904 | key - chave (nome do item) |
| 905 | 905 | */ |
| 906 | -function core_menuCheckBox(valores,textos,selecionados,target,record,key) | |
| 907 | -{ | |
| 908 | - function on_menuCheckBoxChange(p_oEvent) | |
| 909 | - { | |
| 910 | - if(p_oEvent.newValue.get("value") == "OK") | |
| 911 | - { | |
| 912 | - var cks = $i("core_menuCK_bd").getElementsByTagName("input"); | |
| 913 | - var ins = []; | |
| 914 | - for (var i=0;i<cks.length;i++) | |
| 915 | - { | |
| 916 | - if(cks[i].checked) | |
| 917 | - ins.push(cks[i].value); | |
| 906 | +function core_menuCheckBox(valores,textos,selecionados,target,record,key){ | |
| 907 | + function on_menuCheckBoxChange(p_oEvent){ | |
| 908 | + var cks,i, | |
| 909 | + ins = []; | |
| 910 | + if(p_oEvent.newValue.get("value") == "OK") { | |
| 911 | + cks = $i("core_menuCK_bd").getElementsByTagName("input"); | |
| 912 | + ins = []; | |
| 913 | + for (i=0;i<cks.length;i++){ | |
| 914 | + if(cks[i].checked){ | |
| 915 | + ins.push(cks[i].value); | |
| 916 | + } | |
| 917 | + } | |
| 918 | + if(record){ | |
| 919 | + target.innerHTML = "<pre ><p>"+ins.toString()+"</pre>"; | |
| 920 | + record.setData(key,ins.toString()); | |
| 921 | + } | |
| 922 | + else{ | |
| 923 | + target.value = ins.toString(); | |
| 918 | 924 | } |
| 919 | - target.innerHTML = "<pre ><p>"+ins.toString()+"</pre>"; | |
| 920 | - record.setData(key,ins.toString()); | |
| 921 | 925 | } |
| 922 | 926 | YAHOO.admin.container.panelCK.destroy(); |
| 923 | 927 | YAHOO.admin.container.panelCK = null; |
| 924 | 928 | }; |
| 925 | - if(!YAHOO.admin.container.panelCK) | |
| 926 | - { | |
| 927 | - var novoel = document.createElement("div"); | |
| 929 | + var novoel,ndiv,og_core,onde,ins,i,novoCK,ck,j; | |
| 930 | + if(!YAHOO.admin.container.panelCK){ | |
| 931 | + novoel = document.createElement("div"); | |
| 928 | 932 | novoel.id = "core_menuCK"; |
| 929 | - var ndiv = document.createElement("div"); | |
| 933 | + ndiv = document.createElement("div"); | |
| 930 | 934 | ndiv.className= "yui-dt-editor"; |
| 931 | 935 | ndiv.style.height = "144px"; |
| 932 | 936 | ndiv.style.overflow = "auto"; |
| 933 | 937 | ndiv.innerHTML = "<div id='core_menuCK_bd'></div>"; |
| 934 | 938 | novoel.appendChild(ndiv); |
| 935 | 939 | document.body.appendChild(novoel); |
| 936 | - var og_core = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name:"okcancel_checkbox_id", container:"core_menuCK_bd" }); | |
| 940 | + og_core = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name:"okcancel_checkbox_id", container:"core_menuCK_bd" }); | |
| 937 | 941 | og_core.addButtons([ |
| 938 | 942 | { label: "OK", value: "OK", checked: false}, |
| 939 | 943 | { label: "Cancel", value: "CANCEL", checked: false } |
| 940 | 944 | ]); |
| 941 | 945 | og_core.on("checkedButtonChange", on_menuCheckBoxChange); |
| 942 | - YAHOO.admin.container.panelCK = new YAHOO.widget.Overlay("core_menuCK", { zindex:"100",close:false,underlay:false,width:"200px", height:"200px",overflow:"auto", visible:false,constraintoviewport:true } ); | |
| 946 | + YAHOO.admin.container.panelCK = new YAHOO.widget.Overlay("core_menuCK", { zindex:"100",close:false,underlay:false,width:"300px", height:"200px",overflow:"auto", visible:false,constraintoviewport:true } ); | |
| 943 | 947 | YAHOO.admin.container.panelCK.render(); |
| 944 | 948 | } |
| 945 | - var onde = $i("core_menuCK_bd"); | |
| 949 | + onde = $i("core_menuCK_bd"); | |
| 950 | + ins = []; | |
| 946 | 951 | onde.innerHTML = ""; |
| 947 | - for (var i=0;i<valores.length;i++) | |
| 948 | - { | |
| 949 | - var novoCK = document.createElement("div"); | |
| 950 | - var ck = ""; | |
| 951 | - for(var j=0;j<selecionados.length;j++) | |
| 952 | - { | |
| 952 | + for (i=0;i<valores.length;i++){ | |
| 953 | + novoCK = document.createElement("div"); | |
| 954 | + ck = ""; | |
| 955 | + for(j=0;j<selecionados.length;j++){ | |
| 953 | 956 | if(selecionados[j] == valores[i]) |
| 954 | 957 | ck = "CHECKED"; |
| 955 | 958 | } |
| 956 | - var ins = "<input type=checkbox id='CK_"+valores[i]+"' value='"+valores[i]+"' "+ck+" />"+textos[i]+"<br>"; | |
| 957 | - novoCK.innerHTML = ins; | |
| 958 | - onde.appendChild(novoCK); | |
| 959 | + ins.push("<input type=checkbox id='CK_"+valores[i]+"' value='"+valores[i]+"' "+ck+" />"+textos[i]+"<br>"); | |
| 959 | 960 | } |
| 961 | + ins.push("<br>"); | |
| 962 | + novoCK.innerHTML = ins.join(" "); | |
| 963 | + onde.appendChild(novoCK); | |
| 960 | 964 | YAHOO.admin.container.panelCK.moveTo(YAHOO.util.Dom.getX(target),YAHOO.util.Dom.getY(target)); |
| 961 | 965 | YAHOO.admin.container.panelCK.show(); |
| 962 | 966 | } | ... | ... |
admin/js/estat_variavel.js
| 1 | -/* | |
| 2 | -Title: usuarios.js | |
| 3 | - | |
| 4 | -Funções que controlam o cadastro de usuarios | |
| 5 | - | |
| 6 | -Licenca: | |
| 7 | - | |
| 8 | -GPL2 | |
| 9 | - | |
| 10 | -i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet | |
| 11 | - | |
| 12 | -Direitos Autorais Reservados (c) 2006 Ministério do Meio Ambiente Brasil | |
| 13 | -Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br | |
| 14 | - | |
| 15 | -Este programa é software livre; você pode redistribuí-lo | |
| 16 | -e/ou modificá-lo sob os termos da Licença Pública Geral | |
| 17 | -GNU conforme publicada pela Free Software Foundation; | |
| 18 | - | |
| 19 | -Este programa é distribuído na expectativa de que seja útil, | |
| 20 | -porém, SEM NENHUMA GARANTIA; nem mesmo a garantia implícita | |
| 21 | -de COMERCIABILIDADE OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. | |
| 22 | -Consulte a Licença Pública Geral do GNU para mais detalhes. | |
| 23 | -Você deve ter recebido uma cópia da Licença Pública Geral do | |
| 24 | -GNU junto com este programa; se não, escreva para a | |
| 25 | -Free Software Foundation, Inc., no endereço | |
| 26 | -59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | |
| 27 | - | |
| 28 | -Arquivo: | |
| 29 | - | |
| 30 | -i3geo/admin/js/usuarios.js | |
| 31 | -*/ | |
| 32 | -YAHOO.namespace("admin.container"); | |
| 33 | -//armazena os dados das tabelas auxiliares, como tipos de unidades de medida, etc | |
| 34 | -var dadosAuxiliares = []; | |
| 35 | -/* | |
| 36 | -Function: initMenu | |
| 37 | - | |
| 38 | -Inicializa o editor | |
| 39 | -*/ | |
| 40 | -function initMenu(){ | |
| 41 | - listaDadosAuxiliares(); | |
| 42 | - ativaBotaoAdicionaVariavel("../php/metaestat.php?funcao=alteraVariavel","adiciona"); | |
| 43 | - ativaBotaoRelatorioCompleto("../php/metaestat.php?funcao=relatorioCompleto","relatorioCompleto"); | |
| 44 | - core_carregando("ativa"); | |
| 45 | - core_ativaPainelAjuda("ajuda","botaoAjuda"); | |
| 46 | - pegaVariaveis(); | |
| 1 | +if(typeof(i3GEOadmin) === 'undefined'){ | |
| 2 | + var i3GEOadmin = {}; | |
| 47 | 3 | } |
| 48 | -function ativaBotaoAdicionaVariavel(sUrl,idBotao){ | |
| 49 | - var adiciona = function(){ | |
| 4 | +i3GEOadmin.variaveis = { | |
| 5 | + /* | |
| 6 | + * armazena os dados das tabelas auxiliares, como tipos de unidades de medida, etc | |
| 7 | + */ | |
| 8 | + dadosAuxiliares: [], | |
| 9 | + inicia: function(){ | |
| 10 | + YAHOO.namespace("admin.container"); | |
| 11 | + i3GEOadmin.variaveis.listaDadosAuxiliares(); | |
| 12 | + i3GEOadmin.variaveis.ativaBotaoAdicionaVariavel("../php/metaestat.php?funcao=alteraVariavel","adiciona"); | |
| 13 | + i3GEOadmin.variaveis.ativaBotaoRelatorioCompleto("../php/metaestat.php?funcao=relatorioCompleto","relatorioCompleto"); | |
| 50 | 14 | core_carregando("ativa"); |
| 51 | - core_carregando(" adicionando um novo registro"); | |
| 52 | - var callback = { | |
| 53 | - success:function(o){ | |
| 54 | - try { | |
| 55 | - core_carregando("desativa"); | |
| 56 | - var j = YAHOO.lang.JSON.parse(o.responseText); | |
| 57 | - adicionaNosVariaveis([j],true); | |
| 58 | - editar("variavel",j.codigo_variavel); | |
| 59 | - } | |
| 60 | - catch(e){core_handleFailure(e,o.responseText);} | |
| 61 | - }, | |
| 62 | - failure:core_handleFailure, | |
| 63 | - argument: { foo:"foo", bar:"bar" } | |
| 15 | + core_ativaPainelAjuda("ajuda","botaoAjuda"); | |
| 16 | + i3GEOadmin.variaveis.arvore.inicia(); | |
| 17 | + }, | |
| 18 | + ativaBotaoAdicionaVariavel: function(sUrl,idBotao){ | |
| 19 | + var adiciona = function(){ | |
| 20 | + core_carregando("ativa"); | |
| 21 | + core_carregando(" adicionando um novo registro"); | |
| 22 | + var callback = { | |
| 23 | + success:function(o){ | |
| 24 | + try { | |
| 25 | + core_carregando("desativa"); | |
| 26 | + var j = YAHOO.lang.JSON.parse(o.responseText); | |
| 27 | + i3GEOadmin.variaveis.arvore.adicionaNos([j],true); | |
| 28 | + i3GEOadmin.variaveis.editar("variavel",j.codigo_variavel); | |
| 29 | + } | |
| 30 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 31 | + }, | |
| 32 | + failure:core_handleFailure, | |
| 33 | + argument: { foo:"foo", bar:"bar" } | |
| 34 | + }; | |
| 35 | + core_makeRequest(sUrl,callback); | |
| 64 | 36 | }; |
| 65 | - core_makeRequest(sUrl,callback); | |
| 66 | - }; | |
| 67 | - //cria o botão de adição de um novo menu | |
| 68 | - new YAHOO.widget.Button(idBotao,{ onclick: { fn: adiciona } }); | |
| 69 | -} | |
| 70 | -function ativaBotaoRelatorioCompleto(sUrl,idBotao){ | |
| 71 | - var adiciona = function(){ | |
| 72 | - core_carregando("ativa"); | |
| 73 | - core_carregando(" Aguarde"); | |
| 74 | - var callback = { | |
| 75 | - success:function(o){ | |
| 76 | - try { | |
| 77 | - core_carregando("desativa"); | |
| 78 | - var j = YAHOO.lang.JSON.parse(o.responseText); | |
| 79 | - core_montaEditor("","650px","500px","","Relatório"); | |
| 80 | - $i("editor_bd").innerHTML = j; | |
| 81 | - } | |
| 82 | - catch(e){core_handleFailure(e,o.responseText);} | |
| 83 | - }, | |
| 84 | - failure:core_handleFailure, | |
| 85 | - argument: { foo:"foo", bar:"bar" } | |
| 37 | + //cria o botão de adição de um novo menu | |
| 38 | + new YAHOO.widget.Button(idBotao,{ onclick: { fn: adiciona } }); | |
| 39 | + }, | |
| 40 | + ativaBotaoRelatorioCompleto: function(sUrl,idBotao){ | |
| 41 | + var adiciona = function(){ | |
| 42 | + core_carregando("ativa"); | |
| 43 | + core_carregando(" Aguarde"); | |
| 44 | + var callback = { | |
| 45 | + success:function(o){ | |
| 46 | + try { | |
| 47 | + core_carregando("desativa"); | |
| 48 | + var j = YAHOO.lang.JSON.parse(o.responseText); | |
| 49 | + core_montaEditor("","650px","500px","","Relatório"); | |
| 50 | + $i("editor_bd").innerHTML = j; | |
| 51 | + } | |
| 52 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 53 | + }, | |
| 54 | + failure:core_handleFailure, | |
| 55 | + argument: { foo:"foo", bar:"bar" } | |
| 56 | + }; | |
| 57 | + core_makeRequest(sUrl,callback); | |
| 86 | 58 | }; |
| 87 | - core_makeRequest(sUrl,callback); | |
| 88 | - }; | |
| 89 | - new YAHOO.widget.Button(idBotao,{ onclick: { fn: adiciona } }); | |
| 90 | -} | |
| 91 | -/* | |
| 92 | -Function: pegaVariaveis | |
| 93 | - | |
| 94 | -Obtém a lista de variaveis | |
| 95 | - | |
| 96 | -<PEGAVARIAVEIS> | |
| 97 | -*/ | |
| 98 | -function pegaVariaveis(){ | |
| 99 | - core_pegaDados("buscando variáveis...","../php/metaestat.php?funcao=listaVariavel","montaArvore"); | |
| 100 | -} | |
| 101 | -/* | |
| 102 | -Function: montaArvore | |
| 103 | - | |
| 104 | -Monta a árvore de edição | |
| 105 | - | |
| 106 | -<PEGAPRANCHAS> | |
| 107 | -*/ | |
| 108 | -function montaArvore(dados){ | |
| 109 | - YAHOO.example.treeExample = new function() { | |
| 110 | - tree = ""; | |
| 111 | - function changeIconMode(){ | |
| 112 | - buildTree(); | |
| 59 | + new YAHOO.widget.Button(idBotao,{ onclick: { fn: adiciona } }); | |
| 60 | + }, | |
| 61 | + arvore:{ | |
| 62 | + inicia:function(){ | |
| 63 | + core_pegaDados("buscando variáveis...","../php/metaestat.php?funcao=listaVariavel","i3GEOadmin.variaveis.arvore.monta"); | |
| 64 | + }, | |
| 65 | + monta: function(dados){ | |
| 66 | + YAHOO.example.treeExample = new function() { | |
| 67 | + tree = ""; | |
| 68 | + function changeIconMode(){ | |
| 69 | + buildTree(); | |
| 70 | + } | |
| 71 | + function loadNodeData(node, fnLoadComplete){ | |
| 72 | + var sUrl = "../php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel="+node.data.codigo_variavel, | |
| 73 | + callback = { | |
| 74 | + success: function(oResponse){ | |
| 75 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 76 | + i3GEOadmin.variaveis.medidas.adicionaNos(node,dados,false); | |
| 77 | + oResponse.argument.fnLoadComplete(); | |
| 78 | + }, | |
| 79 | + failure: function(oResponse){ | |
| 80 | + oResponse.argument.fnLoadComplete(); | |
| 81 | + }, | |
| 82 | + argument:{ | |
| 83 | + "node": node, | |
| 84 | + "fnLoadComplete": fnLoadComplete | |
| 85 | + }, | |
| 86 | + timeout: 25000 | |
| 87 | + }; | |
| 88 | + if(node.data.codigo_variavel){ | |
| 89 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 90 | + } | |
| 91 | + else{ | |
| 92 | + fnLoadComplete.call(); | |
| 93 | + } | |
| 94 | + } | |
| 95 | + function buildTree(){ | |
| 96 | + tree = new YAHOO.widget.TreeView("tabela"); | |
| 97 | + tree.setDynamicLoad(loadNodeData, 1); | |
| 98 | + var root = tree.getRoot(), | |
| 99 | + tempNode = new YAHOO.widget.TextNode('', root, false); | |
| 100 | + tempNode.isLeaf = true; | |
| 101 | + core_carregando("desativa"); | |
| 102 | + } | |
| 103 | + buildTree(); | |
| 104 | + }(); | |
| 105 | + i3GEOadmin.variaveis.arvore.adicionaNos(dados); | |
| 106 | + tree.draw(); | |
| 107 | + }, | |
| 108 | + adicionaNos: function(dados,redesenha){ | |
| 109 | + var i,j,d,conteudo, | |
| 110 | + root = tree.getRoot(); | |
| 111 | + for (i=0, j=dados.length; i<j; i++){ | |
| 112 | + conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"i3GEOadmin.variaveis.excluir('variavel','"+dados[i].codigo_variavel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 113 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"i3GEOadmin.variaveis.editar('variavel','"+dados[i].codigo_variavel+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 114 | + if(dados[i].nome && dados[i].nome != "") | |
| 115 | + {conteudo += " <span>"+dados[i].nome+" - <span style='color:gray;'>"+dados[i].descricao+" id: "+dados[i].codigo_variavel+"</span></span>";} | |
| 116 | + else | |
| 117 | + {conteudo += " <span style=color:red >Edite para definir a variável!!!</span>";} | |
| 118 | + d = {html:conteudo,codigo_variavel:dados[i].codigo_variavel,tipo:"variavel"}; | |
| 119 | + new YAHOO.widget.HTMLNode(d, root, false,true); | |
| 120 | + } | |
| 121 | + if(redesenha){tree.draw();} | |
| 113 | 122 | } |
| 114 | - function loadNodeData(node, fnLoadComplete){ | |
| 115 | - var sUrl = "../php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel="+node.data.codigo_variavel, | |
| 123 | + }, | |
| 124 | + medidas: { | |
| 125 | + adicionaNos: function(no,dados,redesenha){ | |
| 126 | + var tempNode,tempNode1,tempNode2,tempNode3,tempNode4,tempNode5,i,conteudo,d,j; | |
| 127 | + function temaIconMode(){ | |
| 128 | + var newVal = parseInt(this.value); | |
| 129 | + if (newVal != currentIconMode) | |
| 130 | + {currentIconMode = newVal;} | |
| 131 | + } | |
| 132 | + function loadNodeData(node, fnLoadComplete){ | |
| 133 | + var sUrl = "../php/metaestat.php?funcao=listaParametro&id_medida_variavel="+node.data.no_parametros, | |
| 116 | 134 | callback = { |
| 117 | - success: function(oResponse){ | |
| 118 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 119 | - adicionaNosMedidas(node,dados,false); | |
| 120 | - oResponse.argument.fnLoadComplete(); | |
| 121 | - }, | |
| 122 | - failure: function(oResponse){ | |
| 123 | - oResponse.argument.fnLoadComplete(); | |
| 124 | - }, | |
| 125 | - argument:{ | |
| 126 | - "node": node, | |
| 127 | - "fnLoadComplete": fnLoadComplete | |
| 128 | - }, | |
| 129 | - timeout: 25000 | |
| 135 | + success: function(oResponse){ | |
| 136 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 137 | + i3GEOadmin.variaveis.parametro.adicionaNos(node,dados,false); | |
| 138 | + oResponse.argument.fnLoadComplete(); | |
| 139 | + }, | |
| 140 | + failure: function(oResponse){ | |
| 141 | + oResponse.argument.fnLoadComplete(); | |
| 142 | + }, | |
| 143 | + argument:{ | |
| 144 | + "node": node, | |
| 145 | + "fnLoadComplete": fnLoadComplete | |
| 146 | + }, | |
| 147 | + timeout: 25000 | |
| 130 | 148 | }; |
| 131 | - if(node.data.codigo_variavel){ | |
| 132 | 149 | YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); |
| 150 | + }; | |
| 151 | + function loadNodeDataClasses(node, fnLoadComplete){ | |
| 152 | + var sUrl = "../php/metaestat.php?funcao=listaClassificacaoMedida&id_medida_variavel="+node.data.no_classificacao, | |
| 153 | + callback = { | |
| 154 | + success: function(oResponse){ | |
| 155 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 156 | + i3GEOadmin.variaveis.classificacao.adicionaNos(node,dados,false); | |
| 157 | + oResponse.argument.fnLoadComplete(); | |
| 158 | + }, | |
| 159 | + failure: function(oResponse){ | |
| 160 | + oResponse.argument.fnLoadComplete(); | |
| 161 | + }, | |
| 162 | + argument:{ | |
| 163 | + "node": node, | |
| 164 | + "fnLoadComplete": fnLoadComplete | |
| 165 | + }, | |
| 166 | + timeout: 25000 | |
| 167 | + }; | |
| 168 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 169 | + }; | |
| 170 | + function loadNodeDataLinks(node, fnLoadComplete){ | |
| 171 | + var sUrl = "../php/metaestat.php?funcao=listaLinkMedida&id_medida_variavel="+node.data.no_link, | |
| 172 | + callback = { | |
| 173 | + success: function(oResponse){ | |
| 174 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 175 | + i3GEOadmin.variaveis.link.adicionaNos(node,dados,false); | |
| 176 | + oResponse.argument.fnLoadComplete(); | |
| 177 | + }, | |
| 178 | + failure: function(oResponse){ | |
| 179 | + oResponse.argument.fnLoadComplete(); | |
| 180 | + }, | |
| 181 | + argument:{ | |
| 182 | + "node": node, | |
| 183 | + "fnLoadComplete": fnLoadComplete | |
| 184 | + }, | |
| 185 | + timeout: 25000 | |
| 186 | + }; | |
| 187 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 188 | + }; | |
| 189 | + function loadNodeDataFonteinfo(node, fnLoadComplete){ | |
| 190 | + var sUrl = "../php/metaestat.php?funcao=listaFonteinfoMedida&id_medida_variavel="+node.data.no_fonteinfo, | |
| 191 | + callback = { | |
| 192 | + success: function(oResponse){ | |
| 193 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 194 | + i3GEOadmin.variaveis.fonte.adicionaNos(node,dados,false); | |
| 195 | + oResponse.argument.fnLoadComplete(); | |
| 196 | + }, | |
| 197 | + failure: function(oResponse){ | |
| 198 | + oResponse.argument.fnLoadComplete(); | |
| 199 | + }, | |
| 200 | + argument:{ | |
| 201 | + "node": node, | |
| 202 | + "fnLoadComplete": fnLoadComplete | |
| 203 | + }, | |
| 204 | + timeout: 25000 | |
| 205 | + }; | |
| 206 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 207 | + }; | |
| 208 | + if(!redesenha && !(tree.getNodeByProperty("etiqueta_adiciona_variavel",no.data.codigo_variavel))){ | |
| 209 | + tempNode = new YAHOO.widget.HTMLNode( | |
| 210 | + { | |
| 211 | + html:"<span style=\"cursor:pointer;\" onclick=\"i3GEOadmin.variaveis.medidas.adicionar('"+no.data.codigo_variavel+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova medida da variável</i></span>", | |
| 212 | + etiqueta_adiciona_variavel:no.data.codigo_variavel | |
| 213 | + }, | |
| 214 | + no, | |
| 215 | + false, | |
| 216 | + true | |
| 217 | + ); | |
| 218 | + tempNode.isLeaf = true; | |
| 133 | 219 | } |
| 134 | - else{ | |
| 135 | - fnLoadComplete.call(); | |
| 136 | - } | |
| 137 | - } | |
| 138 | - function buildTree(){ | |
| 139 | - tree = new YAHOO.widget.TreeView("tabela"); | |
| 140 | - tree.setDynamicLoad(loadNodeData, 1); | |
| 141 | - var root = tree.getRoot(), | |
| 142 | - tempNode = new YAHOO.widget.TextNode('', root, false); | |
| 143 | - tempNode.isLeaf = true; | |
| 144 | - core_carregando("desativa"); | |
| 145 | - } | |
| 146 | - buildTree(); | |
| 147 | - }(); | |
| 148 | - adicionaNosVariaveis(dados); | |
| 149 | - tree.draw(); | |
| 150 | -} | |
| 151 | -/* | |
| 152 | -Function: adicionaNosMedidas | |
| 220 | + for (i=0, j=dados.length; i<j; i++) { | |
| 221 | + conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"i3GEOadmin.variaveis.excluir('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 222 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"i3GEOadmin.variaveis.editar('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 223 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"i3GEOadmin.variaveis.sql('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title='ver sql' src=\"../imagens/database.png\" /><b>"; | |
| 153 | 224 | |
| 154 | -Mostra os nós de uma medida | |
| 225 | + if(dados[i].nomemedida != "") | |
| 226 | + {conteudo += " <span><b>"+dados[i].nomemedida+"</b> <span style='color:gray;'>"+dados[i].esquemadb+" - "+dados[i].tabela+" - "+dados[i].colunavalor+" id: "+dados[i].id_medida_variavel+"</span></span>";} | |
| 227 | + else | |
| 228 | + {conteudo += " <span style=color:red >Edite para definir a nova medida!!!</span>";} | |
| 229 | + d = {html:conteudo,id_medida_variavel:dados[i].id_medida_variavel,tipo:"medida"}; | |
| 230 | + tempNode1 = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 231 | + tempNode1.isLeaf = false; | |
| 232 | + //tempNode1.setDynamicLoad(temp, 1); | |
| 233 | + conteudo = " Parâmetros"; | |
| 234 | + d = {html:conteudo,no_parametros:dados[i].id_medida_variavel}; | |
| 235 | + tempNode2 = new YAHOO.widget.HTMLNode(d, tempNode1, false,true); | |
| 236 | + tempNode2.isLeaf = false; | |
| 237 | + tempNode2.setDynamicLoad(loadNodeData, 1); | |
| 238 | + conteudo = " Classificações"; | |
| 239 | + d = {html:conteudo,no_classificacao:dados[i].id_medida_variavel}; | |
| 240 | + tempNode3 = new YAHOO.widget.HTMLNode(d, tempNode1, false,true); | |
| 241 | + tempNode3.isLeaf = false; | |
| 242 | + tempNode3.setDynamicLoad(loadNodeDataClasses, 1); | |
| 243 | + conteudo = " Links"; | |
| 244 | + d = {html:conteudo,no_link:dados[i].id_medida_variavel}; | |
| 245 | + tempNode4 = new YAHOO.widget.HTMLNode(d, tempNode1, false,true); | |
| 246 | + tempNode4.isLeaf = false; | |
| 247 | + tempNode4.setDynamicLoad(loadNodeDataLinks, 1); | |
| 248 | + conteudo = " Fontes"; | |
| 249 | + d = {html:conteudo,no_fonteinfo:dados[i].id_medida_variavel}; | |
| 250 | + tempNode5 = new YAHOO.widget.HTMLNode(d, tempNode1, false,true); | |
| 251 | + tempNode5.isLeaf = false; | |
| 252 | + tempNode5.setDynamicLoad(loadNodeDataFonteinfo, 1); | |
| 253 | + } | |
| 155 | 254 | |
| 156 | -<PEGATEMAS> | |
| 157 | -*/ | |
| 158 | -function adicionaNosMedidas(no,dados,redesenha) | |
| 159 | -{ | |
| 160 | - var tempNode,tempNode1,tempNode2,tempNode3,tempNode4,tempNode5,i,conteudo,d,j; | |
| 161 | - function temaIconMode(){ | |
| 162 | - var newVal = parseInt(this.value); | |
| 163 | - if (newVal != currentIconMode) | |
| 164 | - {currentIconMode = newVal;} | |
| 165 | - } | |
| 166 | - function loadNodeData(node, fnLoadComplete){ | |
| 167 | - var sUrl = "../php/metaestat.php?funcao=listaParametro&id_medida_variavel="+node.data.no_parametros, | |
| 255 | + if(redesenha){tree.draw();} | |
| 256 | + }, | |
| 257 | + adicionar: function(codigo_variavel){ | |
| 258 | + var no = tree.getNodeByProperty("codigo_variavel",codigo_variavel), | |
| 259 | + sUrl = "../php/metaestat.php?funcao=alteraMedidaVariavel&codigo_variavel="+codigo_variavel, | |
| 168 | 260 | callback = { |
| 169 | 261 | success: function(oResponse){ |
| 170 | 262 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 171 | - adicionaNosParametro(node,dados,false); | |
| 172 | - oResponse.argument.fnLoadComplete(); | |
| 173 | - }, | |
| 174 | - failure: function(oResponse){ | |
| 175 | - oResponse.argument.fnLoadComplete(); | |
| 176 | - }, | |
| 177 | - argument:{ | |
| 178 | - "node": node, | |
| 179 | - "fnLoadComplete": fnLoadComplete | |
| 263 | + i3GEOadmin.variaveis.medidas.adicionaNos(no,[dados],true); | |
| 264 | + i3GEOadmin.variaveis.editar('medidaVariavel',dados.id_medida_variavel); | |
| 180 | 265 | }, |
| 181 | - timeout: 25000 | |
| 266 | + failure:core_handleFailure, | |
| 267 | + argument: { foo:"foo", bar:"bar" } | |
| 182 | 268 | }; |
| 183 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 184 | - }; | |
| 185 | - function loadNodeDataClasses(node, fnLoadComplete){ | |
| 186 | - var sUrl = "../php/metaestat.php?funcao=listaClassificacaoMedida&id_medida_variavel="+node.data.no_classificacao, | |
| 187 | - callback = { | |
| 269 | + core_makeRequest(sUrl,callback); | |
| 270 | + }, | |
| 271 | + montaDiv: function(i){ | |
| 272 | + var temp,ins = "", | |
| 273 | + param = { | |
| 274 | + "linhas":[ | |
| 275 | + {titulo:"Nome:",id:"Enomemedida",size:"50",value:i.nomemedida,tipo:"text",div:""}, | |
| 276 | + {titulo:"Unidade de medida:",id:"",size:"50",value:i.codigo_unidade_medida,tipo:"text",div:"<div id=Ccodigo_unidade_medida ></div>"}, | |
| 277 | + {titulo:"Tipo de período:",id:"",size:"50",value:i.codigo_tipo_periodo,tipo:"text",div:"<div id=Ccodigo_tipo_periodo ></div>"}, | |
| 278 | + {titulo:"Tipo de região:",id:"",size:"50",value:i.codigo_tipo_regiao,tipo:"text",div:"<div id=Ccodigo_tipo_regiao ></div>"}, | |
| 279 | + {titulo:"Conexão:",id:"",size:"50",value:i.codigo_estat_conexao,tipo:"text",div:"<div id=Ccodigo_estat_conexao ></div>"}, | |
| 280 | + {titulo:"Esquema do banco: <img onclick='i3GEOadmin.variaveis.selEsquema(\"Eesquemadb\",\"Ecodigo_estat_conexao\")' src='../../imagens/crialeg.jpg' style='cursor:pointer;position :relative;top:2px'/>",id:"Eesquemadb",size:"50",value:i.esquemadb,tipo:"text",div:""}, | |
| 281 | + {titulo:"Tabela do banco: <img onclick='i3GEOadmin.variaveis.selTabela(\"Etabela\",\"Ecodigo_estat_conexao\",\"Eesquemadb\")' src='../../imagens/crialeg.jpg' style='cursor:pointer;position :relative;top:2px'/>",id:"Etabela",size:"50",value:i.tabela,tipo:"text",div:""}, | |
| 282 | + {titulo:"Coluna com os valores: <img onclick='i3GEOadmin.variaveis.selColuna(\"Ecolunavalor\",\"Ecodigo_estat_conexao\",\"Eesquemadb\",\"Etabela\")' src='../../imagens/crialeg.jpg' style='cursor:pointer;position :relative;top:2px'/>",id:"Ecolunavalor",size:"50",value:i.colunavalor,tipo:"text",div:""}, | |
| 283 | + {titulo:"Coluna com os IDs da tabela GEO: <img onclick='i3GEOadmin.variaveis.selColuna(\"Ecolunaidgeo\",\"Ecodigo_estat_conexao\",\"Eesquemadb\",\"Etabela\")' src='../../imagens/crialeg.jpg' style='cursor:pointer;position :relative;top:2px'/>",id:"Ecolunaidgeo",size:"50",value:i.colunaidgeo,tipo:"text",div:""}, | |
| 284 | + {titulo:"Filtro adicional:",id:"Efiltro",size:"50",value:i.filtro,tipo:"text",div:""} | |
| 285 | + ] | |
| 286 | + }; | |
| 287 | + ins += core_geraLinhas(param); | |
| 288 | + ins += "<br><br><br>"; | |
| 289 | + $i("editor_bd").innerHTML = ins; | |
| 290 | + if($i("Ccodigo_unidade_medida")){ | |
| 291 | + temp = "<select id='Ecodigo_unidade_medida' >"; | |
| 292 | + temp += core_comboObjeto(i3GEOadmin.variaveis.dadosAuxiliares.unidade_medida,"codigo_unidade_medida","nome",i.codigo_unidade_medida); | |
| 293 | + temp += "</select>"; | |
| 294 | + $i("Ccodigo_unidade_medida").innerHTML = temp; | |
| 295 | + } | |
| 296 | + if($i("Ccodigo_tipo_periodo")){ | |
| 297 | + temp = "<select id='Ecodigo_tipo_periodo' >"; | |
| 298 | + temp += core_comboObjeto(i3GEOadmin.variaveis.dadosAuxiliares.tipo_periodo,"codigo_tipo_periodo","nome",i.codigo_tipo_periodo); | |
| 299 | + temp += "</select>"; | |
| 300 | + $i("Ccodigo_tipo_periodo").innerHTML = temp; | |
| 301 | + } | |
| 302 | + if($i("Ccodigo_tipo_regiao")){ | |
| 303 | + temp = "<select id='Ecodigo_tipo_regiao' >"; | |
| 304 | + temp += core_comboObjeto(i3GEOadmin.variaveis.dadosAuxiliares.tipo_regiao,"codigo_tipo_regiao","nome_tipo_regiao",i.codigo_tipo_regiao); | |
| 305 | + temp += "</select>"; | |
| 306 | + $i("Ccodigo_tipo_regiao").innerHTML = temp; | |
| 307 | + } | |
| 308 | + if($i("Ccodigo_estat_conexao")){ | |
| 309 | + temp = "<select id='Ecodigo_estat_conexao' >"; | |
| 310 | + temp += core_comboObjeto(i3GEOadmin.variaveis.dadosAuxiliares.conexao,"codigo_estat_conexao","bancodedados",i.codigo_estat_conexao); | |
| 311 | + temp += "</select>"; | |
| 312 | + $i("Ccodigo_estat_conexao").innerHTML = temp; | |
| 313 | + } | |
| 314 | + } | |
| 315 | + }, | |
| 316 | + classificacao:{ | |
| 317 | + adicionaNos: function(no,dados,redesenha){ | |
| 318 | + var tempNode,i,j,conteudo,d; | |
| 319 | + function temaIconMode() { | |
| 320 | + var newVal = parseInt(this.value); | |
| 321 | + if (newVal != currentIconMode) | |
| 322 | + {currentIconMode = newVal;} | |
| 323 | + } | |
| 324 | + function loadNodeData(node, fnLoadComplete){ | |
| 325 | + var sUrl = "../php/metaestat.php?funcao=listaClasseClassificacao&id_classificacao="+node.data.id_classificacao, | |
| 326 | + callback = { | |
| 327 | + success: function(oResponse){ | |
| 328 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 329 | + i3GEOadmin.variaveis.classes.adicionaNos(node,dados,false); | |
| 330 | + oResponse.argument.fnLoadComplete(); | |
| 331 | + }, | |
| 332 | + failure: function(oResponse){ | |
| 333 | + oResponse.argument.fnLoadComplete(); | |
| 334 | + }, | |
| 335 | + argument:{ | |
| 336 | + "node": node, | |
| 337 | + "fnLoadComplete": fnLoadComplete | |
| 338 | + }, | |
| 339 | + timeout: 25000 | |
| 340 | + }; | |
| 341 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 342 | + }; | |
| 343 | + if(!redesenha) { | |
| 344 | + tempNode = new YAHOO.widget.HTMLNode( | |
| 345 | + { | |
| 346 | + html:"<span style=\"cursor:pointer;\" onclick=\"i3GEOadmin.variaveis.classificacao.adicionar('"+no.data.no_classificacao+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova classificação</i></span>" | |
| 347 | + }, | |
| 348 | + no, | |
| 349 | + false, | |
| 350 | + true | |
| 351 | + ); | |
| 352 | + tempNode.isLeaf = true; | |
| 353 | + } | |
| 354 | + for (i=0, j=dados.length; i<j; i++) { | |
| 355 | + conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"i3GEOadmin.variaveis.excluir('classificacaoMedida','"+dados[i].id_classificacao+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 356 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"i3GEOadmin.variaveis.editar('classificacaoMedida','"+dados[i].id_classificacao+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 357 | + if(dados[i].nome != "") | |
| 358 | + {conteudo += " <span><b>"+dados[i].nome+"</b><span style=color:gray > Obs.: "+dados[i].observacao+" id: "+dados[i].id_classificacao+"</span></span>";} | |
| 359 | + else | |
| 360 | + {conteudo += " <span style=color:red >Edite para definir a nova classificação!!!</span>";} | |
| 361 | + d = {html:conteudo,id_classificacao:dados[i].id_classificacao,tipo:"classificacao"}; | |
| 362 | + tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 363 | + tempNode.isLeaf = false; | |
| 364 | + tempNode.setDynamicLoad(loadNodeData, 1); | |
| 365 | + } | |
| 366 | + if(redesenha){tree.draw();} | |
| 367 | + }, | |
| 368 | + adicionar: function(id_medida_variavel){ | |
| 369 | + var no = tree.getNodeByProperty("no_classificacao",id_medida_variavel), | |
| 370 | + sUrl = "../php/metaestat.php?funcao=alteraClassificacaoMedida&id_medida_variavel="+id_medida_variavel, | |
| 371 | + callback = { | |
| 188 | 372 | success: function(oResponse){ |
| 189 | 373 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 190 | - adicionaNosClassificacao(node,dados,false); | |
| 191 | - oResponse.argument.fnLoadComplete(); | |
| 192 | - }, | |
| 193 | - failure: function(oResponse){ | |
| 194 | - oResponse.argument.fnLoadComplete(); | |
| 374 | + i3GEOadmin.variaveis.classificacao.adicionaNos(no,[dados],true); | |
| 375 | + i3GEOadmin.variaveis.editar('classificacaoMedida',dados.id_classificacao); | |
| 195 | 376 | }, |
| 196 | - argument:{ | |
| 197 | - "node": node, | |
| 198 | - "fnLoadComplete": fnLoadComplete | |
| 199 | - }, | |
| 200 | - timeout: 25000 | |
| 377 | + failure:core_handleFailure, | |
| 378 | + argument: { foo:"foo", bar:"bar" } | |
| 201 | 379 | }; |
| 202 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 203 | - }; | |
| 204 | - function loadNodeDataLinks(node, fnLoadComplete){ | |
| 205 | - var sUrl = "../php/metaestat.php?funcao=listaLinkMedida&id_medida_variavel="+node.data.no_link, | |
| 206 | - callback = { | |
| 380 | + core_makeRequest(sUrl,callback); | |
| 381 | + }, | |
| 382 | + montaDiv: function(i){ | |
| 383 | + var ins = "", | |
| 384 | + param = { | |
| 385 | + "linhas":[ | |
| 386 | + {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 387 | + {titulo:"Observação:",id:"Eobservacao",size:"50",value:i.observacao,tipo:"text",div:""} | |
| 388 | + ] | |
| 389 | + }; | |
| 390 | + ins += core_geraLinhas(param); | |
| 391 | + ins += "<br><br><br>"; | |
| 392 | + $i("editor_bd").innerHTML = ins; | |
| 393 | + } | |
| 394 | + }, | |
| 395 | + classes:{ | |
| 396 | + adicionaNos: function(no,dados,redesenha){ | |
| 397 | + var tempNode,i,j,conteudo,d; | |
| 398 | + function temaIconMode() { | |
| 399 | + var newVal = parseInt(this.value); | |
| 400 | + if (newVal != currentIconMode) | |
| 401 | + {currentIconMode = newVal;} | |
| 402 | + } | |
| 403 | + if(!redesenha) { | |
| 404 | + tempNode = new YAHOO.widget.HTMLNode( | |
| 405 | + { | |
| 406 | + html:"<span style=\"cursor:pointer;\" onclick=\"i3GEOadmin.variaveis.classes.adicionar('"+no.data.id_classificacao+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova classe</i></span>" | |
| 407 | + }, | |
| 408 | + no, | |
| 409 | + false, | |
| 410 | + true | |
| 411 | + ); | |
| 412 | + tempNode.isLeaf = true; | |
| 413 | + } | |
| 414 | + for (i=0, j=dados.length; i<j; i++) { | |
| 415 | + conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"i3GEOadmin.variaveis.excluir('classeClassificacao','"+dados[i].id_classe+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 416 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"i3GEOadmin.variaveis.editar('classeClassificacao','"+dados[i].id_classe+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 417 | + if(dados[i].nome != "") | |
| 418 | + {conteudo += " <span><b>"+dados[i].titulo+"</b><span style=color:gray > id: "+dados[i].id_classe+"</span></span>";} | |
| 419 | + else | |
| 420 | + {conteudo += " <span style=color:red >Edite para definir a nova classe!!!</span>";} | |
| 421 | + d = {html:conteudo,id_classe:dados[i].id_classe,tipo:"classeClassificacao"}; | |
| 422 | + tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 423 | + tempNode.isLeaf = true; | |
| 424 | + } | |
| 425 | + if(redesenha){tree.draw();} | |
| 426 | + }, | |
| 427 | + adicionar: function(id_classificacao){ | |
| 428 | + var no = tree.getNodeByProperty("id_classificacao",id_classificacao), | |
| 429 | + sUrl = "../php/metaestat.php?funcao=alteraClasseClassificacao&id_classificacao="+id_classificacao, | |
| 430 | + callback = { | |
| 207 | 431 | success: function(oResponse){ |
| 208 | 432 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 209 | - adicionaNosLink(node,dados,false); | |
| 210 | - oResponse.argument.fnLoadComplete(); | |
| 211 | - }, | |
| 212 | - failure: function(oResponse){ | |
| 213 | - oResponse.argument.fnLoadComplete(); | |
| 214 | - }, | |
| 215 | - argument:{ | |
| 216 | - "node": node, | |
| 217 | - "fnLoadComplete": fnLoadComplete | |
| 433 | + i3GEOadmin.variaveis.classes.adicionaNos(no,[dados],true); | |
| 434 | + i3GEOadmin.variaveis.editar('classeClassificacao',dados.id_classe); | |
| 218 | 435 | }, |
| 219 | - timeout: 25000 | |
| 436 | + failure:core_handleFailure, | |
| 437 | + argument: { foo:"foo", bar:"bar" } | |
| 220 | 438 | }; |
| 221 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 222 | - }; | |
| 223 | - function loadNodeDataFonteinfo(node, fnLoadComplete){ | |
| 224 | - var sUrl = "../php/metaestat.php?funcao=listaFonteinfoMedida&id_medida_variavel="+node.data.no_fonteinfo, | |
| 225 | - callback = { | |
| 439 | + core_makeRequest(sUrl,callback); | |
| 440 | + }, | |
| 441 | + montaDiv: function(i){ | |
| 442 | + var ins = "", | |
| 443 | + param = { | |
| 444 | + "linhas":[ | |
| 445 | + {titulo:"Título:",id:"Etitulo",size:"50",value:i.titulo,tipo:"text",div:""}, | |
| 446 | + {titulo:"Expressão (no estilo Mapserver)<br> exemplo (([nu_farm_funcionando] > 0) and ([nu_farm_funcionando] < 5)):",id:"Eexpressao",size:"50",value:i.expressao,tipo:"text",div:""}, | |
| 447 | + {titulo:"Símbolo:",id:"Esimbolo",size:"10",value:i.simbolo,tipo:"text",div:""}, | |
| 448 | + {titulo:"Tamanho do símbolo:",id:"Etamanho",size:"10",value:i.tamanho,tipo:"text",div:""}, | |
| 449 | + {titulo:"Vermelho:",id:"Evermelho",size:"10",value:i.vermelho,tipo:"text",div:""}, | |
| 450 | + {titulo:"Verde:",id:"Everde",size:"10",value:i.verde,tipo:"text",div:""}, | |
| 451 | + {titulo:"Azul:",id:"Eazul",size:"10",value:i.azul,tipo:"text",div:""}, | |
| 452 | + {titulo:"Contorno - tamanho do símbolo:",id:"Eotamanho",size:"10",value:i.otamanho,tipo:"text",div:""}, | |
| 453 | + {titulo:"Contorno - Vermelho:",id:"Eovermelho",size:"10",value:i.overmelho,tipo:"text",div:""}, | |
| 454 | + {titulo:"Contorno - Verde:",id:"Eoverde",size:"10",value:i.overde,tipo:"text",div:""}, | |
| 455 | + {titulo:"Contorno - Azul:",id:"Eoazul",size:"10",value:i.oazul,tipo:"text",div:""} | |
| 456 | + ] | |
| 457 | + }; | |
| 458 | + ins += core_geraLinhas(param); | |
| 459 | + ins += "<br><br><br>"; | |
| 460 | + $i("editor_bd").innerHTML = ins; | |
| 461 | + } | |
| 462 | + }, | |
| 463 | + parametro:{ | |
| 464 | + adicionaNos: function(no,dados,redesenha){ | |
| 465 | + var tempNode,i,j,conteudo,d; | |
| 466 | + function temaIconMode() { | |
| 467 | + var newVal = parseInt(this.value); | |
| 468 | + if (newVal != currentIconMode) | |
| 469 | + {currentIconMode = newVal;} | |
| 470 | + } | |
| 471 | + if(!redesenha) { | |
| 472 | + tempNode = new YAHOO.widget.HTMLNode( | |
| 473 | + { | |
| 474 | + html:"<span style=\"cursor:pointer;\" onclick=\"i3GEOadmin.variaveis.parametro.adicionar('"+no.data.no_parametros+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar novo parâmetro</i></span>" | |
| 475 | + }, | |
| 476 | + no, | |
| 477 | + false, | |
| 478 | + true | |
| 479 | + ); | |
| 480 | + tempNode.isLeaf = true; | |
| 481 | + } | |
| 482 | + for (i=0, j=dados.length; i<j; i++) { | |
| 483 | + conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"i3GEOadmin.variaveis.excluir('parametroMedida','"+dados[i].id_parametro_medida+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 484 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"i3GEOadmin.variaveis.editar('parametroMedida','"+dados[i].id_parametro_medida+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 485 | + if(dados[i].nome != "") | |
| 486 | + {conteudo += " <span><b>"+dados[i].nome+"</b><span style=color:gray > - "+dados[i].descricao+" id: "+dados[i].id_parametro_medida+"</span></span>";} | |
| 487 | + else | |
| 488 | + {conteudo += " <span style=color:red >Edite para definir a nova medida!!!</span>";} | |
| 489 | + d = {html:conteudo,id_parametro_medida:dados[i].id_parametro_medida,tipo:"parametro"}; | |
| 490 | + tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 491 | + tempNode.isLeaf = true; | |
| 492 | + } | |
| 493 | + if(redesenha){tree.draw();} | |
| 494 | + }, | |
| 495 | + adicionar: function(id_medida_variavel){ | |
| 496 | + var no = tree.getNodeByProperty("id_medida_variavel",id_medida_variavel), | |
| 497 | + sUrl = "../php/metaestat.php?funcao=alteraParametroMedida&id_medida_variavel="+id_medida_variavel, | |
| 498 | + callback = { | |
| 226 | 499 | success: function(oResponse){ |
| 227 | 500 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 228 | - adicionaNosFonteinfo(node,dados,false); | |
| 229 | - oResponse.argument.fnLoadComplete(); | |
| 230 | - }, | |
| 231 | - failure: function(oResponse){ | |
| 232 | - oResponse.argument.fnLoadComplete(); | |
| 233 | - }, | |
| 234 | - argument:{ | |
| 235 | - "node": node, | |
| 236 | - "fnLoadComplete": fnLoadComplete | |
| 501 | + i3GEOadmin.variaveis.parametro.adicionaNos(no,[dados],true); | |
| 502 | + i3GEOadmin.variaveis.editar('parametroMedida',dados.id_parametro_medida); | |
| 237 | 503 | }, |
| 238 | - timeout: 25000 | |
| 504 | + failure:core_handleFailure, | |
| 505 | + argument: { foo:"foo", bar:"bar" } | |
| 239 | 506 | }; |
| 240 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 241 | - }; | |
| 242 | - if(!redesenha && !(tree.getNodeByProperty("etiqueta_adiciona_variavel",no.data.codigo_variavel))){ | |
| 243 | - tempNode = new YAHOO.widget.HTMLNode( | |
| 244 | - { | |
| 245 | - html:"<span style=\"cursor:pointer;\" onclick=\"adicionarMedidaVariavel('"+no.data.codigo_variavel+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova medida da variável</i></span>", | |
| 246 | - etiqueta_adiciona_variavel:no.data.codigo_variavel | |
| 247 | - }, | |
| 248 | - no, | |
| 249 | - false, | |
| 250 | - true | |
| 251 | - ); | |
| 252 | - tempNode.isLeaf = true; | |
| 253 | - } | |
| 254 | - for (i=0, j=dados.length; i<j; i++) { | |
| 255 | - conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 256 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 257 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"sql('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title='ver sql' src=\"../imagens/database.png\" /><b>"; | |
| 258 | - | |
| 259 | - if(dados[i].nomemedida != "") | |
| 260 | - {conteudo += " <span><b>"+dados[i].nomemedida+"</b> <span style='color:gray;'>"+dados[i].esquemadb+" - "+dados[i].tabela+" - "+dados[i].colunavalor+" id: "+dados[i].id_medida_variavel+"</span></span>";} | |
| 261 | - else | |
| 262 | - {conteudo += " <span style=color:red >Edite para definir a nova medida!!!</span>";} | |
| 263 | - d = {html:conteudo,id_medida_variavel:dados[i].id_medida_variavel,tipo:"medida"}; | |
| 264 | - tempNode1 = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 265 | - tempNode1.isLeaf = false; | |
| 266 | - //tempNode1.setDynamicLoad(temp, 1); | |
| 267 | - conteudo = " Parâmetros"; | |
| 268 | - d = {html:conteudo,no_parametros:dados[i].id_medida_variavel}; | |
| 269 | - tempNode2 = new YAHOO.widget.HTMLNode(d, tempNode1, false,true); | |
| 270 | - tempNode2.isLeaf = false; | |
| 271 | - tempNode2.setDynamicLoad(loadNodeData, 1); | |
| 272 | - conteudo = " Classificações"; | |
| 273 | - d = {html:conteudo,no_classificacao:dados[i].id_medida_variavel}; | |
| 274 | - tempNode3 = new YAHOO.widget.HTMLNode(d, tempNode1, false,true); | |
| 275 | - tempNode3.isLeaf = false; | |
| 276 | - tempNode3.setDynamicLoad(loadNodeDataClasses, 1); | |
| 277 | - conteudo = " Links"; | |
| 278 | - d = {html:conteudo,no_link:dados[i].id_medida_variavel}; | |
| 279 | - tempNode4 = new YAHOO.widget.HTMLNode(d, tempNode1, false,true); | |
| 280 | - tempNode4.isLeaf = false; | |
| 281 | - tempNode4.setDynamicLoad(loadNodeDataLinks, 1); | |
| 282 | - conteudo = " Fontes"; | |
| 283 | - d = {html:conteudo,no_fonteinfo:dados[i].id_medida_variavel}; | |
| 284 | - tempNode5 = new YAHOO.widget.HTMLNode(d, tempNode1, false,true); | |
| 285 | - tempNode5.isLeaf = false; | |
| 286 | - tempNode5.setDynamicLoad(loadNodeDataFonteinfo, 1); | |
| 287 | - } | |
| 288 | - | |
| 289 | - if(redesenha){tree.draw();} | |
| 290 | -} | |
| 291 | -/* | |
| 292 | -Function: adicionaNosParametro | |
| 293 | - | |
| 294 | -Mostra os nós de uma parametro | |
| 295 | -*/ | |
| 296 | -function adicionaNosParametro(no,dados,redesenha){ | |
| 297 | - var tempNode,i,j,conteudo,d; | |
| 298 | - function temaIconMode() { | |
| 299 | - var newVal = parseInt(this.value); | |
| 300 | - if (newVal != currentIconMode) | |
| 301 | - {currentIconMode = newVal;} | |
| 302 | - } | |
| 303 | - if(!redesenha) { | |
| 304 | - tempNode = new YAHOO.widget.HTMLNode( | |
| 305 | - { | |
| 306 | - html:"<span style=\"cursor:pointer;\" onclick=\"adicionarParametroMedida('"+no.data.no_parametros+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar novo parâmetro</i></span>" | |
| 307 | - }, | |
| 308 | - no, | |
| 309 | - false, | |
| 310 | - true | |
| 311 | - ); | |
| 312 | - tempNode.isLeaf = true; | |
| 313 | - } | |
| 314 | - for (i=0, j=dados.length; i<j; i++) { | |
| 315 | - conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('parametroMedida','"+dados[i].id_parametro_medida+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 316 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('parametroMedida','"+dados[i].id_parametro_medida+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 317 | - if(dados[i].nome != "") | |
| 318 | - {conteudo += " <span><b>"+dados[i].nome+"</b><span style=color:gray > - "+dados[i].descricao+" id: "+dados[i].id_parametro_medida+"</span></span>";} | |
| 319 | - else | |
| 320 | - {conteudo += " <span style=color:red >Edite para definir a nova medida!!!</span>";} | |
| 321 | - d = {html:conteudo,id_parametro_medida:dados[i].id_parametro_medida,tipo:"parametro"}; | |
| 322 | - tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 323 | - tempNode.isLeaf = true; | |
| 324 | - } | |
| 325 | - if(redesenha){tree.draw();} | |
| 326 | -} | |
| 327 | -/* | |
| 328 | -Function: adicionaNosClassificacao | |
| 329 | - | |
| 330 | -Mostra os nós de um parametro | |
| 331 | -*/ | |
| 332 | -function adicionaNosClassificacao(no,dados,redesenha){ | |
| 333 | - var tempNode,i,j,conteudo,d; | |
| 334 | - function temaIconMode() { | |
| 335 | - var newVal = parseInt(this.value); | |
| 336 | - if (newVal != currentIconMode) | |
| 337 | - {currentIconMode = newVal;} | |
| 338 | - } | |
| 339 | - function loadNodeData(node, fnLoadComplete){ | |
| 340 | - var sUrl = "../php/metaestat.php?funcao=listaClasseClassificacao&id_classificacao="+node.data.id_classificacao, | |
| 341 | - callback = { | |
| 507 | + core_makeRequest(sUrl,callback); | |
| 508 | + }, | |
| 509 | + montaDiv: function(i){ | |
| 510 | + var ins = "", | |
| 511 | + param = { | |
| 512 | + "linhas":[ | |
| 513 | + {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 514 | + {titulo:"Descrição:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""}, | |
| 515 | + {titulo:"Coluna:",id:"Ecoluna",size:"50",value:i.coluna,tipo:"text",div:""}, | |
| 516 | + {titulo:"id_pai:",id:"Eid_pai",size:"50",value:i.id_pai,tipo:"text",div:""} | |
| 517 | + ] | |
| 518 | + }; | |
| 519 | + ins += core_geraLinhas(param); | |
| 520 | + ins += "<br><br><br>"; | |
| 521 | + $i("editor_bd").innerHTML = ins; | |
| 522 | + } | |
| 523 | + }, | |
| 524 | + link: { | |
| 525 | + adicionaNos: function(no,dados,redesenha){ | |
| 526 | + var tempNode,i,j,conteudo,d; | |
| 527 | + function temaIconMode() { | |
| 528 | + var newVal = parseInt(this.value); | |
| 529 | + if (newVal != currentIconMode) | |
| 530 | + {currentIconMode = newVal;} | |
| 531 | + } | |
| 532 | + if(!redesenha) { | |
| 533 | + tempNode = new YAHOO.widget.HTMLNode( | |
| 534 | + { | |
| 535 | + html:"<span style=\"cursor:pointer;\" onclick=\"i3GEOadmin.variaveis.link.adicionar('"+no.data.no_link+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar novo link</i></span>" | |
| 536 | + }, | |
| 537 | + no, | |
| 538 | + false, | |
| 539 | + true | |
| 540 | + ); | |
| 541 | + tempNode.isLeaf = true; | |
| 542 | + } | |
| 543 | + for (i=0, j=dados.length; i<j; i++) { | |
| 544 | + conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"i3GEOadmin.variaveis.excluir('linkMedida','"+dados[i].id_link+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 545 | + conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"i3GEOadmin.variaveis.editar('linkMedida','"+dados[i].id_link+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 546 | + if(dados[i].nome != "") | |
| 547 | + {conteudo += " <span><a href='"+dados[i].link+"' >"+dados[i].nome+"</a><span style=color:gray > - "+dados[i].link+" - id: "+dados[i].id_link+"</span></span>";} | |
| 548 | + else | |
| 549 | + {conteudo += " <span style=color:red >Edite para definir o novo link!!!</span>";} | |
| 550 | + d = {html:conteudo,id_link:dados[i].id_link,tipo:"link"}; | |
| 551 | + tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 552 | + tempNode.isLeaf = true; | |
| 553 | + } | |
| 554 | + if(redesenha){tree.draw();} | |
| 555 | + }, | |
| 556 | + adicionar: function(id_medida_variavel){ | |
| 557 | + var no = tree.getNodeByProperty("no_link",id_medida_variavel), | |
| 558 | + sUrl = "../php/metaestat.php?funcao=alteraLinkMedida&id_medida_variavel="+id_medida_variavel, | |
| 559 | + callback = { | |
| 342 | 560 | success: function(oResponse){ |
| 343 | 561 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 344 | - adicionaNosClasses(node,dados,false); | |
| 345 | - oResponse.argument.fnLoadComplete(); | |
| 346 | - }, | |
| 347 | - failure: function(oResponse){ | |
| 348 | - oResponse.argument.fnLoadComplete(); | |
| 562 | + i3GEOadmin.variaveis.link.adicionaNos(no,[dados],true); | |
| 563 | + i3GEOadmin.variaveis.editar('linkMedida',dados.id_link); | |
| 349 | 564 | }, |
| 350 | - argument:{ | |
| 351 | - "node": node, | |
| 352 | - "fnLoadComplete": fnLoadComplete | |
| 353 | - }, | |
| 354 | - timeout: 25000 | |
| 565 | + failure:core_handleFailure, | |
| 566 | + argument: { foo:"foo", bar:"bar" } | |
| 355 | 567 | }; |
| 356 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 357 | - }; | |
| 358 | - if(!redesenha) { | |
| 359 | - tempNode = new YAHOO.widget.HTMLNode( | |
| 360 | - { | |
| 361 | - html:"<span style=\"cursor:pointer;\" onclick=\"adicionarClassificacaoMedida('"+no.data.no_classificacao+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova classificação</i></span>" | |
| 362 | - }, | |
| 363 | - no, | |
| 364 | - false, | |
| 365 | - true | |
| 366 | - ); | |
| 367 | - tempNode.isLeaf = true; | |
| 368 | - } | |
| 369 | - for (i=0, j=dados.length; i<j; i++) { | |
| 370 | - conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('classificacaoMedida','"+dados[i].id_classificacao+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 371 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('classificacaoMedida','"+dados[i].id_classificacao+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 372 | - if(dados[i].nome != "") | |
| 373 | - {conteudo += " <span><b>"+dados[i].nome+"</b><span style=color:gray > Obs.: "+dados[i].observacao+" id: "+dados[i].id_classificacao+"</span></span>";} | |
| 374 | - else | |
| 375 | - {conteudo += " <span style=color:red >Edite para definir a nova classificação!!!</span>";} | |
| 376 | - d = {html:conteudo,id_classificacao:dados[i].id_classificacao,tipo:"classificacao"}; | |
| 377 | - tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 378 | - tempNode.isLeaf = false; | |
| 379 | - tempNode.setDynamicLoad(loadNodeData, 1); | |
| 380 | - } | |
| 381 | - if(redesenha){tree.draw();} | |
| 382 | -} | |
| 383 | -/* | |
| 384 | -Function: adicionaNosClasses | |
| 385 | - | |
| 386 | -Mostra os nós de uma classificacao | |
| 387 | -*/ | |
| 388 | -function adicionaNosClasses(no,dados,redesenha){ | |
| 389 | - var tempNode,i,j,conteudo,d; | |
| 390 | - function temaIconMode() { | |
| 391 | - var newVal = parseInt(this.value); | |
| 392 | - if (newVal != currentIconMode) | |
| 393 | - {currentIconMode = newVal;} | |
| 394 | - } | |
| 395 | - if(!redesenha) { | |
| 396 | - tempNode = new YAHOO.widget.HTMLNode( | |
| 397 | - { | |
| 398 | - html:"<span style=\"cursor:pointer;\" onclick=\"adicionarClasseClassificacao('"+no.data.id_classificacao+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova classe</i></span>" | |
| 568 | + core_makeRequest(sUrl,callback); | |
| 569 | + }, | |
| 570 | + montaDiv: function(i){ | |
| 571 | + var ins = "", | |
| 572 | + param = { | |
| 573 | + "linhas":[ | |
| 574 | + {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 575 | + {titulo:"Link:",id:"Elink",size:"50",value:i.link,tipo:"text",div:""} | |
| 576 | + ] | |
| 577 | + }; | |
| 578 | + ins += core_geraLinhas(param); | |
| 579 | + ins += "<br><br><br>"; | |
| 580 | + $i("editor_bd").innerHTML = ins; | |
| 581 | + } | |
| 582 | + }, | |
| 583 | + fonte:{ | |
| 584 | + adicionaNos: function(no,dados,redesenha){ | |
| 585 | + var tempNode,i,j,conteudo,d; | |
| 586 | + function temaIconMode() { | |
| 587 | + var newVal = parseInt(this.value); | |
| 588 | + if (newVal != currentIconMode) | |
| 589 | + {currentIconMode = newVal;} | |
| 590 | + } | |
| 591 | + if(!redesenha) { | |
| 592 | + tempNode = new YAHOO.widget.HTMLNode( | |
| 593 | + { | |
| 594 | + html:"<span style=\"cursor:pointer;\" onclick=\"i3GEOadmin.variaveis.fonte.adicionar('"+no.data.no_fonteinfo+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova fonte</i></span>" | |
| 595 | + }, | |
| 596 | + no, | |
| 597 | + false, | |
| 598 | + true | |
| 599 | + ); | |
| 600 | + tempNode.isLeaf = true; | |
| 601 | + } | |
| 602 | + for (i=0, j=dados.length; i<j; i++) { | |
| 603 | + conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"i3GEOadmin.variaveis.excluir('fonteinfo','"+dados[i].id_fonteinfo+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 604 | + if(dados[i].titulo != "") | |
| 605 | + {conteudo += " <span><a href='"+dados[i].link+"' >"+dados[i].titulo+"</a><span style=color:gray > - "+dados[i].link+" - id: "+dados[i].id_fonteinfo+"</span></span>";} | |
| 606 | + else | |
| 607 | + {conteudo += " <span style=color:red >Edite para definir a nova fonte!!!</span>";} | |
| 608 | + d = {html:conteudo,id_medida_variavel_fonteinfo:no.data.no_fonteinfo,id_fonteinfo:dados[i].id_fonteinfo,tipo:"fonteinfo"}; | |
| 609 | + tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 610 | + tempNode.isLeaf = true; | |
| 611 | + } | |
| 612 | + if(redesenha){tree.draw();} | |
| 613 | + }, | |
| 614 | + adicionar: function(id_medida_variavel,id_fonteinfo){ | |
| 615 | + var no = tree.getNodeByProperty("no_fonteinfo",id_medida_variavel), | |
| 616 | + sUrl = "../php/metaestat.php?funcao=alteraFonteinfo&id_medida_variavel="+id_medida_variavel, | |
| 617 | + callback = { | |
| 618 | + success: function(oResponse){ | |
| 619 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 620 | + i3GEOadmin.variaveis.fonte.adicionaNos(no,[dados],true); | |
| 621 | + i3GEOadmin.variaveis.editar('fonteinfo',dados.id_fonteinfo); | |
| 399 | 622 | }, |
| 400 | - no, | |
| 401 | - false, | |
| 402 | - true | |
| 403 | - ); | |
| 404 | - tempNode.isLeaf = true; | |
| 405 | - } | |
| 406 | - for (i=0, j=dados.length; i<j; i++) { | |
| 407 | - conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('classeClassificacao','"+dados[i].id_classe+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 408 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('classeClassificacao','"+dados[i].id_classe+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 409 | - if(dados[i].nome != "") | |
| 410 | - {conteudo += " <span><b>"+dados[i].titulo+"</b><span style=color:gray > id: "+dados[i].id_classe+"</span></span>";} | |
| 411 | - else | |
| 412 | - {conteudo += " <span style=color:red >Edite para definir a nova classe!!!</span>";} | |
| 413 | - d = {html:conteudo,id_classe:dados[i].id_classe,tipo:"classeClassificacao"}; | |
| 414 | - tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 415 | - tempNode.isLeaf = true; | |
| 416 | - } | |
| 417 | - if(redesenha){tree.draw();} | |
| 418 | -} | |
| 419 | -/* | |
| 420 | -Function: adicionaNosLink | |
| 623 | + failure:core_handleFailure, | |
| 624 | + argument: { foo:"foo", bar:"bar" } | |
| 625 | + }; | |
| 626 | + core_makeRequest(sUrl,callback); | |
| 627 | + }, | |
| 628 | + montaDiv: function(dados){ | |
| 629 | + ins = "<br><b>Escolha a Fonte:</b><br><br>"; | |
| 630 | + ins += "<select style='width:400px;' id='Eid_fonteinfo' >"; | |
| 631 | + ins += core_comboObjeto(i3GEOadmin.variaveis.dadosAuxiliares.fonteinfo,"id_fonteinfo","titulo"); | |
| 632 | + ins += "</select>"; | |
| 633 | + $i("editor_bd").innerHTML = ins; | |
| 634 | + } | |
| 635 | + }, | |
| 421 | 636 | |
| 422 | -Mostra os nós de links | |
| 423 | -*/ | |
| 424 | -function adicionaNosLink(no,dados,redesenha){ | |
| 425 | - var tempNode,i,j,conteudo,d; | |
| 426 | - function temaIconMode() { | |
| 427 | - var newVal = parseInt(this.value); | |
| 428 | - if (newVal != currentIconMode) | |
| 429 | - {currentIconMode = newVal;} | |
| 430 | - } | |
| 431 | - if(!redesenha) { | |
| 432 | - tempNode = new YAHOO.widget.HTMLNode( | |
| 433 | - { | |
| 434 | - html:"<span style=\"cursor:pointer;\" onclick=\"adicionarLinkMedida('"+no.data.no_link+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar novo link</i></span>" | |
| 435 | - }, | |
| 436 | - no, | |
| 437 | - false, | |
| 438 | - true | |
| 439 | - ); | |
| 440 | - tempNode.isLeaf = true; | |
| 441 | - } | |
| 442 | - for (i=0, j=dados.length; i<j; i++) { | |
| 443 | - conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('linkMedida','"+dados[i].id_link+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 444 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('linkMedida','"+dados[i].id_link+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 445 | - if(dados[i].nome != "") | |
| 446 | - {conteudo += " <span><a href='"+dados[i].link+"' >"+dados[i].nome+"</a><span style=color:gray > - "+dados[i].link+" - id: "+dados[i].id_link+"</span></span>";} | |
| 447 | - else | |
| 448 | - {conteudo += " <span style=color:red >Edite para definir o novo link!!!</span>";} | |
| 449 | - d = {html:conteudo,id_link:dados[i].id_link,tipo:"link"}; | |
| 450 | - tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 451 | - tempNode.isLeaf = true; | |
| 452 | - } | |
| 453 | - if(redesenha){tree.draw();} | |
| 454 | -} | |
| 455 | -/* | |
| 456 | -Function: adicionaNosFonteinfo | |
| 457 | 637 | |
| 458 | -Mostra os nós de fontes | |
| 459 | -*/ | |
| 460 | -function adicionaNosFonteinfo(no,dados,redesenha){ | |
| 461 | - var tempNode,i,j,conteudo,d; | |
| 462 | - function temaIconMode() { | |
| 463 | - var newVal = parseInt(this.value); | |
| 464 | - if (newVal != currentIconMode) | |
| 465 | - {currentIconMode = newVal;} | |
| 466 | - } | |
| 467 | - if(!redesenha) { | |
| 468 | - tempNode = new YAHOO.widget.HTMLNode( | |
| 469 | - { | |
| 470 | - html:"<span style=\"cursor:pointer;\" onclick=\"editar('fonteinfo','"+no.data.no_fonteinfo+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova fonte</i></span>" | |
| 471 | - }, | |
| 472 | - no, | |
| 473 | - false, | |
| 474 | - true | |
| 475 | - ); | |
| 476 | - tempNode.isLeaf = true; | |
| 477 | - } | |
| 478 | - for (i=0, j=dados.length; i<j; i++) { | |
| 479 | - conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('fonteinfo','"+dados[i].id_fonteinfo+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 480 | - if(dados[i].titulo != "") | |
| 481 | - {conteudo += " <span><a href='"+dados[i].link+"' >"+dados[i].titulo+"</a><span style=color:gray > - "+dados[i].link+" - id: "+dados[i].id_fonteinfo+"</span></span>";} | |
| 482 | - else | |
| 483 | - {conteudo += " <span style=color:red >Edite para definir a nova fonte!!!</span>";} | |
| 484 | - d = {html:conteudo,id_medida_variavel_fonteinfo:no.data.no_fonteinfo,id_fonteinfo:dados[i].id_fonteinfo,tipo:"fonteinfo"}; | |
| 485 | - tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | |
| 486 | - tempNode.isLeaf = true; | |
| 487 | - } | |
| 488 | - if(redesenha){tree.draw();} | |
| 489 | -} | |
| 490 | -function adicionaNosVariaveis(dados,redesenha){ | |
| 491 | - var i,j,d,conteudo, | |
| 492 | - root = tree.getRoot(); | |
| 493 | - for (i=0, j=dados.length; i<j; i++){ | |
| 494 | - conteudo = " <img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('variavel','"+dados[i].codigo_variavel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />"; | |
| 495 | - conteudo += " <img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('variavel','"+dados[i].codigo_variavel+"')\" title=editar src=\"../imagens/06.png\" /><b>"; | |
| 496 | - if(dados[i].nome && dados[i].nome != "") | |
| 497 | - {conteudo += " <span>"+dados[i].nome+" - <span style='color:gray;'>"+dados[i].descricao+" id: "+dados[i].codigo_variavel+"</span></span>";} | |
| 498 | - else | |
| 499 | - {conteudo += " <span style=color:red >Edite para definir a variável!!!</span>";} | |
| 500 | - d = {html:conteudo,codigo_variavel:dados[i].codigo_variavel,tipo:"variavel"}; | |
| 501 | - new YAHOO.widget.HTMLNode(d, root, false,true); | |
| 502 | - } | |
| 503 | - if(redesenha){tree.draw();} | |
| 504 | -} | |
| 505 | -function montaDivVariavel(i){ | |
| 506 | - var ins = "", | |
| 507 | - param = { | |
| 508 | - "linhas":[ | |
| 509 | - {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 510 | - {titulo:"Descrição:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""} | |
| 511 | - ] | |
| 512 | - }; | |
| 513 | - ins += core_geraLinhas(param); | |
| 514 | - ins += "<br><br><br>"; | |
| 515 | - $i("editor_bd").innerHTML = ins; | |
| 516 | -} | |
| 517 | -function montaDivMedidaVariavel(i){ | |
| 518 | - var temp,ins = "", | |
| 638 | + montaDivVariavel: function(i){ | |
| 639 | + var ins = "", | |
| 519 | 640 | param = { |
| 520 | - "linhas":[ | |
| 521 | - {titulo:"Nome:",id:"Enomemedida",size:"50",value:i.nomemedida,tipo:"text",div:""}, | |
| 522 | - {titulo:"Unidade de medida:",id:"",size:"50",value:i.codigo_unidade_medida,tipo:"text",div:"<div id=Ccodigo_unidade_medida ></div>"}, | |
| 523 | - {titulo:"Tipo de período:",id:"",size:"50",value:i.codigo_tipo_periodo,tipo:"text",div:"<div id=Ccodigo_tipo_periodo ></div>"}, | |
| 524 | - {titulo:"Tipo de região:",id:"",size:"50",value:i.codigo_tipo_regiao,tipo:"text",div:"<div id=Ccodigo_tipo_regiao ></div>"}, | |
| 525 | - {titulo:"Conexão:",id:"",size:"50",value:i.codigo_estat_conexao,tipo:"text",div:"<div id=Ccodigo_estat_conexao ></div>"}, | |
| 526 | - {titulo:"Esquema do banco:",id:"Eesquemadb",size:"50",value:i.esquemadb,tipo:"text",div:""}, | |
| 527 | - {titulo:"Tabela do banco:",id:"Etabela",size:"50",value:i.tabela,tipo:"text",div:""}, | |
| 528 | - {titulo:"Coluna com os valores:",id:"Ecolunavalor",size:"50",value:i.colunavalor,tipo:"text",div:""}, | |
| 529 | - {titulo:"Coluna com os IDs da tabela GEO:",id:"Ecolunaidgeo",size:"50",value:i.colunaidgeo,tipo:"text",div:""}, | |
| 530 | - {titulo:"Filtro adicional:",id:"Efiltro",size:"50",value:i.filtro,tipo:"text",div:""} | |
| 531 | - ] | |
| 641 | + "linhas":[ | |
| 642 | + {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 643 | + {titulo:"Descrição:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""} | |
| 644 | + ] | |
| 532 | 645 | }; |
| 533 | - ins += core_geraLinhas(param); | |
| 534 | - ins += "<br><br><br>"; | |
| 535 | - $i("editor_bd").innerHTML = ins; | |
| 536 | - if($i("Ccodigo_unidade_medida")){ | |
| 537 | - temp = "<select id='Ecodigo_unidade_medida' >"; | |
| 538 | - temp += core_comboObjeto(dadosAuxiliares.unidade_medida,"codigo_unidade_medida","nome",i.codigo_unidade_medida); | |
| 539 | - temp += "</select>"; | |
| 540 | - $i("Ccodigo_unidade_medida").innerHTML = temp; | |
| 541 | - } | |
| 542 | - if($i("Ccodigo_tipo_periodo")){ | |
| 543 | - temp = "<select id='Ecodigo_tipo_periodo' >"; | |
| 544 | - temp += core_comboObjeto(dadosAuxiliares.tipo_periodo,"codigo_tipo_periodo","nome",i.codigo_tipo_periodo); | |
| 545 | - temp += "</select>"; | |
| 546 | - $i("Ccodigo_tipo_periodo").innerHTML = temp; | |
| 547 | - } | |
| 548 | - if($i("Ccodigo_tipo_regiao")){ | |
| 549 | - temp = "<select id='Ecodigo_tipo_regiao' >"; | |
| 550 | - temp += core_comboObjeto(dadosAuxiliares.tipo_regiao,"codigo_tipo_regiao","nome_tipo_regiao",i.codigo_tipo_regiao); | |
| 551 | - temp += "</select>"; | |
| 552 | - $i("Ccodigo_tipo_regiao").innerHTML = temp; | |
| 553 | - } | |
| 554 | - if($i("Ccodigo_estat_conexao")){ | |
| 555 | - temp = "<select id='Ecodigo_estat_conexao' >"; | |
| 556 | - temp += core_comboObjeto(dadosAuxiliares.conexao,"codigo_estat_conexao","bancodedados",i.codigo_estat_conexao); | |
| 557 | - temp += "</select>"; | |
| 558 | - $i("Ccodigo_estat_conexao").innerHTML = temp; | |
| 559 | - } | |
| 560 | -} | |
| 561 | -function montaDivParametroMedida(i){ | |
| 562 | - var ins = "", | |
| 563 | - param = { | |
| 564 | - "linhas":[ | |
| 565 | - {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 566 | - {titulo:"Descrição:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""}, | |
| 567 | - {titulo:"Coluna:",id:"Ecoluna",size:"50",value:i.coluna,tipo:"text",div:""}, | |
| 568 | - {titulo:"id_pai:",id:"Eid_pai",size:"50",value:i.id_pai,tipo:"text",div:""} | |
| 569 | - ] | |
| 570 | - }; | |
| 571 | - ins += core_geraLinhas(param); | |
| 572 | - ins += "<br><br><br>"; | |
| 573 | - $i("editor_bd").innerHTML = ins; | |
| 574 | -} | |
| 575 | -function montaDivClassificacaoMedida(i){ | |
| 576 | - var ins = "", | |
| 577 | - param = { | |
| 578 | - "linhas":[ | |
| 579 | - {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 580 | - {titulo:"Observação:",id:"Eobservacao",size:"50",value:i.observacao,tipo:"text",div:""} | |
| 581 | - ] | |
| 582 | - }; | |
| 583 | - ins += core_geraLinhas(param); | |
| 584 | - ins += "<br><br><br>"; | |
| 585 | - $i("editor_bd").innerHTML = ins; | |
| 586 | -} | |
| 587 | - | |
| 588 | -function montaDivClasseClassificacao(i){ | |
| 589 | - var ins = "", | |
| 590 | - param = { | |
| 591 | - "linhas":[ | |
| 592 | - {titulo:"Título:",id:"Etitulo",size:"50",value:i.titulo,tipo:"text",div:""}, | |
| 593 | - {titulo:"Expressão (no estilo Mapserver)<br> exemplo (([nu_farm_funcionando] > 0) and ([nu_farm_funcionando] < 5)):",id:"Eexpressao",size:"50",value:i.expressao,tipo:"text",div:""}, | |
| 594 | - {titulo:"Símbolo:",id:"Esimbolo",size:"10",value:i.simbolo,tipo:"text",div:""}, | |
| 595 | - {titulo:"Tamanho do símbolo:",id:"Etamanho",size:"10",value:i.tamanho,tipo:"text",div:""}, | |
| 596 | - {titulo:"Vermelho:",id:"Evermelho",size:"10",value:i.vermelho,tipo:"text",div:""}, | |
| 597 | - {titulo:"Verde:",id:"Everde",size:"10",value:i.verde,tipo:"text",div:""}, | |
| 598 | - {titulo:"Azul:",id:"Eazul",size:"10",value:i.azul,tipo:"text",div:""}, | |
| 599 | - {titulo:"Contorno - tamanho do símbolo:",id:"Eotamanho",size:"10",value:i.otamanho,tipo:"text",div:""}, | |
| 600 | - {titulo:"Contorno - Vermelho:",id:"Eovermelho",size:"10",value:i.overmelho,tipo:"text",div:""}, | |
| 601 | - {titulo:"Contorno - Verde:",id:"Eoverde",size:"10",value:i.overde,tipo:"text",div:""}, | |
| 602 | - {titulo:"Contorno - Azul:",id:"Eoazul",size:"10",value:i.oazul,tipo:"text",div:""} | |
| 603 | - ] | |
| 604 | - }; | |
| 605 | - ins += core_geraLinhas(param); | |
| 606 | - ins += "<br><br><br>"; | |
| 607 | - $i("editor_bd").innerHTML = ins; | |
| 608 | -} | |
| 609 | -function montaDivLinkMedida(i){ | |
| 610 | - var ins = "", | |
| 611 | - param = { | |
| 612 | - "linhas":[ | |
| 613 | - {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 614 | - {titulo:"Link:",id:"Elink",size:"50",value:i.link,tipo:"text",div:""} | |
| 615 | - ] | |
| 616 | - }; | |
| 617 | - ins += core_geraLinhas(param); | |
| 618 | - ins += "<br><br><br>"; | |
| 619 | - $i("editor_bd").innerHTML = ins; | |
| 620 | -} | |
| 621 | -function montaDivFonteinfo(dados){ | |
| 622 | - ins = "<br><b>Escolha a Fonte:</b><br><br>"; | |
| 623 | - ins += "<select style='width:400px;' id='Eid_fonteinfo' >"; | |
| 624 | - ins += core_comboObjeto(dadosAuxiliares.fonteinfo,"id_fonteinfo","titulo"); | |
| 625 | - ins += "</select>"; | |
| 626 | - $i("editor_bd").innerHTML = ins; | |
| 627 | -} | |
| 628 | -/* | |
| 629 | -Function: adicionarMedidaVariavel | |
| 630 | - | |
| 631 | -Adiciona uma nova medida em uma variavel | |
| 632 | - | |
| 633 | -<ALTERAMEDIDAVARIAVEL> | |
| 634 | -*/ | |
| 635 | -function adicionarMedidaVariavel(codigo_variavel){ | |
| 636 | - var no = tree.getNodeByProperty("codigo_variavel",codigo_variavel), | |
| 637 | - sUrl = "../php/metaestat.php?funcao=alteraMedidaVariavel&codigo_variavel="+codigo_variavel, | |
| 638 | - callback = { | |
| 639 | - success: function(oResponse){ | |
| 640 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 641 | - adicionaNosMedidas(no,[dados],true); | |
| 642 | - editar('medidaVariavel',dados.id_medida_variavel); | |
| 643 | - }, | |
| 644 | - failure:core_handleFailure, | |
| 645 | - argument: { foo:"foo", bar:"bar" } | |
| 646 | - }; | |
| 647 | - core_makeRequest(sUrl,callback); | |
| 648 | -} | |
| 649 | -/* | |
| 650 | -Function: adicionarParametroMedida | |
| 651 | - | |
| 652 | -Adiciona uma nova parametro a uma medida de variavel | |
| 653 | - | |
| 654 | -<ADICIONARPARAMETROMedida> | |
| 655 | -*/ | |
| 656 | -function adicionarParametroMedida(id_medida_variavel){ | |
| 657 | - var no = tree.getNodeByProperty("id_medida_variavel",id_medida_variavel), | |
| 658 | - sUrl = "../php/metaestat.php?funcao=alteraParametroMedida&id_medida_variavel="+id_medida_variavel, | |
| 659 | - callback = { | |
| 660 | - success: function(oResponse){ | |
| 661 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 662 | - adicionaNosParametro(no,[dados],true); | |
| 663 | - editar('parametroMedida',dados.id_parametro_medida); | |
| 664 | - }, | |
| 665 | - failure:core_handleFailure, | |
| 666 | - argument: { foo:"foo", bar:"bar" } | |
| 667 | - }; | |
| 668 | - core_makeRequest(sUrl,callback); | |
| 669 | -} | |
| 670 | -function adicionarLinkMedida(id_medida_variavel){ | |
| 671 | - var no = tree.getNodeByProperty("no_link",id_medida_variavel), | |
| 672 | - sUrl = "../php/metaestat.php?funcao=alteraLinkMedida&id_medida_variavel="+id_medida_variavel, | |
| 673 | - callback = { | |
| 674 | - success: function(oResponse){ | |
| 675 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 676 | - adicionaNosLink(no,[dados],true); | |
| 677 | - editar('linkMedida',dados.id_link); | |
| 678 | - }, | |
| 679 | - failure:core_handleFailure, | |
| 680 | - argument: { foo:"foo", bar:"bar" } | |
| 681 | - }; | |
| 682 | - core_makeRequest(sUrl,callback); | |
| 683 | -} | |
| 684 | -function adicionarFonteinfoMedida(id_medida_variavel,id_fonteinfo){ | |
| 685 | - var no = tree.getNodeByProperty("no_fonteinfo",id_medida_variavel), | |
| 686 | - sUrl = "../php/metaestat.php?funcao=alteraFonteinfo&id_medida_variavel="+id_medida_variavel, | |
| 687 | - callback = { | |
| 688 | - success: function(oResponse){ | |
| 689 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 690 | - adicionaNosLink(no,[dados],true); | |
| 691 | - editar('fonteinfo',dados.id_fonteinfo); | |
| 692 | - }, | |
| 693 | - failure:core_handleFailure, | |
| 694 | - argument: { foo:"foo", bar:"bar" } | |
| 695 | - }; | |
| 696 | - core_makeRequest(sUrl,callback); | |
| 697 | -} | |
| 698 | -/* | |
| 699 | -Function: adicionarClassificacaoMedida | |
| 700 | - | |
| 701 | -Adiciona uma nova classificacao a uma medida de variavel | |
| 702 | -*/ | |
| 703 | -function adicionarClassificacaoMedida(id_medida_variavel){ | |
| 704 | - var no = tree.getNodeByProperty("no_classificacao",id_medida_variavel), | |
| 705 | - sUrl = "../php/metaestat.php?funcao=alteraClassificacaoMedida&id_medida_variavel="+id_medida_variavel, | |
| 706 | - callback = { | |
| 707 | - success: function(oResponse){ | |
| 708 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 709 | - adicionaNosClassificacao(no,[dados],true); | |
| 710 | - editar('classificacaoMedida',dados.id_classificacao); | |
| 711 | - }, | |
| 712 | - failure:core_handleFailure, | |
| 713 | - argument: { foo:"foo", bar:"bar" } | |
| 714 | - }; | |
| 715 | - core_makeRequest(sUrl,callback); | |
| 716 | -} | |
| 717 | -/* | |
| 718 | -Function: adicionarClasseClassificacao | |
| 719 | - | |
| 720 | -Adiciona uma nova classe a uma classificacao | |
| 721 | -*/ | |
| 722 | -function adicionarClasseClassificacao(id_classificacao){ | |
| 723 | - var no = tree.getNodeByProperty("id_classificacao",id_classificacao), | |
| 724 | - sUrl = "../php/metaestat.php?funcao=alteraClasseClassificacao&id_classificacao="+id_classificacao, | |
| 725 | - callback = { | |
| 726 | - success: function(oResponse){ | |
| 727 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 728 | - adicionaNosClasses(no,[dados],true); | |
| 729 | - editar('classeClassificacao',dados.id_classe); | |
| 730 | - }, | |
| 731 | - failure:core_handleFailure, | |
| 732 | - argument: { foo:"foo", bar:"bar" } | |
| 733 | - }; | |
| 734 | - core_makeRequest(sUrl,callback); | |
| 735 | -} | |
| 736 | -/* | |
| 737 | -Function: editar | |
| 738 | - | |
| 739 | -Abre o editor de um nó | |
| 740 | -*/ | |
| 741 | -function editar(tipo,id) { | |
| 742 | - core_carregando("ativa"); | |
| 743 | - core_carregando(" buscando dados"); | |
| 744 | - var sUrl = null, | |
| 646 | + ins += core_geraLinhas(param); | |
| 647 | + ins += "<br><br><br>"; | |
| 648 | + $i("editor_bd").innerHTML = ins; | |
| 649 | + }, | |
| 650 | + editar: function(tipo,id) { | |
| 651 | + core_carregando("ativa"); | |
| 652 | + core_carregando(" buscando dados"); | |
| 653 | + var sUrl = null, | |
| 745 | 654 | callback = { |
| 746 | - success:function(o) { | |
| 747 | - try { | |
| 748 | - var dados; | |
| 749 | - if(tipo == "variavel"){ | |
| 750 | - dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 751 | - core_montaEditor("gravaDados('variavel','"+id+"')","450px","200px","","Editor de variável"); | |
| 752 | - montaDivVariavel(dados); | |
| 753 | - } | |
| 754 | - if(tipo == "medidaVariavel"){ | |
| 755 | - dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 756 | - core_montaEditor("gravaDados('medidaVariavel','"+id+"')","450px","200px","","Editor de medidas"); | |
| 757 | - montaDivMedidaVariavel(dados); | |
| 758 | - } | |
| 759 | - if(tipo == "parametroMedida"){ | |
| 760 | - dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 761 | - core_montaEditor("gravaDados('parametroMedida','"+id+"')","450px","200px","","Editor de parâmetros"); | |
| 762 | - montaDivParametroMedida(dados); | |
| 763 | - } | |
| 764 | - if(tipo == "classificacaoMedida"){ | |
| 765 | - dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 766 | - core_montaEditor("gravaDados('classificacaoMedida','"+id+"')","450px","200px","","Editor de classificação"); | |
| 767 | - montaDivClassificacaoMedida(dados); | |
| 768 | - } | |
| 769 | - if(tipo == "classeClassificacao"){ | |
| 770 | - dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 771 | - core_montaEditor("gravaDados('classeClassificacao','"+id+"')","450px","200px","","Editor de classe"); | |
| 772 | - montaDivClasseClassificacao(dados); | |
| 773 | - } | |
| 774 | - if(tipo == "linkMedida"){ | |
| 775 | - dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 776 | - core_montaEditor("gravaDados('linkMedida','"+id+"')","450px","200px","","Editor de links"); | |
| 777 | - montaDivLinkMedida(dados); | |
| 655 | + success:function(o) { | |
| 656 | + try { | |
| 657 | + var dados; | |
| 658 | + if(tipo == "variavel"){ | |
| 659 | + dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 660 | + core_montaEditor("gravaDados('variavel','"+id+"')","450px","200px","","Editor de variável"); | |
| 661 | + i3GEOadmin.variaveis.montaDivVariavel(dados); | |
| 662 | + } | |
| 663 | + if(tipo == "medidaVariavel"){ | |
| 664 | + dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 665 | + core_montaEditor("gravaDados('medidaVariavel','"+id+"')","450px","200px","","Editor de medidas"); | |
| 666 | + i3GEOadmin.variaveis.medidas.montaDiv(dados); | |
| 667 | + } | |
| 668 | + if(tipo == "parametroMedida"){ | |
| 669 | + dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 670 | + core_montaEditor("gravaDados('parametroMedida','"+id+"')","450px","200px","","Editor de parâmetros"); | |
| 671 | + i3GEOadmin.variaveis.parametro.montaDiv(dados); | |
| 672 | + } | |
| 673 | + if(tipo == "classificacaoMedida"){ | |
| 674 | + dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 675 | + core_montaEditor("gravaDados('classificacaoMedida','"+id+"')","450px","200px","","Editor de classificação"); | |
| 676 | + i3GEOadmin.variaveis.classificacao.montaDiv(dados); | |
| 677 | + } | |
| 678 | + if(tipo == "classeClassificacao"){ | |
| 679 | + dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 680 | + core_montaEditor("gravaDados('classeClassificacao','"+id+"')","450px","200px","","Editor de classe"); | |
| 681 | + i3GEOadmin.variaveis.classes.montaDiv(dados); | |
| 682 | + } | |
| 683 | + if(tipo == "linkMedida"){ | |
| 684 | + dados = YAHOO.lang.JSON.parse(o.responseText); | |
| 685 | + core_montaEditor("gravaDados('linkMedida','"+id+"')","450px","200px","","Editor de links"); | |
| 686 | + i3GEO.variaveis.link.montaDiv(dados); | |
| 687 | + } | |
| 688 | + core_carregando("desativa"); | |
| 778 | 689 | } |
| 779 | - core_carregando("desativa"); | |
| 780 | - } | |
| 781 | - catch(e){core_handleFailure(e,o.responseText);} | |
| 782 | - }, | |
| 783 | - failure:core_handleFailure, | |
| 784 | - argument: { foo:"foo", bar:"bar" } | |
| 690 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 691 | + }, | |
| 692 | + failure:core_handleFailure, | |
| 693 | + argument: { foo:"foo", bar:"bar" } | |
| 785 | 694 | }; |
| 786 | - if(tipo == "variavel"){ | |
| 787 | - sUrl = "../php/metaestat.php?funcao=listaVariavel&codigo_variavel="+id; | |
| 788 | - } | |
| 789 | - if(tipo == "medidaVariavel"){ | |
| 790 | - sUrl = "../php/metaestat.php?funcao=listaMedidaVariavel&id_medida_variavel="+id; | |
| 791 | - } | |
| 792 | - if(tipo == "parametroMedida"){ | |
| 793 | - sUrl = "../php/metaestat.php?funcao=listaParametro&id_parametro_medida="+id; | |
| 794 | - } | |
| 795 | - if(tipo == "classificacaoMedida"){ | |
| 796 | - sUrl = "../php/metaestat.php?funcao=listaClassificacaoMedida&id_classificacao="+id; | |
| 797 | - } | |
| 798 | - if(tipo == "classeClassificacao"){ | |
| 799 | - sUrl = "../php/metaestat.php?funcao=listaClasseClassificacao&id_classe="+id; | |
| 800 | - } | |
| 801 | - if(tipo == "linkMedida"){ | |
| 802 | - sUrl = "../php/metaestat.php?funcao=listaLinkMedida&id_link="+id; | |
| 803 | - } | |
| 804 | - if(tipo == "fonteinfo"){ | |
| 805 | - core_montaEditor("gravaDados('fonteinfo','"+id+"')","450px","200px","","Editor de fontes"); | |
| 806 | - montaDivFonteinfo(); | |
| 807 | - core_carregando("desativa"); | |
| 808 | - } | |
| 809 | - if(sUrl){ | |
| 810 | - core_makeRequest(sUrl,callback); | |
| 811 | - } | |
| 812 | -} | |
| 813 | -/* | |
| 814 | -Function: sql | |
| 815 | - | |
| 816 | -Mostra o sql que acessa os dados | |
| 817 | -*/ | |
| 818 | -function sql(tipo,id) { | |
| 819 | - core_carregando("ativa"); | |
| 820 | - core_carregando(" buscando dados"); | |
| 821 | - var sUrl = null, | |
| 695 | + if(tipo == "variavel"){ | |
| 696 | + sUrl = "../php/metaestat.php?funcao=listaVariavel&codigo_variavel="+id; | |
| 697 | + } | |
| 698 | + if(tipo == "medidaVariavel"){ | |
| 699 | + sUrl = "../php/metaestat.php?funcao=listaMedidaVariavel&id_medida_variavel="+id; | |
| 700 | + } | |
| 701 | + if(tipo == "parametroMedida"){ | |
| 702 | + sUrl = "../php/metaestat.php?funcao=listaParametro&id_parametro_medida="+id; | |
| 703 | + } | |
| 704 | + if(tipo == "classificacaoMedida"){ | |
| 705 | + sUrl = "../php/metaestat.php?funcao=listaClassificacaoMedida&id_classificacao="+id; | |
| 706 | + } | |
| 707 | + if(tipo == "classeClassificacao"){ | |
| 708 | + sUrl = "../php/metaestat.php?funcao=listaClasseClassificacao&id_classe="+id; | |
| 709 | + } | |
| 710 | + if(tipo == "linkMedida"){ | |
| 711 | + sUrl = "../php/metaestat.php?funcao=listaLinkMedida&id_link="+id; | |
| 712 | + } | |
| 713 | + if(tipo == "fonteinfo"){ | |
| 714 | + core_montaEditor("gravaDados('fonteinfo','"+id+"')","450px","200px","","Editor de fontes"); | |
| 715 | + i3GEOadmin.variaveis.fonte.montaDiv(); | |
| 716 | + core_carregando("desativa"); | |
| 717 | + } | |
| 718 | + if(sUrl){ | |
| 719 | + core_makeRequest(sUrl,callback); | |
| 720 | + } | |
| 721 | + }, | |
| 722 | + sql: function(tipo,id) { | |
| 723 | + core_carregando("ativa"); | |
| 724 | + core_carregando(" buscando dados"); | |
| 725 | + var sUrl = null, | |
| 822 | 726 | callback = { |
| 823 | - success:function(o) { | |
| 824 | - try { | |
| 825 | - if(tipo == "medidaVariavel"){ | |
| 826 | - var ins = "", | |
| 727 | + success:function(o) { | |
| 728 | + try { | |
| 729 | + if(tipo == "medidaVariavel"){ | |
| 730 | + var ins = "", | |
| 827 | 731 | dados = YAHOO.lang.JSON.parse(o.responseText); |
| 828 | - core_montaEditor("","480px","300px","","SQL"); | |
| 829 | - ins = "<p><b>Select simples:</b> "+dados.sql; | |
| 830 | - ins += "<p><b>Mapserver:</b> "+dados.sqlmapserver; | |
| 831 | - ins += "<p><b>Última URL:</b><div id='ultimaUrl'></div> "; | |
| 832 | - ins += "<p><b>Colunas:</b> "+dados.colunas; | |
| 833 | - ins +="<p><input style='position:relative;top:2px' type='checkbox' id='incluirtodascolunas' />Incluir todas as colunas no resultado"; | |
| 834 | - ins +="<p>Filtro opcional (exemplo: valor = 1)<br>"; | |
| 835 | - ins += "<input type=text value='' id='filtrosql' />"; | |
| 836 | - ins +="<p>Agrupar pela coluna<br>"; | |
| 837 | - ins += "<input type=text value='' id='agruparsql' />"; | |
| 838 | - ins +="<p>Tipo de layer (para o caso de mapas ou mapfiles, podendo ser point,line ou polygon)<br>"; | |
| 839 | - ins += "<input type=text value='' id='tipolayer' />"; | |
| 840 | - ins +="<p>Codigo da classificação que será usada para mostrar o mapa<br>"; | |
| 841 | - ins += "<input type=text value='' id='classificacao' />"; | |
| 842 | - ins += ' <p><input type=button id="sqljson" value="JSON" />'; | |
| 843 | - ins += ' <input type=button id="xmlestat" value="XML" />'; | |
| 844 | - ins += ' <input type=button id="sumarioestat" value="Sumário" />'; | |
| 845 | - ins += ' <input type=button id="sumarioxmlestat" value="Sumário XML" />'; | |
| 846 | - ins += ' <input type=button id="graficoestat" value="Gráfico" />'; | |
| 847 | - ins += ' <input type=button id="mapfileestat" value="Mapfile" /><br><br>'; | |
| 848 | - ins += ' <input type=button id="i3geoestat" value="i3Geo" />'; | |
| 849 | - ins += ' <input type=button id="kmzestat" value="Kmz (vetorial)" />'; | |
| 850 | - ins += ' <input type=button id="kmlestat" value="Kml (wms)" />'; | |
| 851 | - ins += ' <input type=button id="kml3destat" value="Kml 3d" />'; | |
| 732 | + core_montaEditor("","480px","300px","","SQL"); | |
| 733 | + ins = "<p><b>Select simples:</b> "+dados.sql; | |
| 734 | + ins += "<p><b>Mapserver:</b> "+dados.sqlmapserver; | |
| 735 | + ins += "<p><b>Última URL:</b><div id='ultimaUrl'></div> "; | |
| 736 | + ins += "<p><b>Colunas:</b> "+dados.colunas; | |
| 737 | + ins +="<p><input style='position:relative;top:2px' type='checkbox' id='incluirtodascolunas' />Incluir todas as colunas no resultado"; | |
| 738 | + ins +="<p>Filtro opcional (exemplo: valor = 1)<br>"; | |
| 739 | + ins += "<input type=text value='' id='filtrosql' />"; | |
| 740 | + ins +="<p>Agrupar pela coluna<br>"; | |
| 741 | + ins += "<input type=text value='' id='agruparsql' />"; | |
| 742 | + ins +="<p>Tipo de layer (para o caso de mapas ou mapfiles, podendo ser point,line ou polygon)<br>"; | |
| 743 | + ins += "<input type=text value='' id='tipolayer' />"; | |
| 744 | + ins +="<p>Codigo da classificação que será usada para mostrar o mapa<br>"; | |
| 745 | + ins += "<input type=text value='' id='classificacao' />"; | |
| 746 | + ins += ' <p><input type=button id="sqljson" value="JSON" />'; | |
| 747 | + ins += ' <input type=button id="xmlestat" value="XML" />'; | |
| 748 | + ins += ' <input type=button id="sumarioestat" value="Sumário" />'; | |
| 749 | + ins += ' <input type=button id="sumarioxmlestat" value="Sumário XML" />'; | |
| 750 | + ins += ' <input type=button id="graficoestat" value="Gráfico" />'; | |
| 751 | + ins += ' <input type=button id="mapfileestat" value="Mapfile" /><br><br>'; | |
| 752 | + ins += ' <input type=button id="i3geoestat" value="i3Geo" />'; | |
| 753 | + ins += ' <input type=button id="kmzestat" value="Kmz (vetorial)" />'; | |
| 754 | + ins += ' <input type=button id="kmlestat" value="Kml (wms)" />'; | |
| 755 | + ins += ' <input type=button id="kml3destat" value="Kml 3d" />'; | |
| 852 | 756 | |
| 853 | - $i("editor_bd").innerHTML = ins; | |
| 854 | - new YAHOO.widget.Button("sqljson"); | |
| 855 | - document.getElementById("sqljson-button").onclick = function(){ | |
| 856 | - var u,colunas = 0; | |
| 857 | - if($i("incluirtodascolunas").checked === true){ | |
| 858 | - colunas = 1; | |
| 859 | - } | |
| 860 | - u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=dadosMedidaVariavel&formato=json&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&agruparpor="+$i("agruparsql").value; | |
| 861 | - $i("ultimaUrl").innerHTML = u; | |
| 862 | - window.open(u); | |
| 863 | - }; | |
| 864 | - new YAHOO.widget.Button("xmlestat"); | |
| 865 | - document.getElementById("xmlestat-button").onclick = function(){ | |
| 866 | - var u,colunas = 0; | |
| 867 | - if($i("incluirtodascolunas").checked === true){ | |
| 868 | - colunas = 1; | |
| 869 | - } | |
| 870 | - u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=dadosMedidaVariavel&formato=xml&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&agruparpor="+$i("agruparsql").value; | |
| 871 | - $i("ultimaUrl").innerHTML = u; | |
| 872 | - window.open(u); | |
| 873 | - }; | |
| 874 | - new YAHOO.widget.Button("sumarioestat"); | |
| 875 | - $i("sumarioestat-button").onclick = function(){ | |
| 876 | - var u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=sumarioMedidaVariavel&formato=json&id_medida_variavel='+id+"&agruparpor="+$i("agruparsql").value+"&filtro="+$i("filtrosql").value; | |
| 877 | - $i("ultimaUrl").innerHTML = u; | |
| 878 | - window.open(u); | |
| 879 | - }; | |
| 880 | - new YAHOO.widget.Button("sumarioxmlestat"); | |
| 881 | - $i("sumarioxmlestat-button").onclick = function(){ | |
| 882 | - var u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=sumarioMedidaVariavel&formato=xml&id_medida_variavel='+id+"&agruparpor="+$i("agruparsql").value+"&filtro="+$i("filtrosql").value; | |
| 883 | - $i("ultimaUrl").innerHTML = u; | |
| 884 | - window.open(u); | |
| 885 | - }; | |
| 886 | - new YAHOO.widget.Button("mapfileestat"); | |
| 887 | - $i("mapfileestat-button").onclick = function(){ | |
| 888 | - var u,colunas = 0; | |
| 889 | - if($i("incluirtodascolunas").checked === true){ | |
| 890 | - colunas = 1; | |
| 891 | - } | |
| 892 | - u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=mapfileMedidaVariavel&formato=json&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value; | |
| 893 | - $i("ultimaUrl").innerHTML = u; | |
| 894 | - window.open(u); | |
| 895 | - }; | |
| 896 | - new YAHOO.widget.Button("kmzestat"); | |
| 897 | - $i("kmzestat-button").onclick = function(){ | |
| 898 | - var u,colunas = 0; | |
| 899 | - if($i("incluirtodascolunas").checked === true){ | |
| 900 | - colunas = 1; | |
| 901 | - } | |
| 902 | - u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=kmlmedidavariavel&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value+"&formato=kmz"; | |
| 903 | - $i("ultimaUrl").innerHTML = u; | |
| 904 | - window.open(u); | |
| 905 | - }; | |
| 906 | - new YAHOO.widget.Button("kmlestat"); | |
| 907 | - $i("kmlestat-button").onclick = function(){ | |
| 908 | - var u,colunas = 0; | |
| 909 | - if($i("incluirtodascolunas").checked === true){ | |
| 910 | - colunas = 1; | |
| 911 | - } | |
| 912 | - u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=kmlmedidavariavel&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value+"&formato=kml"; | |
| 913 | - $i("ultimaUrl").innerHTML = u; | |
| 914 | - window.open(u); | |
| 915 | - }; | |
| 916 | - new YAHOO.widget.Button("kml3destat"); | |
| 917 | - $i("kml3destat-button").onclick = function(){ | |
| 918 | - var u,colunas = 0; | |
| 919 | - if($i("incluirtodascolunas").checked === true){ | |
| 920 | - colunas = 1; | |
| 921 | - } | |
| 922 | - u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=kmlmedidavariavel&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value+"&formato=kml3d"; | |
| 923 | - $i("ultimaUrl").innerHTML = u; | |
| 924 | - window.open(u); | |
| 925 | - }; | |
| 926 | - new YAHOO.widget.Button("i3geoestat"); | |
| 927 | - $i("i3geoestat-button").onclick = function(){ | |
| 928 | - var u,sUrl,callback = { | |
| 929 | - success: function(oResponse){ | |
| 930 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 931 | - u = i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+dados.mapfile+"&layers="+dados.layer; | |
| 932 | - $i("ultimaUrl").innerHTML = u; | |
| 933 | - window.open(u); | |
| 934 | - core_carregando("desativa"); | |
| 935 | - }, | |
| 936 | - failure:core_handleFailure, | |
| 937 | - argument: { foo:"foo", bar:"bar" } | |
| 757 | + $i("editor_bd").innerHTML = ins; | |
| 758 | + new YAHOO.widget.Button("sqljson"); | |
| 759 | + document.getElementById("sqljson-button").onclick = function(){ | |
| 760 | + var u,colunas = 0; | |
| 761 | + if($i("incluirtodascolunas").checked === true){ | |
| 762 | + colunas = 1; | |
| 763 | + } | |
| 764 | + u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=dadosMedidaVariavel&formato=json&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&agruparpor="+$i("agruparsql").value; | |
| 765 | + $i("ultimaUrl").innerHTML = u; | |
| 766 | + window.open(u); | |
| 767 | + }; | |
| 768 | + new YAHOO.widget.Button("xmlestat"); | |
| 769 | + document.getElementById("xmlestat-button").onclick = function(){ | |
| 770 | + var u,colunas = 0; | |
| 771 | + if($i("incluirtodascolunas").checked === true){ | |
| 772 | + colunas = 1; | |
| 773 | + } | |
| 774 | + u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=dadosMedidaVariavel&formato=xml&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&agruparpor="+$i("agruparsql").value; | |
| 775 | + $i("ultimaUrl").innerHTML = u; | |
| 776 | + window.open(u); | |
| 777 | + }; | |
| 778 | + new YAHOO.widget.Button("sumarioestat"); | |
| 779 | + $i("sumarioestat-button").onclick = function(){ | |
| 780 | + var u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=sumarioMedidaVariavel&formato=json&id_medida_variavel='+id+"&agruparpor="+$i("agruparsql").value+"&filtro="+$i("filtrosql").value; | |
| 781 | + $i("ultimaUrl").innerHTML = u; | |
| 782 | + window.open(u); | |
| 783 | + }; | |
| 784 | + new YAHOO.widget.Button("sumarioxmlestat"); | |
| 785 | + $i("sumarioxmlestat-button").onclick = function(){ | |
| 786 | + var u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=sumarioMedidaVariavel&formato=xml&id_medida_variavel='+id+"&agruparpor="+$i("agruparsql").value+"&filtro="+$i("filtrosql").value; | |
| 787 | + $i("ultimaUrl").innerHTML = u; | |
| 788 | + window.open(u); | |
| 789 | + }; | |
| 790 | + new YAHOO.widget.Button("mapfileestat"); | |
| 791 | + $i("mapfileestat-button").onclick = function(){ | |
| 792 | + var u,colunas = 0; | |
| 793 | + if($i("incluirtodascolunas").checked === true){ | |
| 794 | + colunas = 1; | |
| 795 | + } | |
| 796 | + u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=mapfileMedidaVariavel&formato=json&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value; | |
| 797 | + $i("ultimaUrl").innerHTML = u; | |
| 798 | + window.open(u); | |
| 799 | + }; | |
| 800 | + new YAHOO.widget.Button("kmzestat"); | |
| 801 | + $i("kmzestat-button").onclick = function(){ | |
| 802 | + var u,colunas = 0; | |
| 803 | + if($i("incluirtodascolunas").checked === true){ | |
| 804 | + colunas = 1; | |
| 805 | + } | |
| 806 | + u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=kmlmedidavariavel&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value+"&formato=kmz"; | |
| 807 | + $i("ultimaUrl").innerHTML = u; | |
| 808 | + window.open(u); | |
| 809 | + }; | |
| 810 | + new YAHOO.widget.Button("kmlestat"); | |
| 811 | + $i("kmlestat-button").onclick = function(){ | |
| 812 | + var u,colunas = 0; | |
| 813 | + if($i("incluirtodascolunas").checked === true){ | |
| 814 | + colunas = 1; | |
| 815 | + } | |
| 816 | + u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=kmlmedidavariavel&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value+"&formato=kml"; | |
| 817 | + $i("ultimaUrl").innerHTML = u; | |
| 818 | + window.open(u); | |
| 819 | + }; | |
| 820 | + new YAHOO.widget.Button("kml3destat"); | |
| 821 | + $i("kml3destat-button").onclick = function(){ | |
| 822 | + var u,colunas = 0; | |
| 823 | + if($i("incluirtodascolunas").checked === true){ | |
| 824 | + colunas = 1; | |
| 825 | + } | |
| 826 | + u = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=kmlmedidavariavel&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value+"&formato=kml3d"; | |
| 827 | + $i("ultimaUrl").innerHTML = u; | |
| 828 | + window.open(u); | |
| 829 | + }; | |
| 830 | + new YAHOO.widget.Button("i3geoestat"); | |
| 831 | + $i("i3geoestat-button").onclick = function(){ | |
| 832 | + var u,sUrl,callback = { | |
| 833 | + success: function(oResponse){ | |
| 834 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 835 | + u = i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+dados.mapfile+"&layers="+dados.layer; | |
| 836 | + $i("ultimaUrl").innerHTML = u; | |
| 837 | + window.open(u); | |
| 838 | + core_carregando("desativa"); | |
| 839 | + }, | |
| 840 | + failure:core_handleFailure, | |
| 841 | + argument: { foo:"foo", bar:"bar" } | |
| 938 | 842 | }, |
| 939 | 843 | colunas = 0; |
| 940 | - if($i("incluirtodascolunas").checked === true){ | |
| 941 | - colunas = 1; | |
| 942 | - } | |
| 943 | - sUrl = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=mapfileMedidaVariavel&formato=json&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value; | |
| 944 | - core_carregando("ativa"); | |
| 945 | - core_makeRequest(sUrl,callback); | |
| 946 | - }; | |
| 947 | - new YAHOO.widget.Button("graficoestat"); | |
| 948 | - $i("graficoestat-button").onclick = function(){ | |
| 949 | - var callback = { | |
| 950 | - success: function(oResponse){ | |
| 951 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 952 | - dados = dados.grupos; | |
| 953 | - if(dados == ""){ | |
| 954 | - dados = dados.histograma; | |
| 955 | - } | |
| 956 | - //converte os dados para o padrao usado no grafico | |
| 957 | - abreDados = function(){ | |
| 958 | - i3GEOF.graficointerativo.dados = dados; | |
| 959 | - i3GEOF.graficointerativo.montaTabelaDados = function(dados){ | |
| 960 | - var i=0, | |
| 844 | + if($i("incluirtodascolunas").checked === true){ | |
| 845 | + colunas = 1; | |
| 846 | + } | |
| 847 | + sUrl = i3GEO.configura.locaplic+'/admin/php/metaestat.php?funcao=mapfileMedidaVariavel&formato=json&id_medida_variavel='+id+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas+"&tipolayer="+$i("tipolayer").value+"&id_classificacao="+$i("classificacao").value+"&agruparpor="+$i("agruparsql").value; | |
| 848 | + core_carregando("ativa"); | |
| 849 | + core_makeRequest(sUrl,callback); | |
| 850 | + }; | |
| 851 | + new YAHOO.widget.Button("graficoestat"); | |
| 852 | + $i("graficoestat-button").onclick = function(){ | |
| 853 | + var callback = { | |
| 854 | + success: function(oResponse){ | |
| 855 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 856 | + dados = dados.grupos; | |
| 857 | + if(dados == ""){ | |
| 858 | + dados = dados.histograma; | |
| 859 | + } | |
| 860 | + //converte os dados para o padrao usado no grafico | |
| 861 | + abreDados = function(){ | |
| 862 | + i3GEOF.graficointerativo.dados = dados; | |
| 863 | + i3GEOF.graficointerativo.montaTabelaDados = function(dados){ | |
| 864 | + var i=0, | |
| 961 | 865 | v, |
| 962 | 866 | ins, |
| 963 | 867 | key = "", |
| 964 | 868 | id, |
| 965 | 869 | cor = "#C11515"; |
| 966 | - n = dados.lenght; | |
| 967 | - v = []; | |
| 968 | - ins = []; | |
| 969 | - ins.push("<p class=paragrafo >Tabela de dados para o gráfico. Os valores podem ser editados</p><table class=lista4 id=i3GEOgraficointerativotabeladados ><tr><td></td>"); | |
| 970 | - ins.push("<td style=background-color:yellow > <img style=cursor:pointer onclick='i3GEOF.graficointerativo.ordenaColuna(this,1)' src='"+i3GEO.configura.locaplic+"/imagens/ordena1.gif' title='ordena' /> nome</td>"); | |
| 971 | - ins.push("<td style=background-color:yellow > <img style=cursor:pointer onclick='i3GEOF.graficointerativo.ordenaColuna(this,2)' src='"+i3GEO.configura.locaplic+"/imagens/ordena1.gif' title='ordena' /> valor</td>"); | |
| 972 | - ins.push("<td style=background-color:yellow >cor</td><td></td></tr>"); | |
| 973 | - for(key in dados){ | |
| 974 | - v[0] = key; | |
| 975 | - v[1] = dados[key]; | |
| 976 | - id = "i3GEOgraficointerativoDados"+i; //layer+indice da classe | |
| 977 | - ins.push("<tr><td>"); | |
| 978 | - ins.push("<img style='cursor:pointer' title='clique para excluir' onclick='i3GEOF.graficointerativo.excluilinha(this)' src='"+i3GEO.configura.locaplic+"/imagens/x.gif' title='excluir' /></td>"); | |
| 979 | - ins.push("</td><td>"); | |
| 980 | - ins.push($inputText("","",id+"_nome","digite o novo nome",20,v[0],"nome")); | |
| 981 | - ins.push("</td><td>"); | |
| 982 | - ins.push($inputText("","",id+"_valor","digite o novo valor",12,v[1],"valor")); | |
| 983 | - ins.push("</td><td>"); | |
| 984 | - if($i("i3GEOgraficointerativoCoresA").checked){ | |
| 985 | - cor = i3GEO.util.rgb2hex(i3GEO.util.randomRGB()); | |
| 870 | + n = dados.lenght; | |
| 871 | + v = []; | |
| 872 | + ins = []; | |
| 873 | + ins.push("<p class=paragrafo >Tabela de dados para o gráfico. Os valores podem ser editados</p><table class=lista4 id=i3GEOgraficointerativotabeladados ><tr><td></td>"); | |
| 874 | + ins.push("<td style=background-color:yellow > <img style=cursor:pointer onclick='i3GEOF.graficointerativo.ordenaColuna(this,1)' src='"+i3GEO.configura.locaplic+"/imagens/ordena1.gif' title='ordena' /> nome</td>"); | |
| 875 | + ins.push("<td style=background-color:yellow > <img style=cursor:pointer onclick='i3GEOF.graficointerativo.ordenaColuna(this,2)' src='"+i3GEO.configura.locaplic+"/imagens/ordena1.gif' title='ordena' /> valor</td>"); | |
| 876 | + ins.push("<td style=background-color:yellow >cor</td><td></td></tr>"); | |
| 877 | + for(key in dados){ | |
| 878 | + v[0] = key; | |
| 879 | + v[1] = dados[key]; | |
| 880 | + id = "i3GEOgraficointerativoDados"+i; //layer+indice da classe | |
| 881 | + ins.push("<tr><td>"); | |
| 882 | + ins.push("<img style='cursor:pointer' title='clique para excluir' onclick='i3GEOF.graficointerativo.excluilinha(this)' src='"+i3GEO.configura.locaplic+"/imagens/x.gif' title='excluir' /></td>"); | |
| 883 | + ins.push("</td><td>"); | |
| 884 | + ins.push($inputText("","",id+"_nome","digite o novo nome",20,v[0],"nome")); | |
| 885 | + ins.push("</td><td>"); | |
| 886 | + ins.push($inputText("","",id+"_valor","digite o novo valor",12,v[1],"valor")); | |
| 887 | + ins.push("</td><td>"); | |
| 888 | + if($i("i3GEOgraficointerativoCoresA").checked){ | |
| 889 | + cor = i3GEO.util.rgb2hex(i3GEO.util.randomRGB()); | |
| 890 | + } | |
| 891 | + //verifica se no objeto com os dados existe um terceiro valor com as cores | |
| 892 | + if(v[2]){ | |
| 893 | + cor = i3GEO.util.rgb2hex(v[2]); | |
| 894 | + } | |
| 895 | + ins.push($inputText("","",id+"_cor","",12,cor,"cor")); | |
| 896 | + ins.push("</td><td>"); | |
| 897 | + ins.push("<img alt='aquarela.gif' style=cursor:pointer src='"+i3GEO.configura.locaplic+"/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo.corj(\""+id+"_cor\")' />"); | |
| 898 | + ins.push("</td></tr>"); | |
| 899 | + i++; | |
| 986 | 900 | } |
| 987 | - //verifica se no objeto com os dados existe um terceiro valor com as cores | |
| 988 | - if(v[2]){ | |
| 989 | - cor = i3GEO.util.rgb2hex(v[2]); | |
| 901 | + ins.push("</table><br>"); | |
| 902 | + //ins.push("<input type=hidden id=i3GEOgraficointerativoComboXid />"); | |
| 903 | + //ins.push("<input type=hidden id=i3GEOgraficointerativoComboYid />"); | |
| 904 | + $i("i3GEOgraficointerativoDados").innerHTML = ins.join(""); | |
| 905 | + if($i("agruparsql").value != ""){ | |
| 906 | + //$i("i3GEOgraficointerativoComboXid").value = $i("agruparsql").value; | |
| 907 | + //$i("i3GEOgraficointerativoComboYid").value = "Soma"; | |
| 990 | 908 | } |
| 991 | - ins.push($inputText("","",id+"_cor","",12,cor,"cor")); | |
| 992 | - ins.push("</td><td>"); | |
| 993 | - ins.push("<img alt='aquarela.gif' style=cursor:pointer src='"+i3GEO.configura.locaplic+"/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo.corj(\""+id+"_cor\")' />"); | |
| 994 | - ins.push("</td></tr>"); | |
| 995 | - i++; | |
| 996 | - } | |
| 997 | - ins.push("</table><br>"); | |
| 998 | - //ins.push("<input type=hidden id=i3GEOgraficointerativoComboXid />"); | |
| 999 | - //ins.push("<input type=hidden id=i3GEOgraficointerativoComboYid />"); | |
| 1000 | - $i("i3GEOgraficointerativoDados").innerHTML = ins.join(""); | |
| 1001 | - if($i("agruparsql").value != ""){ | |
| 1002 | - //$i("i3GEOgraficointerativoComboXid").value = $i("agruparsql").value; | |
| 1003 | - //$i("i3GEOgraficointerativoComboYid").value = "Soma"; | |
| 1004 | - } | |
| 909 | + }; | |
| 910 | + i3GEOF.graficointerativo.criaJanelaFlutuante(); | |
| 911 | + core_carregando("desativa"); | |
| 1005 | 912 | }; |
| 1006 | - i3GEOF.graficointerativo.criaJanelaFlutuante(); | |
| 1007 | - core_carregando("desativa"); | |
| 1008 | - }; | |
| 1009 | - i3GEO.util.scriptTag( | |
| 1010 | - "../../ferramentas/graficointerativo/index.js", | |
| 1011 | - "abreDados()", | |
| 1012 | - "i3GEOF.graficointerativo_script" | |
| 1013 | - ); | |
| 1014 | - }, | |
| 1015 | - failure:core_handleFailure, | |
| 1016 | - argument: { foo:"foo", bar:"bar" } | |
| 913 | + i3GEO.util.scriptTag( | |
| 914 | + "../../ferramentas/graficointerativo/index.js", | |
| 915 | + "abreDados()", | |
| 916 | + "i3GEOF.graficointerativo_script" | |
| 917 | + ); | |
| 918 | + }, | |
| 919 | + failure:core_handleFailure, | |
| 920 | + argument: { foo:"foo", bar:"bar" } | |
| 1017 | 921 | }, |
| 1018 | 922 | sUrl = '../php/metaestat.php?funcao=sumarioMedidaVariavel&formato=json&id_medida_variavel='+id+"&agruparpor="+$i("agruparsql").value+"&filtro="+document.getElementById("filtrosql").value; |
| 1019 | - core_carregando("ativa"); | |
| 1020 | - core_makeRequest(sUrl,callback); | |
| 1021 | - }; | |
| 1022 | - } | |
| 1023 | - if(tipo == "parametroMedida"){ | |
| 923 | + core_carregando("ativa"); | |
| 924 | + core_makeRequest(sUrl,callback); | |
| 925 | + }; | |
| 926 | + } | |
| 927 | + if(tipo == "parametroMedida"){ | |
| 1024 | 928 | |
| 929 | + } | |
| 930 | + core_carregando("desativa"); | |
| 1025 | 931 | } |
| 1026 | - core_carregando("desativa"); | |
| 1027 | - } | |
| 1028 | - catch(e){core_handleFailure(e,o.responseText);} | |
| 1029 | - }, | |
| 1030 | - failure:core_handleFailure, | |
| 1031 | - argument: { foo:"foo", bar:"bar" } | |
| 932 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 933 | + }, | |
| 934 | + failure:core_handleFailure, | |
| 935 | + argument: { foo:"foo", bar:"bar" } | |
| 1032 | 936 | }; |
| 1033 | - if(tipo == "medidaVariavel"){ | |
| 1034 | - sUrl = "../php/metaestat.php?funcao=sqlMedidaVariavel&id_medida_variavel="+id; | |
| 1035 | - } | |
| 1036 | - if(tipo == "parametroMedida"){ | |
| 1037 | - sUrl = "../php/metaestat.php?funcao=listaParametro&id_parametro_medida="+id; | |
| 1038 | - } | |
| 1039 | - if(sUrl){ | |
| 1040 | - core_makeRequest(sUrl,callback); | |
| 1041 | - } | |
| 1042 | -} | |
| 1043 | - | |
| 1044 | -/* | |
| 1045 | -Function: excluir | |
| 1046 | - | |
| 1047 | -Exclui um elemento | |
| 1048 | -*/ | |
| 1049 | -function excluir(tipo,id){ | |
| 1050 | - var mensagem = " excluindo o registro = "+id, | |
| 937 | + if(tipo == "medidaVariavel"){ | |
| 938 | + sUrl = "../php/metaestat.php?funcao=sqlMedidaVariavel&id_medida_variavel="+id; | |
| 939 | + } | |
| 940 | + if(tipo == "parametroMedida"){ | |
| 941 | + sUrl = "../php/metaestat.php?funcao=listaParametro&id_parametro_medida="+id; | |
| 942 | + } | |
| 943 | + if(sUrl){ | |
| 944 | + core_makeRequest(sUrl,callback); | |
| 945 | + } | |
| 946 | + }, | |
| 947 | + excluir: function(tipo,id){ | |
| 948 | + var mensagem = " excluindo o registro = "+id, | |
| 1051 | 949 | no = null, |
| 1052 | 950 | sUrl = null; |
| 1053 | - if(tipo == "variavel") { | |
| 1054 | - no = tree.getNodeByProperty("codigo_variavel",id); | |
| 1055 | - sUrl = "../php/metaestat.php?funcao=excluirVariavel&codigo_variavel="+id; | |
| 1056 | - } | |
| 1057 | - if(tipo == "medidaVariavel") { | |
| 1058 | - no = tree.getNodeByProperty("id_medida_variavel",id); | |
| 1059 | - sUrl = "../php/metaestat.php?funcao=excluirMedidaVariavel&id_medida_variavel="+id; | |
| 1060 | - } | |
| 1061 | - if(tipo == "parametroMedida") { | |
| 1062 | - no = tree.getNodeByProperty("id_parametro_medida",id); | |
| 1063 | - sUrl = "../php/metaestat.php?funcao=excluirParametroMedida&id_parametro_medida="+id; | |
| 1064 | - } | |
| 1065 | - if(tipo == "classificacaoMedida") { | |
| 1066 | - no = tree.getNodeByProperty("id_classificacao",id); | |
| 1067 | - sUrl = "../php/metaestat.php?funcao=excluirClassificacaoMedida&id_classificacao="+id; | |
| 1068 | - } | |
| 1069 | - if(tipo == "classeClassificacao") { | |
| 1070 | - no = tree.getNodeByProperty("id_classe",id); | |
| 1071 | - sUrl = "../php/metaestat.php?funcao=excluirClasseClassificacao&id_classe="+id; | |
| 1072 | - } | |
| 1073 | - if(tipo == "linkMedida") { | |
| 1074 | - no = tree.getNodeByProperty("id_link",id); | |
| 1075 | - sUrl = "../php/metaestat.php?funcao=excluirLinkMedida&id_link="+id; | |
| 1076 | - } | |
| 1077 | - if(tipo == "fonteinfo") { | |
| 1078 | - no = tree.getNodeByProperty("id_fonteinfo",id); | |
| 1079 | - sUrl = "../php/metaestat.php?funcao=excluirFonteinfoMedida&id_fonteinfo="+id+"&id_medida_variavel="+no.data.id_medida_variavel_fonteinfo; | |
| 1080 | - } | |
| 1081 | - if(sUrl) | |
| 1082 | - {core_excluiNoTree(sUrl,no,mensagem);} | |
| 1083 | -} | |
| 1084 | -/* | |
| 1085 | -Function: gravaDados | |
| 1086 | - | |
| 1087 | -Altera dados de um elemento do Atlas | |
| 1088 | - | |
| 1089 | -<ALTERARATLAS> | |
| 1090 | - | |
| 1091 | -<ALTERARPRANCHA> | |
| 1092 | - | |
| 1093 | -<ALTERARTEMA> | |
| 1094 | -*/ | |
| 1095 | -function gravaDados(tipo,id){ | |
| 1096 | - var sUrl,i,campos = null, | |
| 951 | + if(tipo == "variavel") { | |
| 952 | + no = tree.getNodeByProperty("codigo_variavel",id); | |
| 953 | + sUrl = "../php/metaestat.php?funcao=excluirVariavel&codigo_variavel="+id; | |
| 954 | + } | |
| 955 | + if(tipo == "medidaVariavel") { | |
| 956 | + no = tree.getNodeByProperty("id_medida_variavel",id); | |
| 957 | + sUrl = "../php/metaestat.php?funcao=excluirMedidaVariavel&id_medida_variavel="+id; | |
| 958 | + } | |
| 959 | + if(tipo == "parametroMedida") { | |
| 960 | + no = tree.getNodeByProperty("id_parametro_medida",id); | |
| 961 | + sUrl = "../php/metaestat.php?funcao=excluirParametroMedida&id_parametro_medida="+id; | |
| 962 | + } | |
| 963 | + if(tipo == "classificacaoMedida") { | |
| 964 | + no = tree.getNodeByProperty("id_classificacao",id); | |
| 965 | + sUrl = "../php/metaestat.php?funcao=excluirClassificacaoMedida&id_classificacao="+id; | |
| 966 | + } | |
| 967 | + if(tipo == "classeClassificacao") { | |
| 968 | + no = tree.getNodeByProperty("id_classe",id); | |
| 969 | + sUrl = "../php/metaestat.php?funcao=excluirClasseClassificacao&id_classe="+id; | |
| 970 | + } | |
| 971 | + if(tipo == "linkMedida") { | |
| 972 | + no = tree.getNodeByProperty("id_link",id); | |
| 973 | + sUrl = "../php/metaestat.php?funcao=excluirLinkMedida&id_link="+id; | |
| 974 | + } | |
| 975 | + if(tipo == "fonteinfo") { | |
| 976 | + no = tree.getNodeByProperty("id_fonteinfo",id); | |
| 977 | + sUrl = "../php/metaestat.php?funcao=excluirFonteinfoMedida&id_fonteinfo="+id+"&id_medida_variavel="+no.data.id_medida_variavel_fonteinfo; | |
| 978 | + } | |
| 979 | + if(sUrl) | |
| 980 | + {core_excluiNoTree(sUrl,no,mensagem);} | |
| 981 | + }, | |
| 982 | + gravaDados: function(tipo,id){ | |
| 983 | + var sUrl,i,campos = null, | |
| 1097 | 984 | par = null, |
| 1098 | 985 | prog = null; |
| 1099 | - if(tipo == "variavel"){ | |
| 1100 | - campos = new Array("nome","descricao"); | |
| 1101 | - par = "&codigo_variavel="+id; | |
| 1102 | - prog = "../php/metaestat.php?funcao=alteraVariavel"; | |
| 1103 | - } | |
| 1104 | - if(tipo == "medidaVariavel"){ | |
| 1105 | - campos = new Array( "codigo_unidade_medida","codigo_tipo_periodo","codigo_tipo_regiao","codigo_estat_conexao","esquemadb","tabela","colunavalor","colunaidgeo","filtro","nomemedida"); | |
| 1106 | - par = "&id_medida_variavel="+id; | |
| 1107 | - prog = "../php/metaestat.php?funcao=alteraMedidaVariavel"; | |
| 1108 | - } | |
| 1109 | - if(tipo == "parametroMedida"){ | |
| 1110 | - campos = new Array("nome","descricao","coluna","id_pai"); | |
| 1111 | - par = "&id_parametro_medida="+id; | |
| 1112 | - prog = "../php/metaestat.php?funcao=alteraParametroMedida"; | |
| 1113 | - } | |
| 1114 | - if(tipo == "classificacaoMedida"){ | |
| 1115 | - campos = new Array("nome","observacao"); | |
| 1116 | - par = "&id_classificacao="+id; | |
| 1117 | - prog = "../php/metaestat.php?funcao=alteraClassificacaoMedida"; | |
| 1118 | - } | |
| 1119 | - if(tipo == "classeClassificacao"){ | |
| 1120 | - campos = new Array("titulo","expressao","azul","verde","vermelho","tamanho","simbolo","otamanho","overde","oazul","overmelho"); | |
| 1121 | - par = "&id_classe="+id; | |
| 1122 | - prog = "../php/metaestat.php?funcao=alteraClasseClassificacao"; | |
| 1123 | - } | |
| 1124 | - if(tipo == "linkMedida"){ | |
| 1125 | - campos = new Array("nome","link"); | |
| 1126 | - par = "&id_link="+id; | |
| 1127 | - prog = "../php/metaestat.php?funcao=alteraLinkMedida"; | |
| 1128 | - } | |
| 1129 | - if(tipo == "fonteinfo"){ | |
| 1130 | - campos = new Array("id_fonteinfo"); | |
| 1131 | - par = "&id_medida_variavel="+id; | |
| 1132 | - prog = "../php/metaestat.php?funcao=adicionaFonteinfoMedida"; | |
| 1133 | - } | |
| 1134 | - for (i=0;i<campos.length;i++) | |
| 1135 | - {par += "&"+campos[i]+"="+($i("E"+campos[i]).value);} | |
| 986 | + if(tipo == "variavel"){ | |
| 987 | + campos = new Array("nome","descricao"); | |
| 988 | + par = "&codigo_variavel="+id; | |
| 989 | + prog = "../php/metaestat.php?funcao=alteraVariavel"; | |
| 990 | + } | |
| 991 | + if(tipo == "medidaVariavel"){ | |
| 992 | + campos = new Array( "codigo_unidade_medida","codigo_tipo_periodo","codigo_tipo_regiao","codigo_estat_conexao","esquemadb","tabela","colunavalor","colunaidgeo","filtro","nomemedida"); | |
| 993 | + par = "&id_medida_variavel="+id; | |
| 994 | + prog = "../php/metaestat.php?funcao=alteraMedidaVariavel"; | |
| 995 | + } | |
| 996 | + if(tipo == "parametroMedida"){ | |
| 997 | + campos = new Array("nome","descricao","coluna","id_pai"); | |
| 998 | + par = "&id_parametro_medida="+id; | |
| 999 | + prog = "../php/metaestat.php?funcao=alteraParametroMedida"; | |
| 1000 | + } | |
| 1001 | + if(tipo == "classificacaoMedida"){ | |
| 1002 | + campos = new Array("nome","observacao"); | |
| 1003 | + par = "&id_classificacao="+id; | |
| 1004 | + prog = "../php/metaestat.php?funcao=alteraClassificacaoMedida"; | |
| 1005 | + } | |
| 1006 | + if(tipo == "classeClassificacao"){ | |
| 1007 | + campos = new Array("titulo","expressao","azul","verde","vermelho","tamanho","simbolo","otamanho","overde","oazul","overmelho"); | |
| 1008 | + par = "&id_classe="+id; | |
| 1009 | + prog = "../php/metaestat.php?funcao=alteraClasseClassificacao"; | |
| 1010 | + } | |
| 1011 | + if(tipo == "linkMedida"){ | |
| 1012 | + campos = new Array("nome","link"); | |
| 1013 | + par = "&id_link="+id; | |
| 1014 | + prog = "../php/metaestat.php?funcao=alteraLinkMedida"; | |
| 1015 | + } | |
| 1016 | + if(tipo == "fonteinfo"){ | |
| 1017 | + campos = new Array("id_fonteinfo"); | |
| 1018 | + par = "&id_medida_variavel="+id; | |
| 1019 | + prog = "../php/metaestat.php?funcao=adicionaFonteinfoMedida"; | |
| 1020 | + } | |
| 1021 | + for (i=0;i<campos.length;i++) | |
| 1022 | + {par += "&"+campos[i]+"="+($i("E"+campos[i]).value);} | |
| 1136 | 1023 | |
| 1137 | - var callback = { | |
| 1138 | - success:function(o){ | |
| 1139 | - try { | |
| 1140 | - var no; | |
| 1141 | - if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { | |
| 1142 | - core_carregando("<span style=color:red >Não foi possível excluir. Verifique se não existem menus vinculados a este tema</span>"); | |
| 1143 | - setTimeout("core_carregando('desativa')",3000); | |
| 1144 | - } | |
| 1145 | - else{ | |
| 1146 | - if(tipo == "variavel"){ | |
| 1147 | - no = tree.getNodeByProperty("codigo_variavel",id); | |
| 1148 | - no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enome").value+"</b> - <span style='color:gray;'>"+document.getElementById("Edescricao").value+" id: "+id+"</span>"; | |
| 1149 | - no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1150 | - no.html = no.getContentEl().innerHTML; | |
| 1151 | - } | |
| 1152 | - if(tipo == "medidaVariavel"){ | |
| 1153 | - no = tree.getNodeByProperty("id_medida_variavel",id); | |
| 1154 | - no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enomemedida").value+"</b> - <span style='color:gray;'>"+document.getElementById("Eesquemadb").value+" - "+document.getElementById("Etabela").value+" - "+document.getElementById("Ecolunavalor").value+" id: "+id+"</span>"; | |
| 1155 | - no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1156 | - no.html = no.getContentEl().innerHTML; | |
| 1157 | - } | |
| 1158 | - if(tipo == "parametroMedida"){ | |
| 1159 | - no = tree.getNodeByProperty("id_parametro_medida",id); | |
| 1160 | - no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enome").value+"</b><span style=color:gray > - "+document.getElementById("Edescricao").value+" id: "+id+"</span>"; | |
| 1161 | - no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1162 | - no.html = no.getContentEl().innerHTML; | |
| 1024 | + var callback = { | |
| 1025 | + success:function(o){ | |
| 1026 | + try { | |
| 1027 | + var no; | |
| 1028 | + if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { | |
| 1029 | + core_carregando("<span style=color:red >Não foi possível excluir. Verifique se não existem menus vinculados a este tema</span>"); | |
| 1030 | + setTimeout("core_carregando('desativa')",3000); | |
| 1031 | + } | |
| 1032 | + else{ | |
| 1033 | + if(tipo == "variavel"){ | |
| 1034 | + no = tree.getNodeByProperty("codigo_variavel",id); | |
| 1035 | + no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enome").value+"</b> - <span style='color:gray;'>"+document.getElementById("Edescricao").value+" id: "+id+"</span>"; | |
| 1036 | + no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1037 | + no.html = no.getContentEl().innerHTML; | |
| 1038 | + } | |
| 1039 | + if(tipo == "medidaVariavel"){ | |
| 1040 | + no = tree.getNodeByProperty("id_medida_variavel",id); | |
| 1041 | + no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enomemedida").value+"</b> - <span style='color:gray;'>"+document.getElementById("Eesquemadb").value+" - "+document.getElementById("Etabela").value+" - "+document.getElementById("Ecolunavalor").value+" id: "+id+"</span>"; | |
| 1042 | + no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1043 | + no.html = no.getContentEl().innerHTML; | |
| 1044 | + } | |
| 1045 | + if(tipo == "parametroMedida"){ | |
| 1046 | + no = tree.getNodeByProperty("id_parametro_medida",id); | |
| 1047 | + no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enome").value+"</b><span style=color:gray > - "+document.getElementById("Edescricao").value+" id: "+id+"</span>"; | |
| 1048 | + no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1049 | + no.html = no.getContentEl().innerHTML; | |
| 1050 | + } | |
| 1051 | + if(tipo == "classificacaoMedida"){ | |
| 1052 | + no = tree.getNodeByProperty("id_classificacao",id); | |
| 1053 | + no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enome").value+"</b><span style=color:gray > Obs.: "+document.getElementById("Eobservacao").value+" id: "+id+"</span>"; | |
| 1054 | + no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1055 | + no.html = no.getContentEl().innerHTML; | |
| 1056 | + } | |
| 1057 | + if(tipo == "classeClassificacao"){ | |
| 1058 | + no = tree.getNodeByProperty("id_classe",id); | |
| 1059 | + no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Etitulo").value+"</b><span style=color:gray > id: "+id+"</span>"; | |
| 1060 | + no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1061 | + no.html = no.getContentEl().innerHTML; | |
| 1062 | + } | |
| 1063 | + if(tipo == "linkMedida"){ | |
| 1064 | + no = tree.getNodeByProperty("id_link",id); | |
| 1065 | + no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<a href='"+document.getElementById("Elink").value+"' >"+document.getElementById("Enome").value+"</a><span style=color:gray > - "+document.getElementById("Elink").value+" - id: "+id+"</span>"; | |
| 1066 | + no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1067 | + no.html = no.getContentEl().innerHTML; | |
| 1068 | + } | |
| 1069 | + if(tipo == "fonteinfo"){ | |
| 1070 | + no = tree.getNodeByProperty("no_fonteinfo",id); | |
| 1071 | + i3GEOadmin.variaveis.fonte.adicionaNos(no,[YAHOO.lang.JSON.parse(o.responseText)],true); | |
| 1072 | + //no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<a href='"+document.getElementById("Elink").value+"' >"+document.getElementById("Etitulo").value+"</a><span style=color:gray > - "+document.getElementById("Elink").value+" - id: "+id+"</span>"; | |
| 1073 | + //no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1074 | + //no.html = no.getContentEl().innerHTML; | |
| 1075 | + } | |
| 1076 | + core_carregando("desativa"); | |
| 1077 | + } | |
| 1078 | + YAHOO.admin.container.panelEditor.destroy(); | |
| 1079 | + YAHOO.admin.container.panelEditor = null; | |
| 1163 | 1080 | } |
| 1164 | - if(tipo == "classificacaoMedida"){ | |
| 1165 | - no = tree.getNodeByProperty("id_classificacao",id); | |
| 1166 | - no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enome").value+"</b><span style=color:gray > Obs.: "+document.getElementById("Eobservacao").value+" id: "+id+"</span>"; | |
| 1167 | - no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1168 | - no.html = no.getContentEl().innerHTML; | |
| 1081 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 1082 | + }, | |
| 1083 | + failure:core_handleFailure, | |
| 1084 | + argument: { foo:"foo", bar:"bar" } | |
| 1085 | + }; | |
| 1086 | + if(prog && par){ | |
| 1087 | + core_carregando("ativa"); | |
| 1088 | + core_carregando(" gravando o registro do id= "+id); | |
| 1089 | + sUrl = prog+par; | |
| 1090 | + core_makeRequest(sUrl,callback,'GET'); | |
| 1091 | + } | |
| 1092 | + }, | |
| 1093 | + listaDadosAuxiliares: function(){ | |
| 1094 | + var callback = { | |
| 1095 | + success:function(o){ | |
| 1096 | + try { | |
| 1097 | + i3GEOadmin.variaveis.dadosAuxiliares = YAHOO.lang.JSON.parse(o.responseText); | |
| 1169 | 1098 | } |
| 1170 | - if(tipo == "classeClassificacao"){ | |
| 1171 | - no = tree.getNodeByProperty("id_classe",id); | |
| 1172 | - no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Etitulo").value+"</b><span style=color:gray > id: "+id+"</span>"; | |
| 1173 | - no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1174 | - no.html = no.getContentEl().innerHTML; | |
| 1099 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 1100 | + }, | |
| 1101 | + failure:core_handleFailure, | |
| 1102 | + argument: { foo:"foo", bar:"bar" } | |
| 1103 | + }; | |
| 1104 | + core_makeRequest("../php/metaestat.php?funcao=listaDadosTabelasAuxiliares",callback); | |
| 1105 | + }, | |
| 1106 | + selEsquema: function(idEleValue,idEleCodigoConexao){ | |
| 1107 | + var eleValue = $i(idEleValue), | |
| 1108 | + eleCodigoConexao = $i(idEleCodigoConexao), | |
| 1109 | + callback = { | |
| 1110 | + success:function(o){ | |
| 1111 | + try { | |
| 1112 | + var dados = YAHOO.lang.JSON.parse(o.responseText), | |
| 1113 | + n = dados.length, | |
| 1114 | + i, | |
| 1115 | + valores = [], | |
| 1116 | + textos = [], | |
| 1117 | + selecionados = [eleValue.value]; | |
| 1118 | + for(i=0;i<n;i++){ | |
| 1119 | + valores.push(dados[i].esquema); | |
| 1120 | + textos.push(dados[i].esquema); | |
| 1121 | + } | |
| 1122 | + core_menuCheckBox(valores,textos,selecionados,eleValue); | |
| 1175 | 1123 | } |
| 1176 | - if(tipo == "linkMedida"){ | |
| 1177 | - no = tree.getNodeByProperty("id_link",id); | |
| 1178 | - no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<a href='"+document.getElementById("Elink").value+"' >"+document.getElementById("Enome").value+"</a><span style=color:gray > - "+document.getElementById("Elink").value+" - id: "+id+"</span>"; | |
| 1179 | - no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1180 | - no.html = no.getContentEl().innerHTML; | |
| 1124 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 1125 | + }, | |
| 1126 | + failure:core_handleFailure, | |
| 1127 | + argument: { foo:"foo", bar:"bar" } | |
| 1128 | + }; | |
| 1129 | + if(!eleValue || !eleCodigoConexao){ | |
| 1130 | + return; | |
| 1131 | + } | |
| 1132 | + core_makeRequest("../php/metaestat.php?funcao=esquemasConexao&formato=json&codigo_estat_conexao="+eleCodigoConexao.value,callback); | |
| 1133 | + }, | |
| 1134 | + selTabela: function(idEleValue,idEleCodigoConexao,idEleNomeEsquema){ | |
| 1135 | + var eleValue = $i(idEleValue), | |
| 1136 | + eleCodigoConexao = $i(idEleCodigoConexao), | |
| 1137 | + eleNomeEsquema = $i(idEleNomeEsquema), | |
| 1138 | + callback = { | |
| 1139 | + success:function(o){ | |
| 1140 | + try { | |
| 1141 | + var dados = YAHOO.lang.JSON.parse(o.responseText), | |
| 1142 | + n = dados.length, | |
| 1143 | + i, | |
| 1144 | + valores = [], | |
| 1145 | + textos = [], | |
| 1146 | + selecionados = [eleValue.value]; | |
| 1147 | + for(i=0;i<n;i++){ | |
| 1148 | + valores.push(dados[i].tabela); | |
| 1149 | + textos.push(dados[i].tabela); | |
| 1150 | + } | |
| 1151 | + core_menuCheckBox(valores,textos,selecionados,eleValue); | |
| 1181 | 1152 | } |
| 1182 | - if(tipo == "fonteinfo"){ | |
| 1183 | - no = tree.getNodeByProperty("no_fonteinfo",id); | |
| 1184 | - adicionaNosFonteinfo(no,[YAHOO.lang.JSON.parse(o.responseText)],true); | |
| 1185 | - //no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<a href='"+document.getElementById("Elink").value+"' >"+document.getElementById("Etitulo").value+"</a><span style=color:gray > - "+document.getElementById("Elink").value+" - id: "+id+"</span>"; | |
| 1186 | - //no.getContentEl().getElementsByTagName("span")[0].style.color = ""; | |
| 1187 | - //no.html = no.getContentEl().innerHTML; | |
| 1153 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 1154 | + }, | |
| 1155 | + failure:core_handleFailure, | |
| 1156 | + argument: { foo:"foo", bar:"bar" } | |
| 1157 | + }; | |
| 1158 | + if(!eleValue || !eleCodigoConexao || !eleNomeEsquema){ | |
| 1159 | + return; | |
| 1160 | + } | |
| 1161 | + core_makeRequest("../php/metaestat.php?funcao=tabelasEsquema&formato=json&codigo_estat_conexao="+eleCodigoConexao.value+"&nome_esquema="+eleNomeEsquema.value,callback); | |
| 1162 | + }, | |
| 1163 | + selColuna: function(idEleValue,idEleCodigoConexao,idEleNomeEsquema,idEleNomeTabela){ | |
| 1164 | + var eleValue = $i(idEleValue), | |
| 1165 | + eleCodigoConexao = $i(idEleCodigoConexao), | |
| 1166 | + eleNomeEsquema = $i(idEleNomeEsquema), | |
| 1167 | + eleNomeTabela = $i(idEleNomeTabela), | |
| 1168 | + callback = { | |
| 1169 | + success:function(o){ | |
| 1170 | + try { | |
| 1171 | + var dados = YAHOO.lang.JSON.parse(o.responseText), | |
| 1172 | + n = dados.length, | |
| 1173 | + i, | |
| 1174 | + valores = [], | |
| 1175 | + textos = [], | |
| 1176 | + selecionados = [eleValue.value]; | |
| 1177 | + for(i=0;i<n;i++){ | |
| 1178 | + valores.push(dados[i]); | |
| 1179 | + textos.push(dados[i]); | |
| 1180 | + } | |
| 1181 | + core_menuCheckBox(valores,textos,selecionados,eleValue); | |
| 1188 | 1182 | } |
| 1189 | - core_carregando("desativa"); | |
| 1190 | - } | |
| 1191 | - YAHOO.admin.container.panelEditor.destroy(); | |
| 1192 | - YAHOO.admin.container.panelEditor = null; | |
| 1193 | - } | |
| 1194 | - catch(e){core_handleFailure(e,o.responseText);} | |
| 1195 | - }, | |
| 1196 | - failure:core_handleFailure, | |
| 1197 | - argument: { foo:"foo", bar:"bar" } | |
| 1198 | - }; | |
| 1199 | - if(prog && par){ | |
| 1200 | - core_carregando("ativa"); | |
| 1201 | - core_carregando(" gravando o registro do id= "+id); | |
| 1202 | - sUrl = prog+par; | |
| 1203 | - core_makeRequest(sUrl,callback,'GET'); | |
| 1183 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 1184 | + }, | |
| 1185 | + failure:core_handleFailure, | |
| 1186 | + argument: { foo:"foo", bar:"bar" } | |
| 1187 | + }; | |
| 1188 | + if(!eleValue || !eleCodigoConexao || !eleNomeEsquema || !eleNomeTabela){ | |
| 1189 | + return; | |
| 1190 | + } | |
| 1191 | + core_makeRequest("../php/metaestat.php?funcao=colunasTabela&formato=json&codigo_estat_conexao="+eleCodigoConexao.value+"&nome_esquema="+eleNomeEsquema.value+"&nome_tabela="+eleNomeTabela.value,callback); | |
| 1204 | 1192 | } |
| 1205 | -} | |
| 1206 | -/* | |
| 1207 | -Function: listaDadosAuxiliares | |
| 1208 | 1193 | |
| 1209 | -Lista os dados das tabelas auxiliares e guarda no objeto dadosAuxiliares | |
| 1210 | -*/ | |
| 1211 | -function listaDadosAuxiliares(){ | |
| 1212 | - var callback = { | |
| 1213 | - success:function(o){ | |
| 1214 | - try { | |
| 1215 | - dadosAuxiliares = YAHOO.lang.JSON.parse(o.responseText); | |
| 1216 | - } | |
| 1217 | - catch(e){core_handleFailure(e,o.responseText);} | |
| 1218 | - }, | |
| 1219 | - failure:core_handleFailure, | |
| 1220 | - argument: { foo:"foo", bar:"bar" } | |
| 1221 | - }; | |
| 1222 | - core_makeRequest("../php/metaestat.php?funcao=listaDadosTabelasAuxiliares",callback); | |
| 1223 | -} | |
| 1224 | 1194 | \ No newline at end of file |
| 1195 | + | |
| 1196 | +}; | |
| 1225 | 1197 | \ No newline at end of file | ... | ... |
admin/js/grupos.js
admin/php/classe_metaestat.php
| ... | ... | @@ -942,7 +942,7 @@ class Metaestat{ |
| 942 | 942 | $senha {boolean} - mostra ou nao a senha - opcional |
| 943 | 943 | */ |
| 944 | 944 | function listaConexao($codigo_estat_conexao="",$senha=false){ |
| 945 | - if($senha){ | |
| 945 | + if($senha == true){ | |
| 946 | 946 | $colunas = "codigo_estat_conexao, bancodedados, host, porta, usuario, senha"; |
| 947 | 947 | } |
| 948 | 948 | else{ |
| ... | ... | @@ -1045,7 +1045,7 @@ class Metaestat{ |
| 1045 | 1045 | $dbhold = $this->dbh; |
| 1046 | 1046 | $dbh = new PDO('pgsql:dbname='.$c["bancodedados"].';user='.$c["usuario"].';password='.$c["senha"].';host='.$c["host"].';port='.$c["porta"]); |
| 1047 | 1047 | $this->dbh = $dbh; |
| 1048 | - $res = $this->execSQL("SELECT oid,nspname as esquema FROM pg_namespace group by table_schema"); | |
| 1048 | + $res = $this->execSQL("SELECT oid,nspname as esquema FROM pg_namespace group by nspname,oid order by nspname"); | |
| 1049 | 1049 | $this->dbh = $dbhold; |
| 1050 | 1050 | return $res; |
| 1051 | 1051 | } | ... | ... |
admin/php/criabanco.php
| ... | ... | @@ -114,8 +114,8 @@ |
| 114 | 114 | //TODO nao funciona |
| 115 | 115 | //if(function_exists("SQLite3")){ |
| 116 | 116 | //cria o banco de dados de metadados estatisticos |
| 117 | - $banco = new SQLite3("../../admin/metaestat.db",SQLITE3_OPEN_CREATE); | |
| 118 | - $banco->close(); | |
| 117 | + //$banco = new SQLite3("../../admin/metaestat.db",SQLITE3_OPEN_CREATE); | |
| 118 | + //$banco->close(); | |
| 119 | 119 | //} |
| 120 | 120 | //else{ |
| 121 | 121 | //echo "<br>A função de criação do banco sqlite3 não existe no PHP. Não foi possível criar o bando para o sistema de metadados."; | ... | ... |
aplicmap/geral1debianv6.map
| ... | ... | @@ -0,0 +1,22 @@ |
| 1 | +MAP | |
| 2 | +FONTSET "../symbols/fontes.txt" | |
| 3 | +SYMBOLSET "../symbols/simbolos.sym" | |
| 4 | +LAYER | |
| 5 | + NAME spatialite | |
| 6 | + TYPE POLYGON | |
| 7 | + CONNECTIONTYPE OGR | |
| 8 | + CONNECTION "/var/www/i3geo/admin/metaestat.db" | |
| 9 | + DATA "the_geom from (select the_geom,gid from municipios) as foo using unique gid using srid=4326" | |
| 10 | + STATUS DEFAULT | |
| 11 | + METADATA | |
| 12 | + "TEMA" "Municípios" | |
| 13 | + "CLASSE" "SIM" | |
| 14 | + END | |
| 15 | + CLASS | |
| 16 | + NAME "" | |
| 17 | + STYLE | |
| 18 | + COLOR 255 255 120 | |
| 19 | + END | |
| 20 | + END | |
| 21 | +END | |
| 22 | +END | |
| 0 | 23 | \ No newline at end of file | ... | ... |