Commit cf2798467254a346d613de2128478de5b3f6f71c

Authored by Edmar Moretti
1 parent b30aba8a

Validação com JSLint

classesjs/classe_arvoredecamadas.js
... ... @@ -345,16 +345,16 @@ i3GEO.arvoreDeCamadas = {
345 345 init: function()
346 346 {
347 347 if($i("i3geo_lixeira") && i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true)
348   - {new YAHOO.util.DDTarget("i3geo_lixeira");}
  348 + {var ddtarget = new YAHOO.util.DDTarget("i3geo_lixeira");}
349 349 var lista = i3GEO.arvoreDeCamadas.CAMADAS;
350 350 var i = lista.length-1;
351 351 if (i >= 0){
352 352 do{
353 353 var ltema = lista[i];
354 354 if($i("arrastar_"+ltema.name))
355   - {new YAHOO.example.DDList("arrastar_"+ltema.name);}
  355 + {var ddlist = new YAHOO.example.DDList("arrastar_"+ltema.name);}
356 356 }
357   - while(i--)
  357 + while(i--);
358 358 }
359 359 }
360 360 };
... ... @@ -644,7 +644,7 @@ i3GEO.arvoreDeCamadas = {
644 644 var exp = colunas[3].replace(re,'"');
645 645 tabela += "<tr style='border-top:1px solid rgb(240,240,240);'><td><img src='"+colunas[4]+"' </td><td style='text-align:left'>"+colunas[2]+"</td></tr>";
646 646 }
647   - while(linha--)
  647 + while(linha--);
648 648 }
649 649 tabela += "</table><br>";
650 650 }
... ... @@ -670,7 +670,7 @@ i3GEO.arvoreDeCamadas = {
670 670 if (elementos[i].type == "checkbox"){inputs.push(elementos[i]);}
671 671 i++;
672 672 }
673   - while(i < nelementos)
  673 + while(i < nelementos);
674 674 }
675 675 if(original.data.desativar){
676 676 var desativar = original.data.desativar;
... ... @@ -681,7 +681,7 @@ i3GEO.arvoreDeCamadas = {
681 681 inputs[desativar[i]].checked = false;
682 682 i++;
683 683 }
684   - while(i < nindices)
  684 + while(i < nindices);
685 685 }
686 686 }
687 687 };
... ... @@ -805,7 +805,7 @@ i3GEO.arvoreDeCamadas = {
805 805 $i("farol"+ltema.name).src = g_locaplic+"/imagens/"+farol;
806 806 }
807 807 }
808   - while(l--)
  808 + while(l--);
809 809 }
810 810 //YAHOO.log("Farol OK", "i3geo");
811 811 },
... ... @@ -862,7 +862,7 @@ i3GEO.arvoreDeCamadas = {
862 862 i++;
863 863 } catch(e){i++;}
864 864 }
865   - while(i<n)
  865 + while(i<n);
