Commit 9c7699403441208106b80469961644335798357e

Authored by Edmar Moretti
1 parent 19457041

Adicionada função de stoppropagation na barra de botões e árvore de camadas

classesjs/classe_arvoredecamadas.js
... ... @@ -525,6 +525,7 @@ i3GEO.arvoreDeCamadas = {
525 525 }
526 526 }
527 527 }
  528 + YAHOO.util.Event.addListener($i("arrastar_"+ltema), "click", i3GEO.util.stopProp);
528 529 }
529 530 }
530 531 catch(e){
... ... @@ -561,6 +562,7 @@ i3GEO.arvoreDeCamadas = {
561 562 else
562 563 {temaNode = new YAHOO.widget.HTMLNode(d, tempNode);}
563 564 temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes, 1);
  565 + YAHOO.util.Event.addListener($i("arrastar_"+ltema), "click", i3GEO.util.stopProp);
564 566 incluidos.push(ltema.name);
565 567 }
566 568 }
... ... @@ -580,6 +582,7 @@ i3GEO.arvoreDeCamadas = {
580 582 if (n === false){
581 583 temaNode = new YAHOO.widget.HTMLNode({enableHighlight:false,expanded:false,html:i3GEO.arvoreDeCamadas.montaTextoTema(ltema),id:ltema.name,tipo:"tema"}, grupoNode, i3GEO.arvoreDeCamadas.EXPANDIDA,true);
582 584 temaNode.setDynamicLoad(i3GEO.arvoreDeCamadas.montaOpcoes, 1);
  585 + YAHOO.util.Event.addListener($i("arrastar_"+ltema), "click", i3GEO.util.stopProp);
583 586 }
584 587 }
585 588 }
... ...
classesjs/classe_barradebotoes.js
... ... @@ -488,6 +488,8 @@ i3GEO.barraDeBotoes = {
488 488 if(l[b].constroiconteudo)
489 489 {eval(l[b].constroiconteudo);}
490 490 }
  491 + YAHOO.util.Event.addListener($i(l[b].iddiv), "click", i3GEO.util.stopProp);
  492 + //$i("i3geo_barra2").onclick = function(){alert("oi");}
491 493 }
492 494 while (b--);
493 495 }
... ...
classesjs/classe_util.js
... ... @@ -2324,7 +2324,46 @@ i3GEO.util = {
2324 2324 callback();
2325 2325 }
2326 2326 },25);
2327   - }
  2327 + },
  2328 + /*
  2329 + Function: stopProp
  2330 +
  2331 + Para a propagação de eventos em um elemento do DOM
  2332 +
  2333 + Crossbrowser
  2334 +
  2335 + http://javascript.about.com/library/bldom21.htm
  2336 +
  2337 + Parametro:
  2338 +
  2339 + event - evento
  2340 + */
  2341 + stopProp: function(event) {
  2342 + //alert(e.id);
  2343 + if (event && event.stopPropogation)
  2344 + event.stopPropogation;
  2345 + else
  2346 + event.cancelBubble = true;
  2347 + },
  2348 + /*
  2349 + Function: stopDef
  2350 +
  2351 + Anula o evento default de um elemento do DOM
  2352 +
  2353 + Crossbrowser
  2354 +
  2355 + http://javascript.about.com/library/bldom21.htm
  2356 +
  2357 + Parametro:
  2358 +
  2359 + event - evento
  2360 + */
  2361 + stopDef: function(event) {
  2362 + if (event && event.preventDefault)
  2363 + event.preventDefault();
  2364 + else
  2365 + window.eventReturnValue = false;
  2366 + }
2328 2367 };
2329 2368 //++++++++++++++++++++++++++++++++++++
2330 2369 // YUI ACCORDION
... ...