Commit f1357b47b8b08908019cc21ad36342ec44528c92

Authored by Edmar Moretti
1 parent 117d59c4

Inclusão de janela de alerta customizada pelo YUI

classesjs/classe_arvoredecamadas.js
... ... @@ -674,15 +674,9 @@ i3GEO.arvoreDeCamadas = {
674 674 //exclui tema
675 675 if(DDM.getDDById(id).id === "i3geo_lixeira"){
676 676 if(i3GEO.arvoreDeCamadas.ARRASTARLIXEIRA === true){
  677 + (new YAHOO.util.Anim("i3geo_lixeira", { opacity: { from: 0, to: 1 } },3, YAHOO.util.Easing.easeOutStrong)).animate();
677 678 tema = (this.getEl()).id.split("arrastar_")[1];
678 679 i3GEO.tema.exclui(tema);
679   - /*
680   - i3GEO.janela.abreAguarde("ajaxCorpoMapa",$trad("o1"));
681   - tema = (this.getEl()).id.split("arrastar_")[1];
682   - i3GEO.contadorAtualiza++;
683   - i3GEO.php.excluitema(i3GEO.atualiza,tema);
684   - i3GEO.mapa.ativaTema("");
685   - */
686 680 }
687 681 }
688 682 //muda ordem de desenho do tema
... ...
classesjs/classe_janela.js
... ... @@ -487,6 +487,41 @@ i3GEO.janela = {
487 487 }
488 488 },
489 489 /*
  490 + Function: alerta
  491 +
  492 + Abre uma janela com mensagem (windows.alert)
  493 +
  494 + Parametros:
  495 +
  496 + texto {String} - texto da mensagem
  497 + */
  498 + ativaAlerta: function(){
  499 + YAHOO.namespace("dialogInfo");
  500 + YAHOO.dialogInfo = new YAHOO.widget.SimpleDialog("simpledialog1",
  501 + {
  502 + width: "300px",
  503 + fixedcenter: true,
  504 + visible: false,
  505 + draggable: false,
  506 + zIndex: 100000,
  507 + textAlign: "left",
  508 + close: true,
  509 + modal: true,
  510 + effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.25},
  511 + constraintoviewport: true,
  512 + buttons: [ { text:"fecha", handler: function(){this.hide();}, isDefault:true }],
  513 + icon: YAHOO.widget.SimpleDialog.ICON_WARN,
  514 + text: ""
  515 + });
  516 + //YAHOO.dialogInfo.cfg.setProperty("icon",YAHOO.widget.SimpleDialog.ICON_WARN);
  517 + YAHOO.dialogInfo.setHeader("Alerta");
  518 + YAHOO.dialogInfo.render(document.body);
  519 + window.alert = function(texto){
  520 + YAHOO.dialogInfo.cfg.setProperty("text",texto);
  521 + YAHOO.dialogInfo.show();
  522 + };
  523 + },
  524 + /*
490 525 Function: tip
491 526  
492 527 Cria um DIV e posiciona sobre o mapa na posição do mouse.
... ...
css/corrigeyui_geral.css
... ... @@ -105,6 +105,11 @@ opacity:.8;
105 105 filter:alpha(opacity=80);
106 106 }
107 107  
  108 +.yui-skin-sam .yui-panel .bd{
  109 + text-align: left;
  110 + font-size: 10px;
  111 +}
  112 +
108 113 .yui-skin-sam .yui-simple-dialog .bd .yui-icon {
109 114 background:transparent url(../pacotes/yui270/build/assets/skins/sam/sprite.png) no-repeat scroll 0 0;
110 115 float:left;
... ...
interface/googlemaps.phtml
... ... @@ -151,7 +151,10 @@ i3GEO.arvoreDeTemas.TIPOBOTAO = "radio";
151 151 i3GEO.arvoreDeTemas.ATIVATEMAIMEDIATO = true;
152 152 //para evitar a entrada de comentários na árvore de camadas, modifique a opção de cada tema individualmente no sistema de administração
153 153 i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentario = true;
154   -
  154 +//
  155 +//substitui a janela de alerta normal do navegador por uma janela estilizada. Pode ser comentado sem problemas.
  156 +//
  157 +i3GEO.janela.ativaAlerta();
155 158 i3GEO.inicia();
156 159 </script>
157 160 </body>
... ...
interface/openlayers.htm
... ... @@ -253,6 +253,10 @@ OpenLayers.ImgPath = &quot;../pacotes/openlayers/img/&quot;;
253 253 i3GEO.Interface.openlayers.LAYERSADICIONAIS = [ims,wsm,bra,osm];
254 254 })();
255 255 //
  256 +//substitui a janela de alerta normal do navegador por uma janela estilizada. Pode ser comentado sem problemas.
  257 +//
  258 +i3GEO.janela.ativaAlerta();
  259 +//
256 260 //inicia o mapa
257 261 //
258 262 i3GEO.inicia();
... ...