Commit d2497def1b4e859290cbae050b7c0f52c32c399a

Authored by Edmar Moretti
1 parent a1c376ff

Inclusão de função para manipulação de guias em janelas flutuantes (guias das ferramentas)

Showing 1 changed file with 30 additions and 3 deletions   Show diff stats
classesjs/classe_guias.js
@@ -33,9 +33,11 @@ if(typeof(i3GEO) == 'undefined'){ @@ -33,9 +33,11 @@ if(typeof(i3GEO) == 'undefined'){
33 /* 33 /*
34 Classe: i3GEO.guias 34 Classe: i3GEO.guias
35 35
36 -Cria e controla as guias de opções 36 +Cria e controla as guias de opções mostradas no mapa principal e as guias das ferramentas
37 37
38 -Para configurar as guias utilize i3GEO.guias.configura = ... 38 +Para configurar as guias do mapa principal utilize i3GEO.guias.configura = ...
  39 +
  40 +As guias das ferramentas são configuradas nos scripts específicos de cada ferramenta
39 */ 41 */
40 i3GEO.guias = { 42 i3GEO.guias = {
41 /* 43 /*
@@ -279,7 +281,6 @@ i3GEO.guias = { @@ -279,7 +281,6 @@ i3GEO.guias = {
279 } 281 }
280 } 282 }
281 }, 283 },
282 -  
283 /* 284 /*
284 Function: mostra 285 Function: mostra
285 286
@@ -435,7 +436,33 @@ i3GEO.guias = { @@ -435,7 +436,33 @@ i3GEO.guias = {
435 YAHOO.janelaguias.xp.panel.render(); 436 YAHOO.janelaguias.xp.panel.render();
436 YAHOO.janelaguias.xp.panel.show(); 437 YAHOO.janelaguias.xp.panel.show();
437 } 438 }
  439 + },
  440 + /*
  441 + Function: mostraGuiaFerramenta
  442 +
  443 + Mostra uma determinada guia em uma janela do tipo ferramenta.
  444 +
  445 + As guias são construídas pelo construtor da ferramenta
  446 +
  447 + Parametros:
438 448
  449 + guia {String} - O elemento html cujo id for igual a guia+"obj" terá seu estilo (display) definido como block, tornando-o visível
  450 +
  451 + namespace {String} - Todas elementos html que tiverem como id o namespace, seguindo por um número e "obj", terão seu estilo alterado para none, tornando-se invisíveis
  452 +
  453 + */
  454 + mostraGuiaFerramenta: function(guia,namespace){
  455 + if(arguments.length == 1)
  456 + {var namespace = "guia";}
  457 + for(g=0;g<12;g++)
  458 + {
  459 + if ($i(namespace+g+"obj")){
  460 + $i(namespace+g+"obj").style.display="none";
  461 + }
  462 + }
  463 + if ($i(guia+"obj")){
  464 + $i(guia+"obj").style.display="block";
  465 + }
439 } 466 }
440 }; 467 };
441 //YAHOO.log("carregou classe guias", "Classes i3geo"); 468 //YAHOO.log("carregou classe guias", "Classes i3geo");
442 \ No newline at end of file 469 \ No newline at end of file