866 866 var lista = [ligados,desligados,todos];
867 867 return (lista);
868 868 },
... ...
classesjs/classe_arvoredetemas.js
... ... @@ -281,22 +281,22 @@ i3GEO.arvoreDeTemas = {
281 281 var raiz = retorno.data.canais;
282 282 var nraiz = raiz.length;
283 283 var cor = "rgb(51, 102, 102)";
284   - for (i=0;i<nraiz; i++){
  284 + for (var i=0;i<nraiz; i++){
285 285 var html = "<span style='color:"+cor+"' title='"+raiz[i].description+"'> "+raiz[i].title;
286 286 if(raiz[i].nacessos > 0){
287 287 var quali = (raiz[i].nacessosok * 100) / (raiz[i].nacessos*1);
288 288 html += " ("+quali+"%)</span>";
289 289 }
290 290 else
291   - html += " (% de acessos não definido)</span>";
  291 + {html += " (% de acessos não definido)</span>";}
292 292 html += "<hr>";
293 293 var d = {html:html,id_ws:raiz[i].id_ws,url:raiz[i].link,nivel:0};
294 294 var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
295 295 tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS, 1);
296 296 tempNode.enableHighlight = false;
297 297 if(cor == "rgb(51, 102, 102)")
298   - {var cor = "rgb(47, 70, 50)";}
299   - else{var cor = "rgb(51, 102, 102)";}
  298 + {cor = "rgb(47, 70, 50)";}
  299 + else{cor = "rgb(51, 102, 102)";}
300 300 }
301 301 node.loadComplete();
302 302 };
... ... @@ -310,31 +310,34 @@ i3GEO.arvoreDeTemas = {
310 310 listaLayersWMS: function(node){
311 311 //node = no;
312 312 var monta = function(retorno){
313   - try{var n = retorno.data.length;}
  313 + var n = 0;
  314 + try{n = retorno.data.length;}
314 315 catch(m){node.loadComplete();return;}
315 316 var cor = "rgb(51, 102, 102)";
316   - for (i=0;i<n; i++){
  317 + var html = "";
  318 + var d = "";
  319 + for(var i=0;i<n; i++){
317 320 var cabeca = retorno.data[i].nome+" - "+retorno.data[i].titulo;
318 321 if (cabeca != "undefined - undefined"){
319   - var html = "<span style='color:"+cor+"' >"+cabeca;
320   - var d = {html:html,url:node.data.url,nivel:(node.data.nivel*1 + 1),id_ws:"",layer:retorno.data[i].nome};
  322 + html = "<span style='color:"+cor+"' >"+cabeca;
  323 + d = {html:html,url:node.data.url,nivel:(node.data.nivel*1 + 1),id_ws:"",layer:retorno.data[i].nome};
321 324 var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
322 325 tempNode.enableHighlight = false;
323 326 if(!retorno.data[i].estilos)
324   - tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS, 1);
  327 + {tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaLayersWMS, 1);}
325 328 if(retorno.data[i].estilos){
326 329 var ns = retorno.data[i].estilos.length;
327   - for (j=0;j<ns; j++){
328   - var html = i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,retorno.data[i].nome,retorno.data[i].estilos[j].nome,retorno.data[i].estilos[j].titulo,retorno.data[i].srs.toString(),retorno.data[i].formatsinfo.toString(),retorno.data[i].version.toString(),retorno.data[i].formats.toString(),cor);
329   - var d = {html:html};
  330 + for (var j=0;j<ns; j++){
  331 + html = i3GEO.arvoreDeTemas.montaTextoTemaWMS(node.data.url,retorno.data[i].nome,retorno.data[i].estilos[j].nome,retorno.data[i].estilos[j].titulo,retorno.data[i].srs.toString(),retorno.data[i].formatsinfo.toString(),retorno.data[i].version.toString(),retorno.data[i].formats.toString(),cor);
  332 + d = {html:html};
330 333 var tempNodeS = new YAHOO.widget.HTMLNode(d, tempNode, false,true);
331 334 tempNode.isleaf = true;
332 335 tempNodeS.enableHighlight = false;
333 336 }
334 337 }
335 338 if(cor == "rgb(51, 102, 102)")
336   - {var cor = "rgb(47, 70, 50)";}
337   - else{var cor = "rgb(51, 102, 102)";}
  339 + {cor = "rgb(47, 70, 50)";}
  340 + else{cor = "rgb(51, 102, 102)";}
338 341 }
339 342 }
340 343 node.loadComplete();
... ... @@ -390,8 +393,8 @@ i3GEO.arvoreDeTemas = {
390 393 */
391 394 listaMenus: function(g_sid,g_locaplic,funcao) {
392 395 var retorno = function(retorno) {
393   - if(i3GEO.arvoreDeTemas.IDSMENUS.length == 0)
394   - i3GEO.arvoreDeTemas.MENUS = retorno.data;
  396 + if(i3GEO.arvoreDeTemas.IDSMENUS.length === 0)
  397 + {i3GEO.arvoreDeTemas.MENUS = retorno.data;}
395 398 else{
396 399 i3GEO.arvoreDeTemas.MENUS = [];
397 400 var c = retorno.data.length;
... ... @@ -399,12 +402,12 @@ i3GEO.arvoreDeTemas = {
399 402 for (var i=0, j=c; i<j; i++){
400 403 for (var k=0, jj=m; k<jj; k++){
401 404 if(retorno.data[i].idmenu == i3GEO.arvoreDeTemas.IDSMENUS[k])
402   - i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i]);
  405 + {i3GEO.arvoreDeTemas.MENUS.push(retorno.data[i]);}
403 406 }
404 407 }
405 408 }
406   - if(funcao != "")
407   - eval(funcao+"(retorno)");
  409 + if(funcao !== "")
  410 + {eval(funcao+"(retorno)");}
408 411 };
409 412 i3GEO.php.pegalistademenus(retorno);
410 413 },
... ... @@ -428,12 +431,12 @@ i3GEO.arvoreDeTemas = {
428 431 listaGrupos: function(g_sid,g_locaplic,id_menu,funcao) {
429 432 var retorno = function(retorno) {
430 433 i3GEO.arvoreDeTemas.GRUPOS = retorno.data;
431   - if(funcao != "")
432   - funcao.call();
  434 + if(funcao !== "")
  435 + {funcao.call();}
433 436 };
434 437 var listasgrupos = "nao";
435 438 if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD || i3GEO.arvoreDeTemas.FILTRAOGC)
436   - var listasgrupos = "sim";
  439 + {listasgrupos = "sim";}
437 440 i3GEO.php.pegalistadegrupos(retorno,id_menu,listasgrupos);
438 441 },
439 442 /*
... ... @@ -458,10 +461,10 @@ i3GEO.arvoreDeTemas = {
458 461 listaSubGrupos: function(g_sid,g_locaplic,id_menu,id_grupo,funcao) {
459 462 var retorno = function(retorno) {
460 463 i3GEO.arvoreDeTemas.SUBGRUPOS = retorno.data;
461   - if(funcao != "")
462   - funcao.call();
  464 + if(funcao !== "")
  465 + {funcao.call();}
463 466 };
464   - i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo)
  467 + i3GEO.php.pegalistadeSubgrupos(retorno,id_menu,id_grupo);
465 468 },
466 469 /*
467 470 Function: listaTemas
... ... @@ -487,10 +490,10 @@ i3GEO.arvoreDeTemas = {
487 490 listaTemas: function(g_sid,g_locaplic,id_menu,id_grupo,id_subgrupo,funcao) {
488 491 var retorno = function(retorno) {
489 492 i3GEO.arvoreDeTemas.TEMAS = retorno.data;
490   - if(funcao != "")
491   - funcao.call();
  493 + if(funcao !== "")
  494 + {funcao.call();}
492 495 };
493   - i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo)
  496 + i3GEO.php.pegalistadetemas(retorno,id_menu,id_grupo,id_subgrupo);
494 497 },
495 498 /*
496 499 Function: listaSistemas
... ... @@ -510,8 +513,8 @@ i3GEO.arvoreDeTemas = {
510 513 listaSistemas: function(g_sid,g_locaplic,funcao) {
511 514 var retorno = function(retorno) {
512 515 i3GEO.arvoreDeTemas.SISTEMAS = retorno.data;
513   - if(funcao != "")
514   - funcao.call();
  516 + if(funcao !== "")
  517 + {funcao.call();}
515 518 };
516 519 i3GEO.php.pegaSistemas(retorno);
517 520 },
... ... @@ -533,8 +536,8 @@ i3GEO.arvoreDeTemas = {
533 536 listaDrives: function(g_sid,g_locaplic,funcao) {
534 537 var retorno = function(retorno) {
535 538 i3GEO.arvoreDeTemas.DRIVES = retorno.data[0];
536   - if(funcao != "")
537   - funcao.call();
  539 + if(funcao !== "")
  540 + {funcao.call();}
538 541 };
539 542 i3GEO.php.listadrives(retorno);
540 543 },
... ... @@ -562,7 +565,7 @@ i3GEO.arvoreDeTemas = {
562 565 */
563 566 cria: function(g_sid,g_locaplic,idhtml,funcaoTema,objOpcoes) {
564 567 if(this.ARVORE){return;}
565   - if(idhtml != "")
  568 + if(idhtml !== "")
566 569 {i3GEO.arvoreDeTemas.IDHTML = idhtml;}
567 570 var nargs = arguments.length;
568 571 if(nargs == 4 || nargs == 5){
... ... @@ -572,7 +575,7 @@ i3GEO.arvoreDeTemas = {
572 575 {i3GEO.arvoreDeTemas.OPCOESADICIONAIS = objOpcoes;}
573 576 i3GEO.arvoreDeTemas.LOCAPLIC = g_locaplic;
574 577 i3GEO.arvoreDeTemas.SID = g_sid;
575   - if(i3GEO.arvoreDeTemas.IDHTML == ""){return;}
  578 + if(i3GEO.arvoreDeTemas.IDHTML === ""){return;}
576 579 this.listaMenus(g_sid,g_locaplic,"i3GEO.arvoreDeTemas.montaArvore");
577 580 },
578 581 /*
... ... @@ -593,9 +596,9 @@ i3GEO.arvoreDeTemas = {
593 596 */
594 597 montaArvore: function() {
595 598 var currentIconMode;
596   - YAHOO.example.treeExample = new function(){
  599 + YAHOO.example.treeExample = function(){
597 600 function changeIconMode(){
598   - var newVal = parseInt(this.value);
  601 + var newVal = parseInt(this.value,10);
599 602 if (newVal != currentIconMode)
600 603 {currentIconMode = newVal;}
601 604 buildTree();
... ... @@ -609,49 +612,50 @@ i3GEO.arvoreDeTemas = {
609 612 }
610 613 buildTree();
611 614 }();
  615 + var d,tempNode,conteudo,retorno,nomeSis;
612 616 var root = i3GEO.arvoreDeTemas.ARVORE.getRoot();
613 617 //opção de busca de temas
614   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca == true){
  618 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluibusca === true){
615 619 var insp = "<br><br><table><tr>";
616 620 insp += "<td><span style='font-size:12px'>&nbsp;"+$trad("a1")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=31' >&nbsp;&nbsp;&nbsp;</a></span></td>";
617 621 insp += "<td><input onclick='javascript:this.select();' class='digitar' type='text' id='i3geo_buscatema' size='15' value='' /></td>";
618 622 insp += "<td><img class='tic' ";
619 623 if(navm){insp += "style='top:0px;'";}
620 624 else
621   - insp += "style='top:4px;'";
  625 + {insp += "style='top:4px;'";}
622 626 insp += " title='"+$trad("a1")+"' src='"+i3GEO.util.$im("branco.gif")+"' onclick='i3GEO.arvoreDeTemas.buscaTema(document.getElementById(\"i3geo_buscatema\").value)' style='cursor:pointer;top:2px;position:relative;' /></td>";
623 627 insp += "</tr></table>&nbsp;";
624   - var d = {html:insp};
625   - var tempNode = new YAHOO.widget.HTMLNode(d, root, false,false);
  628 + d = {html:insp};
  629 + tempNode = new YAHOO.widget.HTMLNode(d, root, false,false);
626 630 tempNode.enableHighlight = false;
627 631 }
628 632 //icones com as outras opções
629 633 //conforme definido em i3GEO.arvoreDeTemas.OPCOESADICIONAIS
630 634 var outrasOpcoes = i3GEO.arvoreDeTemas.outrasOpcoesHTML();
631   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde != "")
  635 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde !== "")
632 636 {document.getElementById(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde).innerHTML = outrasOpcoes;}
633   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore == true){
634   - var d = {html:outrasOpcoes+"&nbsp;<br>"};
635   - var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
  637 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore === true){
  638 + d = {html:outrasOpcoes+"&nbsp;<br>"};
  639 + tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
636 640 tempNode.enableHighlight = false;
637 641 tempNode.isLeaf = true;
638   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir == true){
639   - var retorno = function(){
640   - var conteudo = "&nbsp;"+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' >&nbsp;&nbsp;&nbsp;</a>";
641   - var d = {html:conteudo};
642   - var tempNode = new YAHOO.widget.HTMLNode(d,root, false,true);
  642 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir === true){
  643 + retorno = function(){
  644 + conteudo = "&nbsp;"+$trad("a6")+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=32' >&nbsp;&nbsp;&nbsp;</a>";
  645 + d = {html:conteudo};
  646 + tempNode = new YAHOO.widget.HTMLNode(d,root, false,true);
643 647 tempNode.enableHighlight = false;
644 648 var drives = i3GEO.arvoreDeTemas.DRIVES;
645 649 var iglt = drives.length;
646 650 var ig=0;
647 651 do{
648   - var d = {html:drives[ig].nome,caminho:drives[ig].caminho};
  652 + d = {html:drives[ig].nome,caminho:drives[ig].caminho};
649 653 var drive = new YAHOO.widget.HTMLNode(d, tempNode, false,true);
650 654 drive.enableHighlight = false;
651 655 drive.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir, 1);
652 656 ig++;
653 657 }
654   - while(ig<iglt)
  658 + while(ig<iglt);
655 659 };
656 660 i3GEO.arvoreDeTemas.listaDrives(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno);
657 661 }
... ... @@ -659,23 +663,23 @@ i3GEO.arvoreDeTemas = {
659 663 //
660 664 //opções para abrir o sistema de administração
661 665 //
662   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir == true){
663   - var conteudo = "<a href='../admin' target=blank >Sistema de administração</a>";
664   - var d = {html:conteudo,idmenu:""};
665   - var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
  666 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir === true){
  667 + conteudo = "<a href='../admin' target=blank >Sistema de administração</a>";
  668 + d = {html:conteudo,idmenu:""};
  669 + tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
666 670 tempNode.enableHighlight = false;
667   - var conteudo = "<a href='../admin/html/arvore.html' target=blank >Editor de menus</a>";
668   - var d = {html:conteudo,idmenu:""};
669   - var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
  671 + conteudo = "<a href='../admin/html/arvore.html' target=blank >Editor de menus</a>";
  672 + d = {html:conteudo,idmenu:""};
  673 + tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
670 674 tempNode.enableHighlight = false;
671 675 }
672 676 //
673 677 //wms
674 678 //
675   - if(i3GEO.arvoreDeTemas.INCLUIWMS == true){
676   - var conteudo = "<b>&nbsp;OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>";
677   - var d = {html:conteudo,idwms:"raiz"};
678   - var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
  679 + if(i3GEO.arvoreDeTemas.INCLUIWMS === true){
  680 + conteudo = "<b>&nbsp;OGC-WMS</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=33' >&nbsp;&nbsp;&nbsp;</a>";
  681 + d = {html:conteudo,idwms:"raiz"};
  682 + tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
679 683 tempNode.enableHighlight = false;
680 684 tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.listaWMS, 1);
681 685 }
... ... @@ -688,37 +692,37 @@ i3GEO.arvoreDeTemas = {
688 692 {
689 693 var desc = dados[i].desc;
690 694 if(!dados[i].nomemenu)
691   - dados[i].nomemenu = dados[i].idmenu;
  695 + {dados[i].nomemenu = dados[i].idmenu;}
692 696 if(!dados[i].publicado){dados[i].publicado = "sim";}
693 697 if(dados[i].publicado.toLowerCase() != "nao")
694   - var conteudo = "<b>&nbsp;<span title='"+desc+"'>"+dados[i].nomemenu+"</span>";
  698 + {conteudo = "<b>&nbsp;<span title='"+desc+"'>"+dados[i].nomemenu+"</span>";}
695 699 else
696   - var conteudo = "<b>&nbsp;<span title='nao publicado' style=color:red; >"+dados[i].nomemenu+"</span>";
697   - var d = {html:conteudo,idmenu:dados[i].idmenu};
698   - var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
  700 + {conteudo = "<b>&nbsp;<span title='nao publicado' style=color:red; >"+dados[i].nomemenu+"</span>";}
  701 + d = {html:conteudo,idmenu:dados[i].idmenu};
  702 + tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
699 703 tempNode.enableHighlight = false;
700 704 tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaGrupos, currentIconMode);
701 705 if(dados[i].status == "aberto")
702 706 {tempNode.expand();}
703 707 }
704 708 if(i3GEO.arvoreDeTemas.INCLUISISTEMAS){
705   - var retorno = function(){
  709 + retorno = function(){
706 710 try{
707 711 var sis = i3GEO.arvoreDeTemas.SISTEMAS;
708 712 var iglt = sis.length;
709   - var conteudo = "<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' >&nbsp;&nbsp;&nbsp;</a>";
710   - var d = {html:conteudo};
711   - var tempNode = new YAHOO.widget.HTMLNode(d,root, false,true);
  713 + conteudo = "<b>Sistemas</b>"+" <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=34' >&nbsp;&nbsp;&nbsp;</a>";
  714 + d = {html:conteudo};
  715 + tempNode = new YAHOO.widget.HTMLNode(d,root, false,true);
712 716 tempNode.enableHighlight = false;
713 717 }catch(e){i3GEO.arvoreDeTemas.ARVORE.draw();return;}
714 718 var ig=0;
715 719 do{
716   - var nomeSis = sis[ig].NOME;
  720 + nomeSis = sis[ig].NOME;
717 721 if(sis[ig].PUBLICADO){
718 722 if(sis[ig].PUBLICADO == "NAO" || sis[ig].PUBLICADO == "nao")
719   - {var nomeSis = "<s>"+sis[ig].NOME+"</s>";}
  723 + {nomeSis = "<s>"+sis[ig].NOME+"</s>";}
720 724 }
721   - var d = {html:nomeSis};
  725 + d = {html:nomeSis};
722 726 var sisNode = new YAHOO.widget.HTMLNode(d, tempNode, false,true);
723 727 sisNode.enableHighlight = false;
724 728 var funcoes = sis[ig].FUNCOES;
... ... @@ -729,21 +733,21 @@ i3GEO.arvoreDeTemas = {
729 733 var h = funcoes[ig2].H;
730 734 var abre = "i3GEO.janela.cria('"+w+"px','"+h+"px','"+executar+"','','','Sistemas')";
731 735 var nomeFunc = "<a href='#' onclick=\""+abre+"\">"+funcoes[ig2].NOME+"</a>";
732   - var d = {html:nomeFunc};
  736 + d = {html:nomeFunc};
733 737 var funcNode = new YAHOO.widget.HTMLNode(d, sisNode, false,true);
734 738 funcNode.enableHighlight = false;
735 739 funcNode.isLeaf = true;
736 740 }
737 741 ig++;
738 742 }
739   - while(ig<iglt)
  743 + while(ig<iglt);
740 744 i3GEO.arvoreDeTemas.ARVORE.draw();
741 745 };
742 746 i3GEO.arvoreDeTemas.listaSistemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,retorno);
743 747 }
744 748 document.getElementById(i3GEO.arvoreDeTemas.IDHTML).style.textAlign="left";
745 749 if(!i3GEO.arvoreDeTemas.INCLUISISTEMAS)
746   - i3GEO.arvoreDeTemas.ARVORE.draw();
  750 + {i3GEO.arvoreDeTemas.ARVORE.draw();}
747 751 },
748 752 /*
749 753 Function: montaGrupos
... ... @@ -753,31 +757,32 @@ i3GEO.arvoreDeTemas = {
753 757 A opção de carga dinâmica dos nós filhos é definida para a montagem dos sub-grupos.
754 758 */
755 759 montaGrupos: function(node){
  760 + var mostra,d,tempNode,i;
756 761 var temp=function(){
757 762 var grupos = i3GEO.arvoreDeTemas.GRUPOS.grupos;
758 763 var c = grupos.length - 3;
759 764 var raiz = grupos[c].temasraiz;
760 765 var nraiz = raiz.length;
761 766 for (i=0;i<nraiz; i++){
762   - var mostra = true;
  767 + mostra = true;
763 768 if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && raiz[i].download == "nao")
764   - {var mostra = false;}
  769 + {mostra = false;}
765 770 if(i3GEO.arvoreDeTemas.FILTRAOGC && raiz[i].ogc == "nao")
766   - {var mostra = false;}
  771 + {mostra = false;}
767 772 if(mostra){
768 773 var html = i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]);
769   - var d = {html:html};
770   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  774 + d = {html:html};
  775 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
771 776 tempNode.enableHighlight = false;
772 777 tempNode.isLeaf = true;
773 778 }
774 779 }
775 780 for (i=0;i<c; i++){
776   - var mostra = true;
  781 + mostra = true;
777 782 if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && grupos[i].download == "nao")
778   - {var mostra = false;}
  783 + {mostra = false;}
779 784 if(i3GEO.arvoreDeTemas.FILTRAOGC && grupos[i].ogc == "nao")
780   - {var mostra = false;}
  785 + {mostra = false;}
781 786 if(mostra){
782 787 //se id_n1 existir, significa que os grupos possuem id, pois são oriundos do sistema
783 788 //de administração
... ... @@ -788,10 +793,10 @@ i3GEO.arvoreDeTemas = {
788 793 grupos[i].nome = "<span title='nao publicado' style=color:red; >"+grupos[i].nome+"</span>";
789 794 }
790 795 }
791   - var d = {html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:i};
  796 + d = {html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:i};
792 797 if(grupos[i].id_n1)
793   - var d = {html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1};
794   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  798 + {d = {html:grupos[i].nome,idmenu:node.data.idmenu,idgrupo:grupos[i].id_n1};}
  799 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
795 800 tempNode.enableHighlight = false;
796 801 tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaSubGrupos, 1);
797 802 tempNode.isLeaf = false;
... ... @@ -809,33 +814,33 @@ i3GEO.arvoreDeTemas = {
809 814 A opção de carga dinâmica dos nós filhos é definida para a montagem dos temas.
810 815 */
811 816 montaSubGrupos: function(node){
  817 + var i,mostra,d,tempNode;
812 818 var temp=function(){
813 819 var subgrupos = i3GEO.arvoreDeTemas.SUBGRUPOS.subgrupo;
814 820 var c = subgrupos.length;
815 821 var raiz = i3GEO.arvoreDeTemas.SUBGRUPOS.temasgrupo;
816 822 var nraiz = raiz.length;
817   -
818 823 for (i=0;i<nraiz; i++){
819   - var mostra = true;
  824 + mostra = true;
820 825 if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && raiz[i].download == "nao")
821   - {var mostra = false;}
  826 + {mostra = false;}
822 827 if(i3GEO.arvoreDeTemas.FILTRAOGC && raiz[i].ogc == "nao")
823   - {var mostra = false;}
  828 + {mostra = false;}
824 829  
825 830 if(mostra){
826 831 var html = i3GEO.arvoreDeTemas.montaTextoTema("gray",raiz[i]);
827   - var d = {html:html};
828   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  832 + d = {html:html};
  833 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
829 834 tempNode.enableHighlight = false;
830 835 tempNode.isLeaf = true;
831 836 }
832 837 }
833 838 for (i=0;i<c; i++){
834   - var mostra = true;
  839 + mostra = true;
835 840 if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && subgrupos[i].download == "nao")
836   - {var mostra = false;}
  841 + {mostra = false;}
837 842 if(i3GEO.arvoreDeTemas.FILTRAOGC && subgrupos[i].ogc == "nao")
838   - {var mostra = false;}
  843 + {mostra = false;}
839 844  
840 845 if(mostra){
841 846 //se id_n2 existir, significa que os grupos possuem id, pois são oriundos do sistema
... ... @@ -847,10 +852,10 @@ i3GEO.arvoreDeTemas = {
847 852 subgrupos[i].nome = "<span title='nao publicado' style=color:red; >"+subgrupos[i].nome+"</span>";
848 853 }
849 854 }
850   - var d = {html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};
  855 + d = {html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:i};
851 856 if(subgrupos[i].id_n2)
852   - var d = {html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2};
853   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  857 + {d = {html:subgrupos[i].nome,idmenu:node.data.idmenu,idgrupo:node.data.idgrupo,idsubgrupo:subgrupos[i].id_n2};}
  858 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
854 859 tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaTemas, 1);
855 860 tempNode.isLeaf = false;
856 861 tempNode.enableHighlight = false;
... ... @@ -858,7 +863,7 @@ i3GEO.arvoreDeTemas = {
858 863 }
859 864 node.loadComplete();
860 865 };
861   - i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp)
  866 + i3GEO.arvoreDeTemas.listaSubGrupos(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,temp);
