Commit e15f905eb312da2ee1e10fed4881b10b940b3805
1 parent
7d25f250
Exists in
master
and in
7 other branches
--no commit message
Showing
29 changed files
with
1288 additions
and
1030 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/js/arvore.js
| ... | ... | @@ -117,8 +117,8 @@ function montaArvore(dados) |
| 117 | 117 | { |
| 118 | 118 | buildTree(); |
| 119 | 119 | } |
| 120 | - function loadNodeData(node, fnLoadComplete) | |
| 121 | - { | |
| 120 | + function loadNodeData(node, fnLoadComplete) | |
| 121 | + { | |
| 122 | 122 | if(node.data.id_menu == undefined){ |
| 123 | 123 | fnLoadComplete.call(); |
| 124 | 124 | return; |
| ... | ... | @@ -126,35 +126,35 @@ function montaArvore(dados) |
| 126 | 126 | var sUrl = "../php/arvore.php?funcao=pegaGrupos&id_menu="+node.data.id_menu+"&idioma="+idiomaSel(); |
| 127 | 127 | var callback = |
| 128 | 128 | { |
| 129 | - success: function(oResponse) | |
| 130 | - { | |
| 131 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 129 | + success: function(oResponse) | |
| 130 | + { | |
| 131 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 132 | 132 | montaNosGrupos(node.data.id_menu,node,dados,true); |
| 133 | - oResponse.argument.fnLoadComplete(); | |
| 134 | - }, | |
| 135 | - failure: function(oResponse) | |
| 136 | - { | |
| 137 | - oResponse.argument.fnLoadComplete(); | |
| 138 | - }, | |
| 139 | - argument: | |
| 140 | - { | |
| 141 | - "node": node, | |
| 142 | - "fnLoadComplete": fnLoadComplete | |
| 143 | - }, | |
| 144 | - timeout: 25000 | |
| 145 | - }; | |
| 146 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 147 | - } | |
| 148 | - function buildTree() | |
| 149 | - { | |
| 133 | + oResponse.argument.fnLoadComplete(); | |
| 134 | + }, | |
| 135 | + failure: function(oResponse) | |
| 136 | + { | |
| 137 | + oResponse.argument.fnLoadComplete(); | |
| 138 | + }, | |
| 139 | + argument: | |
| 140 | + { | |
| 141 | + "node": node, | |
| 142 | + "fnLoadComplete": fnLoadComplete | |
| 143 | + }, | |
| 144 | + timeout: 25000 | |
| 145 | + }; | |
| 146 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 147 | + } | |
| 148 | + function buildTree() | |
| 149 | + { | |
| 150 | 150 | tree = new YAHOO.widget.TreeView("arvoreMenus"); |
| 151 | 151 | tree.setDynamicLoad(loadNodeData, 1); |
| 152 | 152 | var root = tree.getRoot(); |
| 153 | 153 | var tempNode = new YAHOO.widget.TextNode('', root, false); |
| 154 | 154 | tempNode.isLeaf = true; |
| 155 | 155 | core_carregando("desativa"); |
| 156 | - } | |
| 157 | - buildTree(); | |
| 156 | + } | |
| 157 | + buildTree(); | |
| 158 | 158 | }(); |
| 159 | 159 | montaNosMenus(dados); |
| 160 | 160 | tree.draw(); |
| ... | ... | @@ -200,15 +200,15 @@ Monta os n�s com os grupos e permite abrir os subgrupos |
| 200 | 200 | */ |
| 201 | 201 | function montaNosGrupos(idmenu,no,dados,redesenha) |
| 202 | 202 | { |
| 203 | - var tempNodeR = null; | |
| 203 | + var tempNodeR = null; | |
| 204 | 204 | //pega os temas que ficam na raiz da �rvore |
| 205 | 205 | if(!tree.getNodeByProperty("etiquetaTemasRaiz","menu_"+idmenu)) |
| 206 | 206 | {montaTemasRaiz(no,dados,true);} |
| 207 | 207 | //pega os grupos do menu |
| 208 | - if(idmenu == undefined) | |
| 208 | + if(idmenu == undefined) | |
| 209 | 209 | {return;} |
| 210 | 210 | if(!tree.getNodeByProperty("etiquetaGrupo","menu_"+idmenu)) |
| 211 | - { | |
| 211 | + { | |
| 212 | 212 | var temp = "menu_"+idmenu; |
| 213 | 213 | var d = {tipo:"etiqueta","etiquetaGrupo":temp,html:"<i style=color:gray >Grupos</i>"}; |
| 214 | 214 | tempNodeR = new YAHOO.widget.HTMLNode(d, no, false,true); |
| ... | ... | @@ -297,10 +297,10 @@ Monta os n�s com os temas |
| 297 | 297 | */ |
| 298 | 298 | function montaNosSubgrupos(idmenu,no,dados,redesenha) |
| 299 | 299 | { |
| 300 | - var tempNodeR = null; | |
| 300 | + var tempNodeR = null; | |
| 301 | 301 | if(!tree.getNodeByProperty("etiquetaTemasGrupo","grupo_"+no.data.id_n1)) |
| 302 | 302 | montaTemasRaizGrupo(idmenu,no,dados,true); |
| 303 | - if(idmenu == undefined) | |
| 303 | + if(idmenu == undefined) | |
| 304 | 304 | {return;} |
| 305 | 305 | if(!tree.getNodeByProperty("etiquetaTemasSubGrupo",no.data.id_n1)) |
| 306 | 306 | { |
| ... | ... | @@ -373,7 +373,7 @@ function montaTemasRaiz(no,dados,redesenha) |
| 373 | 373 | if(no.data.id_menu == undefined) |
| 374 | 374 | {return;} |
| 375 | 375 | if(!tree.getNodeByProperty("etiquetaTemasRaiz","menu_"+no.data.id_menu)) |
| 376 | - { | |
| 376 | + { | |
| 377 | 377 | var temp = "menu_"+no.data.id_menu; |
| 378 | 378 | var d = {id_menu:no.data.id_menu,tipo:"etiqueta",etiquetaTemasRaiz:temp,html:"<i style=color:gray >Temas na raiz do menu</i>"}; |
| 379 | 379 | tempNodeR = new YAHOO.widget.HTMLNode(d, no, false,true); |
| ... | ... | @@ -402,7 +402,7 @@ function montaTemasRaizGrupo(idmenu,no,dados,redesenha) |
| 402 | 402 | if(no.data.id_n1 == undefined) |
| 403 | 403 | {return;} |
| 404 | 404 | if(!tree.getNodeByProperty("etiquetaTemasGrupo","grupo_"+no.data.id_n1)) |
| 405 | - { | |
| 405 | + { | |
| 406 | 406 | var temp = "grupo_"+no.data.id_n1; |
| 407 | 407 | var d = {etiquetaTemasGrupo:temp,tipo:"etiqueta",html:"<i style=color:gray >Temas na raiz do grupo:</i>"}; |
| 408 | 408 | tempNodeR = new YAHOO.widget.HTMLNode(d, no, false,true); |
| ... | ... | @@ -437,7 +437,7 @@ function novoTemaRaiz(id) |
| 437 | 437 | var sUrl = "../php/arvore.php?funcao=adicionarTemaRaiz&id_menu="+id+"&idioma="+idiomaSel(); |
| 438 | 438 | var callback = |
| 439 | 439 | { |
| 440 | - success: function(oResponse) | |
| 440 | + success: function(oResponse) | |
| 441 | 441 | { |
| 442 | 442 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 443 | 443 | dados = dados.raiz[0]; |
| ... | ... | @@ -469,7 +469,7 @@ function novoTemaRaizGrupo(idmenu,id) |
| 469 | 469 | var sUrl = "../php/arvore.php?funcao=adicionarTemaRaizGrupo&id_n1="+id+"&id_menu="+idmenu+"&idioma="+idiomaSel(); |
| 470 | 470 | var callback = |
| 471 | 471 | { |
| 472 | - success: function(oResponse) | |
| 472 | + success: function(oResponse) | |
| 473 | 473 | { |
| 474 | 474 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 475 | 475 | dados = dados.raiz[0]; |
| ... | ... | @@ -500,7 +500,7 @@ function novoGrupo(id_menu) |
| 500 | 500 | var sUrl = "../php/arvore.php?funcao=adicionarGrupo&id_menu="+id_menu+"&idioma="+idiomaSel(); |
| 501 | 501 | var callback = |
| 502 | 502 | { |
| 503 | - success: function(oResponse) | |
| 503 | + success: function(oResponse) | |
| 504 | 504 | { |
| 505 | 505 | var no = tree.getNodeByProperty("etiquetaGrupo","menu_"+id_menu); |
| 506 | 506 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| ... | ... | @@ -534,7 +534,7 @@ function novoSubGrupo(id_menu,id_n1) |
| 534 | 534 | var sUrl = "../php/arvore.php?funcao=adicionarSubGrupo&id_n1="+id_n1+"&idioma="+idiomaSel(); |
| 535 | 535 | var callback = |
| 536 | 536 | { |
| 537 | - success: function(oResponse) | |
| 537 | + success: function(oResponse) | |
| 538 | 538 | { |
| 539 | 539 | var no = tree.getNodeByProperty("etiquetaTemasSubGrupo",id_n1); |
| 540 | 540 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| ... | ... | @@ -568,7 +568,7 @@ function novoTema(id_menu,id_n2) |
| 568 | 568 | var sUrl = "../php/arvore.php?funcao=adicionarTema&id_n2="+id_n2+"&idioma="+idiomaSel(); |
| 569 | 569 | var callback = |
| 570 | 570 | { |
| 571 | - success: function(oResponse) | |
| 571 | + success: function(oResponse) | |
| 572 | 572 | { |
| 573 | 573 | var no = tree.getNodeByProperty("etiquetaTemas",id_n2); |
| 574 | 574 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| ... | ... | @@ -897,7 +897,7 @@ function sobeDesce(movimento,tipo,id) |
| 897 | 897 | } |
| 898 | 898 | var callback = |
| 899 | 899 | { |
| 900 | - success: function(oResponse) | |
| 900 | + success: function(oResponse) | |
| 901 | 901 | {core_carregando("desativa");}, |
| 902 | 902 | failure:core_handleFailure, |
| 903 | 903 | argument: { foo:"foo", bar:"bar" } | ... | ... |
admin/js/atlas.js
| ... | ... | @@ -96,40 +96,40 @@ function montaArvore(dados) |
| 96 | 96 | { |
| 97 | 97 | buildTree(); |
| 98 | 98 | } |
| 99 | - function loadNodeData(node, fnLoadComplete) | |
| 100 | - { | |
| 99 | + function loadNodeData(node, fnLoadComplete) | |
| 100 | + { | |
| 101 | 101 | var sUrl = "../php/atlas.php?funcao=pegaPranchas&id_atlas="+node.data.id_atlas; |
| 102 | 102 | var callback = |
| 103 | 103 | { |
| 104 | - success: function(oResponse) | |
| 105 | - { | |
| 106 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 104 | + success: function(oResponse) | |
| 105 | + { | |
| 106 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 107 | 107 | adicionaNosPranchas(node,dados,false); |
| 108 | - oResponse.argument.fnLoadComplete(); | |
| 109 | - }, | |
| 110 | - failure: function(oResponse) | |
| 111 | - { | |
| 112 | - oResponse.argument.fnLoadComplete(); | |
| 113 | - }, | |
| 114 | - argument: | |
| 115 | - { | |
| 116 | - "node": node, | |
| 117 | - "fnLoadComplete": fnLoadComplete | |
| 118 | - }, | |
| 119 | - timeout: 25000 | |
| 120 | - }; | |
| 121 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 122 | - } | |
| 123 | - function buildTree() | |
| 124 | - { | |
| 108 | + oResponse.argument.fnLoadComplete(); | |
| 109 | + }, | |
| 110 | + failure: function(oResponse) | |
| 111 | + { | |
| 112 | + oResponse.argument.fnLoadComplete(); | |
| 113 | + }, | |
| 114 | + argument: | |
| 115 | + { | |
| 116 | + "node": node, | |
| 117 | + "fnLoadComplete": fnLoadComplete | |
| 118 | + }, | |
| 119 | + timeout: 25000 | |
| 120 | + }; | |
| 121 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 122 | + } | |
| 123 | + function buildTree() | |
| 124 | + { | |
| 125 | 125 | tree = new YAHOO.widget.TreeView("tabela"); |
| 126 | 126 | tree.setDynamicLoad(loadNodeData, 1); |
| 127 | 127 | var root = tree.getRoot(); |
| 128 | 128 | var tempNode = new YAHOO.widget.TextNode('', root, false); |
| 129 | 129 | tempNode.isLeaf = true; |
| 130 | 130 | core_carregando("desativa"); |
| 131 | - } | |
| 132 | - buildTree(); | |
| 131 | + } | |
| 132 | + buildTree(); | |
| 133 | 133 | }(); |
| 134 | 134 | adicionaNosAtlas(dados); |
| 135 | 135 | tree.draw(); |
| ... | ... | @@ -181,32 +181,32 @@ function adicionaNosPranchas(no,dados,redesenha) |
| 181 | 181 | if (newVal != currentIconMode) |
| 182 | 182 | {currentIconMode = newVal;} |
| 183 | 183 | } |
| 184 | - function loadTemasData(node, fnLoadComplete) | |
| 185 | - { | |
| 184 | + function loadTemasData(node, fnLoadComplete) | |
| 185 | + { | |
| 186 | 186 | var sUrl = "../php/atlas.php?funcao=pegaTemas&id_prancha="+node.data.id_prancha; |
| 187 | 187 | var callback = |
| 188 | 188 | { |
| 189 | - success: function(oResponse) | |
| 190 | - { | |
| 191 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 189 | + success: function(oResponse) | |
| 190 | + { | |
| 191 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 192 | 192 | adicionaNosTemas(node,dados,false); |
| 193 | - oResponse.argument.fnLoadComplete(); | |
| 194 | - }, | |
| 195 | - failure: function(oResponse) | |
| 196 | - { | |
| 197 | - oResponse.argument.fnLoadComplete(); | |
| 198 | - }, | |
| 199 | - argument: | |
| 200 | - { | |
| 201 | - "node": node, | |
| 202 | - "fnLoadComplete": fnLoadComplete | |
| 203 | - }, | |
| 204 | - timeout: 7000 | |
| 205 | - }; | |
| 206 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 207 | - } | |
| 208 | - if(!redesenha) | |
| 209 | - { | |
| 193 | + oResponse.argument.fnLoadComplete(); | |
| 194 | + }, | |
| 195 | + failure: function(oResponse) | |
| 196 | + { | |
| 197 | + oResponse.argument.fnLoadComplete(); | |
| 198 | + }, | |
| 199 | + argument: | |
| 200 | + { | |
| 201 | + "node": node, | |
| 202 | + "fnLoadComplete": fnLoadComplete | |
| 203 | + }, | |
| 204 | + timeout: 7000 | |
| 205 | + }; | |
| 206 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 207 | + } | |
| 208 | + if(!redesenha) | |
| 209 | + { | |
| 210 | 210 | var conteudo = "<span style=\"cursor:pointer;\" onclick=\"adicionarPrancha('"+no.data.id_atlas+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova prancha</i></span>"; |
| 211 | 211 | var d = {html:conteudo}; |
| 212 | 212 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| ... | ... | @@ -400,7 +400,7 @@ function sobeDesce(movimento,tipo,id) |
| 400 | 400 | } |
| 401 | 401 | var callback = |
| 402 | 402 | { |
| 403 | - success: function(oResponse) | |
| 403 | + success: function(oResponse) | |
| 404 | 404 | {core_carregando("desativa");}, |
| 405 | 405 | failure:core_handleFailure, |
| 406 | 406 | argument: { foo:"foo", bar:"bar" } |
| ... | ... | @@ -460,7 +460,7 @@ function adicionarTema(id) |
| 460 | 460 | var sUrl = "../php/atlas.php?funcao=alterarTema&id_prancha="+id; |
| 461 | 461 | var callback = |
| 462 | 462 | { |
| 463 | - success: function(oResponse) | |
| 463 | + success: function(oResponse) | |
| 464 | 464 | { |
| 465 | 465 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 466 | 466 | adicionaNosTemas(no,dados,true); |
| ... | ... | @@ -484,7 +484,7 @@ function adicionarPrancha(id) |
| 484 | 484 | var sUrl = "../php/atlas.php?funcao=alterarPrancha&id_atlas="+id; |
| 485 | 485 | var callback = |
| 486 | 486 | { |
| 487 | - success: function(oResponse) | |
| 487 | + success: function(oResponse) | |
| 488 | 488 | { |
| 489 | 489 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 490 | 490 | adicionaNosPranchas(no,dados,true); | ... | ... |
admin/js/core.js
| ... | ... | @@ -307,7 +307,7 @@ function core_handleFailure(o,texto) |
| 307 | 307 | } |
| 308 | 308 | if (!YAHOO.carregando.container.wait) |
| 309 | 309 | { |
| 310 | - YAHOO.carregando.container.wait = new YAHOO.widget.Panel("wait",{width: "240px",fixedcenter: true,close: true,draggable: false,zindex:4,modal: true,visible: false}); | |
| 310 | + YAHOO.carregando.container.wait = new YAHOO.widget.Panel("wait",{width: "240px",fixedcenter: true,close: true,draggable: false,zindex:4,modal: true,visible: false}); | |
| 311 | 311 | YAHOO.carregando.container.wait.setHeader("Aguarde..."); |
| 312 | 312 | YAHOO.carregando.container.wait.render(document.body); |
| 313 | 313 | } |
| ... | ... | @@ -363,7 +363,7 @@ function core_carregando(tipo) |
| 363 | 363 | YAHOO.namespace("carregando.container"); |
| 364 | 364 | if (!YAHOO.carregando.container.wait) |
| 365 | 365 | { |
| 366 | - YAHOO.carregando.container.wait = new YAHOO.widget.Panel("wait",{width: "240px",fixedcenter: true,close: true,draggable: false,zindex:4,modal: true,visible: false}); | |
| 366 | + YAHOO.carregando.container.wait = new YAHOO.widget.Panel("wait",{width: "240px",fixedcenter: true,close: true,draggable: false,zindex:4,modal: true,visible: false}); | |
| 367 | 367 | YAHOO.carregando.container.wait.setHeader("Aguarde..."); |
| 368 | 368 | YAHOO.carregando.container.wait.setBody("<img src=\"../../imagens/aguarde.gif\"/>"); |
| 369 | 369 | YAHOO.carregando.container.wait.render(document.body); |
| ... | ... | @@ -935,9 +935,9 @@ function core_menuCheckBox(valores,textos,selecionados,target,record,key) |
| 935 | 935 | document.body.appendChild(novoel); |
| 936 | 936 | var og_core = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name:"okcancel_checkbox_id", container:"core_menuCK_bd" }); |
| 937 | 937 | og_core.addButtons([ |
| 938 | - { label: "OK", value: "OK", checked: false}, | |
| 939 | - { label: "Cancel", value: "CANCEL", checked: false } | |
| 940 | - ]); | |
| 938 | + { label: "OK", value: "OK", checked: false}, | |
| 939 | + { label: "Cancel", value: "CANCEL", checked: false } | |
| 940 | + ]); | |
| 941 | 941 | og_core.on("checkedButtonChange", on_menuCheckBoxChange); |
| 942 | 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 } ); |
| 943 | 943 | YAHOO.admin.container.panelCK.render(); | ... | ... |
admin/js/editormapfile.js
| ... | ... | @@ -195,8 +195,8 @@ function montaArvore() |
| 195 | 195 | tree = ""; |
| 196 | 196 | function changeIconMode() |
| 197 | 197 | {buildTree();} |
| 198 | - function loadNodeData(node, fnLoadComplete) | |
| 199 | - { | |
| 198 | + function loadNodeData(node, fnLoadComplete) | |
| 199 | + { | |
| 200 | 200 | if(node.data.codigoMap == undefined){ |
| 201 | 201 | fnLoadComplete.call(); |
| 202 | 202 | return; |
| ... | ... | @@ -204,27 +204,27 @@ function montaArvore() |
| 204 | 204 | var sUrl = "../php/editormapfile.php?funcao=pegaLayers&codigoMap="+node.data.codigoMap; |
| 205 | 205 | var callback = |
| 206 | 206 | { |
| 207 | - success: function(oResponse) | |
| 208 | - { | |
| 209 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 207 | + success: function(oResponse) | |
| 208 | + { | |
| 209 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 210 | 210 | montaRaizTema(node,dados); |
| 211 | - oResponse.argument.fnLoadComplete(); | |
| 212 | - }, | |
| 213 | - failure: function(oResponse) | |
| 214 | - { | |
| 215 | - oResponse.argument.fnLoadComplete(); | |
| 216 | - }, | |
| 217 | - argument: | |
| 218 | - { | |
| 219 | - "node": node, | |
| 220 | - "fnLoadComplete": fnLoadComplete | |
| 221 | - }, | |
| 222 | - timeout: 25000 | |
| 223 | - }; | |
| 224 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 225 | - } | |
| 226 | - function buildTree() | |
| 227 | - { | |
| 211 | + oResponse.argument.fnLoadComplete(); | |
| 212 | + }, | |
| 213 | + failure: function(oResponse) | |
| 214 | + { | |
| 215 | + oResponse.argument.fnLoadComplete(); | |
| 216 | + }, | |
| 217 | + argument: | |
| 218 | + { | |
| 219 | + "node": node, | |
| 220 | + "fnLoadComplete": fnLoadComplete | |
| 221 | + }, | |
| 222 | + timeout: 25000 | |
| 223 | + }; | |
| 224 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 225 | + } | |
| 226 | + function buildTree() | |
| 227 | + { | |
| 228 | 228 | tree = new YAHOO.widget.TreeView("tabela"); |
| 229 | 229 | tree.setDynamicLoad(loadNodeData, 0); |
| 230 | 230 | var root = tree.getRoot(); |
| ... | ... | @@ -237,8 +237,8 @@ function montaArvore() |
| 237 | 237 | tempNode.isLeaf = true; |
| 238 | 238 | } |
| 239 | 239 | core_carregando("desativa"); |
| 240 | - } | |
| 241 | - buildTree(); | |
| 240 | + } | |
| 241 | + buildTree(); | |
| 242 | 242 | }(); |
| 243 | 243 | montaNosRaiz("nao"); |
| 244 | 244 | tree.draw(); |
| ... | ... | @@ -291,9 +291,9 @@ Monta as op&ccedil;&otilde;es de edi&ccedil;&atilde;o b&aacute;sicas de um LAYER |
| 291 | 291 | */ |
| 292 | 292 | function montaRaizTema(no,dados) |
| 293 | 293 | { |
| 294 | - var tempNodeR = ""; | |
| 294 | + var tempNodeR = ""; | |
| 295 | 295 | if(!tree.getNodeByProperty("etiquetaLayers",no.data.codigoMap)) |
| 296 | - { | |
| 296 | + { | |
| 297 | 297 | var d = {tipo:"etiqueta",etiquetaLayers:no.data.codigoMap,html:"<i>Layers</i>"}; |
| 298 | 298 | tempNodeR = new YAHOO.widget.HTMLNode(d, no, true,true); |
| 299 | 299 | tempNodeR.isLeaf = false; |
| ... | ... | @@ -363,45 +363,45 @@ function montaParametrosTemas(no,dados,redesenha) |
| 363 | 363 | var id = codigoMap+"_"+codigoLayer; |
| 364 | 364 | var conteudo = ""; |
| 365 | 365 | var tempNodeR = ""; |
| 366 | - if(!tree.getNodeByProperty("etiquetaDados",id)) | |
| 367 | - { | |
| 366 | + if(!tree.getNodeByProperty("etiquetaDados",id)) | |
| 367 | + { | |
| 368 | 368 | conteudo = "<span style=cursor:pointer; onclick=\"editorDados('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='' src=\"../imagens/06.png\" /> Conexão com os dados</span>"; |
| 369 | 369 | var d = {tipo:"etiquetaDados",etiquetaDados:id,html:conteudo}; |
| 370 | 370 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 371 | 371 | tempNode.isLeaf = true; |
| 372 | 372 | } |
| 373 | - if(!tree.getNodeByProperty("etiquetaTitulo",id)) | |
| 374 | - { | |
| 373 | + if(!tree.getNodeByProperty("etiquetaTitulo",id)) | |
| 374 | + { | |
| 375 | 375 | conteudo = "<span style=cursor:pointer; onclick=\"editorTitulo('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='' src=\"../imagens/06.png\" /> Título, escala, extensão</span>"; |
| 376 | 376 | var d = {tipo:"etiquetaTitulo",etiquetaTitulo:id,html:conteudo}; |
| 377 | 377 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 378 | 378 | tempNode.isLeaf = true; |
| 379 | 379 | } |
| 380 | - if(!tree.getNodeByProperty("etiquetaComport",id)) | |
| 381 | - { | |
| 380 | + if(!tree.getNodeByProperty("etiquetaComport",id)) | |
| 381 | + { | |
| 382 | 382 | conteudo = "<span style=cursor:pointer; onclick=\"editorComport('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='' src=\"../imagens/06.png\" /> Comportamento no mapa</span>"; |
| 383 | 383 | var d = {tipo:"etiquetaComport",etiquetaComport:id,html:conteudo}; |
| 384 | 384 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 385 | 385 | tempNode.isLeaf = true; |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | - if(!tree.getNodeByProperty("etiquetaDispo",id)) | |
| 389 | - { | |
| 388 | + if(!tree.getNodeByProperty("etiquetaDispo",id)) | |
| 389 | + { | |
| 390 | 390 | conteudo = "<span style=cursor:pointer; onclick=\"editorDispo('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='' src=\"../imagens/06.png\" /> Disponibilidade (download, wms,...)</span>"; |
| 391 | 391 | var d = {tipo:"etiquetaDispo",etiquetaDispo:id,html:conteudo}; |
| 392 | 392 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 393 | 393 | tempNode.isLeaf = true; |
| 394 | 394 | } |
| 395 | 395 | //rever |
| 396 | - if(!tree.getNodeByProperty("etiquetaMetadados",id)) | |
| 397 | - { | |
| 396 | + if(!tree.getNodeByProperty("etiquetaMetadados",id)) | |
| 397 | + { | |
| 398 | 398 | conteudo = "<span style=cursor:pointer; onclick=\"editorMetadados('"+codigoMap+"','"+codigoLayer+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='edita metadados' src=\"../imagens/06.png\" /> Miscelânea</span>"; |
| 399 | 399 | var d = {tipo:"etiquetaMetadados",etiquetaMetadados:id,html:conteudo}; |
| 400 | 400 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 401 | 401 | tempNode.isLeaf = true; |
| 402 | 402 | } |
| 403 | - if(!tree.getNodeByProperty("etiquetaClasses",id)) | |
| 404 | - { | |
| 403 | + if(!tree.getNodeByProperty("etiquetaClasses",id)) | |
| 404 | + { | |
| 405 | 405 | var d = {id:id,codigoMap:codigoMap,codigoLayer:codigoLayer,tipo:"etiquetaClasses",etiquetaClasses:id,html:"<i> Classes</i>"}; |
| 406 | 406 | tempNodeR = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 407 | 407 | tempNodeR.isLeaf = false; |
| ... | ... | @@ -469,22 +469,22 @@ function montaParametrosClasses(no,dados,redesenha) |
| 469 | 469 | var conteudo = ""; |
| 470 | 470 | var tempNode = ""; |
| 471 | 471 | var tempNodeR = ""; |
| 472 | - if(!tree.getNodeByProperty("etiquetaClasseGeral",no.data.id)) | |
| 473 | - { | |
| 472 | + if(!tree.getNodeByProperty("etiquetaClasseGeral",no.data.id)) | |
| 473 | + { | |
| 474 | 474 | conteudo = "<span style=cursor:pointer; onclick=\"editorClasseGeral('"+codigoMap+"','"+codigoLayer+"','"+indiceClasse+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='edita características da classe' src=\"../imagens/06.png\" /> Editar características gerais</span>"; |
| 475 | 475 | var d = {tipo:"etiquetaClasseGeral",etiquetaClasseGeral:codigoMap+"_"+codigoLayer+"_"+indiceClasse,html:conteudo}; |
| 476 | 476 | tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 477 | 477 | tempNode.isLeaf = true; |
| 478 | 478 | } |
| 479 | - if(!tree.getNodeByProperty("etiquetaClasseLabel",no.data.id)) | |
| 480 | - { | |
| 479 | + if(!tree.getNodeByProperty("etiquetaClasseLabel",no.data.id)) | |
| 480 | + { | |
| 481 | 481 | conteudo = "<span style=cursor:pointer; onclick=\"editorClasseLabel('"+codigoMap+"','"+codigoLayer+"','"+indiceClasse+"')\" ><img width='10px' heigth='10px' style=\"position:relative;top:0px\" title='edita identificadores de texto' src=\"../imagens/06.png\" /> Editar toponímia</span>"; |
| 482 | 482 | var d = {tipo:"etiquetaClasseLabel",etiquetaClasseLabel:codigoMap+"_"+codigoLayer+"_"+indiceClasse,html:conteudo}; |
| 483 | 483 | tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 484 | 484 | tempNode.isLeaf = true; |
| 485 | 485 | } |
| 486 | - if(!tree.getNodeByProperty("etiquetaEstilo",no.data.id)) | |
| 487 | - { | |
| 486 | + if(!tree.getNodeByProperty("etiquetaEstilo",no.data.id)) | |
| 487 | + { | |
| 488 | 488 | var d = {tipo:"etiquetaEstilo",etiquetaEstilo:codigoMap+"_"+codigoLayer+"_"+indiceClasse,html:"<i>Estilos</i>"}; |
| 489 | 489 | tempNodeR = new YAHOO.widget.HTMLNode(d, no, false,true); |
| 490 | 490 | tempNodeR.isLeaf = false; |
| ... | ... | @@ -795,9 +795,9 @@ function classesAuto(codigoMap,codigoLayer) |
| 795 | 795 | document.body.appendChild(novoel); |
| 796 | 796 | var editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name: "okcancel_checkbox_id", container: "okcancel_checkbox" }); |
| 797 | 797 | editorBotoes.addButtons([ |
| 798 | - { label: "Criar classes", value: "OK", checked: false}, | |
| 799 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 800 | - ]); | |
| 798 | + { label: "Criar classes", value: "OK", checked: false}, | |
| 799 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 800 | + ]); | |
| 801 | 801 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 802 | 802 | YAHOO.admin.container.panelEditorAutoClasses = new YAHOO.widget.Panel("janela_editor_auto", { fixedcenter:true,close:true,width:"400px", height:"400px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 803 | 803 | YAHOO.admin.container.panelEditorAutoClasses.render(); |
| ... | ... | @@ -1995,7 +1995,7 @@ function sobeDesce(movimento,tipo,codigoMap,codigoLayer,indiceClasse,indiceEstil |
| 1995 | 1995 | |
| 1996 | 1996 | var callback = |
| 1997 | 1997 | { |
| 1998 | - success: function(o) | |
| 1998 | + success: function(o) | |
| 1999 | 1999 | { |
| 2000 | 2000 | core_carregando("desativa"); |
| 2001 | 2001 | var no = ""; | ... | ... |
admin/js/estat_conexao.js
| ... | ... | @@ -26,15 +26,15 @@ function montaTabela(dados){ |
| 26 | 26 | elCell.innerHTML = "a senha deve ser editada<br>diretamente no banco de dados"; |
| 27 | 27 | }, |
| 28 | 28 | myColumnDefs = [ |
| 29 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 30 | - {key:"mais",label:"editar",formatter:formatMais}, | |
| 31 | - {label:"código",key:"codigo_estat_conexao", formatter:formatTexto}, | |
| 32 | - {label:"Banco de dados",resizeable:true,key:"bancodedados", formatter:formatTexto}, | |
| 33 | - {label:"Host",resizeable:true,key:"host", formatter:formatTexto}, | |
| 34 | - {label:"Porta",key:"porta",formatter:formatTexto}, | |
| 35 | - {label:"Usuário",key:"usuario",formatter:formatTexto}, | |
| 36 | - {label:"Senha",key:"senha",formatter:formatSenha} | |
| 37 | - ]; | |
| 29 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 30 | + {key:"mais",label:"editar",formatter:formatMais}, | |
| 31 | + {label:"código",key:"codigo_estat_conexao", formatter:formatTexto}, | |
| 32 | + {label:"Banco de dados",resizeable:true,key:"bancodedados", formatter:formatTexto}, | |
| 33 | + {label:"Host",resizeable:true,key:"host", formatter:formatTexto}, | |
| 34 | + {label:"Porta",key:"porta",formatter:formatTexto}, | |
| 35 | + {label:"Usuário",key:"usuario",formatter:formatTexto}, | |
| 36 | + {label:"Senha",key:"senha",formatter:formatSenha} | |
| 37 | + ]; | |
| 38 | 38 | myDataSource = new YAHOO.util.DataSource(dados); |
| 39 | 39 | myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); |
| 40 | 40 | |
| ... | ... | @@ -100,9 +100,9 @@ function montaEditor(dados,id,recordid){ |
| 100 | 100 | document.body.appendChild(novoel); |
| 101 | 101 | editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); |
| 102 | 102 | editorBotoes.addButtons([ |
| 103 | - { label: "Salva", value: "OK", checked: false}, | |
| 104 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 105 | - ]); | |
| 103 | + { label: "Salva", value: "OK", checked: false}, | |
| 104 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 105 | + ]); | |
| 106 | 106 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 107 | 107 | YAHOO.admin.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"380px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 108 | 108 | YAHOO.admin.container.panelEditor2.render(); | ... | ... |
admin/js/estat_fonteinfo.js
| ... | ... | @@ -14,7 +14,7 @@ function montaTabela(dados){ |
| 14 | 14 | if(oData === ""){ |
| 15 | 15 | oData = "<span style='color:gray' ></span>"; |
| 16 | 16 | } |
| 17 | - elCell.innerHTML = "<pre ><p style=cursor:pointer title='clique para editar'>" + oData + "</pre>"; | |
| 17 | + elCell.innerHTML = "<pre ><p>" + oData + "</pre>"; | |
| 18 | 18 | }, |
| 19 | 19 | formatExclui = function(elCell, oRecord, oColumn){ |
| 20 | 20 | elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>"; |
| ... | ... | @@ -23,12 +23,12 @@ function montaTabela(dados){ |
| 23 | 23 | elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; |
| 24 | 24 | }, |
| 25 | 25 | myColumnDefs = [ |
| 26 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 27 | - {key:"mais",label:"editar",formatter:formatMais}, | |
| 28 | - {label:"Id",resizeable:true,key:"id_fonteinfo", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 29 | - {label:"Título",resizeable:true,key:"titulo", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 30 | - {label:"Link",resizeable:true,key:"link", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
| 31 | - ]; | |
| 26 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 27 | + {key:"mais",label:"editar",formatter:formatMais}, | |
| 28 | + {label:"Id",resizeable:true,key:"id_fonteinfo", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 29 | + {label:"Título",resizeable:true,key:"titulo", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 30 | + {label:"Link",resizeable:true,key:"link", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
| 31 | + ]; | |
| 32 | 32 | myDataSource = new YAHOO.util.DataSource(dados); |
| 33 | 33 | myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); |
| 34 | 34 | |
| ... | ... | @@ -94,9 +94,9 @@ function montaEditor(dados,id,recordid){ |
| 94 | 94 | document.body.appendChild(novoel); |
| 95 | 95 | editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); |
| 96 | 96 | editorBotoes.addButtons([ |
| 97 | - { label: "Salva", value: "OK", checked: false}, | |
| 98 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 99 | - ]); | |
| 97 | + { label: "Salva", value: "OK", checked: false}, | |
| 98 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 99 | + ]); | |
| 100 | 100 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 101 | 101 | YAHOO.admin.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"380px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 102 | 102 | YAHOO.admin.container.panelEditor2.render(); | ... | ... |
admin/js/estat_tipo_periodo.js
| ... | ... | @@ -14,7 +14,7 @@ function montaTabela(dados){ |
| 14 | 14 | if(oData === ""){ |
| 15 | 15 | oData = "<span style='color:gray' ></span>"; |
| 16 | 16 | } |
| 17 | - elCell.innerHTML = "<pre ><p style=cursor:pointer title='clique para editar'>" + oData + "</pre>"; | |
| 17 | + elCell.innerHTML = "<pre ><p>" + oData + "</pre>"; | |
| 18 | 18 | }, |
| 19 | 19 | formatExclui = function(elCell, oRecord, oColumn){ |
| 20 | 20 | elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>"; |
| ... | ... | @@ -23,12 +23,12 @@ function montaTabela(dados){ |
| 23 | 23 | elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; |
| 24 | 24 | }, |
| 25 | 25 | myColumnDefs = [ |
| 26 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 27 | - {key:"mais",label:"editar",formatter:formatMais}, | |
| 28 | - {label:"código",key:"codigo_tipo_periodo", formatter:formatTexto}, | |
| 29 | - {label:"Nome",resizeable:true,key:"nome", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 30 | - {label:"Descricao",resizeable:true,key:"descricao", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
| 31 | - ]; | |
| 26 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 27 | + {key:"mais",label:"editar",formatter:formatMais}, | |
| 28 | + {label:"código",key:"codigo_tipo_periodo", formatter:formatTexto}, | |
| 29 | + {label:"Nome",resizeable:true,key:"nome", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 30 | + {label:"Descricao",resizeable:true,key:"descricao", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
| 31 | + ]; | |
| 32 | 32 | myDataSource = new YAHOO.util.DataSource(dados); |
| 33 | 33 | myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); |
| 34 | 34 | |
| ... | ... | @@ -94,9 +94,9 @@ function montaEditor(dados,id,recordid){ |
| 94 | 94 | document.body.appendChild(novoel); |
| 95 | 95 | editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); |
| 96 | 96 | editorBotoes.addButtons([ |
| 97 | - { label: "Salva", value: "OK", checked: false}, | |
| 98 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 99 | - ]); | |
| 97 | + { label: "Salva", value: "OK", checked: false}, | |
| 98 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 99 | + ]); | |
| 100 | 100 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 101 | 101 | YAHOO.admin.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"380px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 102 | 102 | YAHOO.admin.container.panelEditor2.render(); | ... | ... |
admin/js/estat_tipo_regiao.js
| ... | ... | @@ -7,14 +7,31 @@ function pegaDados(){ |
| 7 | 7 | core_carregando("ativa"); |
| 8 | 8 | core_pegaDados("buscando dados...","../php/metaestat.php?funcao=listaTipoRegiao","montaTabela"); |
| 9 | 9 | } |
| 10 | +function pegaDadosAgregacoes(codigo_tipo_regiao){ | |
| 11 | + core_carregando("ativa"); | |
| 12 | + core_carregando("buscando dados..."); | |
| 13 | + sUrl = "../php/metaestat.php?funcao=listaAgregaRegiao&codigo_tipo_regiao="+codigo_tipo_regiao; | |
| 14 | + callback = { | |
| 15 | + success:function(o){ | |
| 16 | + try{ | |
| 17 | + iniciaEditorAgregacoes(YAHOO.lang.JSON.parse(o.responseText),codigo_tipo_regiao); | |
| 18 | + } | |
| 19 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 20 | + }, | |
| 21 | + failure:core_handleFailure, | |
| 22 | + argument: { foo:"foo", bar:"bar" } | |
| 23 | + }; | |
| 24 | + core_makeRequest(sUrl,callback); | |
| 25 | +} | |
| 10 | 26 | function montaTabela(dados){ |
| 11 | - YAHOO.example.InlineCellEditing = new function() { | |
| 27 | + YAHOO.namespace("editorregiao"); | |
| 28 | + YAHOO.editorregiao.InlineCellEditing = new function() { | |
| 12 | 29 | // Custom formatter for "address" column to preserve line breaks |
| 13 | 30 | var formatTexto = function(elCell, oRecord, oColumn, oData){ |
| 14 | 31 | if(oData === ""){ |
| 15 | 32 | oData = "<span style='color:gray' ></span>"; |
| 16 | 33 | } |
| 17 | - elCell.innerHTML = "<pre ><p style=cursor:pointer title='clique para editar'>" + oData + "</pre>"; | |
| 34 | + elCell.innerHTML = "<pre ><p>" + oData + "</pre>"; | |
| 18 | 35 | }, |
| 19 | 36 | formatExclui = function(elCell, oRecord, oColumn){ |
| 20 | 37 | elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>"; |
| ... | ... | @@ -38,15 +55,16 @@ function montaTabela(dados){ |
| 38 | 55 | {label:"Centróide",key:"colunacentroide",formatter:formatTexto}, |
| 39 | 56 | {label:"Data",key:"data",formatter:formatTexto}, |
| 40 | 57 | {label:"Código",key:"identificador",formatter:formatTexto}, |
| 41 | - {label:"Coluna com os nomes de cada região",key:"colunanomeregiao",formatter:formatTexto}, | |
| 42 | - {label:"Código SRID da projeção",key:"srid",formatter:formatTexto} | |
| 58 | + {label:"Conexão",key:"codigo_estat_conexao",formatter:formatTexto}, | |
| 59 | + {label:"Nomes",resizeable:false,key:"colunanomeregiao",formatter:formatTexto}, | |
| 60 | + {label:"SRID",key:"srid",formatter:formatTexto} | |
| 43 | 61 | ]; |
| 44 | 62 | myDataSource = new YAHOO.util.DataSource(dados); |
| 45 | 63 | myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); |
| 46 | 64 | |
| 47 | 65 | myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; |
| 48 | 66 | myDataSource.responseSchema = { |
| 49 | - fields: ["codigo_tipo_regiao","nome_tipo_regiao","descricao_tipo_regiao","esquemadb","tabela","colunageo","colunacentroide","data","identificador","colunanomeregiao","srid"] | |
| 67 | + fields: ["codigo_tipo_regiao","nome_tipo_regiao","descricao_tipo_regiao","esquemadb","tabela","colunageo","colunacentroide","data","identificador","codigo_estat_conexao","colunanomeregiao","srid"] | |
| 50 | 68 | }; |
| 51 | 69 | myDataTable.subscribe( |
| 52 | 70 | 'cellClickEvent', |
| ... | ... | @@ -83,15 +101,78 @@ function montaTabela(dados){ |
| 83 | 101 | } |
| 84 | 102 | if (column.key == 'rel'){ |
| 85 | 103 | record = this.getRecord(target); |
| 104 | + $clicouId = record.getData('codigo_tipo_regiao'); | |
| 105 | + $recordid = record.getId(); | |
| 106 | + pegaDadosAgregacoes(record.getData('codigo_tipo_regiao')); | |
| 107 | + } | |
| 108 | + } | |
| 109 | + ); | |
| 110 | + }; | |
| 111 | + core_carregando("desativa"); | |
| 112 | +} | |
| 113 | +function iniciaEditorAgregacoes(dados,codigo_tipo_regiao){ | |
| 114 | + core_carregando("desativa"); | |
| 115 | + //if($i("editor_bd")){return;} | |
| 116 | + core_montaEditor("","550px","250px","","Agregações"); | |
| 117 | + $i("editor_bd").innerHTML = '<p class=paragrafo ><p class=paragrafo ><input type=button id=adicionaNovaAgregacao value="Adicionar nova relação" style="left:-5px;" /></p><p><br><br><div id="tabelaAgrega" style="left:-5px;"> </div>'; | |
| 118 | + core_ativaBotaoAdicionaLinha("../php/metaestat.php?funcao=alteraAgregaRegiao&codigo_tipo_regiao="+codigo_tipo_regiao,"adicionaNovaAgregacao","pegaDadosAgregacoes('"+codigo_tipo_regiao+"')"); | |
| 119 | + montaTabelaAgregacoes(dados); | |
| 120 | +} | |
| 121 | +function montaTabelaAgregacoes(dados){ | |
| 122 | + YAHOO.namespace("editoragregacoes"); | |
| 123 | + YAHOO.editoragregacoes.InlineCellEditing = new function() { | |
| 124 | + // Custom formatter for "address" column to preserve line breaks | |
| 125 | + var formatTexto = function(elCell, oRecord, oColumn, oData){ | |
| 126 | + if(oData === ""){ | |
| 127 | + oData = "<span style='color:gray' ></span>"; | |
| 128 | + } | |
| 129 | + elCell.innerHTML = "<pre ><p>" + oData + "</pre>"; | |
| 130 | + }, | |
| 131 | + formatExclui = function(elCell, oRecord, oColumn){ | |
| 132 | + elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>"; | |
| 133 | + }, | |
| 134 | + formatMais = function(elCell, oRecord, oColumn){ | |
| 135 | + elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
| 136 | + }, | |
| 137 | + myColumnDefs = [ | |
| 138 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 139 | + {key:"mais",label:"editar",formatter:formatMais}, | |
| 140 | + {label:"código",key:"id_agregaregiao", formatter:formatTexto}, | |
| 141 | + {label:"Região",resizeable:true,key:"codigo_tipo_regiao", formatter:formatTexto}, | |
| 142 | + {label:"Pai",resizeable:true,key:"codigo_tipo_regiao_pai", formatter:formatTexto}, | |
| 143 | + {label:"Coluna de ligacao",key:"colunaligacao_regiaopai",formatter:formatTexto} | |
| 144 | + ]; | |
| 145 | + myDataSource = new YAHOO.util.DataSource(dados); | |
| 146 | + myDataTable = new YAHOO.widget.DataTable("tabelaAgrega", myColumnDefs, myDataSource); | |
| 147 | + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 148 | + myDataSource.responseSchema = { | |
| 149 | + fields: ["id_agregaregiao","codigo_tipo_regiao","codigo_regiao_pai","colunaligacao_regiaopai"] | |
| 150 | + }; | |
| 151 | + myDataTable.subscribe( | |
| 152 | + 'cellClickEvent', | |
| 153 | + function(ev){ | |
| 154 | + var record,$clicouId,$recordid,sUrl,callback, | |
| 155 | + target = YAHOO.util.Event.getTarget(ev), | |
| 156 | + column = this.getColumn(target); | |
| 157 | + if(YAHOO.admin.container.panelCK){ | |
| 158 | + YAHOO.admin.container.panelCK.destroy(); | |
| 159 | + YAHOO.admin.container.panelCK = null; | |
| 160 | + } | |
| 161 | + if (column.key == 'excluir'){ | |
| 162 | + record = this.getRecord(target); | |
| 163 | + excluiLinhaAgregacao(record.getData('id_agregaregiao'),target); | |
| 164 | + } | |
| 165 | + if (column.key == 'mais'){ | |
| 166 | + record = this.getRecord(target); | |
| 86 | 167 | core_carregando("ativa"); |
| 87 | 168 | core_carregando("buscando dados..."); |
| 88 | - $clicouId = record.getData('codigo_tipo_regiao'); | |
| 169 | + $clicouId = record.getData('id_agregaregiao'); | |
| 89 | 170 | $recordid = record.getId(); |
| 90 | - sUrl = "../php/metaestat.php?funcao=listaAgregaRegiao&codigo_tipo_regiao="+record.getData('codigo_tipo_regiao'); | |
| 171 | + sUrl = "../php/metaestat.php?funcao=listaAgregaRegiao&id_agregaregiao="+$clicouId; | |
| 91 | 172 | callback = { |
| 92 | 173 | success:function(o){ |
| 93 | 174 | try{ |
| 94 | - montaTabelaAgregacoes(YAHOO.lang.JSON.parse(o.responseText),$clicouId,$recordid); | |
| 175 | + montaEditorAgregacoes(YAHOO.lang.JSON.parse(o.responseText),$clicouId,$recordid); | |
| 95 | 176 | } |
| 96 | 177 | catch(e){core_handleFailure(e,o.responseText);} |
| 97 | 178 | }, |
| ... | ... | @@ -105,9 +186,6 @@ function montaTabela(dados){ |
| 105 | 186 | }; |
| 106 | 187 | core_carregando("desativa"); |
| 107 | 188 | } |
| 108 | -function montaTabelaAgregacoes(){ | |
| 109 | - | |
| 110 | -} | |
| 111 | 189 | function montaEditor(dados,id,recordid){ |
| 112 | 190 | function on_editorCheckBoxChange(p_oEvent){ |
| 113 | 191 | if(p_oEvent.newValue.get("value") == "OK"){ |
| ... | ... | @@ -119,7 +197,6 @@ function montaEditor(dados,id,recordid){ |
| 119 | 197 | if(!$i("janela_editor2")){ |
| 120 | 198 | var ins,editorBotoes, |
| 121 | 199 | novoel = document.createElement("div"); |
| 122 | - | |
| 123 | 200 | novoel.id = "janela_editor2"; |
| 124 | 201 | ins = '<div class="hd">Editor</div>'; |
| 125 | 202 | ins += "<div class='bd' style='height:354px;overflow:auto'>"; |
| ... | ... | @@ -128,9 +205,9 @@ function montaEditor(dados,id,recordid){ |
| 128 | 205 | document.body.appendChild(novoel); |
| 129 | 206 | editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); |
| 130 | 207 | editorBotoes.addButtons([ |
| 131 | - { label: "Salva", value: "OK", checked: false}, | |
| 132 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 133 | - ]); | |
| 208 | + { label: "Salva", value: "OK", checked: false}, | |
| 209 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 210 | + ]); | |
| 134 | 211 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 135 | 212 | YAHOO.admin.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"380px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 136 | 213 | YAHOO.admin.container.panelEditor2.render(); |
| ... | ... | @@ -139,6 +216,36 @@ function montaEditor(dados,id,recordid){ |
| 139 | 216 | $i("editor_bd2").innerHTML = montaDiv(dados); |
| 140 | 217 | core_carregando("desativa"); |
| 141 | 218 | } |
| 219 | +function montaEditorAgregacoes(dados,id,recordid){ | |
| 220 | + function on_editorCheckBoxChange(p_oEvent){ | |
| 221 | + if(p_oEvent.newValue.get("value") == "OK"){ | |
| 222 | + gravaDadosAgregacoes(id,recordid); | |
| 223 | + } | |
| 224 | + YAHOO.admin.container.panelEditor2.destroy(); | |
| 225 | + YAHOO.admin.container.panelEditor2 = null; | |
| 226 | + }; | |
| 227 | + if(!$i("janela_editor2")){ | |
| 228 | + var ins,editorBotoes, | |
| 229 | + novoel = document.createElement("div"); | |
| 230 | + novoel.id = "janela_editor2"; | |
| 231 | + ins = '<div class="hd">Editor</div>'; | |
| 232 | + ins += "<div class='bd' style='height:354px;overflow:auto'>"; | |
| 233 | + ins += "<div id='okcancel_checkbox2'></div><div id='editor_bd2'></div>"; | |
| 234 | + novoel.innerHTML = ins; | |
| 235 | + document.body.appendChild(novoel); | |
| 236 | + editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); | |
| 237 | + editorBotoes.addButtons([ | |
| 238 | + { label: "Salva", value: "OK", checked: false}, | |
| 239 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 240 | + ]); | |
| 241 | + editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); | |
| 242 | + YAHOO.admin.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"280px",overflow:"auto", visible:false,constraintoviewport:true } ); | |
| 243 | + YAHOO.admin.container.panelEditor2.render(); | |
| 244 | + } | |
| 245 | + YAHOO.admin.container.panelEditor2.show(); | |
| 246 | + $i("editor_bd2").innerHTML = montaDivAgregacoes(dados); | |
| 247 | + core_carregando("desativa"); | |
| 248 | +} | |
| 142 | 249 | function montaDiv(i){ |
| 143 | 250 | var param = { |
| 144 | 251 | "linhas":[ |
| ... | ... | @@ -150,6 +257,7 @@ function montaDiv(i){ |
| 150 | 257 | {titulo:"Coluna com pontos (pode ser a mesmo que a anterior):",id:"Ecolunacentroide",size:"50",value:i.colunacentroide,tipo:"text",div:""}, |
| 151 | 258 | {titulo:"Data a qual se referem os dados:",id:"Edata",size:"50",value:i.data,tipo:"text",div:""}, |
| 152 | 259 | {titulo:"Coluna com o código de cada registro:",id:"Eidentificador",size:"50",value:i.identificador,tipo:"text",div:""}, |
| 260 | + {titulo:"Código da conexão com o banco:",id:"Ecodigo_estat_conexao",size:"50",value:i.codigo_estat_conexao,tipo:"text",div:""}, | |
| 153 | 261 | {titulo:"Coluna com o nome da região:",id:"Ecolunanomeregiao",size:"50",value:i.colunanomeregiao,tipo:"text",div:""}, |
| 154 | 262 | {titulo:"Código SRID:",id:"Esrid",size:"50",value:i.srid,tipo:"text",div:""} |
| 155 | 263 | ] |
| ... | ... | @@ -159,9 +267,20 @@ function montaDiv(i){ |
| 159 | 267 | ins += core_geraLinhas(param); |
| 160 | 268 | return(ins); |
| 161 | 269 | } |
| 270 | +function montaDivAgregacoes(i){ | |
| 271 | + var param = { | |
| 272 | + "linhas":[ | |
| 273 | + {titulo:"Código da região de nível superior:",id:"Ecodigo_tipo_regiao_pai",size:"50",value:i.codigo_tipo_regiao_pai,tipo:"text",div:""}, | |
| 274 | + {titulo:"Coluna na tabela da região de nível inferior que permite a ligação:",id:"Ecolunaligacao_regiaopai",size:"50",value:i.colunaligacao_regiaopai,tipo:"text",div:""} | |
| 275 | + ] | |
| 276 | + }, | |
| 277 | + ins = ""; | |
| 278 | + ins += core_geraLinhas(param); | |
| 279 | + return(ins); | |
| 280 | +} | |
| 162 | 281 | |
| 163 | 282 | function gravaDados(id,recordid){ |
| 164 | - var campos = new Array("nome_tipo_regiao","descricao_tipo_regiao","esquemadb","tabela","colunageo","colunacentroide","data","identificador","colunanomeregiao","srid"), | |
| 283 | + var campos = new Array("codigo_estat_conexao","nome_tipo_regiao","descricao_tipo_regiao","esquemadb","tabela","colunageo","colunacentroide","data","identificador","colunanomeregiao","srid"), | |
| 165 | 284 | par = "", |
| 166 | 285 | i = 0, |
| 167 | 286 | sUrl,callback; |
| ... | ... | @@ -193,9 +312,48 @@ function gravaDados(id,recordid){ |
| 193 | 312 | }; |
| 194 | 313 | core_makeRequest(sUrl,callback); |
| 195 | 314 | } |
| 315 | +function gravaDadosAgregacoes(id,recordid){ | |
| 316 | + // TODO | |
| 317 | + var campos = new Array("codigo_tipo_regiao_pai","colunaligacao_regiaopai"), | |
| 318 | + par = "", | |
| 319 | + i = 0, | |
| 320 | + sUrl,callback; | |
| 321 | + | |
| 322 | + for (i=0;i<campos.length;i++){ | |
| 323 | + par += "&"+campos[i]+"="+($i("E"+campos[i]).value); | |
| 324 | + } | |
| 325 | + par += "&id_agregaregiao="+id; | |
| 326 | + core_carregando("ativa"); | |
| 327 | + core_carregando(" gravando o registro do id= "+id); | |
| 328 | + sUrl = "../php/metaestat.php?funcao=alteraAgregaregiao"+par; | |
| 329 | + callback = { | |
| 330 | + success:function(o){ | |
| 331 | + try { | |
| 332 | + if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { | |
| 333 | + core_carregando("<span style=color:red >Não foi possível excluir. Verifique se não existem registros vinculados</span>"); | |
| 334 | + setTimeout("core_carregando('desativa')",3000); | |
| 335 | + } | |
| 336 | + else{ | |
| 337 | + var rec = myDataTable.getRecordSet().getRecord(recordid); | |
| 338 | + myDataTable.updateRow(rec,YAHOO.lang.JSON.parse(o.responseText)); | |
| 339 | + core_carregando("desativa"); | |
| 340 | + } | |
| 341 | + } | |
| 342 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 343 | + }, | |
| 344 | + failure:core_handleFailure, | |
| 345 | + argument: { foo:"foo", bar:"bar" } | |
| 346 | + }; | |
| 347 | + core_makeRequest(sUrl,callback); | |
| 348 | +} | |
| 196 | 349 | function excluiLinha(id,row){ |
| 197 | 350 | var mensagem = " excluindo o registro do id= "+id, |
| 198 | 351 | sUrl = "../php/metaestat.php?funcao=excluirTipoRegiao&codigo_tipo_regiao="+id; |
| 199 | 352 | core_excluiLinha(sUrl,row,mensagem); |
| 200 | 353 | } |
| 354 | +function excluiLinhaAgregacao(id,row){ | |
| 355 | + var mensagem = " excluindo o registro do id= "+id, | |
| 356 | + sUrl = "../php/metaestat.php?funcao=excluirAgregaRegiao&id_agregaregiao="+id; | |
| 357 | + core_excluiLinha(sUrl,row,mensagem); | |
| 358 | +} | |
| 201 | 359 | //YAHOO.util.Event.addListener(window, "load", initMenu); |
| 202 | 360 | \ No newline at end of file | ... | ... |
admin/js/estat_unidade_medida.js
| ... | ... | @@ -14,7 +14,7 @@ function montaTabela(dados){ |
| 14 | 14 | if(oData === ""){ |
| 15 | 15 | oData = "<span style='color:gray' ></span>"; |
| 16 | 16 | } |
| 17 | - elCell.innerHTML = "<pre ><p style=cursor:pointer title='clique para editar'>" + oData + "</pre>"; | |
| 17 | + elCell.innerHTML = "<pre ><p>" + oData + "</pre>"; | |
| 18 | 18 | }, |
| 19 | 19 | formatExclui = function(elCell, oRecord, oColumn){ |
| 20 | 20 | elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>"; |
| ... | ... | @@ -23,14 +23,14 @@ function montaTabela(dados){ |
| 23 | 23 | elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; |
| 24 | 24 | }, |
| 25 | 25 | myColumnDefs = [ |
| 26 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 27 | - {key:"mais",label:"editar",formatter:formatMais}, | |
| 28 | - {label:"código",key:"codigo_unidade_medida", formatter:formatTexto}, | |
| 29 | - {label:"Nome",resizeable:true,key:"nome", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 30 | - {label:"Sigla",resizeable:true,key:"sigla", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 31 | - {label:"Permite soma?",key:"permitesoma",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}}, | |
| 32 | - {label:"Permite média?",key:"permitemedia",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}} | |
| 33 | - ]; | |
| 26 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 27 | + {key:"mais",label:"editar",formatter:formatMais}, | |
| 28 | + {label:"código",key:"codigo_unidade_medida", formatter:formatTexto}, | |
| 29 | + {label:"Nome",resizeable:true,key:"nome", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 30 | + {label:"Sigla",resizeable:true,key:"sigla", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 31 | + {label:"Permite soma?",key:"permitesoma",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}}, | |
| 32 | + {label:"Permite média?",key:"permitemedia",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}} | |
| 33 | + ]; | |
| 34 | 34 | myDataSource = new YAHOO.util.DataSource(dados); |
| 35 | 35 | myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); |
| 36 | 36 | |
| ... | ... | @@ -96,9 +96,9 @@ function montaEditor(dados,id,recordid){ |
| 96 | 96 | document.body.appendChild(novoel); |
| 97 | 97 | editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); |
| 98 | 98 | editorBotoes.addButtons([ |
| 99 | - { label: "Salva", value: "OK", checked: false}, | |
| 100 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 101 | - ]); | |
| 99 | + { label: "Salva", value: "OK", checked: false}, | |
| 100 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 101 | + ]); | |
| 102 | 102 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 103 | 103 | YAHOO.admin.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"380px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 104 | 104 | YAHOO.admin.container.panelEditor2.render(); | ... | ... |
admin/js/estat_variavel.js
| ... | ... | @@ -111,39 +111,39 @@ function montaArvore(dados){ |
| 111 | 111 | function changeIconMode(){ |
| 112 | 112 | buildTree(); |
| 113 | 113 | } |
| 114 | - function loadNodeData(node, fnLoadComplete){ | |
| 115 | - var sUrl = "../php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel="+node.data.codigo_variavel, | |
| 114 | + function loadNodeData(node, fnLoadComplete){ | |
| 115 | + var sUrl = "../php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel="+node.data.codigo_variavel, | |
| 116 | 116 | callback = { |
| 117 | - success: function(oResponse){ | |
| 118 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 117 | + success: function(oResponse){ | |
| 118 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 119 | 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 | |
| 130 | - }; | |
| 131 | - if(node.data.codigo_variavel){ | |
| 132 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 133 | - } | |
| 134 | - else{ | |
| 135 | - fnLoadComplete.call(); | |
| 136 | - } | |
| 137 | - } | |
| 138 | - function buildTree(){ | |
| 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 | |
| 130 | + }; | |
| 131 | + if(node.data.codigo_variavel){ | |
| 132 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 133 | + } | |
| 134 | + else{ | |
| 135 | + fnLoadComplete.call(); | |
| 136 | + } | |
| 137 | + } | |
| 138 | + function buildTree(){ | |
| 139 | 139 | tree = new YAHOO.widget.TreeView("tabela"); |
| 140 | 140 | tree.setDynamicLoad(loadNodeData, 1); |
| 141 | 141 | var root = tree.getRoot(), |
| 142 | 142 | tempNode = new YAHOO.widget.TextNode('', root, false); |
| 143 | 143 | tempNode.isLeaf = true; |
| 144 | 144 | core_carregando("desativa"); |
| 145 | - } | |
| 146 | - buildTree(); | |
| 145 | + } | |
| 146 | + buildTree(); | |
| 147 | 147 | }(); |
| 148 | 148 | adicionaNosVariaveis(dados); |
| 149 | 149 | tree.draw(); |
| ... | ... | @@ -163,83 +163,83 @@ function adicionaNosMedidas(no,dados,redesenha) |
| 163 | 163 | if (newVal != currentIconMode) |
| 164 | 164 | {currentIconMode = newVal;} |
| 165 | 165 | } |
| 166 | - function loadNodeData(node, fnLoadComplete){ | |
| 167 | - var sUrl = "../php/metaestat.php?funcao=listaParametro&id_medida_variavel="+node.data.no_parametros, | |
| 166 | + function loadNodeData(node, fnLoadComplete){ | |
| 167 | + var sUrl = "../php/metaestat.php?funcao=listaParametro&id_medida_variavel="+node.data.no_parametros, | |
| 168 | 168 | callback = { |
| 169 | - success: function(oResponse){ | |
| 170 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 169 | + success: function(oResponse){ | |
| 170 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 171 | 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 | |
| 180 | - }, | |
| 181 | - timeout: 25000 | |
| 182 | - }; | |
| 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, | |
| 172 | + oResponse.argument.fnLoadComplete(); | |
| 173 | + }, | |
| 174 | + failure: function(oResponse){ | |
| 175 | + oResponse.argument.fnLoadComplete(); | |
| 176 | + }, | |
| 177 | + argument:{ | |
| 178 | + "node": node, | |
| 179 | + "fnLoadComplete": fnLoadComplete | |
| 180 | + }, | |
| 181 | + timeout: 25000 | |
| 182 | + }; | |
| 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 | 187 | callback = { |
| 188 | - success: function(oResponse){ | |
| 189 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 188 | + success: function(oResponse){ | |
| 189 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 190 | 190 | adicionaNosClassificacao(node,dados,false); |
| 191 | - oResponse.argument.fnLoadComplete(); | |
| 192 | - }, | |
| 193 | - failure: function(oResponse){ | |
| 194 | - oResponse.argument.fnLoadComplete(); | |
| 195 | - }, | |
| 196 | - argument:{ | |
| 197 | - "node": node, | |
| 198 | - "fnLoadComplete": fnLoadComplete | |
| 199 | - }, | |
| 200 | - timeout: 25000 | |
| 201 | - }; | |
| 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, | |
| 191 | + oResponse.argument.fnLoadComplete(); | |
| 192 | + }, | |
| 193 | + failure: function(oResponse){ | |
| 194 | + oResponse.argument.fnLoadComplete(); | |
| 195 | + }, | |
| 196 | + argument:{ | |
| 197 | + "node": node, | |
| 198 | + "fnLoadComplete": fnLoadComplete | |
| 199 | + }, | |
| 200 | + timeout: 25000 | |
| 201 | + }; | |
| 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 | 206 | callback = { |
| 207 | - success: function(oResponse){ | |
| 208 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 207 | + success: function(oResponse){ | |
| 208 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 209 | 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 | |
| 218 | - }, | |
| 219 | - timeout: 25000 | |
| 220 | - }; | |
| 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, | |
| 210 | + oResponse.argument.fnLoadComplete(); | |
| 211 | + }, | |
| 212 | + failure: function(oResponse){ | |
| 213 | + oResponse.argument.fnLoadComplete(); | |
| 214 | + }, | |
| 215 | + argument:{ | |
| 216 | + "node": node, | |
| 217 | + "fnLoadComplete": fnLoadComplete | |
| 218 | + }, | |
| 219 | + timeout: 25000 | |
| 220 | + }; | |
| 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 | 225 | callback = { |
| 226 | - success: function(oResponse){ | |
| 227 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 226 | + success: function(oResponse){ | |
| 227 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 228 | 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 | |
| 237 | - }, | |
| 238 | - timeout: 25000 | |
| 239 | - }; | |
| 240 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 241 | - }; | |
| 242 | - if(!redesenha && !(tree.getNodeByProperty("etiqueta_adiciona_variavel",no.data.codigo_variavel))){ | |
| 229 | + oResponse.argument.fnLoadComplete(); | |
| 230 | + }, | |
| 231 | + failure: function(oResponse){ | |
| 232 | + oResponse.argument.fnLoadComplete(); | |
| 233 | + }, | |
| 234 | + argument:{ | |
| 235 | + "node": node, | |
| 236 | + "fnLoadComplete": fnLoadComplete | |
| 237 | + }, | |
| 238 | + timeout: 25000 | |
| 239 | + }; | |
| 240 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 241 | + }; | |
| 242 | + if(!redesenha && !(tree.getNodeByProperty("etiqueta_adiciona_variavel",no.data.codigo_variavel))){ | |
| 243 | 243 | tempNode = new YAHOO.widget.HTMLNode( |
| 244 | 244 | { |
| 245 | 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>", |
| ... | ... | @@ -300,7 +300,7 @@ function adicionaNosParametro(no,dados,redesenha){ |
| 300 | 300 | if (newVal != currentIconMode) |
| 301 | 301 | {currentIconMode = newVal;} |
| 302 | 302 | } |
| 303 | - if(!redesenha) { | |
| 303 | + if(!redesenha) { | |
| 304 | 304 | tempNode = new YAHOO.widget.HTMLNode( |
| 305 | 305 | { |
| 306 | 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>" |
| ... | ... | @@ -336,26 +336,26 @@ function adicionaNosClassificacao(no,dados,redesenha){ |
| 336 | 336 | if (newVal != currentIconMode) |
| 337 | 337 | {currentIconMode = newVal;} |
| 338 | 338 | } |
| 339 | - function loadNodeData(node, fnLoadComplete){ | |
| 340 | - var sUrl = "../php/metaestat.php?funcao=listaClasseClassificacao&id_classificacao="+node.data.id_classificacao, | |
| 339 | + function loadNodeData(node, fnLoadComplete){ | |
| 340 | + var sUrl = "../php/metaestat.php?funcao=listaClasseClassificacao&id_classificacao="+node.data.id_classificacao, | |
| 341 | 341 | callback = { |
| 342 | - success: function(oResponse){ | |
| 343 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 342 | + success: function(oResponse){ | |
| 343 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 344 | 344 | adicionaNosClasses(node,dados,false); |
| 345 | - oResponse.argument.fnLoadComplete(); | |
| 346 | - }, | |
| 347 | - failure: function(oResponse){ | |
| 348 | - oResponse.argument.fnLoadComplete(); | |
| 349 | - }, | |
| 350 | - argument:{ | |
| 351 | - "node": node, | |
| 352 | - "fnLoadComplete": fnLoadComplete | |
| 353 | - }, | |
| 354 | - timeout: 25000 | |
| 355 | - }; | |
| 356 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 357 | - }; | |
| 358 | - if(!redesenha) { | |
| 345 | + oResponse.argument.fnLoadComplete(); | |
| 346 | + }, | |
| 347 | + failure: function(oResponse){ | |
| 348 | + oResponse.argument.fnLoadComplete(); | |
| 349 | + }, | |
| 350 | + argument:{ | |
| 351 | + "node": node, | |
| 352 | + "fnLoadComplete": fnLoadComplete | |
| 353 | + }, | |
| 354 | + timeout: 25000 | |
| 355 | + }; | |
| 356 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 357 | + }; | |
| 358 | + if(!redesenha) { | |
| 359 | 359 | tempNode = new YAHOO.widget.HTMLNode( |
| 360 | 360 | { |
| 361 | 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>" |
| ... | ... | @@ -392,7 +392,7 @@ function adicionaNosClasses(no,dados,redesenha){ |
| 392 | 392 | if (newVal != currentIconMode) |
| 393 | 393 | {currentIconMode = newVal;} |
| 394 | 394 | } |
| 395 | - if(!redesenha) { | |
| 395 | + if(!redesenha) { | |
| 396 | 396 | tempNode = new YAHOO.widget.HTMLNode( |
| 397 | 397 | { |
| 398 | 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>" |
| ... | ... | @@ -428,7 +428,7 @@ function adicionaNosLink(no,dados,redesenha){ |
| 428 | 428 | if (newVal != currentIconMode) |
| 429 | 429 | {currentIconMode = newVal;} |
| 430 | 430 | } |
| 431 | - if(!redesenha) { | |
| 431 | + if(!redesenha) { | |
| 432 | 432 | tempNode = new YAHOO.widget.HTMLNode( |
| 433 | 433 | { |
| 434 | 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>" |
| ... | ... | @@ -464,7 +464,7 @@ function adicionaNosFonteinfo(no,dados,redesenha){ |
| 464 | 464 | if (newVal != currentIconMode) |
| 465 | 465 | {currentIconMode = newVal;} |
| 466 | 466 | } |
| 467 | - if(!redesenha) { | |
| 467 | + if(!redesenha) { | |
| 468 | 468 | tempNode = new YAHOO.widget.HTMLNode( |
| 469 | 469 | { |
| 470 | 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>" |
| ... | ... | @@ -506,8 +506,8 @@ function montaDivVariavel(i){ |
| 506 | 506 | var ins = "", |
| 507 | 507 | param = { |
| 508 | 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:""} | |
| 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 | 511 | ] |
| 512 | 512 | }; |
| 513 | 513 | ins += core_geraLinhas(param); |
| ... | ... | @@ -518,16 +518,16 @@ function montaDivMedidaVariavel(i){ |
| 518 | 518 | var temp,ins = "", |
| 519 | 519 | param = { |
| 520 | 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:""} | |
| 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 | 531 | ] |
| 532 | 532 | }; |
| 533 | 533 | ins += core_geraLinhas(param); |
| ... | ... | @@ -562,10 +562,10 @@ function montaDivParametroMedida(i){ |
| 562 | 562 | var ins = "", |
| 563 | 563 | param = { |
| 564 | 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:""} | |
| 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 | 569 | ] |
| 570 | 570 | }; |
| 571 | 571 | ins += core_geraLinhas(param); |
| ... | ... | @@ -576,8 +576,8 @@ function montaDivClassificacaoMedida(i){ |
| 576 | 576 | var ins = "", |
| 577 | 577 | param = { |
| 578 | 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:""} | |
| 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 | 581 | ] |
| 582 | 582 | }; |
| 583 | 583 | ins += core_geraLinhas(param); |
| ... | ... | @@ -589,17 +589,17 @@ function montaDivClasseClassificacao(i){ |
| 589 | 589 | var ins = "", |
| 590 | 590 | param = { |
| 591 | 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:""} | |
| 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 | 603 | ] |
| 604 | 604 | }; |
| 605 | 605 | ins += core_geraLinhas(param); |
| ... | ... | @@ -610,8 +610,8 @@ function montaDivLinkMedida(i){ |
| 610 | 610 | var ins = "", |
| 611 | 611 | param = { |
| 612 | 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:""} | |
| 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 | 615 | ] |
| 616 | 616 | }; |
| 617 | 617 | ins += core_geraLinhas(param); |
| ... | ... | @@ -636,13 +636,13 @@ function adicionarMedidaVariavel(codigo_variavel){ |
| 636 | 636 | var no = tree.getNodeByProperty("codigo_variavel",codigo_variavel), |
| 637 | 637 | sUrl = "../php/metaestat.php?funcao=alteraMedidaVariavel&codigo_variavel="+codigo_variavel, |
| 638 | 638 | callback = { |
| 639 | - success: function(oResponse){ | |
| 639 | + success: function(oResponse){ | |
| 640 | 640 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 641 | 641 | adicionaNosMedidas(no,[dados],true); |
| 642 | 642 | editar('medidaVariavel',dados.id_medida_variavel); |
| 643 | 643 | }, |
| 644 | - failure:core_handleFailure, | |
| 645 | - argument: { foo:"foo", bar:"bar" } | |
| 644 | + failure:core_handleFailure, | |
| 645 | + argument: { foo:"foo", bar:"bar" } | |
| 646 | 646 | }; |
| 647 | 647 | core_makeRequest(sUrl,callback); |
| 648 | 648 | } |
| ... | ... | @@ -657,13 +657,13 @@ function adicionarParametroMedida(id_medida_variavel){ |
| 657 | 657 | var no = tree.getNodeByProperty("id_medida_variavel",id_medida_variavel), |
| 658 | 658 | sUrl = "../php/metaestat.php?funcao=alteraParametroMedida&id_medida_variavel="+id_medida_variavel, |
| 659 | 659 | callback = { |
| 660 | - success: function(oResponse){ | |
| 660 | + success: function(oResponse){ | |
| 661 | 661 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 662 | 662 | adicionaNosParametro(no,[dados],true); |
| 663 | 663 | editar('parametroMedida',dados.id_parametro_medida); |
| 664 | 664 | }, |
| 665 | - failure:core_handleFailure, | |
| 666 | - argument: { foo:"foo", bar:"bar" } | |
| 665 | + failure:core_handleFailure, | |
| 666 | + argument: { foo:"foo", bar:"bar" } | |
| 667 | 667 | }; |
| 668 | 668 | core_makeRequest(sUrl,callback); |
| 669 | 669 | } |
| ... | ... | @@ -671,13 +671,13 @@ function adicionarLinkMedida(id_medida_variavel){ |
| 671 | 671 | var no = tree.getNodeByProperty("no_link",id_medida_variavel), |
| 672 | 672 | sUrl = "../php/metaestat.php?funcao=alteraLinkMedida&id_medida_variavel="+id_medida_variavel, |
| 673 | 673 | callback = { |
| 674 | - success: function(oResponse){ | |
| 674 | + success: function(oResponse){ | |
| 675 | 675 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 676 | 676 | adicionaNosLink(no,[dados],true); |
| 677 | 677 | editar('linkMedida',dados.id_link); |
| 678 | 678 | }, |
| 679 | - failure:core_handleFailure, | |
| 680 | - argument: { foo:"foo", bar:"bar" } | |
| 679 | + failure:core_handleFailure, | |
| 680 | + argument: { foo:"foo", bar:"bar" } | |
| 681 | 681 | }; |
| 682 | 682 | core_makeRequest(sUrl,callback); |
| 683 | 683 | } |
| ... | ... | @@ -685,13 +685,13 @@ function adicionarFonteinfoMedida(id_medida_variavel,id_fonteinfo){ |
| 685 | 685 | var no = tree.getNodeByProperty("no_fonteinfo",id_medida_variavel), |
| 686 | 686 | sUrl = "../php/metaestat.php?funcao=alteraFonteinfo&id_medida_variavel="+id_medida_variavel, |
| 687 | 687 | callback = { |
| 688 | - success: function(oResponse){ | |
| 688 | + success: function(oResponse){ | |
| 689 | 689 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 690 | 690 | adicionaNosLink(no,[dados],true); |
| 691 | 691 | editar('fonteinfo',dados.id_fonteinfo); |
| 692 | 692 | }, |
| 693 | - failure:core_handleFailure, | |
| 694 | - argument: { foo:"foo", bar:"bar" } | |
| 693 | + failure:core_handleFailure, | |
| 694 | + argument: { foo:"foo", bar:"bar" } | |
| 695 | 695 | }; |
| 696 | 696 | core_makeRequest(sUrl,callback); |
| 697 | 697 | } |
| ... | ... | @@ -704,13 +704,13 @@ function adicionarClassificacaoMedida(id_medida_variavel){ |
| 704 | 704 | var no = tree.getNodeByProperty("no_classificacao",id_medida_variavel), |
| 705 | 705 | sUrl = "../php/metaestat.php?funcao=alteraClassificacaoMedida&id_medida_variavel="+id_medida_variavel, |
| 706 | 706 | callback = { |
| 707 | - success: function(oResponse){ | |
| 707 | + success: function(oResponse){ | |
| 708 | 708 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 709 | 709 | adicionaNosClassificacao(no,[dados],true); |
| 710 | 710 | editar('classificacaoMedida',dados.id_classificacao); |
| 711 | 711 | }, |
| 712 | - failure:core_handleFailure, | |
| 713 | - argument: { foo:"foo", bar:"bar" } | |
| 712 | + failure:core_handleFailure, | |
| 713 | + argument: { foo:"foo", bar:"bar" } | |
| 714 | 714 | }; |
| 715 | 715 | core_makeRequest(sUrl,callback); |
| 716 | 716 | } |
| ... | ... | @@ -723,13 +723,13 @@ function adicionarClasseClassificacao(id_classificacao){ |
| 723 | 723 | var no = tree.getNodeByProperty("id_classificacao",id_classificacao), |
| 724 | 724 | sUrl = "../php/metaestat.php?funcao=alteraClasseClassificacao&id_classificacao="+id_classificacao, |
| 725 | 725 | callback = { |
| 726 | - success: function(oResponse){ | |
| 726 | + success: function(oResponse){ | |
| 727 | 727 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 728 | 728 | adicionaNosClasses(no,[dados],true); |
| 729 | 729 | editar('classeClassificacao',dados.id_classe); |
| 730 | 730 | }, |
| 731 | - failure:core_handleFailure, | |
| 732 | - argument: { foo:"foo", bar:"bar" } | |
| 731 | + failure:core_handleFailure, | |
| 732 | + argument: { foo:"foo", bar:"bar" } | |
| 733 | 733 | }; |
| 734 | 734 | core_makeRequest(sUrl,callback); |
| 735 | 735 | } |
| ... | ... | @@ -926,7 +926,7 @@ function sql(tipo,id) { |
| 926 | 926 | new YAHOO.widget.Button("i3geoestat"); |
| 927 | 927 | $i("i3geoestat-button").onclick = function(){ |
| 928 | 928 | var u,sUrl,callback = { |
| 929 | - success: function(oResponse){ | |
| 929 | + success: function(oResponse){ | |
| 930 | 930 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 931 | 931 | u = i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+dados.mapfile+"&layers="+dados.layer; |
| 932 | 932 | $i("ultimaUrl").innerHTML = u; |
| ... | ... | @@ -947,7 +947,7 @@ function sql(tipo,id) { |
| 947 | 947 | new YAHOO.widget.Button("graficoestat"); |
| 948 | 948 | $i("graficoestat-button").onclick = function(){ |
| 949 | 949 | var callback = { |
| 950 | - success: function(oResponse){ | |
| 950 | + success: function(oResponse){ | |
| 951 | 951 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 952 | 952 | dados = dados.grupos; |
| 953 | 953 | if(dados == ""){ |
| ... | ... | @@ -1135,66 +1135,66 @@ function gravaDados(tipo,id){ |
| 1135 | 1135 | {par += "&"+campos[i]+"="+($i("E"+campos[i]).value);} |
| 1136 | 1136 | |
| 1137 | 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>"; | |
| 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 | 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>"; | |
| 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 | 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>"; | |
| 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 | 1161 | no.getContentEl().getElementsByTagName("span")[0].style.color = ""; |
| 1162 | - no.html = no.getContentEl().innerHTML; | |
| 1163 | - } | |
| 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>"; | |
| 1162 | + no.html = no.getContentEl().innerHTML; | |
| 1163 | + } | |
| 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 | 1167 | no.getContentEl().getElementsByTagName("span")[0].style.color = ""; |
| 1168 | - no.html = no.getContentEl().innerHTML; | |
| 1169 | - } | |
| 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>"; | |
| 1168 | + no.html = no.getContentEl().innerHTML; | |
| 1169 | + } | |
| 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 | 1173 | no.getContentEl().getElementsByTagName("span")[0].style.color = ""; |
| 1174 | - no.html = no.getContentEl().innerHTML; | |
| 1175 | - } | |
| 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>"; | |
| 1174 | + no.html = no.getContentEl().innerHTML; | |
| 1175 | + } | |
| 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 | 1179 | no.getContentEl().getElementsByTagName("span")[0].style.color = ""; |
| 1180 | - no.html = no.getContentEl().innerHTML; | |
| 1181 | - } | |
| 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>"; | |
| 1180 | + no.html = no.getContentEl().innerHTML; | |
| 1181 | + } | |
| 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 | 1186 | //no.getContentEl().getElementsByTagName("span")[0].style.color = ""; |
| 1187 | - //no.html = no.getContentEl().innerHTML; | |
| 1188 | - } | |
| 1189 | - core_carregando("desativa"); | |
| 1190 | - } | |
| 1187 | + //no.html = no.getContentEl().innerHTML; | |
| 1188 | + } | |
| 1189 | + core_carregando("desativa"); | |
| 1190 | + } | |
| 1191 | 1191 | YAHOO.admin.container.panelEditor.destroy(); |
| 1192 | 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" } | |
| 1193 | + } | |
| 1194 | + catch(e){core_handleFailure(e,o.responseText);} | |
| 1195 | + }, | |
| 1196 | + failure:core_handleFailure, | |
| 1197 | + argument: { foo:"foo", bar:"bar" } | |
| 1198 | 1198 | }; |
| 1199 | 1199 | if(prog && par){ |
| 1200 | 1200 | core_carregando("ativa"); |
| ... | ... | @@ -1210,13 +1210,13 @@ Lista os dados das tabelas auxiliares e guarda no objeto dadosAuxiliares |
| 1210 | 1210 | */ |
| 1211 | 1211 | function listaDadosAuxiliares(){ |
| 1212 | 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, | |
| 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 | 1220 | argument: { foo:"foo", bar:"bar" } |
| 1221 | 1221 | }; |
| 1222 | 1222 | core_makeRequest("../php/metaestat.php?funcao=listaDadosTabelasAuxiliares",callback); | ... | ... |
admin/js/grupos.js
| ... | ... | @@ -73,102 +73,84 @@ function filtraDadosLetras_G(letra){ |
| 73 | 73 | } |
| 74 | 74 | function montaTabela_G(dados) |
| 75 | 75 | { |
| 76 | - if(dados_G == ""){ | |
| 77 | - dados_G = dados; | |
| 78 | - } | |
| 79 | - core_listaDeLetras("letras_G","filtraDadosLetras_G"); | |
| 80 | - YAHOO.example.InlineCellEditing = new function() | |
| 81 | - { | |
| 82 | - // Custom formatter for "address" column to preserve line breaks | |
| 83 | - var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 84 | - { | |
| 85 | - if(oData === ""){ | |
| 86 | - oData = "<span style='color:gray' >Clique para editar, tecle enter e depois salve</span>"; | |
| 87 | - } | |
| 88 | - elCell.innerHTML = "<p style=width:250px;cursor:pointer title='clique para editar'>" + oData + "</p>"; | |
| 89 | - }; | |
| 90 | - var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 91 | - { | |
| 92 | - elCell.innerHTML = "<p style=width:20px >" + oData + "</p>"; | |
| 93 | - }; | |
| 94 | - var formatSalva = function(elCell, oRecord, oColumn) | |
| 95 | - { | |
| 96 | - elCell.innerHTML = "<div title='salva' class=salvar style='text-align:center' onclick='gravaLinha_G(\""+oRecord._sId+"\")'></div>"; | |
| 97 | - }; | |
| 98 | - var formatExclui = function(elCell, oRecord, oColumn) | |
| 99 | - { | |
| 100 | - elCell.innerHTML = "<div title='exclui' class=excluir style='text-align:center' ></div>"; | |
| 101 | - }; | |
| 102 | - var myColumnDefs = [ | |
| 103 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 104 | - {label:"salvar",formatter:formatSalva}, | |
| 105 | - {label:"id",key:"id_grupo", formatter:formatTextoId}, | |
| 106 | - {label:"nome",resizeable:true,key:"nome_grupo", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 107 | - {label:"descrição",resizeable:true,key:"desc_grupo", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 108 | - {label:"en",resizeable:true,key:"en", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 109 | - {label:"es",resizeable:true,key:"es", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 110 | - {label:"it",resizeable:true,key:"it", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
| 111 | - ]; | |
| 112 | - myDataSource = new YAHOO.util.DataSource(dados); | |
| 113 | - myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 114 | - myDataSource.responseSchema = | |
| 115 | - { | |
| 116 | - fields: ["it","es","en","desc_grupo","id_grupo","nome_grupo"] | |
| 117 | - }; | |
| 118 | - myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 119 | - // Set up editing flow | |
| 120 | - myDataTable.highlightEditableCell = function(oArgs) | |
| 121 | - { | |
| 122 | - var elCell = oArgs.target; | |
| 123 | - var column = myDataTable.getColumn(oArgs.target); | |
| 124 | - //if(column.editor != "null") | |
| 125 | - if(!YAHOO.lang.isNull(column.editor)) | |
| 126 | - { | |
| 76 | + if(dados_G == ""){ | |
| 77 | + dados_G = dados; | |
| 78 | + } | |
| 79 | + core_listaDeLetras("letras_G","filtraDadosLetras_G"); | |
| 80 | + YAHOO.example.InlineCellEditing = new function(){ | |
| 81 | + // Custom formatter for "address" column to preserve line breaks | |
| 82 | + var formatTexto = function(elCell, oRecord, oColumn, oData){ | |
| 83 | + if(oData === ""){ | |
| 84 | + oData = "<span style='color:gray' >Clique para editar, tecle enter e depois salve</span>"; | |
| 85 | + } | |
| 86 | + elCell.innerHTML = "<p style=width:250px;cursor:pointer title='clique para editar'>" + oData + "</p>"; | |
| 87 | + }, | |
| 88 | + formatTextoId = function(elCell, oRecord, oColumn, oData){ | |
| 89 | + elCell.innerHTML = "<p style=width:20px >" + oData + "</p>"; | |
| 90 | + }, | |
| 91 | + formatSalva = function(elCell, oRecord, oColumn){ | |
| 92 | + elCell.innerHTML = "<div title='salva' class=salvar style='text-align:center' onclick='gravaLinha_G(\""+oRecord._sId+"\")'></div>"; | |
| 93 | + }, | |
| 94 | + formatExclui = function(elCell, oRecord, oColumn){ | |
| 95 | + elCell.innerHTML = "<div title='exclui' class=excluir style='text-align:center' ></div>"; | |
| 96 | + }, | |
| 97 | + myColumnDefs = [ | |
| 98 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 99 | + {label:"salvar",formatter:formatSalva}, | |
| 100 | + {label:"id",key:"id_grupo", formatter:formatTextoId}, | |
| 101 | + {label:"nome",resizeable:true,key:"nome_grupo", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 102 | + {label:"descrição",resizeable:true,key:"desc_grupo", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 103 | + {label:"en",resizeable:true,key:"en", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 104 | + {label:"es",resizeable:true,key:"es", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, | |
| 105 | + {label:"it",resizeable:true,key:"it", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} | |
| 106 | + ]; | |
| 107 | + myDataSource = new YAHOO.util.DataSource(dados); | |
| 108 | + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 109 | + myDataSource.responseSchema = { | |
| 110 | + fields: ["it","es","en","desc_grupo","id_grupo","nome_grupo"] | |
| 111 | + }; | |
| 112 | + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 113 | + // Set up editing flow | |
| 114 | + myDataTable.highlightEditableCell = function(oArgs) { | |
| 115 | + var elCell = oArgs.target, | |
| 116 | + column = myDataTable.getColumn(oArgs.target); | |
| 117 | + //if(column.editor != "null") | |
| 118 | + if(!YAHOO.lang.isNull(column.editor)){ | |
| 127 | 119 | YAHOO.util.Dom.addClass(elCell,'yui-dt-highlighted'); |
| 128 | - } | |
| 129 | - }; | |
| 130 | - myDataTable.unhighlightEditableCell = function(oArgs) | |
| 131 | - { | |
| 132 | - var elCell = oArgs.target; | |
| 133 | - if(elCell.style.cursor="pointer") | |
| 134 | - { | |
| 120 | + } | |
| 121 | + }; | |
| 122 | + myDataTable.unhighlightEditableCell = function(oArgs){ | |
| 123 | + var elCell = oArgs.target; | |
| 124 | + if(elCell.style.cursor="pointer"){ | |
| 135 | 125 | YAHOO.util.Dom.removeClass(elCell,'yui-dt-highlighted'); |
| 136 | - } | |
| 137 | - }; | |
| 138 | - myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); | |
| 139 | - myDataTable.subscribe("cellMouseoutEvent", myDataTable.unhighlightEditableCell); | |
| 140 | - myDataTable.subscribe('cellClickEvent',function(ev) | |
| 141 | - { | |
| 142 | - var target = YAHOO.util.Event.getTarget(ev); | |
| 143 | - var column = this.getColumn(target); | |
| 144 | - if(YAHOO.admin.container.panelCK) | |
| 145 | - { | |
| 126 | + } | |
| 127 | + }; | |
| 128 | + myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); | |
| 129 | + myDataTable.subscribe("cellMouseoutEvent", myDataTable.unhighlightEditableCell); | |
| 130 | + myDataTable.subscribe('cellClickEvent',function(ev){ | |
| 131 | + var record,target = YAHOO.util.Event.getTarget(ev), | |
| 132 | + column = this.getColumn(target); | |
| 133 | + if(YAHOO.admin.container.panelCK){ | |
| 146 | 134 | YAHOO.admin.container.panelCK.destroy(); |
| 147 | 135 | YAHOO.admin.container.panelCK = null; |
| 148 | 136 | } |
| 149 | - if (column.key == 'excluir') | |
| 150 | - { | |
| 151 | - var record = this.getRecord(target); | |
| 137 | + if (column.key == 'excluir'){ | |
| 138 | + record = this.getRecord(target); | |
| 152 | 139 | excluiLinha_G(record.getData('id_grupo'),target); |
| 153 | 140 | } |
| 154 | 141 | else |
| 155 | 142 | {this.onEventShowCellEditor(ev);} |
| 156 | 143 | }); |
| 157 | - // Hook into custom event to customize save-flow of "radio" editor | |
| 158 | - myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 159 | - { | |
| 160 | - if(oArgs.editor.column.key === "active") | |
| 161 | - { | |
| 162 | - this.saveCellEditor(); | |
| 163 | - | |
| 164 | - } | |
| 165 | - }); | |
| 166 | - myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 167 | - { | |
| 168 | - this.cancelCellEditor(); | |
| 169 | - }); | |
| 170 | - myDataTable.subscribe("editorSaveEvent", function(oArgs) | |
| 171 | - { | |
| 144 | + // Hook into custom event to customize save-flow of "radio" editor | |
| 145 | + myDataTable.subscribe("editorUpdateEvent", function(oArgs){ | |
| 146 | + if(oArgs.editor.column.key === "active"){ | |
| 147 | + this.saveCellEditor(); | |
| 148 | + } | |
| 149 | + }); | |
| 150 | + myDataTable.subscribe("editorBlurEvent", function(oArgs){ | |
| 151 | + this.cancelCellEditor(); | |
| 152 | + }); | |
| 153 | + myDataTable.subscribe("editorSaveEvent", function(oArgs){ | |
| 172 | 154 | if(oArgs.newData != oArgs.oldData){ |
| 173 | 155 | var linha = myDataTable.getTrEl(oArgs.editor.getRecord()); |
| 174 | 156 | if(linha){ |
| ... | ... | @@ -176,9 +158,9 @@ function montaTabela_G(dados) |
| 176 | 158 | linha.style.textDecoration = "blink"; |
| 177 | 159 | } |
| 178 | 160 | } |
| 179 | - }); | |
| 180 | - }; | |
| 181 | - core_carregando("desativa"); | |
| 161 | + }); | |
| 162 | + }; | |
| 163 | + core_carregando("desativa"); | |
| 182 | 164 | } |
| 183 | 165 | /* |
| 184 | 166 | Function: gravaLinha_G | ... | ... |
admin/js/gruposusuarios.js
| ... | ... | @@ -83,34 +83,34 @@ function montaArvore(dados){ |
| 83 | 83 | function changeIconMode(){ |
| 84 | 84 | buildTree(); |
| 85 | 85 | } |
| 86 | - function loadNodeData(node, fnLoadComplete){ | |
| 87 | - var sUrl = "../php/gruposusuarios.php?funcao=pegaUsuariosGrupo&id_grupo="+node.data.id_grupo; | |
| 86 | + function loadNodeData(node, fnLoadComplete){ | |
| 87 | + var sUrl = "../php/gruposusuarios.php?funcao=pegaUsuariosGrupo&id_grupo="+node.data.id_grupo; | |
| 88 | 88 | var callback = { |
| 89 | - success: function(oResponse){ | |
| 90 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 89 | + success: function(oResponse){ | |
| 90 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 91 | 91 | adicionaNosUsuarios(node,dados,false); |
| 92 | - oResponse.argument.fnLoadComplete(); | |
| 93 | - }, | |
| 94 | - failure: function(oResponse){ | |
| 95 | - oResponse.argument.fnLoadComplete(); | |
| 96 | - }, | |
| 97 | - argument:{ | |
| 98 | - "node": node, | |
| 99 | - "fnLoadComplete": fnLoadComplete | |
| 100 | - }, | |
| 101 | - timeout: 25000 | |
| 102 | - }; | |
| 103 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 104 | - } | |
| 105 | - function buildTree(){ | |
| 92 | + oResponse.argument.fnLoadComplete(); | |
| 93 | + }, | |
| 94 | + failure: function(oResponse){ | |
| 95 | + oResponse.argument.fnLoadComplete(); | |
| 96 | + }, | |
| 97 | + argument:{ | |
| 98 | + "node": node, | |
| 99 | + "fnLoadComplete": fnLoadComplete | |
| 100 | + }, | |
| 101 | + timeout: 25000 | |
| 102 | + }; | |
| 103 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 104 | + } | |
| 105 | + function buildTree(){ | |
| 106 | 106 | tree = new YAHOO.widget.TreeView("tabela"); |
| 107 | 107 | tree.setDynamicLoad(loadNodeData, 1); |
| 108 | 108 | var root = tree.getRoot(); |
| 109 | 109 | var tempNode = new YAHOO.widget.TextNode('', root, false); |
| 110 | 110 | tempNode.isLeaf = true; |
| 111 | 111 | core_carregando("desativa"); |
| 112 | - } | |
| 113 | - buildTree(); | |
| 112 | + } | |
| 113 | + buildTree(); | |
| 114 | 114 | }(); |
| 115 | 115 | adicionaNosGrupos(dados); |
| 116 | 116 | tree.draw(); |
| ... | ... | @@ -122,7 +122,7 @@ function adicionaNosUsuarios(no,dados,redesenha) |
| 122 | 122 | if (newVal != currentIconMode) |
| 123 | 123 | {currentIconMode = newVal;} |
| 124 | 124 | } |
| 125 | - if(!redesenha){ | |
| 125 | + if(!redesenha){ | |
| 126 | 126 | var conteudo = "<span style=\"cursor:pointer;\" onclick=\"editar('usuario','"+no.data.id_grupo+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar novo usuário</i></span>"; |
| 127 | 127 | var d = {html:conteudo}; |
| 128 | 128 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| ... | ... | @@ -196,8 +196,8 @@ function editar(tipo,id){ |
| 196 | 196 | function montaDivGrupo(i){ |
| 197 | 197 | var param = { |
| 198 | 198 | "linhas":[ |
| 199 | - {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 200 | - {titulo:"Descrição:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""} | |
| 199 | + {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""}, | |
| 200 | + {titulo:"Descrição:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""} | |
| 201 | 201 | ] |
| 202 | 202 | }; |
| 203 | 203 | var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditorGrupo />"; | ... | ... |
admin/js/identifica.js
| ... | ... | @@ -44,37 +44,37 @@ function pegaFuncoes() |
| 44 | 44 | } |
| 45 | 45 | function montaTabela(dados) |
| 46 | 46 | { |
| 47 | - YAHOO.example.InlineCellEditing = new function() | |
| 48 | - { | |
| 49 | - // Custom formatter for "address" column to preserve line breaks | |
| 50 | - var formatMais = function(elCell, oRecord, oColumn) | |
| 51 | - { | |
| 52 | - elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
| 53 | - }; | |
| 54 | - var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 55 | - { | |
| 56 | - elCell.innerHTML = "<pre ><p>" + oData + "</pre>"; | |
| 57 | - }; | |
| 58 | - var formatExclui = function(elCell, oRecord, oColumn) | |
| 59 | - { | |
| 60 | - elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>";//onclick='excluiLinha(\""+oRecord.getData("id_menu")+"\",\""+oRecord.getId()+"\")'></div>"; | |
| 61 | - }; | |
| 62 | - var myColumnDefs = [ | |
| 63 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 47 | + YAHOO.example.InlineCellEditing = new function() | |
| 48 | + { | |
| 49 | + // Custom formatter for "address" column to preserve line breaks | |
| 50 | + var formatMais = function(elCell, oRecord, oColumn) | |
| 51 | + { | |
| 52 | + elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
| 53 | + }; | |
| 54 | + var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 55 | + { | |
| 56 | + elCell.innerHTML = "<pre ><p>" + oData + "</pre>"; | |
| 57 | + }; | |
| 58 | + var formatExclui = function(elCell, oRecord, oColumn) | |
| 59 | + { | |
| 60 | + elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>";//onclick='excluiLinha(\""+oRecord.getData("id_menu")+"\",\""+oRecord.getId()+"\")'></div>"; | |
| 61 | + }; | |
| 62 | + var myColumnDefs = [ | |
| 63 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 64 | 64 | {key:"mais",label:"editar",formatter:formatMais}, |
| 65 | - {label:"id",key:"id_i", formatter:formatTexto}, | |
| 65 | + {label:"id",key:"id_i", formatter:formatTexto}, | |
| 66 | 66 | {label:"nome",resizeable:true,key:"nome_i", formatter:formatTexto, editor:"textbox"}, |
| 67 | 67 | {label:"publicado?",key:"publicado_i",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false}}, |
| 68 | 68 | {label:"programa",resizeable:true,key:"abrir_i", formatter:formatTexto, editor:"textbox"}, |
| 69 | 69 | {label:"abrir como?",key:"target_i", formatter:formatTexto,editor:"dropdown" ,editorOptions:{dropdownOptions:["self","target"],disableBtns:false}} |
| 70 | - ]; | |
| 71 | - myDataSource = new YAHOO.util.DataSource(dados); | |
| 72 | - myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 73 | - myDataSource.responseSchema = | |
| 74 | - { | |
| 75 | - fields: ["publicado_i","abrir_i","id_i","nome_i","target_i"] | |
| 76 | - }; | |
| 77 | - myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 70 | + ]; | |
| 71 | + myDataSource = new YAHOO.util.DataSource(dados); | |
| 72 | + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 73 | + myDataSource.responseSchema = | |
| 74 | + { | |
| 75 | + fields: ["publicado_i","abrir_i","id_i","nome_i","target_i"] | |
| 76 | + }; | |
| 77 | + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 78 | 78 | myDataTable.subscribe('cellClickEvent',function(ev) |
| 79 | 79 | { |
| 80 | 80 | var target = YAHOO.util.Event.getTarget(ev); |
| ... | ... | @@ -114,8 +114,8 @@ function montaTabela(dados) |
| 114 | 114 | } |
| 115 | 115 | }); |
| 116 | 116 | |
| 117 | - }; | |
| 118 | - core_carregando("desativa"); | |
| 117 | + }; | |
| 118 | + core_carregando("desativa"); | |
| 119 | 119 | } |
| 120 | 120 | function montaEditor(dados,id,recordid) |
| 121 | 121 | { |
| ... | ... | @@ -142,9 +142,9 @@ function montaEditor(dados,id,recordid) |
| 142 | 142 | document.body.appendChild(novoel); |
| 143 | 143 | var editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name: "okcancel_checkbox_id", container: "okcancel_checkbox" }); |
| 144 | 144 | editorBotoes.addButtons([ |
| 145 | - { label: "Salva", value: "OK", checked: false}, | |
| 146 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 147 | - ]); | |
| 145 | + { label: "Salva", value: "OK", checked: false}, | |
| 146 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 147 | + ]); | |
| 148 | 148 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 149 | 149 | YAHOO.admin.container.panelEditor = new YAHOO.widget.Panel("janela_editor", { fixedcenter:true,close:false,width:"400px", height:"400px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 150 | 150 | YAHOO.admin.container.panelEditor.render(); | ... | ... |
admin/js/listatemas.js
| ... | ... | @@ -32,9 +32,9 @@ function montaEditorTema(dados) |
| 32 | 32 | document.body.appendChild(novoel); |
| 33 | 33 | var editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name: "okcancel_checkbox_id", container: "okcancel_checkbox" }); |
| 34 | 34 | editorBotoes.addButtons([ |
| 35 | - { label: "Salva", value: "OK", checked: false}, | |
| 36 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 37 | - ]); | |
| 35 | + { label: "Salva", value: "OK", checked: false}, | |
| 36 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 37 | + ]); | |
| 38 | 38 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 39 | 39 | YAHOO.admin.container.panelEditorTema = new YAHOO.widget.Panel("janela_editor_tema", { fixedcenter:true,close:true,width:"400px", height:"400px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 40 | 40 | YAHOO.admin.container.panelEditorTema.render(); | ... | ... |
admin/js/mapas.js
| ... | ... | @@ -64,37 +64,37 @@ Monta a tabela com as op&ccedil;&otilde;es de edi&ccedil;&atilde;o de cada regis |
| 64 | 64 | */ |
| 65 | 65 | function montaTabela(dados) |
| 66 | 66 | { |
| 67 | - YAHOO.example.InlineCellEditing = new function() | |
| 68 | - { | |
| 69 | - // Custom formatter for "address" column to preserve line breaks | |
| 70 | - var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 71 | - { | |
| 72 | - elCell.innerHTML = "<p>" + oData + "</p>"; | |
| 73 | - }; | |
| 67 | + YAHOO.example.InlineCellEditing = new function() | |
| 68 | + { | |
| 69 | + // Custom formatter for "address" column to preserve line breaks | |
| 70 | + var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 71 | + { | |
| 72 | + elCell.innerHTML = "<p>" + oData + "</p>"; | |
| 73 | + }; | |
| 74 | 74 | |
| 75 | - var formatMais = function(elCell, oRecord, oColumn) | |
| 76 | - { | |
| 77 | - elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
| 78 | - }; | |
| 79 | - var formatExclui = function(elCell, oRecord, oColumn) | |
| 80 | - { | |
| 81 | - elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | |
| 82 | - }; | |
| 83 | - var myColumnDefs = [ | |
| 84 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 85 | - {key:"mais",label:"mais",formatter:formatMais}, | |
| 86 | - {label:"id",key:"id_mapa", formatter:formatTextoId}, | |
| 87 | - {label:"nome",key:"nome_mapa", formatter:formatTextoId}, | |
| 88 | - {label:"ordem",key:"ordem_mapa", formatter:formatTextoId} | |
| 89 | - ]; | |
| 90 | - myDataSource = new YAHOO.util.DataSource(dados); | |
| 91 | - myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 92 | - myDataSource.responseSchema = | |
| 93 | - { | |
| 94 | - fields: ["id_mapa","nome_mapa","ordem_mapa"] | |
| 95 | - }; | |
| 96 | - myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 97 | - // Set up editing flow | |
| 75 | + var formatMais = function(elCell, oRecord, oColumn) | |
| 76 | + { | |
| 77 | + elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
| 78 | + }; | |
| 79 | + var formatExclui = function(elCell, oRecord, oColumn) | |
| 80 | + { | |
| 81 | + elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | |
| 82 | + }; | |
| 83 | + var myColumnDefs = [ | |
| 84 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 85 | + {key:"mais",label:"mais",formatter:formatMais}, | |
| 86 | + {label:"id",key:"id_mapa", formatter:formatTextoId}, | |
| 87 | + {label:"nome",key:"nome_mapa", formatter:formatTextoId}, | |
| 88 | + {label:"ordem",key:"ordem_mapa", formatter:formatTextoId} | |
| 89 | + ]; | |
| 90 | + myDataSource = new YAHOO.util.DataSource(dados); | |
| 91 | + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 92 | + myDataSource.responseSchema = | |
| 93 | + { | |
| 94 | + fields: ["id_mapa","nome_mapa","ordem_mapa"] | |
| 95 | + }; | |
| 96 | + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 97 | + // Set up editing flow | |
| 98 | 98 | myDataTable.subscribe('cellClickEvent',function(ev) |
| 99 | 99 | { |
| 100 | 100 | var target = YAHOO.util.Event.getTarget(ev); |
| ... | ... | @@ -129,20 +129,20 @@ function montaTabela(dados) |
| 129 | 129 | } |
| 130 | 130 | |
| 131 | 131 | }); |
| 132 | - // Hook into custom event to customize save-flow of "radio" editor | |
| 133 | - myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 134 | - { | |
| 135 | - if(oArgs.editor.column.key === "active") | |
| 136 | - { | |
| 137 | - this.saveCellEditor(); | |
| 138 | - } | |
| 139 | - }); | |
| 140 | - myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 141 | - { | |
| 142 | - this.cancelCellEditor(); | |
| 143 | - }); | |
| 144 | - }; | |
| 145 | - core_carregando("desativa"); | |
| 132 | + // Hook into custom event to customize save-flow of "radio" editor | |
| 133 | + myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 134 | + { | |
| 135 | + if(oArgs.editor.column.key === "active") | |
| 136 | + { | |
| 137 | + this.saveCellEditor(); | |
| 138 | + } | |
| 139 | + }); | |
| 140 | + myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 141 | + { | |
| 142 | + this.cancelCellEditor(); | |
| 143 | + }); | |
| 144 | + }; | |
| 145 | + core_carregando("desativa"); | |
| 146 | 146 | } |
| 147 | 147 | function montaEditorMapa(dados,id,recordid) |
| 148 | 148 | { |
| ... | ... | @@ -169,9 +169,9 @@ function montaEditorMapa(dados,id,recordid) |
| 169 | 169 | document.body.appendChild(novoel); |
| 170 | 170 | var editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name: "okcancel_checkbox_id", container: "okcancel_checkbox" }); |
| 171 | 171 | editorBotoes.addButtons([ |
| 172 | - { label: "Salva", value: "OK", checked: false}, | |
| 173 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 174 | - ]); | |
| 172 | + { label: "Salva", value: "OK", checked: false}, | |
| 173 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 174 | + ]); | |
| 175 | 175 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 176 | 176 | YAHOO.admin.container.panelEditorMapa = new YAHOO.widget.Panel("janela_editor", { fixedcenter:true,close:false,width:"400px", height:"400px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 177 | 177 | YAHOO.admin.container.panelEditorMapa.render(); | ... | ... |
admin/js/menu.js
| ... | ... | @@ -74,32 +74,32 @@ function filtraDadosLetras_M(letra){ |
| 74 | 74 | } |
| 75 | 75 | function montaTabela_M(dados) |
| 76 | 76 | { |
| 77 | - if(dados_M == ""){ | |
| 78 | - dados_M = dados; | |
| 79 | - } | |
| 80 | - core_listaDeLetras("letras_M","filtraDadosLetras_M"); | |
| 77 | + if(dados_M == ""){ | |
| 78 | + dados_M = dados; | |
| 79 | + } | |
| 80 | + core_listaDeLetras("letras_M","filtraDadosLetras_M"); | |
| 81 | 81 | YAHOO.example.InlineCellEditing = new function() |
| 82 | - { | |
| 83 | - // Custom formatter for "address" column to preserve line breaks | |
| 84 | - var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 85 | - { | |
| 86 | - if(oData === ""){ | |
| 82 | + { | |
| 83 | + // Custom formatter for "address" column to preserve line breaks | |
| 84 | + var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 85 | + { | |
| 86 | + if(oData === ""){ | |
| 87 | 87 | oData = "<span style='color:gray' ></span>"; |
| 88 | 88 | } |
| 89 | 89 | elCell.innerHTML = "<pre ><p style=cursor:pointer title='clique para editar'>" + oData + "</pre>"; |
| 90 | - }; | |
| 91 | - var formatExclui = function(elCell, oRecord, oColumn) | |
| 92 | - { | |
| 93 | - elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>";//onclick='excluiLinha_M(\""+oRecord.getData("id_menu")+"\",\""+oRecord.getId()+"\")'></div>"; | |
| 94 | - }; | |
| 95 | - var formatMais = function(elCell, oRecord, oColumn) | |
| 96 | - { | |
| 97 | - elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
| 98 | - }; | |
| 99 | - var myColumnDefs = [ | |
| 100 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 90 | + }; | |
| 91 | + var formatExclui = function(elCell, oRecord, oColumn) | |
| 92 | + { | |
| 93 | + elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>";//onclick='excluiLinha_M(\""+oRecord.getData("id_menu")+"\",\""+oRecord.getId()+"\")'></div>"; | |
| 94 | + }; | |
| 95 | + var formatMais = function(elCell, oRecord, oColumn) | |
| 96 | + { | |
| 97 | + elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
| 98 | + }; | |
| 99 | + var myColumnDefs = [ | |
| 100 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 101 | 101 | {key:"mais",label:"editar",formatter:formatMais}, |
| 102 | - {label:"id",key:"id_menu", formatter:formatTexto}, | |
| 102 | + {label:"id",key:"id_menu", formatter:formatTexto}, | |
| 103 | 103 | {label:"nome padrão do menu",resizeable:true,key:"nome_menu", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, |
| 104 | 104 | {label:"nome em inglês (opcional)",resizeable:true,key:"en", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, |
| 105 | 105 | {label:"nome em espanhol (opcional)",resizeable:true,key:"es", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, |
| ... | ... | @@ -108,15 +108,15 @@ function montaTabela_M(dados) |
| 108 | 108 | {label:"perfis",resizeable:true,key:"perfil_menu", formatter:formatTexto,editor:"textbox",editorOptions:{LABEL_SAVE:"OK"}}, |
| 109 | 109 | {label:"inicia aberto?",key:"aberto", editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}}, |
| 110 | 110 | {label:"descrição",resizeable:true,key:"desc_menu", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} |
| 111 | - ]; | |
| 111 | + ]; | |
| 112 | 112 | //YAHOO.widget.CellEditor.LABEL_SAVE = "Aplicar"; |
| 113 | - myDataSource = new YAHOO.util.DataSource(dados); | |
| 114 | - myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 115 | - myDataSource.responseSchema = | |
| 116 | - { | |
| 117 | - fields: ["it","es","en","publicado_menu","perfil_menu","aberto","desc_menu","id_menu","nome_menu"] | |
| 118 | - }; | |
| 119 | - myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 113 | + myDataSource = new YAHOO.util.DataSource(dados); | |
| 114 | + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 115 | + myDataSource.responseSchema = | |
| 116 | + { | |
| 117 | + fields: ["it","es","en","publicado_menu","perfil_menu","aberto","desc_menu","id_menu","nome_menu"] | |
| 118 | + }; | |
| 119 | + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 120 | 120 | myDataTable.subscribe('cellClickEvent',function(ev) |
| 121 | 121 | { |
| 122 | 122 | var target = YAHOO.util.Event.getTarget(ev); |
| ... | ... | @@ -155,8 +155,8 @@ function montaTabela_M(dados) |
| 155 | 155 | core_makeRequest(sUrl,callback); |
| 156 | 156 | } |
| 157 | 157 | }); |
| 158 | - }; | |
| 159 | - core_carregando("desativa"); | |
| 158 | + }; | |
| 159 | + core_carregando("desativa"); | |
| 160 | 160 | } |
| 161 | 161 | function montaEditor_M(dados,id,recordid) |
| 162 | 162 | { |
| ... | ... | @@ -182,9 +182,9 @@ function montaEditor_M(dados,id,recordid) |
| 182 | 182 | document.body.appendChild(novoel); |
| 183 | 183 | var editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" }); |
| 184 | 184 | editorBotoes.addButtons([ |
| 185 | - { label: "Salva", value: "OK", checked: false}, | |
| 186 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 187 | - ]); | |
| 185 | + { label: "Salva", value: "OK", checked: false}, | |
| 186 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 187 | + ]); | |
| 188 | 188 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 189 | 189 | YAHOO.admin.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"480px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 190 | 190 | YAHOO.admin.container.panelEditor2.render(); | ... | ... |
admin/js/operacoes.js
| ... | ... | @@ -92,34 +92,34 @@ function montaArvore(dados){ |
| 92 | 92 | { |
| 93 | 93 | buildTree(); |
| 94 | 94 | } |
| 95 | - function loadNodeData(node, fnLoadComplete){ | |
| 96 | - var sUrl = "../php/operacoes.php?funcao=pegaPapeisOperacao&id_operacao="+node.data.id_operacao; | |
| 95 | + function loadNodeData(node, fnLoadComplete){ | |
| 96 | + var sUrl = "../php/operacoes.php?funcao=pegaPapeisOperacao&id_operacao="+node.data.id_operacao; | |
| 97 | 97 | var callback = { |
| 98 | - success: function(oResponse){ | |
| 99 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 98 | + success: function(oResponse){ | |
| 99 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 100 | 100 | adicionaNosPapeis(node,dados,false); |
| 101 | - oResponse.argument.fnLoadComplete(); | |
| 102 | - }, | |
| 103 | - failure: function(oResponse){ | |
| 104 | - oResponse.argument.fnLoadComplete(); | |
| 105 | - }, | |
| 106 | - argument:{ | |
| 107 | - "node": node, | |
| 108 | - "fnLoadComplete": fnLoadComplete | |
| 109 | - }, | |
| 110 | - timeout: 25000 | |
| 111 | - }; | |
| 112 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 113 | - } | |
| 114 | - function buildTree(){ | |
| 101 | + oResponse.argument.fnLoadComplete(); | |
| 102 | + }, | |
| 103 | + failure: function(oResponse){ | |
| 104 | + oResponse.argument.fnLoadComplete(); | |
| 105 | + }, | |
| 106 | + argument:{ | |
| 107 | + "node": node, | |
| 108 | + "fnLoadComplete": fnLoadComplete | |
| 109 | + }, | |
| 110 | + timeout: 25000 | |
| 111 | + }; | |
| 112 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 113 | + } | |
| 114 | + function buildTree(){ | |
| 115 | 115 | tree = new YAHOO.widget.TreeView("tabela"); |
| 116 | 116 | tree.setDynamicLoad(loadNodeData, 1); |
| 117 | 117 | var root = tree.getRoot(); |
| 118 | 118 | var tempNode = new YAHOO.widget.TextNode('', root, false); |
| 119 | 119 | tempNode.isLeaf = true; |
| 120 | 120 | core_carregando("desativa"); |
| 121 | - } | |
| 122 | - buildTree(); | |
| 121 | + } | |
| 122 | + buildTree(); | |
| 123 | 123 | }(); |
| 124 | 124 | adicionaNosOperacoes(dados); |
| 125 | 125 | tree.draw(); |
| ... | ... | @@ -139,8 +139,8 @@ function adicionaNosPapeis(no,dados,redesenha) |
| 139 | 139 | if (newVal != currentIconMode) |
| 140 | 140 | {currentIconMode = newVal;} |
| 141 | 141 | } |
| 142 | - if(!redesenha) | |
| 143 | - { | |
| 142 | + if(!redesenha) | |
| 143 | + { | |
| 144 | 144 | var conteudo = "<span style=\"cursor:pointer;\" onclick=\"editar('papel','"+no.data.id_operacao+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar novo papel</i></span>"; |
| 145 | 145 | var d = {html:conteudo}; |
| 146 | 146 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); | ... | ... |
admin/js/perfis.js
| ... | ... | @@ -57,59 +57,59 @@ function pegaPerfis() |
| 57 | 57 | } |
| 58 | 58 | function montaTabela(dados) |
| 59 | 59 | { |
| 60 | - YAHOO.example.InlineCellEditing = new function() | |
| 61 | - { | |
| 62 | - // Custom formatter for "address" column to preserve line breaks | |
| 63 | - var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 64 | - { | |
| 65 | - elCell.innerHTML = "<p style=width:250px >" + oData + "</p>"; | |
| 66 | - }; | |
| 67 | - var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 68 | - { | |
| 69 | - elCell.innerHTML = "<p style=width:20px >" + oData + "</p>"; | |
| 70 | - }; | |
| 71 | - | |
| 72 | - var formatSalva = function(elCell, oRecord, oColumn) | |
| 73 | - { | |
| 74 | - elCell.innerHTML = "<div class=salvar style='text-align:center' onclick='gravaLinha(\""+oRecord._sId+"\")'></div>"; | |
| 75 | - }; | |
| 76 | - var formatExclui = function(elCell, oRecord, oColumn) | |
| 77 | - { | |
| 78 | - elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | |
| 79 | - }; | |
| 80 | - var myColumnDefs = [ | |
| 81 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 82 | - {label:"salvar",formatter:formatSalva}, | |
| 83 | - {label:"id",key:"id_perfil", formatter:formatTextoId}, | |
| 60 | + YAHOO.example.InlineCellEditing = new function() | |
| 61 | + { | |
| 62 | + // Custom formatter for "address" column to preserve line breaks | |
| 63 | + var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 64 | + { | |
| 65 | + elCell.innerHTML = "<p style=width:250px >" + oData + "</p>"; | |
| 66 | + }; | |
| 67 | + var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 68 | + { | |
| 69 | + elCell.innerHTML = "<p style=width:20px >" + oData + "</p>"; | |
| 70 | + }; | |
| 71 | + | |
| 72 | + var formatSalva = function(elCell, oRecord, oColumn) | |
| 73 | + { | |
| 74 | + elCell.innerHTML = "<div class=salvar style='text-align:center' onclick='gravaLinha(\""+oRecord._sId+"\")'></div>"; | |
| 75 | + }; | |
| 76 | + var formatExclui = function(elCell, oRecord, oColumn) | |
| 77 | + { | |
| 78 | + elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | |
| 79 | + }; | |
| 80 | + var myColumnDefs = [ | |
| 81 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 82 | + {label:"salvar",formatter:formatSalva}, | |
| 83 | + {label:"id",key:"id_perfil", formatter:formatTextoId}, | |
| 84 | 84 | {label:"nome",resizeable:true,key:"perfil", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} |
| 85 | - ]; | |
| 86 | - myDataSource = new YAHOO.util.DataSource(dados); | |
| 87 | - myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 88 | - myDataSource.responseSchema = | |
| 89 | - { | |
| 90 | - fields: ["id_perfil","perfil"] | |
| 91 | - }; | |
| 92 | - myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 93 | - // Set up editing flow | |
| 94 | - myDataTable.highlightEditableCell = function(oArgs) | |
| 95 | - { | |
| 96 | - var elCell = oArgs.target; | |
| 97 | - var column = myDataTable.getColumn(oArgs.target); | |
| 98 | - if(!YAHOO.lang.isNull(column.editor)) | |
| 99 | - { | |
| 85 | + ]; | |
| 86 | + myDataSource = new YAHOO.util.DataSource(dados); | |
| 87 | + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 88 | + myDataSource.responseSchema = | |
| 89 | + { | |
| 90 | + fields: ["id_perfil","perfil"] | |
| 91 | + }; | |
| 92 | + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 93 | + // Set up editing flow | |
| 94 | + myDataTable.highlightEditableCell = function(oArgs) | |
| 95 | + { | |
| 96 | + var elCell = oArgs.target; | |
| 97 | + var column = myDataTable.getColumn(oArgs.target); | |
| 98 | + if(!YAHOO.lang.isNull(column.editor)) | |
| 99 | + { | |
| 100 | 100 | YAHOO.util.Dom.addClass(elCell,'yui-dt-highlighted'); |
| 101 | - } | |
| 102 | - }; | |
| 103 | - myDataTable.unhighlightEditableCell = function(oArgs) | |
| 104 | - { | |
| 105 | - var elCell = oArgs.target; | |
| 106 | - if(elCell.style.cursor="pointer") | |
| 107 | - { | |
| 101 | + } | |
| 102 | + }; | |
| 103 | + myDataTable.unhighlightEditableCell = function(oArgs) | |
| 104 | + { | |
| 105 | + var elCell = oArgs.target; | |
| 106 | + if(elCell.style.cursor="pointer") | |
| 107 | + { | |
| 108 | 108 | YAHOO.util.Dom.removeClass(elCell,'yui-dt-highlighted'); |
| 109 | - } | |
| 110 | - }; | |
| 111 | - myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); | |
| 112 | - myDataTable.subscribe("cellMouseoutEvent", myDataTable.unhighlightEditableCell); | |
| 109 | + } | |
| 110 | + }; | |
| 111 | + myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); | |
| 112 | + myDataTable.subscribe("cellMouseoutEvent", myDataTable.unhighlightEditableCell); | |
| 113 | 113 | myDataTable.subscribe('cellClickEvent',function(ev) |
| 114 | 114 | { |
| 115 | 115 | var target = YAHOO.util.Event.getTarget(ev); |
| ... | ... | @@ -129,29 +129,29 @@ function montaTabela(dados) |
| 129 | 129 | this.onEventShowCellEditor(ev); |
| 130 | 130 | } |
| 131 | 131 | }); |
| 132 | - // Hook into custom event to customize save-flow of "radio" editor | |
| 133 | - myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 134 | - { | |
| 135 | - if(oArgs.editor.column.key === "active") | |
| 136 | - { | |
| 137 | - this.saveCellEditor(); | |
| 138 | - } | |
| 139 | - }); | |
| 140 | - myDataTable.subscribe("editorSaveEvent", function(oArgs) | |
| 141 | - { | |
| 132 | + // Hook into custom event to customize save-flow of "radio" editor | |
| 133 | + myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 134 | + { | |
| 135 | + if(oArgs.editor.column.key === "active") | |
| 136 | + { | |
| 137 | + this.saveCellEditor(); | |
| 138 | + } | |
| 139 | + }); | |
| 140 | + myDataTable.subscribe("editorSaveEvent", function(oArgs) | |
| 141 | + { | |
| 142 | 142 | if(oArgs.newData != oArgs.oldData){ |
| 143 | 143 | var linha = myDataTable.getTrEl(oArgs.editor.getRecord()); |
| 144 | 144 | linha.style.color = "blue"; |
| 145 | 145 | linha.style.textDecoration = "blink"; |
| 146 | 146 | } |
| 147 | - }); | |
| 148 | - | |
| 149 | - myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 150 | - { | |
| 151 | - this.cancelCellEditor(); | |
| 152 | - }); | |
| 153 | - }; | |
| 154 | - core_carregando("desativa"); | |
| 147 | + }); | |
| 148 | + | |
| 149 | + myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 150 | + { | |
| 151 | + this.cancelCellEditor(); | |
| 152 | + }); | |
| 153 | + }; | |
| 154 | + core_carregando("desativa"); | |
| 155 | 155 | } |
| 156 | 156 | /* |
| 157 | 157 | Function: gravaLinha | ... | ... |
admin/js/sistemas.js
| ... | ... | @@ -96,40 +96,40 @@ function montaArvore(dados) |
| 96 | 96 | { |
| 97 | 97 | buildTree(); |
| 98 | 98 | } |
| 99 | - function loadNodeData(node, fnLoadComplete) | |
| 100 | - { | |
| 99 | + function loadNodeData(node, fnLoadComplete) | |
| 100 | + { | |
| 101 | 101 | var sUrl = "../php/sistemas.php?funcao=pegaFuncoes&id_sistema="+node.data.id_sistema; |
| 102 | 102 | var callback = |
| 103 | 103 | { |
| 104 | - success: function(oResponse) | |
| 105 | - { | |
| 106 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 104 | + success: function(oResponse) | |
| 105 | + { | |
| 106 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 107 | 107 | adicionaNos(node,dados,false); |
| 108 | - oResponse.argument.fnLoadComplete(); | |
| 109 | - }, | |
| 110 | - failure: function(oResponse) | |
| 111 | - { | |
| 112 | - oResponse.argument.fnLoadComplete(); | |
| 113 | - }, | |
| 114 | - argument: | |
| 115 | - { | |
| 116 | - "node": node, | |
| 117 | - "fnLoadComplete": fnLoadComplete | |
| 118 | - }, | |
| 119 | - timeout: 25000 | |
| 120 | - }; | |
| 121 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 122 | - } | |
| 123 | - function buildTree() | |
| 124 | - { | |
| 108 | + oResponse.argument.fnLoadComplete(); | |
| 109 | + }, | |
| 110 | + failure: function(oResponse) | |
| 111 | + { | |
| 112 | + oResponse.argument.fnLoadComplete(); | |
| 113 | + }, | |
| 114 | + argument: | |
| 115 | + { | |
| 116 | + "node": node, | |
| 117 | + "fnLoadComplete": fnLoadComplete | |
| 118 | + }, | |
| 119 | + timeout: 25000 | |
| 120 | + }; | |
| 121 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 122 | + } | |
| 123 | + function buildTree() | |
| 124 | + { | |
| 125 | 125 | tree = new YAHOO.widget.TreeView("tabela"); |
| 126 | 126 | tree.setDynamicLoad(loadNodeData, 0); |
| 127 | 127 | var root = tree.getRoot(); |
| 128 | 128 | var tempNode = new YAHOO.widget.TextNode('', root, false); |
| 129 | 129 | tempNode.isLeaf = true; |
| 130 | 130 | core_carregando("desativa"); |
| 131 | - } | |
| 132 | - buildTree(); | |
| 131 | + } | |
| 132 | + buildTree(); | |
| 133 | 133 | }(); |
| 134 | 134 | adicionaNosRaiz(dados); |
| 135 | 135 | tree.draw(); |
| ... | ... | @@ -307,7 +307,7 @@ function adicionarFuncao(id) |
| 307 | 307 | var sUrl = "../php/sistemas.php?funcao=alterarFuncoes&id_sistema="+id; |
| 308 | 308 | var callback = |
| 309 | 309 | { |
| 310 | - success: function(oResponse) | |
| 310 | + success: function(oResponse) | |
| 311 | 311 | { |
| 312 | 312 | var dados = YAHOO.lang.JSON.parse(oResponse.responseText); |
| 313 | 313 | adicionaNos(no,dados,true); | ... | ... |
admin/js/subgrupos.js
| ... | ... | @@ -74,71 +74,71 @@ function filtraDadosLetras_S(letra){ |
| 74 | 74 | } |
| 75 | 75 | function montaTabela_S(dados) |
| 76 | 76 | { |
| 77 | - if(dados_S == ""){ | |
| 78 | - dados_S = dados; | |
| 79 | - } | |
| 80 | - core_listaDeLetras("letras_S","filtraDadosLetras_S"); | |
| 77 | + if(dados_S == ""){ | |
| 78 | + dados_S = dados; | |
| 79 | + } | |
| 80 | + core_listaDeLetras("letras_S","filtraDadosLetras_S"); | |
| 81 | 81 | YAHOO.example.InlineCellEditing = new function() |
| 82 | - { | |
| 83 | - // Custom formatter for "address" column to preserve line breaks | |
| 84 | - var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 85 | - { | |
| 86 | - if(oData === ""){ | |
| 82 | + { | |
| 83 | + // Custom formatter for "address" column to preserve line breaks | |
| 84 | + var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 85 | + { | |
| 86 | + if(oData === ""){ | |
| 87 | 87 | oData = "<span style='color:gray' >Clique para editar, tecle enter e depois salve</span>"; |
| 88 | 88 | } |
| 89 | 89 | elCell.innerHTML = "<p style=width:250px;cursor:pointer title='clique para editar'>" + oData + "</p>"; |
| 90 | - }; | |
| 91 | - var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 92 | - { | |
| 93 | - elCell.innerHTML = "<p style=width:20px >" + oData + "</p>"; | |
| 94 | - }; | |
| 95 | - | |
| 96 | - var formatSalva = function(elCell, oRecord, oColumn) | |
| 97 | - { | |
| 98 | - elCell.innerHTML = "<div title='salva' class=salvar style='text-align:center' onclick='gravaLinha_S(\""+oRecord._sId+"\")'></div>"; | |
| 99 | - }; | |
| 100 | - var formatExclui = function(elCell, oRecord, oColumn) | |
| 101 | - { | |
| 102 | - elCell.innerHTML = "<div title='exclui' class=excluir style='text-align:center' ></div>"; | |
| 103 | - }; | |
| 104 | - var myColumnDefs = [ | |
| 105 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 106 | - {label:"salvar",formatter:formatSalva}, | |
| 107 | - {label:"id",key:"id_subgrupo", formatter:formatTextoId}, | |
| 90 | + }; | |
| 91 | + var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 92 | + { | |
| 93 | + elCell.innerHTML = "<p style=width:20px >" + oData + "</p>"; | |
| 94 | + }; | |
| 95 | + | |
| 96 | + var formatSalva = function(elCell, oRecord, oColumn) | |
| 97 | + { | |
| 98 | + elCell.innerHTML = "<div title='salva' class=salvar style='text-align:center' onclick='gravaLinha_S(\""+oRecord._sId+"\")'></div>"; | |
| 99 | + }; | |
| 100 | + var formatExclui = function(elCell, oRecord, oColumn) | |
| 101 | + { | |
| 102 | + elCell.innerHTML = "<div title='exclui' class=excluir style='text-align:center' ></div>"; | |
| 103 | + }; | |
| 104 | + var myColumnDefs = [ | |
| 105 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 106 | + {label:"salvar",formatter:formatSalva}, | |
| 107 | + {label:"id",key:"id_subgrupo", formatter:formatTextoId}, | |
| 108 | 108 | {label:"nome",resizeable:true,key:"nome_subgrupo", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, |
| 109 | 109 | {label:"descrição",resizeable:true,key:"desc_subgrupo", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, |
| 110 | 110 | {label:"en",resizeable:true,key:"en", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, |
| 111 | 111 | {label:"es",resizeable:true,key:"es", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, |
| 112 | 112 | {label:"it",resizeable:true,key:"it", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} |
| 113 | - ]; | |
| 114 | - myDataSource = new YAHOO.util.DataSource(dados); | |
| 115 | - myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 116 | - myDataSource.responseSchema = | |
| 117 | - { | |
| 118 | - fields: ["it","es","en","desc_subgrupo","id_subgrupo","nome_subgrupo"] | |
| 119 | - }; | |
| 120 | - myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 121 | - // Set up editing flow | |
| 122 | - myDataTable.highlightEditableCell = function(oArgs) | |
| 123 | - { | |
| 124 | - var elCell = oArgs.target; | |
| 125 | - var column = myDataTable.getColumn(oArgs.target); | |
| 126 | - //if(column.editor != "null") | |
| 127 | - if(!YAHOO.lang.isNull(column.editor)) | |
| 128 | - { | |
| 113 | + ]; | |
| 114 | + myDataSource = new YAHOO.util.DataSource(dados); | |
| 115 | + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 116 | + myDataSource.responseSchema = | |
| 117 | + { | |
| 118 | + fields: ["it","es","en","desc_subgrupo","id_subgrupo","nome_subgrupo"] | |
| 119 | + }; | |
| 120 | + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 121 | + // Set up editing flow | |
| 122 | + myDataTable.highlightEditableCell = function(oArgs) | |
| 123 | + { | |
| 124 | + var elCell = oArgs.target; | |
| 125 | + var column = myDataTable.getColumn(oArgs.target); | |
| 126 | + //if(column.editor != "null") | |
| 127 | + if(!YAHOO.lang.isNull(column.editor)) | |
| 128 | + { | |
| 129 | 129 | YAHOO.util.Dom.addClass(elCell,'yui-dt-highlighted'); |
| 130 | - } | |
| 131 | - }; | |
| 132 | - myDataTable.unhighlightEditableCell = function(oArgs) | |
| 133 | - { | |
| 134 | - var elCell = oArgs.target; | |
| 135 | - if(elCell.style.cursor="pointer") | |
| 136 | - { | |
| 130 | + } | |
| 131 | + }; | |
| 132 | + myDataTable.unhighlightEditableCell = function(oArgs) | |
| 133 | + { | |
| 134 | + var elCell = oArgs.target; | |
| 135 | + if(elCell.style.cursor="pointer") | |
| 136 | + { | |
| 137 | 137 | YAHOO.util.Dom.removeClass(elCell,'yui-dt-highlighted'); |
| 138 | - } | |
| 139 | - }; | |
| 140 | - myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); | |
| 141 | - myDataTable.subscribe("cellMouseoutEvent", myDataTable.unhighlightEditableCell); | |
| 138 | + } | |
| 139 | + }; | |
| 140 | + myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); | |
| 141 | + myDataTable.subscribe("cellMouseoutEvent", myDataTable.unhighlightEditableCell); | |
| 142 | 142 | myDataTable.subscribe('cellClickEvent',function(ev) |
| 143 | 143 | { |
| 144 | 144 | var target = YAHOO.util.Event.getTarget(ev); |
| ... | ... | @@ -156,30 +156,30 @@ function montaTabela_S(dados) |
| 156 | 156 | else |
| 157 | 157 | {this.onEventShowCellEditor(ev);} |
| 158 | 158 | }); |
| 159 | - // Hook into custom event to customize save-flow of "radio" editor | |
| 160 | - myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 161 | - { | |
| 162 | - if(oArgs.editor.column.key === "active") | |
| 163 | - { | |
| 164 | - this.saveCellEditor(); | |
| 165 | - | |
| 166 | - } | |
| 167 | - }); | |
| 168 | - myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 169 | - { | |
| 170 | - this.cancelCellEditor(); | |
| 171 | - }); | |
| 172 | - myDataTable.subscribe("editorSaveEvent", function(oArgs) | |
| 173 | - { | |
| 159 | + // Hook into custom event to customize save-flow of "radio" editor | |
| 160 | + myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 161 | + { | |
| 162 | + if(oArgs.editor.column.key === "active") | |
| 163 | + { | |
| 164 | + this.saveCellEditor(); | |
| 165 | + | |
| 166 | + } | |
| 167 | + }); | |
| 168 | + myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 169 | + { | |
| 170 | + this.cancelCellEditor(); | |
| 171 | + }); | |
| 172 | + myDataTable.subscribe("editorSaveEvent", function(oArgs) | |
| 173 | + { | |
| 174 | 174 | if(oArgs.newData != oArgs.oldData){ |
| 175 | 175 | var linha = myDataTable.getTrEl(oArgs.editor.getRecord()); |
| 176 | 176 | linha.style.color = "blue"; |
| 177 | 177 | linha.style.textDecoration = "blink"; |
| 178 | 178 | } |
| 179 | - }); | |
| 179 | + }); | |
| 180 | 180 | |
| 181 | - }; | |
| 182 | - core_carregando("desativa"); | |
| 181 | + }; | |
| 182 | + core_carregando("desativa"); | |
| 183 | 183 | } |
| 184 | 184 | /* |
| 185 | 185 | Function: gravaLinha_S | ... | ... |
admin/js/tags.js
| ... | ... | @@ -57,59 +57,59 @@ function pegaTags() |
| 57 | 57 | } |
| 58 | 58 | function montaTabela(dados) |
| 59 | 59 | { |
| 60 | - YAHOO.example.InlineCellEditing = new function() | |
| 61 | - { | |
| 62 | - // Custom formatter for "address" column to preserve line breaks | |
| 63 | - var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 64 | - { | |
| 65 | - elCell.innerHTML = "<p style=width:250px >" + oData + "</p>"; | |
| 66 | - }; | |
| 67 | - var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 68 | - { | |
| 69 | - elCell.innerHTML = "<p style=width:20px >" + oData + "</p>"; | |
| 70 | - }; | |
| 71 | - | |
| 72 | - var formatSalva = function(elCell, oRecord, oColumn) | |
| 73 | - { | |
| 74 | - elCell.innerHTML = "<div class=salvar style='text-align:center' onclick='gravaLinha(\""+oRecord._sId+"\")'></div>"; | |
| 75 | - }; | |
| 76 | - var formatExclui = function(elCell, oRecord, oColumn) | |
| 77 | - { | |
| 78 | - elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | |
| 79 | - }; | |
| 80 | - var myColumnDefs = [ | |
| 81 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 82 | - {label:"salvar",formatter:formatSalva}, | |
| 83 | - {label:"id",key:"id_tag", formatter:formatTextoId}, | |
| 60 | + YAHOO.example.InlineCellEditing = new function() | |
| 61 | + { | |
| 62 | + // Custom formatter for "address" column to preserve line breaks | |
| 63 | + var formatTexto = function(elCell, oRecord, oColumn, oData) | |
| 64 | + { | |
| 65 | + elCell.innerHTML = "<p style=width:250px >" + oData + "</p>"; | |
| 66 | + }; | |
| 67 | + var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 68 | + { | |
| 69 | + elCell.innerHTML = "<p style=width:20px >" + oData + "</p>"; | |
| 70 | + }; | |
| 71 | + | |
| 72 | + var formatSalva = function(elCell, oRecord, oColumn) | |
| 73 | + { | |
| 74 | + elCell.innerHTML = "<div class=salvar style='text-align:center' onclick='gravaLinha(\""+oRecord._sId+"\")'></div>"; | |
| 75 | + }; | |
| 76 | + var formatExclui = function(elCell, oRecord, oColumn) | |
| 77 | + { | |
| 78 | + elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | |
| 79 | + }; | |
| 80 | + var myColumnDefs = [ | |
| 81 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 82 | + {label:"salvar",formatter:formatSalva}, | |
| 83 | + {label:"id",key:"id_tag", formatter:formatTextoId}, | |
| 84 | 84 | {label:"nome",resizeable:true,key:"nome", formatter:formatTexto, editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})} |
| 85 | - ]; | |
| 86 | - myDataSource = new YAHOO.util.DataSource(dados); | |
| 87 | - myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 88 | - myDataSource.responseSchema = | |
| 89 | - { | |
| 90 | - fields: ["id_tag","nome"] | |
| 91 | - }; | |
| 92 | - myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 93 | - // Set up editing flow | |
| 94 | - myDataTable.highlightEditableCell = function(oArgs) | |
| 95 | - { | |
| 96 | - var elCell = oArgs.target; | |
| 97 | - var column = myDataTable.getColumn(oArgs.target); | |
| 98 | - if(!YAHOO.lang.isNull(column.editor)) | |
| 99 | - { | |
| 85 | + ]; | |
| 86 | + myDataSource = new YAHOO.util.DataSource(dados); | |
| 87 | + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 88 | + myDataSource.responseSchema = | |
| 89 | + { | |
| 90 | + fields: ["id_tag","nome"] | |
| 91 | + }; | |
| 92 | + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 93 | + // Set up editing flow | |
| 94 | + myDataTable.highlightEditableCell = function(oArgs) | |
| 95 | + { | |
| 96 | + var elCell = oArgs.target; | |
| 97 | + var column = myDataTable.getColumn(oArgs.target); | |
| 98 | + if(!YAHOO.lang.isNull(column.editor)) | |
| 99 | + { | |
| 100 | 100 | YAHOO.util.Dom.addClass(elCell,'yui-dt-highlighted'); |
| 101 | - } | |
| 102 | - }; | |
| 103 | - myDataTable.unhighlightEditableCell = function(oArgs) | |
| 104 | - { | |
| 105 | - var elCell = oArgs.target; | |
| 106 | - if(elCell.style.cursor="pointer") | |
| 107 | - { | |
| 101 | + } | |
| 102 | + }; | |
| 103 | + myDataTable.unhighlightEditableCell = function(oArgs) | |
| 104 | + { | |
| 105 | + var elCell = oArgs.target; | |
| 106 | + if(elCell.style.cursor="pointer") | |
| 107 | + { | |
| 108 | 108 | YAHOO.util.Dom.removeClass(elCell,'yui-dt-highlighted'); |
| 109 | - } | |
| 110 | - }; | |
| 111 | - myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); | |
| 112 | - myDataTable.subscribe("cellMouseoutEvent", myDataTable.unhighlightEditableCell); | |
| 109 | + } | |
| 110 | + }; | |
| 111 | + myDataTable.subscribe("cellMouseoverEvent", myDataTable.highlightEditableCell); | |
| 112 | + myDataTable.subscribe("cellMouseoutEvent", myDataTable.unhighlightEditableCell); | |
| 113 | 113 | myDataTable.subscribe('cellClickEvent',function(ev) |
| 114 | 114 | { |
| 115 | 115 | var target = YAHOO.util.Event.getTarget(ev); |
| ... | ... | @@ -127,30 +127,30 @@ function montaTabela(dados) |
| 127 | 127 | else |
| 128 | 128 | {this.onEventShowCellEditor(ev);} |
| 129 | 129 | }); |
| 130 | - // Hook into custom event to customize save-flow of "radio" editor | |
| 131 | - myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 132 | - { | |
| 133 | - if(oArgs.editor.column.key === "active") | |
| 134 | - { | |
| 135 | - this.saveCellEditor(); | |
| 136 | - | |
| 137 | - } | |
| 138 | - }); | |
| 139 | - myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 140 | - { | |
| 141 | - this.cancelCellEditor(); | |
| 142 | - }); | |
| 143 | - myDataTable.subscribe("editorSaveEvent", function(oArgs) | |
| 144 | - { | |
| 130 | + // Hook into custom event to customize save-flow of "radio" editor | |
| 131 | + myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 132 | + { | |
| 133 | + if(oArgs.editor.column.key === "active") | |
| 134 | + { | |
| 135 | + this.saveCellEditor(); | |
| 136 | + | |
| 137 | + } | |
| 138 | + }); | |
| 139 | + myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 140 | + { | |
| 141 | + this.cancelCellEditor(); | |
| 142 | + }); | |
| 143 | + myDataTable.subscribe("editorSaveEvent", function(oArgs) | |
| 144 | + { | |
| 145 | 145 | if(oArgs.newData != oArgs.oldData){ |
| 146 | 146 | var linha = myDataTable.getTrEl(oArgs.editor.getRecord()); |
| 147 | 147 | linha.style.color = "blue"; |
| 148 | 148 | linha.style.textDecoration = "blink"; |
| 149 | 149 | } |
| 150 | - }); | |
| 150 | + }); | |
| 151 | 151 | |
| 152 | - }; | |
| 153 | - core_carregando("desativa"); | |
| 152 | + }; | |
| 153 | + core_carregando("desativa"); | |
| 154 | 154 | } |
| 155 | 155 | /* |
| 156 | 156 | Function: gravaLinha | ... | ... |
admin/js/temas.js
| ... | ... | @@ -424,7 +424,7 @@ function pegaMetadados(codigoMap,codigoLayer) |
| 424 | 424 | var ins = "<br><fieldset><legend>+- Metadados</legend><div style=display:none >"; |
| 425 | 425 | var retorna = function(retorna) |
| 426 | 426 | { |
| 427 | - ins += ""; | |
| 427 | + ins += ""; | |
| 428 | 428 | var param = { |
| 429 | 429 | "linhas":[ |
| 430 | 430 | {texto:"Nome que será utilizado na legenda do mapa e na guia 'Temas'", | ... | ... |
admin/js/usuarios.js
| ... | ... | @@ -92,34 +92,34 @@ function montaArvore(dados){ |
| 92 | 92 | { |
| 93 | 93 | buildTree(); |
| 94 | 94 | } |
| 95 | - function loadNodeData(node, fnLoadComplete){ | |
| 96 | - var sUrl = "../php/usuarios.php?funcao=pegaPapeisUsuario&id_usuario="+node.data.id_usuario; | |
| 95 | + function loadNodeData(node, fnLoadComplete){ | |
| 96 | + var sUrl = "../php/usuarios.php?funcao=pegaPapeisUsuario&id_usuario="+node.data.id_usuario; | |
| 97 | 97 | var callback = { |
| 98 | - success: function(oResponse){ | |
| 99 | - var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 98 | + success: function(oResponse){ | |
| 99 | + var dados = YAHOO.lang.JSON.parse(oResponse.responseText); | |
| 100 | 100 | adicionaNosPapeis(node,dados,false); |
| 101 | - oResponse.argument.fnLoadComplete(); | |
| 102 | - }, | |
| 103 | - failure: function(oResponse){ | |
| 104 | - oResponse.argument.fnLoadComplete(); | |
| 105 | - }, | |
| 106 | - argument:{ | |
| 107 | - "node": node, | |
| 108 | - "fnLoadComplete": fnLoadComplete | |
| 109 | - }, | |
| 110 | - timeout: 25000 | |
| 111 | - }; | |
| 112 | - YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 113 | - } | |
| 114 | - function buildTree(){ | |
| 101 | + oResponse.argument.fnLoadComplete(); | |
| 102 | + }, | |
| 103 | + failure: function(oResponse){ | |
| 104 | + oResponse.argument.fnLoadComplete(); | |
| 105 | + }, | |
| 106 | + argument:{ | |
| 107 | + "node": node, | |
| 108 | + "fnLoadComplete": fnLoadComplete | |
| 109 | + }, | |
| 110 | + timeout: 25000 | |
| 111 | + }; | |
| 112 | + YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); | |
| 113 | + } | |
| 114 | + function buildTree(){ | |
| 115 | 115 | tree = new YAHOO.widget.TreeView("tabela"); |
| 116 | 116 | tree.setDynamicLoad(loadNodeData, 1); |
| 117 | 117 | var root = tree.getRoot(); |
| 118 | 118 | var tempNode = new YAHOO.widget.TextNode('', root, false); |
| 119 | 119 | tempNode.isLeaf = true; |
| 120 | 120 | core_carregando("desativa"); |
| 121 | - } | |
| 122 | - buildTree(); | |
| 121 | + } | |
| 122 | + buildTree(); | |
| 123 | 123 | }(); |
| 124 | 124 | adicionaNosUsuarios(dados); |
| 125 | 125 | tree.draw(); |
| ... | ... | @@ -139,8 +139,8 @@ function adicionaNosPapeis(no,dados,redesenha) |
| 139 | 139 | if (newVal != currentIconMode) |
| 140 | 140 | {currentIconMode = newVal;} |
| 141 | 141 | } |
| 142 | - if(!redesenha) | |
| 143 | - { | |
| 142 | + if(!redesenha) | |
| 143 | + { | |
| 144 | 144 | var conteudo = "<span style=\"cursor:pointer;\" onclick=\"editar('papel','"+no.data.id_usuario+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar novo papel</i></span>"; |
| 145 | 145 | var d = {html:conteudo}; |
| 146 | 146 | var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true); |
| ... | ... | @@ -222,12 +222,12 @@ function editar(tipo,id) |
| 222 | 222 | function montaDivUsuario(i){ |
| 223 | 223 | var param = { |
| 224 | 224 | "linhas":[ |
| 225 | - {titulo:"Nome:",id:"Enome_usuario",size:"50",value:i.nome_usuario,tipo:"text",div:""}, | |
| 226 | - {titulo:"Login:",id:"Elogin",size:"50",value:i.login,tipo:"text",div:""}, | |
| 227 | - {ajuda:"Se o usuário já existir, preencha para alterar a senha. Se for mantido em branco, o sistema gerará uma senha aleatória no caso de novos usuários. Envie a senha por e-mail após o cadastro.",titulo:"Nova senha:",id:"Esenha",size:"50",value:"",tipo:"text",div:""}, | |
| 228 | - {titulo:"E-mail:",id:"Eemail",size:"50",value:i.email,tipo:"text",div:""}, | |
| 229 | - {titulo:"Data de cadastro:",id:"Edata_cadastro",size:"50",value:i.data_cadastro,tipo:"text",div:""}, | |
| 230 | - {titulo:"Ativo:",id:"",size:"50",value:i.ativo,tipo:"text",div:"<div id=cAtivo ></div>"} | |
| 225 | + {titulo:"Nome:",id:"Enome_usuario",size:"50",value:i.nome_usuario,tipo:"text",div:""}, | |
| 226 | + {titulo:"Login:",id:"Elogin",size:"50",value:i.login,tipo:"text",div:""}, | |
| 227 | + {ajuda:"Se o usuário já existir, preencha para alterar a senha. Se for mantido em branco, o sistema gerará uma senha aleatória no caso de novos usuários. Envie a senha por e-mail após o cadastro.",titulo:"Nova senha:",id:"Esenha",size:"50",value:"",tipo:"text",div:""}, | |
| 228 | + {titulo:"E-mail:",id:"Eemail",size:"50",value:i.email,tipo:"text",div:""}, | |
| 229 | + {titulo:"Data de cadastro:",id:"Edata_cadastro",size:"50",value:i.data_cadastro,tipo:"text",div:""}, | |
| 230 | + {titulo:"Ativo:",id:"",size:"50",value:i.ativo,tipo:"text",div:"<div id=cAtivo ></div>"} | |
| 231 | 231 | ] |
| 232 | 232 | }; |
| 233 | 233 | var ins = "<input type=button title='Salvar' value='Salvar' id=salvarEditorUsuario />"; | ... | ... |
admin/js/webservices.js
| ... | ... | @@ -53,7 +53,7 @@ Obt&eacute;m a lista de WS |
| 53 | 53 | */ |
| 54 | 54 | function pegaWS() |
| 55 | 55 | { |
| 56 | - // | |
| 56 | + // | |
| 57 | 57 | //pega o tipo de WS que será listado se tiver sido definido na url |
| 58 | 58 | // |
| 59 | 59 | var tipows = "",u; |
| ... | ... | @@ -75,33 +75,33 @@ Monta a tabela de edi&ccedil;&atilde;o |
| 75 | 75 | function montaTabela(dados) |
| 76 | 76 | { |
| 77 | 77 | YAHOO.example.InlineCellEditing = new function() |
| 78 | - { | |
| 79 | - // Custom formatter for "address" column to preserve line breaks | |
| 80 | - var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 81 | - { | |
| 82 | - elCell.innerHTML = "<p>" + oData + "</p>"; | |
| 83 | - }; | |
| 84 | - var formatMais = function(elCell, oRecord, oColumn) | |
| 85 | - { | |
| 86 | - elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
| 87 | - }; | |
| 88 | - var formatExclui = function(elCell, oRecord, oColumn) | |
| 89 | - { | |
| 90 | - elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | |
| 91 | - }; | |
| 92 | - var myColumnDefs = [ | |
| 93 | - {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 94 | - {key:"mais",label:"editar",formatter:formatMais}, | |
| 95 | - {label:"id",key:"id_ws", formatter:formatTextoId}, | |
| 96 | - {label:"tipo",key:"tipo_ws", formatter:formatTextoId}, | |
| 97 | - {label:"nome",key:"nome_ws", formatter:formatTextoId}, | |
| 98 | - ]; | |
| 99 | - myDataSource = new YAHOO.util.DataSource(dados); | |
| 100 | - myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 101 | - myDataSource.responseSchema = | |
| 102 | - {fields: ["id_ws","nome_ws","tipo_ws"]}; | |
| 103 | - myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 104 | - // Set up editing flow | |
| 78 | + { | |
| 79 | + // Custom formatter for "address" column to preserve line breaks | |
| 80 | + var formatTextoId = function(elCell, oRecord, oColumn, oData) | |
| 81 | + { | |
| 82 | + elCell.innerHTML = "<p>" + oData + "</p>"; | |
| 83 | + }; | |
| 84 | + var formatMais = function(elCell, oRecord, oColumn) | |
| 85 | + { | |
| 86 | + elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; | |
| 87 | + }; | |
| 88 | + var formatExclui = function(elCell, oRecord, oColumn) | |
| 89 | + { | |
| 90 | + elCell.innerHTML = "<div class=excluir style='text-align:center' ></div>"; | |
| 91 | + }; | |
| 92 | + var myColumnDefs = [ | |
| 93 | + {key:"excluir",label:"excluir",formatter:formatExclui}, | |
| 94 | + {key:"mais",label:"editar",formatter:formatMais}, | |
| 95 | + {label:"id",key:"id_ws", formatter:formatTextoId}, | |
| 96 | + {label:"tipo",key:"tipo_ws", formatter:formatTextoId}, | |
| 97 | + {label:"nome",key:"nome_ws", formatter:formatTextoId}, | |
| 98 | + ]; | |
| 99 | + myDataSource = new YAHOO.util.DataSource(dados); | |
| 100 | + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; | |
| 101 | + myDataSource.responseSchema = | |
| 102 | + {fields: ["id_ws","nome_ws","tipo_ws"]}; | |
| 103 | + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); | |
| 104 | + // Set up editing flow | |
| 105 | 105 | myDataTable.subscribe('cellClickEvent',function(ev) |
| 106 | 106 | { |
| 107 | 107 | var target = YAHOO.util.Event.getTarget(ev); |
| ... | ... | @@ -136,20 +136,20 @@ function montaTabela(dados) |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | }); |
| 139 | - // Hook into custom event to customize save-flow of "radio" editor | |
| 140 | - myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 141 | - { | |
| 142 | - if(oArgs.editor.column.key === "active") | |
| 143 | - { | |
| 144 | - this.saveCellEditor(); | |
| 145 | - } | |
| 146 | - }); | |
| 147 | - myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 148 | - { | |
| 149 | - this.cancelCellEditor(); | |
| 150 | - }); | |
| 151 | - }; | |
| 152 | - core_carregando("desativa"); | |
| 139 | + // Hook into custom event to customize save-flow of "radio" editor | |
| 140 | + myDataTable.subscribe("editorUpdateEvent", function(oArgs) | |
| 141 | + { | |
| 142 | + if(oArgs.editor.column.key === "active") | |
| 143 | + { | |
| 144 | + this.saveCellEditor(); | |
| 145 | + } | |
| 146 | + }); | |
| 147 | + myDataTable.subscribe("editorBlurEvent", function(oArgs) | |
| 148 | + { | |
| 149 | + this.cancelCellEditor(); | |
| 150 | + }); | |
| 151 | + }; | |
| 152 | + core_carregando("desativa"); | |
| 153 | 153 | } |
| 154 | 154 | function montaEditor(dados,id,recordid) |
| 155 | 155 | { |
| ... | ... | @@ -176,9 +176,9 @@ function montaEditor(dados,id,recordid) |
| 176 | 176 | document.body.appendChild(novoel); |
| 177 | 177 | var editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id", name: "okcancel_checkbox_id", container: "okcancel_checkbox" }); |
| 178 | 178 | editorBotoes.addButtons([ |
| 179 | - { label: "Salva", value: "OK", checked: false}, | |
| 180 | - { label: "Cancela", value: "CANCEL", checked: false } | |
| 181 | - ]); | |
| 179 | + { label: "Salva", value: "OK", checked: false}, | |
| 180 | + { label: "Cancela", value: "CANCEL", checked: false } | |
| 181 | + ]); | |
| 182 | 182 | editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange); |
| 183 | 183 | YAHOO.admin.container.panelEditor = new YAHOO.widget.Panel("janela_editor", { fixedcenter:true,close:false,width:"400px", height:"400px",overflow:"auto", visible:false,constraintoviewport:true } ); |
| 184 | 184 | YAHOO.admin.container.panelEditor.render(); | ... | ... |
admin/php/classe_metaestat.php
| ... | ... | @@ -156,16 +156,16 @@ class Metaestat{ |
| 156 | 156 | $r = $r[0]; |
| 157 | 157 | } |
| 158 | 158 | else{ |
| 159 | - $r = false; | |
| 159 | + $r = array(); | |
| 160 | 160 | } |
| 161 | 161 | } |
| 162 | - if($r != false) | |
| 162 | + if($r != false && count($r) > 0){ | |
| 163 | 163 | $r = $this->converteTextoArray($r); |
| 164 | - | |
| 164 | + } | |
| 165 | 165 | return $r; |
| 166 | 166 | } |
| 167 | 167 | else{ |
| 168 | - return false; | |
| 168 | + return array(); | |
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | 171 | else{ |
| ... | ... | @@ -651,14 +651,14 @@ class Metaestat{ |
| 651 | 651 | |
| 652 | 652 | Altera uma regiao |
| 653 | 653 | */ |
| 654 | - function alteraTipoRegiao($codigo_tipo_regiao,$nome_tipo_regiao,$descricao_tipo_regiao,$esquemadb,$tabela,$colunageo,$colunacentroide,$data,$identificador,$colunanomeregiao,$srid){ | |
| 654 | + function alteraTipoRegiao($codigo_tipo_regiao,$nome_tipo_regiao,$descricao_tipo_regiao,$esquemadb,$tabela,$colunageo,$colunacentroide,$data,$identificador,$colunanomeregiao,$srid,$codigo_estat_conexao){ | |
| 655 | 655 | try { |
| 656 | 656 | if($codigo_tipo_regiao != ""){ |
| 657 | 657 | if($this->convUTF){ |
| 658 | 658 | $nome_tipo_regiao = utf8_encode($nome_tipo_regiao); |
| 659 | 659 | $descricao_tipo_regiao = utf8_encode($descricao_tipo_regiao); |
| 660 | 660 | } |
| 661 | - $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_tipo_regiao SET colunacentroide = '$colunacentroide',nome_tipo_regiao = '$nome_tipo_regiao',descricao_tipo_regiao = '$descricao_tipo_regiao',esquemadb = '$esquemadb',tabela = '$tabela',colunageo = '$colunageo',data = '$data',identificador = '$identificador',colunanomeregiao = '$colunanomeregiao', srid = '$srid' WHERE codigo_tipo_regiao = $codigo_tipo_regiao"); | |
| 661 | + $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_tipo_regiao SET codigo_estat_conexao = '$codigo_estat_conexao', colunacentroide = '$colunacentroide',nome_tipo_regiao = '$nome_tipo_regiao',descricao_tipo_regiao = '$descricao_tipo_regiao',esquemadb = '$esquemadb',tabela = '$tabela',colunageo = '$colunageo',data = '$data',identificador = '$identificador',colunanomeregiao = '$colunanomeregiao', srid = '$srid' WHERE codigo_tipo_regiao = $codigo_tipo_regiao"); | |
| 662 | 662 | $retorna = $codigo_tipo_regiao; |
| 663 | 663 | } |
| 664 | 664 | else{ |
| ... | ... | @@ -670,6 +670,22 @@ class Metaestat{ |
| 670 | 670 | return "Error!: " . $e->getMessage(); |
| 671 | 671 | } |
| 672 | 672 | } |
| 673 | + function alteraAgregaRegiao($codigo_tipo_regiao,$id_agregaregiao="",$codigo_tipo_regiao_pai="",$coluna_ligacao_regiaopai=""){ | |
| 674 | + try { | |
| 675 | + if($id_agregaregiao != ""){ | |
| 676 | + $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_agregaregiao SET colunaligacao_regiaopai = '$colunaligacao_regiaopai', codigo_tipo_regiao_pai = '$codigo_tipo_regiao_pai' WHERE id_agregaregiao = $id_agregaregiao"); | |
| 677 | + $retorna = $id_agregaregiao; | |
| 678 | + } | |
| 679 | + else{ | |
| 680 | + $retorna = $this->insertId("i3geoestat_agregaregiao","colunaligacao_regiaopai","id_agregaregiao"); | |
| 681 | + $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_agregaregiao SET codigo_tipo_regiao = '$codigo_tipo_regiao' WHERE id_agregaregiao = $retorna"); | |
| 682 | + } | |
| 683 | + return $retorna; | |
| 684 | + } | |
| 685 | + catch (PDOException $e) { | |
| 686 | + return "Error!: " . $e->getMessage(); | |
| 687 | + } | |
| 688 | + } | |
| 673 | 689 | /* |
| 674 | 690 | Function: alteraParametroMedida |
| 675 | 691 | |
| ... | ... | @@ -980,6 +996,18 @@ class Metaestat{ |
| 980 | 996 | $sql .= "ORDER BY nome_tipo_regiao"; |
| 981 | 997 | return $this->execSQL($sql,$codigo_tipo_regiao); |
| 982 | 998 | } |
| 999 | + function listaAgregaRegiao($codigo_tipo_regiao,$id_agregaregiao=""){ | |
| 1000 | + $sql = "select * from ".$this->esquemaadmin."i3geoestat_agregaregiao "; | |
| 1001 | + if($id_agregaregiao != ""){ | |
| 1002 | + $sql .= "WHERE id_agregaregiao = $id_agregaregiao "; | |
| 1003 | + } | |
| 1004 | + else{ | |
| 1005 | + $sql .= "WHERE codigo_tipo_regiao = $codigo_tipo_regiao"; | |
| 1006 | + } | |
| 1007 | + $sql .= " ORDER BY colunaligacao_regiaopai"; | |
| 1008 | + //echo $sql;exit; | |
| 1009 | + return $this->execSQL($sql,$id_agregaregiao); | |
| 1010 | + } | |
| 983 | 1011 | function esquemasConexao($codigo_estat_conexao){ |
| 984 | 1012 | $c = $this->listaConexao($codigo_estat_conexao,true); |
| 985 | 1013 | $dbhold = $this->dbh; |
| ... | ... | @@ -1103,7 +1131,7 @@ class Metaestat{ |
| 1103 | 1131 | } |
| 1104 | 1132 | else{ |
| 1105 | 1133 | $tipos[] = "java.lang.String"; |
| 1106 | - } | |
| 1134 | + } | |
| 1107 | 1135 | } |
| 1108 | 1136 | $xml .= '<!--'.implode($tipos,",").'-->' . PHP_EOL; |
| 1109 | 1137 | } |
| ... | ... | @@ -1128,7 +1156,7 @@ class Metaestat{ |
| 1128 | 1156 | } |
| 1129 | 1157 | else{ |
| 1130 | 1158 | $tipos[] = "java.lang.String"; |
| 1131 | - } | |
| 1159 | + } | |
| 1132 | 1160 | break; |
| 1133 | 1161 | } |
| 1134 | 1162 | $xml .= '<!--'.implode($tipos,",").'-->' . PHP_EOL; | ... | ... |
admin/php/metaestat.php
| ... | ... | @@ -203,6 +203,14 @@ switch (strtoupper($funcao)) |
| 203 | 203 | retornaJSON($m->listaTipoRegiao($codigo_tipo_regiao)); |
| 204 | 204 | exit; |
| 205 | 205 | break; |
| 206 | + case "LISTAAGREGAREGIAO": | |
| 207 | + $m = new Metaestat(); | |
| 208 | + if(empty($codigo_tipo_regiao)){ | |
| 209 | + $codigo_tipo_regiao = ""; | |
| 210 | + } | |
| 211 | + retornaJSON($m->listaAgregaRegiao($codigo_tipo_regiao,$id_agregaregiao)); | |
| 212 | + exit; | |
| 213 | + break; | |
| 206 | 214 | /* |
| 207 | 215 | Valor: ALTERARVARIAVEL |
| 208 | 216 | |
| ... | ... | @@ -386,11 +394,23 @@ switch (strtoupper($funcao)) |
| 386 | 394 | $codigo_tipo_regiao = $m->alteraTipoRegiao(); |
| 387 | 395 | } |
| 388 | 396 | else{ |
| 389 | - $codigo_tipo_regiao = $m->alteraTipoRegiao($codigo_tipo_regiao,$nome_tipo_regiao,$descricao_tipo_regiao,$esquemadb,$tabela,$colunageo,$colunacentroide,$data,$identificador,$colunanomeregiao,$srid); | |
| 397 | + $codigo_tipo_regiao = $m->alteraTipoRegiao($codigo_tipo_regiao,$nome_tipo_regiao,$descricao_tipo_regiao,$esquemadb,$tabela,$colunageo,$colunacentroide,$data,$identificador,$colunanomeregiao,$srid,$codigo_estat_conexao); | |
| 390 | 398 | } |
| 391 | 399 | retornaJSON($m->listaTipoRegiao($codigo_tipo_regiao)); |
| 392 | 400 | exit; |
| 393 | 401 | break; |
| 402 | + case "ALTERAAGREGAREGIAO": | |
| 403 | + $m = new Metaestat(); | |
| 404 | + if(empty($id_agregaregiao)){ | |
| 405 | + $id_agregaregiao = $m->alteraAgregaRegiao($codigo_tipo_regiao); | |
| 406 | + } | |
| 407 | + else{ | |
| 408 | + $id_agregaregiao = $m->alteraAgregaRegiao("",$id_agregaregiao,$codigo_tipo_regiao_pai,$coluna_ligacao_regiaopai); | |
| 409 | + $codigo_tipo_regiao = ""; | |
| 410 | + } | |
| 411 | + retornaJSON($m->listaAgregaRegiao($codigo_tipo_regiao,$id_agregaregiao)); | |
| 412 | + exit; | |
| 413 | + break; | |
| 394 | 414 | /* |
| 395 | 415 | Valor: ALTERARTIPOPERIODO |
| 396 | 416 | |
| ... | ... | @@ -543,6 +563,13 @@ switch (strtoupper($funcao)) |
| 543 | 563 | retornaJSON("erro"); |
| 544 | 564 | exit; |
| 545 | 565 | break; |
| 566 | + case "EXCLUIRAGREGAREGIAO": | |
| 567 | + $tabela = "i3geoestat_agregaregiao"; | |
| 568 | + $id = $id_agregaregiao; | |
| 569 | + $m = new Metaestat(); | |
| 570 | + retornaJSON($m->excluirRegistro("i3geoestat_agregaregiao","id_agregaregiao",$id)); | |
| 571 | + exit; | |
| 572 | + break; | |
| 546 | 573 | /* |
| 547 | 574 | Valor: EXCLUIRMEDIDAVARIAVEL |
| 548 | 575 | ... | ... |
admin/sql/metaestat.sql
| 1 | 1 | |
| 2 | 2 | /* drop tables */ |
| 3 | 3 | |
| 4 | +drop table i3geoestat_agregaregiao; | |
| 4 | 5 | drop table i3geoestat_classes; |
| 5 | 6 | drop table i3geoestat_classificacao; |
| 6 | 7 | drop table i3geoestat_fonteinfo_medida; |
| ... | ... | @@ -15,22 +16,10 @@ drop table i3geoestat_unidade_medida; |
| 15 | 16 | drop table i3geoestat_variavel; |
| 16 | 17 | |
| 17 | 18 | |
| 18 | - | |
| 19 | + | |
| 19 | 20 | |
| 20 | 21 | /* create tables */ |
| 21 | 22 | |
| 22 | -create table i3geoestat_unidade_medida | |
| 23 | -( | |
| 24 | - codigo_unidade_medida integer not null unique primary key autoincrement, | |
| 25 | - nome text, | |
| 26 | - sigla text, | |
| 27 | - -- o tipo de unidade permite que os valores sejam somados? (0 ou 1) | |
| 28 | - permitesoma integer default 0, | |
| 29 | - -- o tipo de unidade permite o cálculo de média aritmética? (0 ou 1) | |
| 30 | - permitemedia integer default 0 | |
| 31 | -); | |
| 32 | - | |
| 33 | - | |
| 34 | 23 | -- lista controlada dos parâmetros de conexão com o banco de dados onde residem dados |
| 35 | 24 | create table i3geoestat_conexao |
| 36 | 25 | ( |
| ... | ... | @@ -76,6 +65,18 @@ create table i3geoestat_tipo_regiao |
| 76 | 65 | ); |
| 77 | 66 | |
| 78 | 67 | |
| 68 | +create table i3geoestat_agregaregiao | |
| 69 | +( | |
| 70 | + id_agregaregiao integer not null unique primary key autoincrement, | |
| 71 | + codigo_tipo_regiao integer, | |
| 72 | + codigo_tipo_regiao_pai integer, | |
| 73 | + -- coluna na tabela filho que liga com a coluna de identificadores da coluna pai | |
| 74 | + colunaligacao_regiaopai text, | |
| 75 | + foreign key (codigo_tipo_regiao) | |
| 76 | + references i3geoestat_tipo_regiao (codigo_tipo_regiao) | |
| 77 | +); | |
| 78 | + | |
| 79 | + | |
| 79 | 80 | -- lista controlada de tipos de período de tempo |
| 80 | 81 | create table i3geoestat_tipo_periodo |
| 81 | 82 | ( |
| ... | ... | @@ -94,6 +95,18 @@ create table i3geoestat_variavel |
| 94 | 95 | ); |
| 95 | 96 | |
| 96 | 97 | |
| 98 | +create table i3geoestat_unidade_medida | |
| 99 | +( | |
| 100 | + codigo_unidade_medida integer not null unique primary key autoincrement, | |
| 101 | + nome text, | |
| 102 | + sigla text, | |
| 103 | + -- o tipo de unidade permite que os valores sejam somados? (0 ou 1) | |
| 104 | + permitesoma integer default 0, | |
| 105 | + -- o tipo de unidade permite o cálculo de média aritmética? (0 ou 1) | |
| 106 | + permitemedia integer default 0 | |
| 107 | +); | |
| 108 | + | |
| 109 | + | |
| 97 | 110 | -- descreve as colunas que contém valores de algum tipo de medida, por exemplo população residente |
| 98 | 111 | create table i3geoestat_medida_variavel |
| 99 | 112 | ( |
| ... | ... | @@ -115,16 +128,16 @@ create table i3geoestat_medida_variavel |
| 115 | 128 | filtro text, |
| 116 | 129 | -- titulo da medida |
| 117 | 130 | nomemedida text, |
| 118 | - foreign key (codigo_unidade_medida) | |
| 119 | - references i3geoestat_unidade_medida (codigo_unidade_medida), | |
| 120 | 131 | foreign key (codigo_tipo_regiao) |
| 121 | 132 | references i3geoestat_tipo_regiao (codigo_tipo_regiao), |
| 122 | 133 | foreign key (codigo_tipo_periodo) |
| 123 | 134 | references i3geoestat_tipo_periodo (codigo_tipo_periodo), |
| 135 | + foreign key (codigo_variavel) | |
| 136 | + references i3geoestat_variavel (codigo_variavel), | |
| 124 | 137 | foreign key (codigo_estat_conexao) |
| 125 | 138 | references i3geoestat_conexao (codigo_estat_conexao), |
| 126 | - foreign key (codigo_variavel) | |
| 127 | - references i3geoestat_variavel (codigo_variavel) | |
| 139 | + foreign key (codigo_unidade_medida) | |
| 140 | + references i3geoestat_unidade_medida (codigo_unidade_medida) | |
| 128 | 141 | ); |
| 129 | 142 | |
| 130 | 143 | |
| ... | ... | @@ -218,4 +231,4 @@ create table i3geoestat_parametro_medida |
| 218 | 231 | ); |
| 219 | 232 | |
| 220 | 233 | |
| 221 | - | |
| 234 | + | ... | ... |
documentacao/diagramas/metaestat.erm
| ... | ... | @@ -11,8 +11,8 @@ |
| 11 | 11 | </page_setting> |
| 12 | 12 | <category_index>0</category_index> |
| 13 | 13 | <zoom>1.0</zoom> |
| 14 | - <x>155</x> | |
| 15 | - <y>111</y> | |
| 14 | + <x>-372</x> | |
| 15 | + <y>275</y> | |
| 16 | 16 | <default_color> |
| 17 | 17 | <r>255</r> |
| 18 | 18 | <g>128</g> |
| ... | ... | @@ -41,7 +41,7 @@ |
| 41 | 41 | <suspend_validator>false</suspend_validator> |
| 42 | 42 | <export_setting> |
| 43 | 43 | <category_name_to_export>All</category_name_to_export> |
| 44 | - <ddl_output>C:\ms4w\Apache\htdocs\i3geo\admin\sql\metaestat.sql</ddl_output> | |
| 44 | + <ddl_output>/var/www/i3geo/admin/sql/metaestat.sql</ddl_output> | |
| 45 | 45 | <excel_output></excel_output> |
| 46 | 46 | <excel_template></excel_template> |
| 47 | 47 | <image_output></image_output> |
| ... | ... | @@ -97,7 +97,7 @@ |
| 97 | 97 | <id></id> |
| 98 | 98 | <height>-1</height> |
| 99 | 99 | <width>-1</width> |
| 100 | - <font_name>Segoe UI</font_name> | |
| 100 | + <font_name>Ubuntu</font_name> | |
| 101 | 101 | <font_size>9</font_size> |
| 102 | 102 | <x>50</x> |
| 103 | 103 | <y>50</y> |
| ... | ... | @@ -110,7 +110,7 @@ |
| 110 | 110 | </connections> |
| 111 | 111 | <display>false</display> |
| 112 | 112 | <creation_date>2012-07-17 15:03:53</creation_date> |
| 113 | - <updated_date>2012-08-16 11:27:59</updated_date> | |
| 113 | + <updated_date>2012-08-18 09:59:03</updated_date> | |
| 114 | 114 | <model_property> |
| 115 | 115 | <name>Project Name</name> |
| 116 | 116 | <value></value> |
| ... | ... | @@ -1068,7 +1068,7 @@ |
| 1068 | 1068 | </sequence> |
| 1069 | 1069 | </normal_column> |
| 1070 | 1070 | <normal_column> |
| 1071 | - <word_id>36</word_id> | |
| 1071 | + <word_id>38</word_id> | |
| 1072 | 1072 | <id>1</id> |
| 1073 | 1073 | <description></description> |
| 1074 | 1074 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -1259,7 +1259,7 @@ |
| 1259 | 1259 | </sequence> |
| 1260 | 1260 | </normal_column> |
| 1261 | 1261 | <normal_column> |
| 1262 | - <word_id>40</word_id> | |
| 1262 | + <word_id>41</word_id> | |
| 1263 | 1263 | <id>6</id> |
| 1264 | 1264 | <description></description> |
| 1265 | 1265 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -1386,7 +1386,7 @@ |
| 1386 | 1386 | </sequence> |
| 1387 | 1387 | </normal_column> |
| 1388 | 1388 | <normal_column> |
| 1389 | - <word_id>38</word_id> | |
| 1389 | + <word_id>37</word_id> | |
| 1390 | 1390 | <id>9</id> |
| 1391 | 1391 | <description></description> |
| 1392 | 1392 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -1753,7 +1753,7 @@ |
| 1753 | 1753 | </sequence> |
| 1754 | 1754 | </normal_column> |
| 1755 | 1755 | <normal_column> |
| 1756 | - <word_id>37</word_id> | |
| 1756 | + <word_id>39</word_id> | |
| 1757 | 1757 | <id>18</id> |
| 1758 | 1758 | <description></description> |
| 1759 | 1759 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -2466,7 +2466,7 @@ |
| 2466 | 2466 | <connections> |
| 2467 | 2467 | <relation> |
| 2468 | 2468 | <id>2</id> |
| 2469 | - <source>2</source> | |
| 2469 | + <source>13</source> | |
| 2470 | 2470 | <target>9</target> |
| 2471 | 2471 | <child_cardinality>1..n</child_cardinality> |
| 2472 | 2472 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2483,7 +2483,7 @@ |
| 2483 | 2483 | </relation> |
| 2484 | 2484 | <relation> |
| 2485 | 2485 | <id>3</id> |
| 2486 | - <source>4</source> | |
| 2486 | + <source>3</source> | |
| 2487 | 2487 | <target>9</target> |
| 2488 | 2488 | <child_cardinality>1..n</child_cardinality> |
| 2489 | 2489 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2500,7 +2500,7 @@ |
| 2500 | 2500 | </relation> |
| 2501 | 2501 | <relation> |
| 2502 | 2502 | <id>4</id> |
| 2503 | - <source>13</source> | |
| 2503 | + <source>4</source> | |
| 2504 | 2504 | <target>9</target> |
| 2505 | 2505 | <child_cardinality>1..n</child_cardinality> |
| 2506 | 2506 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2534,7 +2534,7 @@ |
| 2534 | 2534 | </relation> |
| 2535 | 2535 | <relation> |
| 2536 | 2536 | <id>6</id> |
| 2537 | - <source>3</source> | |
| 2537 | + <source>2</source> | |
| 2538 | 2538 | <target>9</target> |
| 2539 | 2539 | <child_cardinality>1..n</child_cardinality> |
| 2540 | 2540 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2592,7 +2592,7 @@ |
| 2592 | 2592 | <normal_column> |
| 2593 | 2593 | <id>38</id> |
| 2594 | 2594 | <referenced_column>0</referenced_column> |
| 2595 | - <relation>2</relation> | |
| 2595 | + <relation>6</relation> | |
| 2596 | 2596 | <description></description> |
| 2597 | 2597 | <unique_key_name></unique_key_name> |
| 2598 | 2598 | <logical_name></logical_name> |
| ... | ... | @@ -2625,7 +2625,7 @@ |
| 2625 | 2625 | <normal_column> |
| 2626 | 2626 | <id>39</id> |
| 2627 | 2627 | <referenced_column>5</referenced_column> |
| 2628 | - <relation>6</relation> | |
| 2628 | + <relation>3</relation> | |
| 2629 | 2629 | <description></description> |
| 2630 | 2630 | <unique_key_name></unique_key_name> |
| 2631 | 2631 | <logical_name></logical_name> |
| ... | ... | @@ -2658,7 +2658,7 @@ |
| 2658 | 2658 | <normal_column> |
| 2659 | 2659 | <id>40</id> |
| 2660 | 2660 | <referenced_column>8</referenced_column> |
| 2661 | - <relation>3</relation> | |
| 2661 | + <relation>4</relation> | |
| 2662 | 2662 | <description></description> |
| 2663 | 2663 | <unique_key_name></unique_key_name> |
| 2664 | 2664 | <logical_name></logical_name> |
| ... | ... | @@ -2691,7 +2691,7 @@ |
| 2691 | 2691 | <normal_column> |
| 2692 | 2692 | <id>41</id> |
| 2693 | 2693 | <referenced_column>61</referenced_column> |
| 2694 | - <relation>4</relation> | |
| 2694 | + <relation>2</relation> | |
| 2695 | 2695 | <description></description> |
| 2696 | 2696 | <unique_key_name></unique_key_name> |
| 2697 | 2697 | <logical_name></logical_name> |
| ... | ... | @@ -3060,7 +3060,7 @@ |
| 3060 | 3060 | </sequence> |
| 3061 | 3061 | </normal_column> |
| 3062 | 3062 | <normal_column> |
| 3063 | - <word_id>41</word_id> | |
| 3063 | + <word_id>40</word_id> | |
| 3064 | 3064 | <id>51</id> |
| 3065 | 3065 | <description></description> |
| 3066 | 3066 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -3148,7 +3148,7 @@ |
| 3148 | 3148 | <connections> |
| 3149 | 3149 | <relation> |
| 3150 | 3150 | <id>8</id> |
| 3151 | - <source>9</source> | |
| 3151 | + <source>8</source> | |
| 3152 | 3152 | <target>11</target> |
| 3153 | 3153 | <child_cardinality>1..n</child_cardinality> |
| 3154 | 3154 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -3165,7 +3165,7 @@ |
| 3165 | 3165 | </relation> |
| 3166 | 3166 | <relation> |
| 3167 | 3167 | <id>9</id> |
| 3168 | - <source>8</source> | |
| 3168 | + <source>9</source> | |
| 3169 | 3169 | <target>11</target> |
| 3170 | 3170 | <child_cardinality>1..n</child_cardinality> |
| 3171 | 3171 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -3191,7 +3191,7 @@ |
| 3191 | 3191 | <normal_column> |
| 3192 | 3192 | <id>53</id> |
| 3193 | 3193 | <referenced_column>37</referenced_column> |
| 3194 | - <relation>8</relation> | |
| 3194 | + <relation>9</relation> | |
| 3195 | 3195 | <description></description> |
| 3196 | 3196 | <unique_key_name></unique_key_name> |
| 3197 | 3197 | <logical_name></logical_name> |
| ... | ... | @@ -3224,7 +3224,7 @@ |
| 3224 | 3224 | <normal_column> |
| 3225 | 3225 | <id>54</id> |
| 3226 | 3226 | <referenced_column>34</referenced_column> |
| 3227 | - <relation>9</relation> | |
| 3227 | + <relation>8</relation> | |
| 3228 | 3228 | <description></description> |
| 3229 | 3229 | <unique_key_name></unique_key_name> |
| 3230 | 3230 | <logical_name></logical_name> |
| ... | ... | @@ -3367,7 +3367,7 @@ |
| 3367 | 3367 | </sequence> |
| 3368 | 3368 | </normal_column> |
| 3369 | 3369 | <normal_column> |
| 3370 | - <word_id>39</word_id> | |
| 3370 | + <word_id>36</word_id> | |
| 3371 | 3371 | <id>57</id> |
| 3372 | 3372 | <description></description> |
| 3373 | 3373 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -4383,6 +4383,56 @@ |
| 4383 | 4383 | <value>the_geom2</value> |
| 4384 | 4384 | </column_data> |
| 4385 | 4385 | </data> |
| 4386 | + <data> | |
| 4387 | + <column_data> | |
| 4388 | + <column_id>61</column_id> | |
| 4389 | + <value>3</value> | |
| 4390 | + </column_data> | |
| 4391 | + <column_data> | |
| 4392 | + <column_id>62</column_id> | |
| 4393 | + <value>Estados</value> | |
| 4394 | + </column_data> | |
| 4395 | + <column_data> | |
| 4396 | + <column_id>63</column_id> | |
| 4397 | + <value>Limites estaduais</value> | |
| 4398 | + </column_data> | |
| 4399 | + <column_data> | |
| 4400 | + <column_id>64</column_id> | |
| 4401 | + <value>1</value> | |
| 4402 | + </column_data> | |
| 4403 | + <column_data> | |
| 4404 | + <column_id>65</column_id> | |
| 4405 | + <value>public</value> | |
| 4406 | + </column_data> | |
| 4407 | + <column_data> | |
| 4408 | + <column_id>66</column_id> | |
| 4409 | + <value>tb_ibge_estados</value> | |
| 4410 | + </column_data> | |
| 4411 | + <column_data> | |
| 4412 | + <column_id>67</column_id> | |
| 4413 | + <value>the_geom</value> | |
| 4414 | + </column_data> | |
| 4415 | + <column_data> | |
| 4416 | + <column_id>68</column_id> | |
| 4417 | + <value></value> | |
| 4418 | + </column_data> | |
| 4419 | + <column_data> | |
| 4420 | + <column_id>69</column_id> | |
| 4421 | + <value>co_ibge_uf</value> | |
| 4422 | + </column_data> | |
| 4423 | + <column_data> | |
| 4424 | + <column_id>70</column_id> | |
| 4425 | + <value>no_uf</value> | |
| 4426 | + </column_data> | |
| 4427 | + <column_data> | |
| 4428 | + <column_id>71</column_id> | |
| 4429 | + <value>4326</value> | |
| 4430 | + </column_data> | |
| 4431 | + <column_data> | |
| 4432 | + <column_id>72</column_id> | |
| 4433 | + <value>the_geom</value> | |
| 4434 | + </column_data> | |
| 4435 | + </data> | |
| 4386 | 4436 | </direct_test_data> |
| 4387 | 4437 | <repeat_test_data> |
| 4388 | 4438 | <test_data_num>0</test_data_num> | ... | ... |