Commit 75eaefd7b3e5239eb875ff2b94e1ab2288b7b5d9
1 parent
87296ceb
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
33 additions
and
2 deletions
Show diff stats
ferramentas/buffer/index.js
... | ... | @@ -51,9 +51,40 @@ function t2() |
51 | 51 | } |
52 | 52 | function t3() |
53 | 53 | { |
54 | + ins = "Escolha os itens das tabelas de atributos dos temas de origem e de destino que ser&aatilde;o acrescentados ao novo tema que será criado com o resultado do cálculo." | |
55 | + var temaOrigem = $i("temasOrigem").value | |
56 | + var temaDestino = $i("temasDestino").value | |
57 | + ins += "<br><br>Para o tema de origem:" | |
58 | + comboitens("selItemOrigem",temaOrigem,function(retorno) | |
59 | + { | |
60 | + var comboDeOrigem = retorno.dados | |
61 | + if(retorno.tipo == "erro") | |
62 | + {ins += "<br><br><span style='color:red'>erro ao ler os itens do tema de origem</span><br><br>";} | |
63 | + else | |
64 | + { | |
65 | + ins += "<br><br>"+comboDeOrigem; | |
66 | + comboitens("selItemDestino",temaDestino,function(retorno) | |
67 | + { | |
68 | + ins += "<br><br>Para o tema de destino:" | |
69 | + var comboDeDestino = retorno.dados | |
70 | + if(retorno.tipo == "erro") | |
71 | + {ins += "<br><br><span style='color:red'>erro ao ler os itens do tema de destino</span><br><br>";} | |
72 | + else | |
73 | + { | |
74 | + ins += "<br><br>"+comboDeDestino; | |
75 | + mostraOpcao("t1()","t4()",ins,"t3") | |
76 | + } | |
77 | + } | |
78 | + ) | |
79 | + } | |
80 | + } | |
81 | + ) | |
82 | +} | |
83 | +function t4() | |
84 | +{ | |
54 | 85 | ins = "O tema com o entorno e as distâncias serão adicionados ao mapa atual." |
55 | 86 | ins += "<br><br><div onclick='calcula()' style='text-align:left;left:0px'><input id=botao1 size=18 class=executar type='buttom' value='Calcular' /></div>" |
56 | - mostraOpcao("t2()","",ins,"t3") | |
87 | + mostraOpcao("t3()","",ins,"t4") | |
57 | 88 | YAHOO.example.init = function () |
58 | 89 | { |
59 | 90 | function onPushButtonsMarkupReady() |
... | ... | @@ -78,7 +109,7 @@ function calcula() |
78 | 109 | else |
79 | 110 | {window.parent.ajaxredesenha("");} |
80 | 111 | } |
81 | - var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=distanciaptpt&temaorigem="+temaOrigem+"&temadestino="+temaDestino+"&distancia="+distancia | |
112 | + var p = g_locaplic+"/classesphp/mapa_controle.php?g_sid="+g_sid+"&funcao=distanciaptpt&temaorigem="+temaOrigem+"&temadestino="+temaDestino+"&distancia="+distancia+"&itemorigem="+$i("selItemOrigem").value+"&itemdestino="+$i("selItemDestino").value | |
82 | 113 | var cp = new cpaint(); |
83 | 114 | //cp.set_debug(2); |
84 | 115 | cp.set_response_type("JSON"); | ... | ... |