862 867 },
863 868 /*
864 869 Function: montaTemas
... ... @@ -866,24 +871,24 @@ i3GEO.arvoreDeTemas = {
866 871 Monta a lista de temas de um nó.
867 872 */
868 873 montaTemas: function(node){
  874 + var i,cor;
869 875 var temp=function(){
870 876 var temas = i3GEO.arvoreDeTemas.TEMAS.temas;
871 877 var c = temas.length;
872   - var cor = "rgb(51, 102, 102)";
  878 + cor = "rgb(51, 102, 102)";
873 879 for (i=0;i<c; i++){
874 880 var mostra = true;
875 881 if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && temas[i].download == "nao")
876   - {var mostra = false;}
  882 + {mostra = false;}
877 883 if(i3GEO.arvoreDeTemas.FILTRAOGC && temas[i].ogc == "nao")
878   - {var mostra = false;}
879   -
  884 + {mostra = false;}
880 885 if(mostra){
881 886 if(temas[i].publicado){
882 887 if(temas[i].publicado == "NAO"){
883 888 temas[i].nome = "<span title='nao publicado' style=color:red; >"+temas[i].nome+"</span>";
884 889 }
885 890 }
886   - htmli = i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]);
  891 + var htmli = i3GEO.arvoreDeTemas.montaTextoTema(cor,temas[i]);
887 892 var d = {nacessos:temas[i].nacessos,html:htmli,idtema:temas[i].tid,fonte:temas[i].link,ogc:temas[i].ogc,kmz:temas[i].kmz};
888 893 var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
889 894 //tempNode.nowrap = true;
... ... @@ -891,13 +896,13 @@ i3GEO.arvoreDeTemas = {
891 896 tempNode.isLeaf = false;
892 897 tempNode.enableHighlight = false;
893 898 if(cor == "rgb(51, 102, 102)")
894   - {var cor = "rgb(47, 70, 50)";}
895   - else{var cor = "rgb(51, 102, 102)";}
  899 + {cor = "rgb(47, 70, 50)";}
  900 + else{cor = "rgb(51, 102, 102)";}
896 901 }
897 902 }
898 903 node.loadComplete();
899 904 };
900   - i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp)
  905 + i3GEO.arvoreDeTemas.listaTemas(i3GEO.arvoreDeTemas.SID,i3GEO.arvoreDeTemas.LOCAPLIC,node.data.idmenu,node.data.idgrupo,node.data.idsubgrupo,temp);
