Commit 63219c111082fe8c488dfdafad64949cb1241677
1 parent
9321af9a
Exists in
master
and in
7 other branches
--no commit message
Showing
5 changed files
with
124 additions
and
37 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/js/estat_variavel.js
| ... | ... | @@ -292,7 +292,7 @@ i3GEOadmin.variaveis = { |
| 292 | 292 | core_makeRequest(sUrl,callback); |
| 293 | 293 | }, |
| 294 | 294 | montaDiv: function(i){ |
| 295 | - var temp,ins = "", | |
| 295 | + var temp,ins = "",limg=i3GEO.configura.locaplic+"/imagens/crialeg.jpg", | |
| 296 | 296 | param = { |
| 297 | 297 | "linhas":[ |
| 298 | 298 | {titulo:"Nome:",id:"Enomemedida",size:"50",value:i.nomemedida,tipo:"text",div:""}, |
| ... | ... | @@ -300,10 +300,10 @@ i3GEOadmin.variaveis = { |
| 300 | 300 | {titulo:"Tipo de período:",id:"",size:"50",value:i.codigo_tipo_periodo,tipo:"text",div:"<div id=Ccodigo_tipo_periodo ></div>"}, |
| 301 | 301 | {titulo:"Tipo de região:",id:"",size:"50",value:i.codigo_tipo_regiao,tipo:"text",div:"<div id=Ccodigo_tipo_regiao ></div>"}, |
| 302 | 302 | {titulo:"Conexão:",id:"",size:"50",value:i.codigo_estat_conexao,tipo:"text",div:"<div id=Ccodigo_estat_conexao ></div>"}, |
| 303 | - {titulo:"Esquema do banco: <img onclick='i3GEOadmin.variaveis.selEsquema(\"Eesquemadb\",\"Ecodigo_estat_conexao\")' src='../../imagens/crialeg.jpg' style='cursor:pointer;position :relative;top:2px'/>",id:"Eesquemadb",size:"50",value:i.esquemadb,tipo:"text",div:""}, | |
| 304 | - {titulo:"Tabela do banco: <img onclick='i3GEOadmin.variaveis.selTabela(\"Etabela\",\"Ecodigo_estat_conexao\",\"Eesquemadb\")' src='../../imagens/crialeg.jpg' style='cursor:pointer;position :relative;top:2px'/>",id:"Etabela",size:"50",value:i.tabela,tipo:"text",div:""}, | |
| 305 | - {titulo:"Coluna com os valores: <img onclick='i3GEOadmin.variaveis.selColuna(\"Ecolunavalor\",\"Ecodigo_estat_conexao\",\"Eesquemadb\",\"Etabela\")' src='../../imagens/crialeg.jpg' style='cursor:pointer;position :relative;top:2px'/>",id:"Ecolunavalor",size:"50",value:i.colunavalor,tipo:"text",div:""}, | |
| 306 | - {titulo:"Coluna com os IDs da tabela GEO: <img onclick='i3GEOadmin.variaveis.selColuna(\"Ecolunaidgeo\",\"Ecodigo_estat_conexao\",\"Eesquemadb\",\"Etabela\")' src='../../imagens/crialeg.jpg' style='cursor:pointer;position :relative;top:2px'/>",id:"Ecolunaidgeo",size:"50",value:i.colunaidgeo,tipo:"text",div:""}, | |
| 303 | + {titulo:"Esquema do banco: <img onclick='i3GEOadmin.variaveis.selEsquema(\"Eesquemadb\",\"Ecodigo_estat_conexao\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>",id:"Eesquemadb",size:"50",value:i.esquemadb,tipo:"text",div:""}, | |
| 304 | + {titulo:"Tabela do banco: <img onclick='i3GEOadmin.variaveis.selTabela(\"Etabela\",\"Ecodigo_estat_conexao\",\"Eesquemadb\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>",id:"Etabela",size:"50",value:i.tabela,tipo:"text",div:""}, | |
| 305 | + {titulo:"Coluna com os valores: <img onclick='i3GEOadmin.variaveis.selColuna(\"Ecolunavalor\",\"Ecodigo_estat_conexao\",\"Eesquemadb\",\"Etabela\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>",id:"Ecolunavalor",size:"50",value:i.colunavalor,tipo:"text",div:""}, | |
| 306 | + {titulo:"Coluna com os IDs da tabela GEO: <img onclick='i3GEOadmin.variaveis.selColuna(\"Ecolunaidgeo\",\"Ecodigo_estat_conexao\",\"Eesquemadb\",\"Etabela\")' src='"+limg+"' style='cursor:pointer;position :relative;top:2px'/>",id:"Ecolunaidgeo",size:"50",value:i.colunaidgeo,tipo:"text",div:""}, | |
| 307 | 307 | {titulo:"Filtro adicional:",id:"Efiltro",size:"50",value:i.filtro,tipo:"text",div:""} |
| 308 | 308 | ] |
| 309 | 309 | }; | ... | ... |
documentacao/diagramas/metaestat.erm
| ... | ... | @@ -12,7 +12,7 @@ |
| 12 | 12 | <category_index>0</category_index> |
| 13 | 13 | <zoom>1.0</zoom> |
| 14 | 14 | <x>-372</x> |
| 15 | - <y>179</y> | |
| 15 | + <y>51</y> | |
| 16 | 16 | <default_color> |
| 17 | 17 | <r>255</r> |
| 18 | 18 | <g>128</g> |
| ... | ... | @@ -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-09-03 12:54:45</updated_date> | |
| 113 | + <updated_date>2012-09-24 00:15:20</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>37</word_id> | |
| 1071 | + <word_id>39</word_id> | |
| 1072 | 1072 | <id>1</id> |
| 1073 | 1073 | <description></description> |
| 1074 | 1074 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -1386,7 +1386,7 @@ |
| 1386 | 1386 | </sequence> |
| 1387 | 1387 | </normal_column> |
| 1388 | 1388 | <normal_column> |
| 1389 | - <word_id>41</word_id> | |
| 1389 | + <word_id>38</word_id> | |
| 1390 | 1390 | <id>9</id> |
| 1391 | 1391 | <description></description> |
| 1392 | 1392 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -1418,7 +1418,7 @@ |
| 1418 | 1418 | </sequence> |
| 1419 | 1419 | </normal_column> |
| 1420 | 1420 | <normal_column> |
| 1421 | - <word_id>16</word_id> | |
| 1421 | + <word_id>17</word_id> | |
| 1422 | 1422 | <id>10</id> |
| 1423 | 1423 | <description></description> |
| 1424 | 1424 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -2243,7 +2243,7 @@ |
| 2243 | 2243 | <connections> |
| 2244 | 2244 | <relation> |
| 2245 | 2245 | <id>2</id> |
| 2246 | - <source>4</source> | |
| 2246 | + <source>2</source> | |
| 2247 | 2247 | <target>8</target> |
| 2248 | 2248 | <child_cardinality>1..n</child_cardinality> |
| 2249 | 2249 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2277,7 +2277,7 @@ |
| 2277 | 2277 | </relation> |
| 2278 | 2278 | <relation> |
| 2279 | 2279 | <id>4</id> |
| 2280 | - <source>14</source> | |
| 2280 | + <source>4</source> | |
| 2281 | 2281 | <target>8</target> |
| 2282 | 2282 | <child_cardinality>1..n</child_cardinality> |
| 2283 | 2283 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2294,7 +2294,7 @@ |
| 2294 | 2294 | </relation> |
| 2295 | 2295 | <relation> |
| 2296 | 2296 | <id>5</id> |
| 2297 | - <source>12</source> | |
| 2297 | + <source>14</source> | |
| 2298 | 2298 | <target>8</target> |
| 2299 | 2299 | <child_cardinality>1..n</child_cardinality> |
| 2300 | 2300 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2311,7 +2311,7 @@ |
| 2311 | 2311 | </relation> |
| 2312 | 2312 | <relation> |
| 2313 | 2313 | <id>6</id> |
| 2314 | - <source>2</source> | |
| 2314 | + <source>12</source> | |
| 2315 | 2315 | <target>8</target> |
| 2316 | 2316 | <child_cardinality>1..n</child_cardinality> |
| 2317 | 2317 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2369,7 +2369,7 @@ |
| 2369 | 2369 | <normal_column> |
| 2370 | 2370 | <id>32</id> |
| 2371 | 2371 | <referenced_column>0</referenced_column> |
| 2372 | - <relation>6</relation> | |
| 2372 | + <relation>2</relation> | |
| 2373 | 2373 | <description></description> |
| 2374 | 2374 | <unique_key_name></unique_key_name> |
| 2375 | 2375 | <logical_name></logical_name> |
| ... | ... | @@ -2435,7 +2435,7 @@ |
| 2435 | 2435 | <normal_column> |
| 2436 | 2436 | <id>34</id> |
| 2437 | 2437 | <referenced_column>8</referenced_column> |
| 2438 | - <relation>2</relation> | |
| 2438 | + <relation>4</relation> | |
| 2439 | 2439 | <description></description> |
| 2440 | 2440 | <unique_key_name></unique_key_name> |
| 2441 | 2441 | <logical_name></logical_name> |
| ... | ... | @@ -2468,7 +2468,7 @@ |
| 2468 | 2468 | <normal_column> |
| 2469 | 2469 | <id>35</id> |
| 2470 | 2470 | <referenced_column>55</referenced_column> |
| 2471 | - <relation>5</relation> | |
| 2471 | + <relation>6</relation> | |
| 2472 | 2472 | <description></description> |
| 2473 | 2473 | <unique_key_name></unique_key_name> |
| 2474 | 2474 | <logical_name></logical_name> |
| ... | ... | @@ -2501,7 +2501,7 @@ |
| 2501 | 2501 | <normal_column> |
| 2502 | 2502 | <id>36</id> |
| 2503 | 2503 | <referenced_column>71</referenced_column> |
| 2504 | - <relation>4</relation> | |
| 2504 | + <relation>5</relation> | |
| 2505 | 2505 | <description></description> |
| 2506 | 2506 | <unique_key_name></unique_key_name> |
| 2507 | 2507 | <logical_name></logical_name> |
| ... | ... | @@ -2837,7 +2837,7 @@ |
| 2837 | 2837 | </sequence> |
| 2838 | 2838 | </normal_column> |
| 2839 | 2839 | <normal_column> |
| 2840 | - <word_id>39</word_id> | |
| 2840 | + <word_id>37</word_id> | |
| 2841 | 2841 | <id>45</id> |
| 2842 | 2842 | <description></description> |
| 2843 | 2843 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -2925,7 +2925,7 @@ |
| 2925 | 2925 | <connections> |
| 2926 | 2926 | <relation> |
| 2927 | 2927 | <id>8</id> |
| 2928 | - <source>8</source> | |
| 2928 | + <source>7</source> | |
| 2929 | 2929 | <target>10</target> |
| 2930 | 2930 | <child_cardinality>1..n</child_cardinality> |
| 2931 | 2931 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2942,7 +2942,7 @@ |
| 2942 | 2942 | </relation> |
| 2943 | 2943 | <relation> |
| 2944 | 2944 | <id>9</id> |
| 2945 | - <source>7</source> | |
| 2945 | + <source>8</source> | |
| 2946 | 2946 | <target>10</target> |
| 2947 | 2947 | <child_cardinality>1..n</child_cardinality> |
| 2948 | 2948 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -2968,7 +2968,7 @@ |
| 2968 | 2968 | <normal_column> |
| 2969 | 2969 | <id>47</id> |
| 2970 | 2970 | <referenced_column>31</referenced_column> |
| 2971 | - <relation>8</relation> | |
| 2971 | + <relation>9</relation> | |
| 2972 | 2972 | <description></description> |
| 2973 | 2973 | <unique_key_name></unique_key_name> |
| 2974 | 2974 | <logical_name></logical_name> |
| ... | ... | @@ -3001,7 +3001,7 @@ |
| 3001 | 3001 | <normal_column> |
| 3002 | 3002 | <id>48</id> |
| 3003 | 3003 | <referenced_column>28</referenced_column> |
| 3004 | - <relation>9</relation> | |
| 3004 | + <relation>8</relation> | |
| 3005 | 3005 | <description></description> |
| 3006 | 3006 | <unique_key_name></unique_key_name> |
| 3007 | 3007 | <logical_name></logical_name> |
| ... | ... | @@ -3144,7 +3144,7 @@ |
| 3144 | 3144 | </sequence> |
| 3145 | 3145 | </normal_column> |
| 3146 | 3146 | <normal_column> |
| 3147 | - <word_id>38</word_id> | |
| 3147 | + <word_id>41</word_id> | |
| 3148 | 3148 | <id>51</id> |
| 3149 | 3149 | <description></description> |
| 3150 | 3150 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -3176,7 +3176,7 @@ |
| 3176 | 3176 | </sequence> |
| 3177 | 3177 | </normal_column> |
| 3178 | 3178 | <normal_column> |
| 3179 | - <word_id>17</word_id> | |
| 3179 | + <word_id>16</word_id> | |
| 3180 | 3180 | <id>52</id> |
| 3181 | 3181 | <description></description> |
| 3182 | 3182 | <unique_key_name></unique_key_name> |
| ... | ... | @@ -4157,23 +4157,23 @@ |
| 4157 | 4157 | </column_data> |
| 4158 | 4158 | <column_data> |
| 4159 | 4159 | <column_id>72</column_id> |
| 4160 | - <value>default</value> | |
| 4160 | + <value>i3geo_metaestat</value> | |
| 4161 | 4161 | </column_data> |
| 4162 | 4162 | <column_data> |
| 4163 | 4163 | <column_id>73</column_id> |
| 4164 | - <value></value> | |
| 4164 | + <value>localhost</value> | |
| 4165 | 4165 | </column_data> |
| 4166 | 4166 | <column_data> |
| 4167 | 4167 | <column_id>74</column_id> |
| 4168 | - <value></value> | |
| 4168 | + <value>5432</value> | |
| 4169 | 4169 | </column_data> |
| 4170 | 4170 | <column_data> |
| 4171 | 4171 | <column_id>75</column_id> |
| 4172 | - <value></value> | |
| 4172 | + <value>postgres</value> | |
| 4173 | 4173 | </column_data> |
| 4174 | 4174 | <column_data> |
| 4175 | 4175 | <column_id>76</column_id> |
| 4176 | - <value></value> | |
| 4176 | + <value>postgres</value> | |
| 4177 | 4177 | </column_data> |
| 4178 | 4178 | </data> |
| 4179 | 4179 | </direct_test_data> | ... | ... |
ferramentas/metaestat/dicionario1.js
| ... | ... | @@ -30,7 +30,7 @@ it:"" |
| 30 | 30 | }], |
| 31 | 31 | "5":[ |
| 32 | 32 | { |
| 33 | -pt:"Ou crie uma nova", | |
| 33 | +pt:"ou crie uma nova", | |
| 34 | 34 | en:"", |
| 35 | 35 | es:"", |
| 36 | 36 | it:"" |
| ... | ... | @@ -44,13 +44,27 @@ it:"" |
| 44 | 44 | }], |
| 45 | 45 | "7":[ |
| 46 | 46 | { |
| 47 | -pt:"", | |
| 47 | +pt:"Crie ou edite as classificações que podem ser utilizadas para representar os dados escolhidos. As classificações definem as cores para o mapa e os valores que cada classe abrange. Na próxima tela serão definidas as classes.", | |
| 48 | 48 | en:"", |
| 49 | 49 | es:"", |
| 50 | 50 | it:"" |
| 51 | 51 | }], |
| 52 | 52 | "8":[ |
| 53 | 53 | { |
| 54 | +pt:"Edite", | |
| 55 | +en:"", | |
| 56 | +es:"", | |
| 57 | +it:"" | |
| 58 | +}], | |
| 59 | +"9":[ | |
| 60 | +{ | |
| 61 | +pt:"", | |
| 62 | +en:"", | |
| 63 | +es:"", | |
| 64 | +it:"" | |
| 65 | +}], | |
| 66 | +"10":[ | |
| 67 | +{ | |
| 54 | 68 | pt:"", |
| 55 | 69 | en:"", |
| 56 | 70 | es:"", | ... | ... |
ferramentas/metaestat/index.js
| ... | ... | @@ -477,6 +477,12 @@ i3GEOF.metaestat = { |
| 477 | 477 | }; |
| 478 | 478 | i3GEOadmin.variaveis.editar("variavel",""); |
| 479 | 479 | }, |
| 480 | + editaVariavel: function(){ | |
| 481 | + //TODO | |
| 482 | + }, | |
| 483 | + criaClassificacao: function(){ | |
| 484 | +//TODO | |
| 485 | + }, | |
| 480 | 486 | criaMedidaVariavel: function(){ |
| 481 | 487 | i3GEOadmin.variaveis.aposGravar = function(){ |
| 482 | 488 | core_carregando("desativa"); |
| ... | ... | @@ -484,10 +490,27 @@ i3GEOF.metaestat = { |
| 484 | 490 | i3GEOF.metaestat.editor.removeEl("i3GEOF.metaestat.editor.t2"); |
| 485 | 491 | // Enome e o id do input onde o usuario escolheu o nome da nova variavel |
| 486 | 492 | i3GEOF.metaestat.editor.t2(true,$i("Enomemedida").value); |
| 493 | + //TODO adicionar os parametros de tempo que ja existem na tabela | |
| 487 | 494 | }; |
| 488 | 495 | i3GEOadmin.variaveis.editar("medidaVariavel",""); |
| 489 | 496 | //passa o codigo da variavel |
| 490 | 497 | $i("Ecodigo_variavel").value = $i("i3geoCartoComboVariavelEditor").value; |
| 498 | + //define os valores que sao padrao | |
| 499 | + //a conexao e com o default | |
| 500 | + $i("Ecodigo_estat_conexao").value = 0; | |
| 501 | + //o esquema e o public | |
| 502 | + $i("Eesquemadb").value = "public"; | |
| 503 | + //a tabela onde ficarao os dados | |
| 504 | + $i("Etabela").value = "indicadores_bairro"; | |
| 505 | + //coluna com os valores | |
| 506 | + $i("Ecolunavalor").value = "valor_num"; | |
| 507 | + //id que liga com o geo | |
| 508 | + $i("Ecolunaidgeo").value = "codigoregiao"; | |
| 509 | + //impede a alteracao do filtro | |
| 510 | + $i("Efiltro").disabled = "disabled"; | |
| 511 | + }, | |
| 512 | + editaMedidaVariavel:function(){ | |
| 513 | +//TODO | |
| 491 | 514 | }, |
| 492 | 515 | removeEl:function(id){ |
| 493 | 516 | var no = $i(id); |
| ... | ... | @@ -523,6 +546,7 @@ i3GEOF.metaestat = { |
| 523 | 546 | ); |
| 524 | 547 | }, |
| 525 | 548 | t1: function(remove,textoSelecionado){ |
| 549 | + //TODO botao para editar uma variavel ja existente | |
| 526 | 550 | if(remove == true){ |
| 527 | 551 | //remove o conteudo anteriormente construido |
| 528 | 552 | i3GEOF.metaestat.editor.removeEl("i3GEOF.metaestat.editor.t1"); |
| ... | ... | @@ -530,13 +554,19 @@ i3GEOF.metaestat = { |
| 530 | 554 | var temp = function(dados){ |
| 531 | 555 | var ins = "<p class='paragrafo' >" + $trad(1,i3GEOF.metaestat.dicionario) + "<br><br>" + |
| 532 | 556 | "<span>" + i3GEOF.metaestat.principal.comboVariaveis(dados,"i3geoCartoComboVariavelEditor","") + "</span>" + |
| 533 | - "<br><br><p><input id=i3GEOFmetaestatEditorBotao3 type='button' value='"+$trad(5,i3GEOF.metaestat.dicionario1)+"' /><br>"; | |
| 557 | + "<br><br><p><input id=i3GEOFmetaestatEditorBotao3 type='button' value='"+$trad(8,i3GEOF.metaestat.dicionario1)+"' />" + | |
| 558 | + " <input id=i3GEOFmetaestatEditorBotao3a type='button' value='"+$trad(5,i3GEOF.metaestat.dicionario1)+"' /><br>"; | |
| 534 | 559 | i3GEO.util.proximoAnterior("i3GEOF.metaestat.editor.t0()","i3GEOF.metaestat.editor.t2()",ins,"i3GEOF.metaestat.editor.t1","i3GEOFmetaestatEditor",true); |
| 535 | 560 | new YAHOO.widget.Button( |
| 536 | 561 | "i3GEOFmetaestatEditorBotao3", |
| 537 | 562 | {onclick:{fn: i3GEOF.metaestat.editor.criaVariavel}} |
| 538 | 563 | ); |
| 539 | 564 | $i("i3GEOFmetaestatEditorBotao3-button").style.width = (i3GEOF.metaestat.LARGURA / 2) + "px"; |
| 565 | + new YAHOO.widget.Button( | |
| 566 | + "i3GEOFmetaestatEditorBotao3a", | |
| 567 | + {onclick:{fn: i3GEOF.metaestat.editor.editaVariavel}} | |
| 568 | + ); | |
| 569 | + $i("i3GEOFmetaestatEditorBotao3a-button").style.width = (i3GEOF.metaestat.LARGURA / 2) + "px"; | |
| 540 | 570 | if(textoSelecionado){ |
| 541 | 571 | i3GEOF.metaestat.editor.selComboPorTexto("i3geoCartoComboVariavelEditor",textoSelecionado); |
| 542 | 572 | } |
| ... | ... | @@ -544,6 +574,7 @@ i3GEOF.metaestat = { |
| 544 | 574 | i3GEO.php.listaVariavel(temp); |
| 545 | 575 | }, |
| 546 | 576 | t2: function(remove,textoSelecionado){ |
| 577 | + //TODO botao para editar uma medida de variavel ja existente | |
| 547 | 578 | if(remove == true){ |
| 548 | 579 | //remove o conteudo anteriormente construido |
| 549 | 580 | i3GEOF.metaestat.editor.removeEl("i3GEOF.metaestat.editor.t2"); |
| ... | ... | @@ -556,17 +587,22 @@ i3GEOF.metaestat = { |
| 556 | 587 | var temp = function(dados){ |
| 557 | 588 | var ins = "<p class='paragrafo' >" + $trad(2,i3GEOF.metaestat.dicionario) + "<br><br>" + |
| 558 | 589 | "<span>" + i3GEOF.metaestat.principal.comboMedidasVariavel(dados,"i3geoCartoComboMedidaVariavelEditor","") + "</span>" + |
| 559 | - "<br><br><p><input id=i3GEOFmetaestatEditorBotao4 type='button' value='"+$trad(5,i3GEOF.metaestat.dicionario1)+"' /><br>"; | |
| 590 | + "<br><br><p><input id=i3GEOFmetaestatEditorBotao4 type='button' value='"+$trad(8,i3GEOF.metaestat.dicionario1)+"' />" + | |
| 591 | + "  <input id=i3GEOFmetaestatEditorBotao4a type='button' value='"+$trad(5,i3GEOF.metaestat.dicionario1)+"' /><br>"; | |
| 560 | 592 | i3GEO.util.proximoAnterior("i3GEOF.metaestat.editor.t1()","i3GEOF.metaestat.editor.t3()",ins,"i3GEOF.metaestat.editor.t2","i3GEOFmetaestatEditor",true); |
| 561 | 593 | new YAHOO.widget.Button( |
| 562 | - "i3GEOFmetaestatEditorBotao4", | |
| 594 | + "i3GEOFmetaestatEditorBotao4a", | |
| 595 | + {onclick:{fn: i3GEOF.metaestat.editor.editaMedidaVariavel}} | |
| 596 | + ); | |
| 597 | + $i("i3GEOFmetaestatEditorBotao4a-button").style.width = (i3GEOF.metaestat.LARGURA / 2) + "px"; | |
| 598 | + new YAHOO.widget.Button( | |
| 599 | + "i3GEOFmetaestatEditorBotao4a", | |
| 563 | 600 | {onclick:{fn: i3GEOF.metaestat.editor.criaMedidaVariavel}} |
| 564 | 601 | ); |
| 565 | - $i("i3GEOFmetaestatEditorBotao4-button").style.width = (i3GEOF.metaestat.LARGURA / 2) + "px"; | |
| 602 | + $i("i3GEOFmetaestatEditorBotao4a-button").style.width = (i3GEOF.metaestat.LARGURA / 2) + "px"; | |
| 566 | 603 | if(textoSelecionado){ |
| 567 | 604 | i3GEOF.metaestat.editor.selComboPorTexto("i3geoCartoComboMedidaVariavelEditor",textoSelecionado); |
| 568 | 605 | } |
| 569 | - | |
| 570 | 606 | }, |
| 571 | 607 | codigo_variavel = $i("i3geoCartoComboVariavelEditor").value; |
| 572 | 608 | if(codigo_variavel == ""){ |
| ... | ... | @@ -576,6 +612,31 @@ i3GEOF.metaestat = { |
| 576 | 612 | } |
| 577 | 613 | i3GEO.php.listaMedidaVariavel(codigo_variavel,temp); |
| 578 | 614 | } |
| 615 | + }, | |
| 616 | + t3: function(remove,textoSelecionado){ | |
| 617 | + //TODO escolha dos parametros de classificacao | |
| 618 | + if(remove == true){ | |
| 619 | + //remove o conteudo anteriormente construido | |
| 620 | + i3GEOF.metaestat.editor.removeEl("i3GEOF.metaestat.editor.t3"); | |
| 621 | + } | |
| 622 | + if($i("i3geoCartoComboMedidaVariavelEditor").value === ""){ | |
| 623 | + alert($trad(2,i3GEOF.metaestat.dicionario)); | |
| 624 | + i3GEOF.metaestat.editor.t2(false); | |
| 625 | + } | |
| 626 | + else{ | |
| 627 | + var temp = function(dados){ | |
| 628 | + var ins = "<p class='paragrafo' >" + $trad(7,i3GEOF.metaestat.dicionario1) + "<br><br>" + | |
| 629 | + "<span>" + i3GEOF.metaestat.principal.comboClassificacoesMedidaVariavel(dados,"i3geoCartoComboClassificacoesMedidaVariavelEditor","") + "</span>" + | |
| 630 | + "<br><br><p><input id=i3GEOFmetaestatEditorBotao5 type='button' value='"+$trad(5,i3GEOF.metaestat.dicionario1)+"' /><br>"; | |
| 631 | + i3GEO.util.proximoAnterior("i3GEOF.metaestat.editor.t2()","i3GEOF.metaestat.editor.t4()",ins,"i3GEOF.metaestat.editor.t3","i3GEOFmetaestatEditor",true); | |
| 632 | + new YAHOO.widget.Button( | |
| 633 | + "i3GEOFmetaestatEditorBotao5", | |
| 634 | + {onclick:{fn: i3GEOF.metaestat.editor.criaClassificacao}} | |
| 635 | + ); | |
| 636 | + $i("i3GEOFmetaestatEditorBotao5-button").style.width = (i3GEOF.metaestat.LARGURA / 2) + "px"; | |
| 637 | + }; | |
| 638 | + i3GEO.php.listaClassificacaoMedida($i("i3geoCartoComboMedidaVariavelEditor").value,temp); | |
| 639 | + } | |
| 579 | 640 | } |
| 580 | 641 | }, |
| 581 | 642 | parametros: { |
| ... | ... | @@ -868,6 +929,18 @@ i3GEOF.metaestat = { |
| 868 | 929 | }, |
| 869 | 930 | comboMedidaVariavelOnchange: function(combo){ |
| 870 | 931 | i3GEOF.metaestat.editor.removeEl("i3GEOF.metaestat.editor.t3"); |
| 932 | + }, | |
| 933 | + comboClassificacoesMedidaVariavel: function(dados,idcombo){ | |
| 934 | + var ins,i,n = dados.length; | |
| 935 | + ins = "<select id='"+idcombo+"' style='box-shadow:0 1px 5px gray;width:"+(i3GEOF.metaestat.LARGURA - 20)+"px' onchange='i3GEOF.metaestat.principal.comboClassificacoesMedidaVariavelOnchange()'><option value=''>---</option>"; | |
| 936 | + for(i=0;i<n;i++){ | |
| 937 | + ins += "<option title='"+dados[i].observacao+"' value='"+dados[i].id_classificacao+"'>"+dados[i].nome+"</option>"; | |
| 938 | + } | |
| 939 | + ins += "</select>"; | |
| 940 | + return ins; | |
| 941 | + }, | |
| 942 | + comboClassificacoesMedidaVariavelOnchange: function(){ | |
| 943 | + | |
| 871 | 944 | } |
| 872 | 945 | } |
| 873 | 946 | }; |
| 874 | 947 | \ No newline at end of file | ... | ... |