Commit f9781e6323450c9e21095d9613f9d9694d741842

Authored by Edmar Moretti
1 parent ebfc38d9

Formatação dos textos mostrados nas ferramentas de cálculo de área e distância

ferramentas/area/dependencias.php
@@ -16,6 +16,7 @@ if(extension_loaded('zlib')){ @@ -16,6 +16,7 @@ if(extension_loaded('zlib')){
16 header("Content-type: text/javascript"); 16 header("Content-type: text/javascript");
17 include("index.js"); 17 include("index.js");
18 include("dicionario.js"); 18 include("dicionario.js");
  19 +include("../../pacotes/formatnumber.js");
19 echo "\n"; 20 echo "\n";
20 21
21 if(extension_loaded('zlib')){ 22 if(extension_loaded('zlib')){
ferramentas/area/index.js
@@ -351,21 +351,21 @@ i3GEOF.area = @@ -351,21 +351,21 @@ i3GEOF.area =
351 texto = 351 texto =
352 "total <br>" + $trad("d21at") 352 "total <br>" + $trad("d21at")
353 + " km2: " 353 + " km2: "
354 - + (area / 1000000).toFixed(3) 354 + + format("#.###,000", (area / 1000000).toFixed(3))
355 + "<br>" 355 + "<br>"
356 + $trad("d21at") 356 + $trad("d21at")
357 + " ha: " 357 + " ha: "
358 - + (area / 10000).toFixed(2) 358 + + format("#.###,00",(area / 10000).toFixed(2))
359 + "<br>" 359 + "<br>"
360 + $trad("x98") 360 + $trad("x98")
361 + " km: " 361 + " km: "
362 - + (per).toFixed(2) 362 + + format("#.###,00",(per).toFixed(2))
363 + "<br>" 363 + "<br>"
364 + $trad("x25") 364 + $trad("x25")
365 + ": " 365 + ": "
366 + i3GEO.calculo.metododistancia; 366 + i3GEO.calculo.metododistancia;
367 mostra.innerHTML = texto + "<hr>"; 367 mostra.innerHTML = texto + "<hr>";
368 - i3GEOF.area.ultimaMedida = (area / 1000000).toFixed(3) + " km2"; 368 + i3GEOF.area.ultimaMedida = format("#.###,000",(area / 1000000).toFixed(3)) + " km2";
369 } 369 }
370 }, 370 },
371 /** 371 /**
@@ -377,19 +377,19 @@ i3GEOF.area = @@ -377,19 +377,19 @@ i3GEOF.area =
377 texto = 377 texto =
378 "parcial <br>" + $trad("d21at") 378 "parcial <br>" + $trad("d21at")
379 + " km2:" 379 + " km2:"
380 - + (area / 1000000).toFixed(3) 380 + + format("#.###,000",(area / 1000000).toFixed(3))
381 + "<br>" 381 + "<br>"
382 + $trad("d21at") 382 + $trad("d21at")
383 + " ha: " 383 + " ha: "
384 - + (area / 10000).toFixed(2) 384 + + format("#.###,00",(area / 10000).toFixed(2))
385 + "<br>" 385 + "<br>"
386 + $trad("x95") 386 + $trad("x95")
387 + " km: " 387 + " km: "
388 - + trecho.toFixed(3) 388 + + format("#.###,000",trecho.toFixed(3))
389 + "<br>" 389 + "<br>"
390 + $trad("x98") 390 + $trad("x98")
391 + " km: " 391 + " km: "
392 - + (per).toFixed(3) 392 + + format("#.###,000",(per).toFixed(3))
393 + "<br>" 393 + "<br>"
394 + $trad("x23") 394 + $trad("x23")
395 + " (DMS):" 395 + " (DMS):"
ferramentas/distancia/dependencias.php
@@ -16,6 +16,7 @@ if(extension_loaded(&#39;zlib&#39;)){ @@ -16,6 +16,7 @@ if(extension_loaded(&#39;zlib&#39;)){
16 header("Content-type: text/javascript"); 16 header("Content-type: text/javascript");
17 include("index.js"); 17 include("index.js");
18 include("dicionario.js"); 18 include("dicionario.js");
  19 +include("../../pacotes/formatnumber.js");
19 echo "\n"; 20 echo "\n";
20 21
21 if(extension_loaded('zlib')){ 22 if(extension_loaded('zlib')){
ferramentas/distancia/index.js
@@ -404,11 +404,11 @@ i3GEOF.distancia = @@ -404,11 +404,11 @@ i3GEOF.distancia =
404 texto = 404 texto =
405 "total <br>" + $trad("x96") 405 "total <br>" + $trad("x96")
406 + " km: " 406 + " km: "
407 - + total.toFixed(3) 407 + + format("#.###,000",total.toFixed(3))
408 + "<br>" 408 + "<br>"
409 + $trad("x96") 409 + $trad("x96")
410 + " m: " 410 + " m: "
411 - + (total * 1000).toFixed(2) 411 + + format("#.###,00",(total * 1000).toFixed(2))
412 + "<br>" 412 + "<br>"
413 + $trad("x25") 413 + $trad("x25")
414 + ": " 414 + ": "
@@ -425,11 +425,11 @@ i3GEOF.distancia = @@ -425,11 +425,11 @@ i3GEOF.distancia =
425 texto = 425 texto =
426 "parcial <br>" + $trad("x95") 426 "parcial <br>" + $trad("x95")
427 + " km: " 427 + " km: "
428 - + trecho.toFixed(3) 428 + + format("#.###,000",trecho.toFixed(3))
429 + "<br>" 429 + "<br>"
430 + $trad("x97") 430 + $trad("x97")
431 + " km: " 431 + " km: "
432 - + (parcial + trecho).toFixed(3) 432 + + format("#.###,000",(parcial + trecho).toFixed(3))
433 + "<br>" 433 + "<br>"
434 + $trad("x23") 434 + $trad("x23")
435 + " (DMS): " 435 + " (DMS): "