901 906 },
902 907 /*
903 908 Function: montaDir
... ... @@ -909,13 +914,14 @@ i3GEO.arvoreDeTemas = {
909 914 node {node} - nó onde será criada a lista
910 915 */
911 916 montaDir: function(node){
  917 + var ig,d,conteudo;
912 918 var montaLista = function(retorno)
913 919 {
914 920 var dirs = retorno.data.diretorios;
915 921 for (ig=0;ig<dirs.length;ig++)
916 922 {
917   - var conteudo = dirs[ig];
918   - var d = {html:conteudo,caminho:node.data.caminho+"/"+conteudo};
  923 + conteudo = dirs[ig];
  924 + d = {html:conteudo,caminho:node.data.caminho+"/"+conteudo};
919 925 var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
920 926 tempNode.setDynamicLoad(i3GEO.arvoreDeTemas.montaDir, 1);
921 927 tempNode.enableHighlight = false;
... ... @@ -923,11 +929,11 @@ i3GEO.arvoreDeTemas = {
923 929 var arquivos = retorno.data.arquivos;
924 930 for (ig=0;ig<arquivos.length;ig++)
925 931 {
926   - var conteudo = arquivos[ig];
  932 + conteudo = arquivos[ig];
927 933 if(conteudo.search(".img") > 1 || conteudo.search(".tif") > 1 || conteudo.search(".TIF") > 1 || conteudo.search(".shp") > 1 || conteudo.search(".SHP") > 1)
928 934 {
929   - var conteudo = "<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";
930   - var d = {html:conteudo,caminho:node.data.caminho+"/"+conteudo};
  935 + conteudo = "<a href='#' title='"+$trad("g2")+"' onclick='i3GEO.util.adicionaSHP(\""+node.data.caminho+"/"+conteudo+"\")' >"+conteudo+"</a>";
  936 + d = {html:conteudo,caminho:node.data.caminho+"/"+conteudo};
931 937 var nodeSHP = new YAHOO.widget.HTMLNode(d, node, false,true);
932 938 nodeSHP.enableHighlight = false;
933 939 nodeSHP.isLeaf = true;
... ... @@ -954,10 +960,10 @@ i3GEO.arvoreDeTemas = {
954 960 */
955 961 montaTextoTema: function(cor,tema){
956 962 var html = "<td style='vertical-align:top;padding-top:5px;'><span ><input style='cursor:pointer;border:solid 0 white;' ";
957   - if(i3GEO.arvoreDeTemas.ATIVATEMA != "")
958   - html += "onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\"";
  963 + if(i3GEO.arvoreDeTemas.ATIVATEMA !== "")
  964 + {html += "onclick=\""+i3GEO.arvoreDeTemas.ATIVATEMA+"\"";}
959 965 else
960   - html += "onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'";
  966 + {html += "onclick='i3GEO.util.criaBotaoAplicar(\"i3GEO.arvoreDeTemas.adicionaTemas\",\""+$trad("p14")+"\",\"i3geoBotaoAplicar\",this)'";}
961 967 html += " type='checkbox' value='"+tema.tid+"' /></td><td style='padding-top:4px;vertical-align:top;text-align:left;color:"+cor+";padding-left:3px;' >";
962 968 html += tema.nome;
963 969 html += "</td></span>";
... ... @@ -974,58 +980,59 @@ i3GEO.arvoreDeTemas = {
974 980 */
975 981 propTemas: function(node){
976 982 var g_locaplic = i3GEO.arvoreDeTemas.LOCAPLIC;
977   - if(node.data.fonte != "" && node.data.fonte != " "){
978   - var html = "<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>";
979   - var d = {html:html};
980   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  983 + var d,tempNode,html;
  984 + if(node.data.fonte !== "" && node.data.fonte != " "){
  985 + html = "<a title='' href='"+node.data.fonte+"' target='_blank' >Fonte</a>";
  986 + d = {html:html};
  987 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
981 988 tempNode.enableHighlight = false;
982 989 tempNode.isLeaf = true;
983 990 }
984   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini == true){
  991 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.mini === true){
985 992 var lkmini = g_locaplic+"/testamapfile.php?map="+node.data.idtema+".map&tipo=mini";
986 993 var lkmini1 = g_locaplic+"/testamapfile.php?map="+node.data.idtema+".map&tipo=grande";
987   - var html = "<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>";
988   - var d = {html:html};
989   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  994 + html = "<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkmini+" />\")' href='"+lkmini1+"' target='blank' >Miniatura</a>";
  995 + d = {html:html};
  996 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
990 997 tempNode.enableHighlight = false;
991 998 tempNode.isLeaf = true;
992 999 }
993 1000 if (node.data.ogc != "nao"){
994   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml == true){
995   - var html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";
  1001 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.kml === true){
  1002 + html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kml\")' >Kml</a>";
996 1003 if (node.data.kmz == "sim")
997   - var html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>";
  1004 + {html = "<a href='#' title='' onclick='i3GEO.tema.dialogo.abreKml(\""+node.data.idtema+"\",\"kmz\")' >Kml</a>";}
998 1005  
999   - var d = {html:html};
1000   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  1006 + d = {html:html};
  1007 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
1001 1008 tempNode.enableHighlight = false;
1002 1009 tempNode.isLeaf = true;
1003 1010 }
1004 1011 var ogc = g_locaplic+"/ogc.php?tema="+node.data.idtema+"&service=wms&request=getcapabilities";
1005   - var html = "<a title='' href='"+ogc+"' target='blank' >WMS - OGC</a>";
1006   - var d = {html:html};
1007   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  1012 + html = "<a title='' href='"+ogc+"' target='blank' >WMS - OGC</a>";
  1013 + d = {html:html};
  1014 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
1008 1015 tempNode.enableHighlight = false;
1009 1016 tempNode.isLeaf = true;
1010 1017 }
1011   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode == true){
  1018 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.qrcode === true){
1012 1019 var lkgrcode = g_locaplic+"/pacotes/qrcode/php/qr_html.php?d="+g_locaplic+"/mobile/index.php?temasa="+node.data.idtema;
1013 1020 var lkgrcode1 = g_locaplic+"/pacotes/qrcode/php/qr_img.php?d="+g_locaplic+"/mobile/index.php?temasa="+node.data.idtema;
1014   - var html = "<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>";
1015   - var d = {html:html};
1016   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  1021 + html = "<a title='' onmouseover='i3GEO.ajuda.mostraJanela(\"<img src="+lkgrcode1+" />\")' href='"+lkgrcode+"' target='blank' >Qrcode</a>";
  1022 + d = {html:html};
  1023 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
1017 1024 tempNode.enableHighlight = false;
1018 1025 tempNode.isLeaf = true;
1019 1026 }
1020   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas == true){
1021   - var n = parseInt(node.data.nacessos / (i3GEO.arvoreDeTemas.FATORESTRELA*1));
1022   - if(n >= 5){var n = 5;}
  1027 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.estrelas === true){
  1028 + var n = parseInt(node.data.nacessos / (i3GEO.arvoreDeTemas.FATORESTRELA*1),10);
  1029 + if(n >= 5){n = 5;}
1023 1030 if(n > 0)
1024   - var html = "<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>";
  1031 + {html = "<img src='"+i3GEO.util.$im("e"+n+".png")+"'/>";}
1025 1032 else
1026   - var html = "<img src='"+i3GEO.util.$im("e0.png")+"'/>";
1027   - var d = {html:html};
1028   - var tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
  1033 + {html = "<img src='"+i3GEO.util.$im("e0.png")+"'/>";}
  1034 + d = {html:html};
  1035 + tempNode = new YAHOO.widget.HTMLNode(d, node, false,true);
1029 1036 tempNode.enableHighlight = false;
1030 1037 tempNode.isLeaf = true;
1031 1038 }
... ... @@ -1043,40 +1050,39 @@ i3GEO.arvoreDeTemas = {
1043 1050 outrasOpcoesHTML: function(){
1044 1051 var ins = "";
1045 1052 var t = 0;
1046   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.refresh == true){
  1053 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.refresh === true){
1047 1054 ins += "<td><img class='refresh' onclick='i3GEO.arvoreDeTemas.atualiza()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='Refresh'/><td>";
1048 1055 t += 20;
1049 1056 }
1050   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf == true){
  1057 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploaddbf === true){
1051 1058 ins += "<td><img class='uploaddbf' onclick='i3GEO.arvoreDeTemas.dialogo.uploaddbf()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a2b")+"'/><td>";
1052 1059 t += 20;
1053 1060 }
1054   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal == true){
  1061 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.uploadlocal === true){
1055 1062 ins += "<td><img class='upload' onclick='i3GEO.arvoreDeTemas.dialogo.upload()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a2")+"'/><td>";
1056 1063 t += 20;
1057 1064 }
1058   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase == true){
  1065 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.downloadbase === true){
1059 1066 ins += "<td><img onclick='i3GEO.arvoreDeTemas.dialogo.downloadbase()' class='download' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a3")+"'/><td>";
1060 1067 t += 20;
1061 1068 }
1062   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms == true){
  1069 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwms === true){
1063 1070 ins += "<td><img class='conectarwms' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwms()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a4")+"'/><td>";
1064 1071 t += 20;
1065 1072 }
1066   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwmst == true){
  1073 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectarwmst === true){
1067 1074 ins += "<td><img class='conectarwmst' onclick='i3GEO.arvoreDeTemas.dialogo.conectarwmst()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a4b")+"'/><td>";
1068 1075 t += 20;
1069 1076 }
1070   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss == true){
  1077 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.conectargeorss === true){
1071 1078 ins += "<td><img class='conectargeorss' onclick='i3GEO.arvoreDeTemas.dialogo.conectargeorss()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a5")+"'/><td>";
1072 1079 t += 20;
1073 1080 }
1074   - if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags == true){
  1081 + if(i3GEO.arvoreDeTemas.OPCOESADICIONAIS.nuvemTags === true){
1075 1082 ins += "<td><img class='nuvemtags' onclick='i3GEO.arvoreDeTemas.dialogo.nuvemTags()' src='"+i3GEO.util.$im("branco.gif")+"' style='cursor:pointer;text-align:left' title='"+$trad("a5a")+"'/><td>";
1076 1083 t += 20;
1077 1084 }
1078   - var ins = "<table width='"+t+"px' ><tr>"+ins+"</tr></table>";
1079   - return(ins);
  1085 + return("<table width='"+t+"px' ><tr>"+ins+"</tr></table>");
1080 1086 },
1081 1087 /*
1082 1088 Function: desativaCheckbox
... ... @@ -1092,7 +1098,7 @@ i3GEO.arvoreDeTemas = {
1092 1098 inputs[i].checked = false;
1093 1099 i++;
1094 1100 }
1095   - while(i<n)
  1101 + while(i<n);
1096 1102 },
1097 1103 /*
1098 1104 Function: listaTemasAtivos
... ... @@ -1109,11 +1115,11 @@ i3GEO.arvoreDeTemas = {
1109 1115 var i=0;
1110 1116 var lista = [];
1111 1117 do{
1112   - if(inputs[i].checked == true)
  1118 + if(inputs[i].checked === true)
1113 1119 {lista.push(inputs[i].value);}
1114 1120 i++;
1115 1121 }
1116   - while(i<n)
  1122 + while(i<n);
1117 1123 return (lista);
1118 1124 },
1119 1125 /*
... ... @@ -1127,14 +1133,15 @@ i3GEO.arvoreDeTemas = {
1127 1133 */
1128 1134 buscaTema: function(palavra){
1129 1135 var procurar = i3GEO.util.removeAcentos(palavra);
  1136 + var mostra,tempNode,d;
1130 1137 var resultadoProcurar = function(retorno)
1131 1138 {
1132 1139 if(!retorno.data)
1133 1140 {alert("Ocorreu um erro");}
1134 1141 else{
1135   - var retorno = retorno.data;
  1142 + retorno = retorno.data;
1136 1143 var conta = 0;
1137   - if ((retorno != "erro") && (retorno != undefined)){
  1144 + if ((retorno != "erro") && (retorno !== undefined)){
1138 1145 var ig = retorno.length-1;
1139 1146 if(ig >= 0){
1140 1147 do{
... ... @@ -1145,19 +1152,19 @@ i3GEO.arvoreDeTemas = {
1145 1152 var ngTema = ngSgrupo[sg].temas;
1146 1153 var tempng = ngTema.length;
1147 1154 for (var st=0;st<tempng;st++){
1148   - var mostra = true;
  1155 + mostra = true;
1149 1156 if(i3GEO.arvoreDeTemas.FILTRADOWNLOAD && ngTema[st].download == "nao")
1150   - {var mostra = false;}
  1157 + {mostra = false;}
1151 1158 if(i3GEO.arvoreDeTemas.FILTRAOGC && ngTema[st].ogc == "nao")
1152   - {var mostra = false;}
  1159 + {mostra = false;}
1153 1160  
1154 1161 if(mostra){
1155   - var d = i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);
  1162 + d = i3GEO.arvoreDeTemas.montaTextoTema("gray",ngTema[st]);
1156 1163 var lk = "";
1157 1164 if ( ngTema[st].link != " ")
1158   - {var lk = "<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>";}
  1165 + {lk = "<a href='"+ngTema[st].link+"' target='blank'>&nbsp;fonte</a>";}
1159 1166 d += "<td style='text-allign:left'> ("+nomeSgrupo+") "+lk+"</td>";
1160   - var tempNode = new YAHOO.widget.HTMLNode(d, nodePalavra, false,true);
  1167 + tempNode = new YAHOO.widget.HTMLNode(d, nodePalavra, false,true);
1161 1168 tempNode.isLeaf = true;
1162 1169 tempNode.enableHighlight = false;
1163 1170 }
... ... @@ -1165,11 +1172,11 @@ i3GEO.arvoreDeTemas = {
1165 1172 }
1166 1173 }
1167 1174 }
1168   - while(ig--)
  1175 + while(ig--);
1169 1176 }
1170 1177 else{
1171   - var d = "<span style='color:red'>Nada encontrado<br><br></span>";
1172   - var tempNode = new YAHOO.widget.HTMLNode(d, nodePalavra, false,true);
  1178 + d = "<span style='color:red'>Nada encontrado<br><br></span>";
  1179 + tempNode = new YAHOO.widget.HTMLNode(d, nodePalavra, false,true);
1173 1180 tempNode.isLeaf = true;
1174 1181 tempNode.enableHighlight = false;
1175 1182 }
... ... @@ -1189,13 +1196,13 @@ i3GEO.arvoreDeTemas = {
1189 1196 i3GEO.arvoreDeTemas.ARVORE.collapseAll();
1190 1197 var root = i3GEO.arvoreDeTemas.ARVORE.getRoot();
1191 1198 if(!i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados")){
1192   - var d = {html:"Temas encontrados",id:"temasEncontrados"};
1193   - var tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
  1199 + d = {html:"Temas encontrados",id:"temasEncontrados"};
  1200 + tempNode = new YAHOO.widget.HTMLNode(d, root, false,true);
1194 1201 tempNode.enableHighlight = false;
1195 1202 }
1196 1203 else
1197   - {var tempNode = i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados");}
1198   - var d = {html:palavra};
  1204 + {tempNode = i3GEO.arvoreDeTemas.ARVORE.getNodeByProperty("id","temasEncontrados");}
  1205 + d = {html:palavra};
1199 1206 nodePalavra = new YAHOO.widget.HTMLNode(d, tempNode, false,true);
1200 1207 nodePalavra.enableHighlight = false;
1201 1208 i3GEO.arvoreDeTemas.ARVORE.draw();
... ... @@ -1235,7 +1242,7 @@ i3GEO.arvoreDeTemas = {
1235 1242 //
1236 1243 //verifica se deve ser ativada uma outra guia que não a atual
1237 1244 //
1238   - if(i3GEO.arvoreDeTemas.RETORNAGUIA != ""){
  1245 + if(i3GEO.arvoreDeTemas.RETORNAGUIA !== ""){
1239 1246 if(i3GEO.arvoreDeTemas.RETORNAGUIA != i3GEO.guias.ATUAL){
1240 1247 i3GEO.guias.mostra(i3GEO.arvoreDeTemas.RETORNAGUIA);
1241 1248 }
... ... @@ -1278,12 +1285,12 @@ i3GEO.arvoreDeTemas = {
1278 1285 comboMenus: function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura){
1279 1286 i3GEO.configura.locaplic = locaplic;
1280 1287 var combo = function (retorno){
1281   - ob = retorno.data;
  1288 + var ob = retorno.data;
1282 1289 var ins = "<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um menu:</option>";
1283   - for (ig=0;ig<ob.length; ig++){
  1290 + for (var ig=0;ig<ob.length; ig++){
1284 1291 if(ob[ig].publicado != "nao" && ob[ig].publicado != "NAO"){
1285 1292 if(ob[ig].nomemenu)
1286   - ins += "<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>";
  1293 + {ins += "<option value="+ob[ig].idmenu+" >"+ob[ig].nomemenu+"</option>";}
1287 1294 }
1288 1295 }
1289 1296 $i(idDestino).innerHTML = ins+"</select>";
... ... @@ -1316,11 +1323,11 @@ i3GEO.arvoreDeTemas = {
1316 1323 comboGruposMenu: function(locaplic,funcaoOnchange,idDestino,idCombo,largura,altura,id_menu){
1317 1324 i3GEO.configura.locaplic = locaplic;
1318 1325 var combo = function (retorno){
1319   - obGrupos = retorno.data;
  1326 + var obGrupos = retorno.data;
1320 1327 var ins = "<select id='"+idCombo+"' SIZE="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"(this.value)' ><option value='' >Escolha um grupo:</option>";
1321 1328 for (ig=0;ig<obGrupos.grupos.length; ig++){
1322 1329 if(obGrupos.grupos[ig].nome)
1323   - ins += "<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>";
  1330 + {ins += "<option value="+obGrupos.grupos[ig].id_n1+" >"+obGrupos.grupos[ig].nome+"</option>";}
1324 1331 }
1325 1332 $i(idDestino).innerHTML = ins+"</select>";
1326 1333 };
... ... @@ -1350,7 +1357,7 @@ i3GEO.arvoreDeTemas = {
1350 1357 altura {Numeric} - altura do combo em linhas
1351 1358 */
1352 1359 comboSubGruposMenu: function(locaplic,funcaoOnchange,idDestino,idCombo,idGrupo,largura,altura){
1353   - if(idGrupo != ""){
  1360 + if(idGrupo !== ""){
1354 1361 var combo = function(retorno){
1355 1362 var ins = "<select id='"+idCombo+"' size="+altura+" style=width:"+largura+"px onchange='"+funcaoOnchange+"("+idGrupo+",this.value)' ><option value='' >Escolha um sub-grupo:</option>";
1356 1363 if (retorno.data.subgrupo){
... ... @@ -1443,8 +1450,8 @@ i3GEO.arvoreDeTemas = {
1443 1450 conectarwmst: function(){
1444 1451 var l = 400;
1445 1452 var a = 350;
1446   - if(i3GEO.parametros.w){var l = i3GEO.parametros.w + 150;}
1447   - if(i3GEO.parametros.h){var a = i3GEO.parametros.h + 200;}
  1453 + if(i3GEO.parametros.w){l = i3GEO.parametros.w + 150;}
  1454 + if(i3GEO.parametros.h){a = i3GEO.parametros.h + 200;}
1448 1455 i3GEO.janela.cria(l/2 + "px",a/2 + "px",i3GEO.configura.locaplic+"/ferramentas/wmstime/index.htm","","","Conexão WMS-T <a class=ajuda_usuario target=_blank href='"+i3GEO.configura.locaplic+"/ajuda_usuario.php?idcategoria=4&idajuda=76' >&nbsp;&nbsp;&nbsp;</a>");
1449 1456 },
1450 1457 /*
... ...