Commit abb367f8fd3dfc6edf321c436a59bbf3f92a87e3
1 parent
3122380f
Exists in
master
and in
7 other branches
Otimização de código com JSlint. Remoção de variáveis inúteis. Correções no IE.
Showing
16 changed files
with
99 additions
and
88 deletions
Show diff stats
classesjs/classe_ajuda.js
| ... | ... | @@ -185,6 +185,7 @@ i3GEO.ajuda = { |
| 185 | 185 | */ |
| 186 | 186 | ativaCookie: function(){ |
| 187 | 187 | i3GEO.util.insereCookie("g_janelaMen","sim"); |
| 188 | + i3GEO.util.insereCookie("botoesAjuda","sim"); | |
| 188 | 189 | }, |
| 189 | 190 | /* |
| 190 | 191 | Function: ativaLetreiro |
| ... | ... | @@ -273,17 +274,20 @@ i3GEO.ajuda = { |
| 273 | 274 | jm = $i("i3geo_janelaMensagens"), |
| 274 | 275 | h = parseInt(YAHOO.util.Dom.getStyle(jm,"height"),10), |
| 275 | 276 | temp; |
| 277 | + | |
| 276 | 278 | if(j){ |
| 277 | 279 | j.innerHTML = texto === "" ? "-" : texto; |
| 278 | 280 | } |
| 279 | 281 | else{ |
| 280 | - YAHOO.util.Dom.setY("i3geo_janelaMensagens",YAHOO.util.Dom.getY(jm) + h); | |
| 282 | + if(h) | |
| 283 | + {YAHOO.util.Dom.setY("i3geo_janelaMensagens",YAHOO.util.Dom.getY(jm) + h);} | |
| 281 | 284 | if(k){k.innerHTML = texto;} |
| 282 | 285 | if(i3GEO.ajuda.TRANSICAOSUAVE){ |
| 283 | 286 | temp = texto !== "" ? YAHOO.util.Dom.setStyle(jm,"opacity","1") : YAHOO.util.Dom.setStyle(jm,"opacity",(i3GEO.ajuda.OPACIDADE / 100)); |
| 284 | 287 | } |
| 285 | 288 | h = parseInt(YAHOO.util.Dom.getStyle(jm,"height"),10); |
| 286 | - YAHOO.util.Dom.setY(jm,YAHOO.util.Dom.getY(jm) - h); | |
| 289 | + if(h) | |
| 290 | + {YAHOO.util.Dom.setY(jm,YAHOO.util.Dom.getY(jm) - h);} | |
| 287 | 291 | } |
| 288 | 292 | }, |
| 289 | 293 | /* |
| ... | ... | @@ -307,7 +311,7 @@ i3GEO.ajuda = { |
| 307 | 311 | {$i(i3GEO.ajuda.DIVLETREIRO).value = BSpaces + BMessage;} |
| 308 | 312 | BPos-=BSpeed; |
| 309 | 313 | if (BQuantas < 2) |
| 310 | - {i3GEO.ajuda.tempoLetreiro = setTimeout('i3GEO.ajuda.mostraLetreiro();', 140);} | |
| 314 | + {i3GEO.ajuda.tempoLetreiro = setTimeout(function(){i3GEO.ajuda.mostraLetreiro();}, 140);} | |
| 311 | 315 | }, |
| 312 | 316 | /* |
| 313 | 317 | Function: redesSociais | ... | ... |
classesjs/classe_arvoredecamadas.js
| ... | ... | @@ -343,19 +343,19 @@ i3GEO.arvoreDeCamadas = { |
| 343 | 343 | if(!YAHOO.lang.isUndefined(funcaoTema)){ |
| 344 | 344 | i3GEO.arvoreDeCamadas.ATIVATEMA = funcaoTema; |
| 345 | 345 | } |
| 346 | - this.SID = typeof(g_sid) !== 'undefined' ? g_sid : i3GEO.configura.sid; | |
| 347 | - this.LOCAPLIC = typeof(g_locaplic) !== 'undefined' ? g_locaplic : i3GEO.configura.locaplic; | |
| 346 | + i3GEO.arvoreDeCamadas.SID = typeof(g_sid) !== 'undefined' ? g_sid : i3GEO.configura.sid; | |
| 347 | + i3GEO.arvoreDeCamadas.LOCAPLIC = typeof(g_locaplic) !== 'undefined' ? g_locaplic : i3GEO.configura.locaplic; | |
| 348 | 348 | if(onde !== "") |
| 349 | - {this.IDHTML = onde;} | |
| 350 | - if(this.IDHTML === "") | |
| 349 | + {i3GEO.arvoreDeCamadas.IDHTML = onde;} | |
| 350 | + if(i3GEO.arvoreDeCamadas.IDHTML === "") | |
| 351 | 351 | {return;} |
| 352 | - if(!$i(this.IDHTML)) | |
| 352 | + if(!$i(i3GEO.arvoreDeCamadas.IDHTML)) | |
| 353 | 353 | {return;} |
| 354 | 354 | if(YAHOO.lang.isUndefined(temas)) |
| 355 | 355 | {return;} |
| 356 | - this.atualiza(temas); | |
| 357 | - if(this.finaliza !== ""){ | |
| 358 | - eval(this.finaliza); | |
| 356 | + i3GEO.arvoreDeCamadas.atualiza(temas); | |
| 357 | + if(i3GEO.arvoreDeCamadas.finaliza !== ""){ | |
| 358 | + eval(i3GEO.arvoreDeCamadas.finaliza); | |
| 359 | 359 | } |
| 360 | 360 | }, |
| 361 | 361 | /* |
| ... | ... | @@ -1325,7 +1325,7 @@ i3GEO.arvoreDeCamadas = { |
| 1325 | 1325 | do{ |
| 1326 | 1326 | ltema = camadas[i]; |
| 1327 | 1327 | if(ltema.escondido !== "sim"){ |
| 1328 | - temp = eval("ltema."+propriedade); | |
| 1328 | + temp = ltema[propriedade]; | |
| 1329 | 1329 | if(operador === "igual"){ |
| 1330 | 1330 | if(temp === valor) |
| 1331 | 1331 | {resultado.push(ltema);} |
| ... | ... | @@ -1365,7 +1365,7 @@ i3GEO.arvoreDeCamadas = { |
| 1365 | 1365 | do{ |
| 1366 | 1366 | ltema = i3GEO.arvoreDeCamadas.CAMADAS[i]; |
| 1367 | 1367 | if(ltema.name === camada){ |
| 1368 | - eval("ltema."+propriedade+"='"+valor+"';"); | |
| 1368 | + ltema[propriedade] = valor; | |
| 1369 | 1369 | } |
| 1370 | 1370 | i += 1; |
| 1371 | 1371 | } | ... | ... |
classesjs/classe_barradebotoes.js
| ... | ... | @@ -324,9 +324,9 @@ i3GEO.barraDeBotoes = { |
| 324 | 324 | BOTAOCLICADO: "", |
| 325 | 325 | ativaPadrao: function(){ |
| 326 | 326 | try{ |
| 327 | - $i(i3GEO.barraDeBotoes.BOTAOPADRAO).onclick.call(); | |
| 327 | + $i(i3GEO.barraDeBotoes.BOTAOPADRAO).onclick.apply(); //call não funciona no IE | |
| 328 | 328 | } |
| 329 | - catch(e){} | |
| 329 | + catch(e){alert(e)} | |
| 330 | 330 | }, |
| 331 | 331 | /* |
| 332 | 332 | Function: ativaIcone |
| ... | ... | @@ -447,7 +447,7 @@ i3GEO.barraDeBotoes = { |
| 447 | 447 | */ |
| 448 | 448 | ativaBotoes:function(padrao){ |
| 449 | 449 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaBotoes()");} |
| 450 | - var l,b; | |
| 450 | + var l,b,d; | |
| 451 | 451 | if(arguments.length === 0) |
| 452 | 452 | {padrao = i3GEO.barraDeBotoes.BOTAOPADRAO;} |
| 453 | 453 | i3GEO.barraDeBotoes.BOTAOCLICADO = padrao; |
| ... | ... | @@ -464,7 +464,7 @@ i3GEO.barraDeBotoes = { |
| 464 | 464 | } |
| 465 | 465 | if(l[b].funcaoonclick){ |
| 466 | 466 | $i(l[b].iddiv).onclick = l[b].funcaoonclick; |
| 467 | - if(l[b].iddiv === padrao) | |
| 467 | + if(l[b].iddiv == padrao) | |
| 468 | 468 | {l[b].funcaoonclick();} |
| 469 | 469 | } |
| 470 | 470 | if(l[b].constroiconteudo) |
| ... | ... | @@ -539,7 +539,7 @@ i3GEO.barraDeBotoes = { |
| 539 | 539 | chaves = i3GEO.util.listaChaves(i3GEO.barraDeBotoes.INCLUIBOTAO); |
| 540 | 540 | n = chaves.length; |
| 541 | 541 | for(i=0;i<n;i+=1){ |
| 542 | - if(eval("i3GEO.barraDeBotoes.INCLUIBOTAO."+chaves[i]) === true){ | |
| 542 | + if(i3GEO.barraDeBotoes.INCLUIBOTAO[chaves[i]] === true){ | |
| 543 | 543 | temp += i3GEO.barraDeBotoes.TEMPLATEBOTAO.replace("$$",chaves[i]); |
| 544 | 544 | } |
| 545 | 545 | } |
| ... | ... | @@ -739,7 +739,7 @@ i3GEO.barraDeBotoes = { |
| 739 | 739 | YAHOO.util.Dom.replaceClass(idconteudonovo+"_h","hd2"); |
| 740 | 740 | }, |
| 741 | 741 | /* |
| 742 | - Function: ativaMenuContexto | |
| 742 | + Function: ativaMenuContexto (depreciado na versão 4.5) | |
| 743 | 743 | |
| 744 | 744 | Ativa o menu de contexto acionado com o botão direito do mouse |
| 745 | 745 | |
| ... | ... | @@ -898,7 +898,7 @@ i3GEO.barraDeBotoes = { |
| 898 | 898 | $i("divMensagemBarraDeBotoesCorpo").innerHTML = mensagem; |
| 899 | 899 | divmensagem.style.display="block"; |
| 900 | 900 | try{clearTimeout(timeAjudaBotoes);}catch(e){} |
| 901 | - timeAjudaBotoes = setTimeout("i3GEO.barraDeBotoes.escondeJanelaAjuda()",3000); | |
| 901 | + timeAjudaBotoes = setTimeout(function(){i3GEO.barraDeBotoes.escondeJanelaAjuda();},3000); | |
| 902 | 902 | } |
| 903 | 903 | }, |
| 904 | 904 | escondeJanelaAjuda:function(){ | ... | ... |
classesjs/classe_calculo.js
| ... | ... | @@ -543,9 +543,9 @@ i3GEO.calculo = { |
| 543 | 543 | */ |
| 544 | 544 | rect2ext: function(idrect,mapext,pixel){ |
| 545 | 545 | if(typeof(console) !== 'undefined'){console.info("i3GEO.calculo.rect2ext()");} |
| 546 | - var bx,bxs,xfig,yfig,nx,ny,pix,piy,pos,amext,dx,dy,x1,y1,x2,y2; | |
| 547 | - eval('pix = parseInt(document.getElementById("'+idrect+'").style.' + g_tipoleft + ',10);'); | |
| 548 | - eval('piy = parseInt(document.getElementById("'+idrect+'").style.' + g_tipotop + ',10);'); | |
| 546 | + var bx,bxs,xfig,yfig,nx,ny,pix,piy,pos,amext,dx,dy,x1,y1,x2,y2, | |
| 547 | + pix = parseInt(document.getElementById(idrect).style.left,10), | |
| 548 | + piy = parseInt(document.getElementById(idrect).style.top,10); | |
| 549 | 549 | if($i(idrect)){ |
| 550 | 550 | bx = $i(idrect); |
| 551 | 551 | bxs = bx.style; | ... | ... |
classesjs/classe_configura.js
| ... | ... | @@ -725,7 +725,7 @@ i3GEO.configura = { |
| 725 | 725 | }; |
| 726 | 726 | panMapaDesloca = function(){ |
| 727 | 727 | var nx,ny,l,t; |
| 728 | - if ($i(i3GEO.Interface.IDMAPA) && (g_panM === "sim")){ | |
| 728 | + if (typeof(g_panM) !== 'undefined' && $i(i3GEO.Interface.IDMAPA) && (g_panM === "sim")){ | |
| 729 | 729 | nx = objposicaocursor.telax - leftinicial - clicinicialx; |
| 730 | 730 | ny = objposicaocursor.telay - topinicial - clicinicialy; |
| 731 | 731 | if (i3GEO.configura.entorno === "nao"){ | ... | ... |
classesjs/classe_eventos.js
| ... | ... | @@ -407,6 +407,7 @@ i3GEO.eventos = { |
| 407 | 407 | docMapa.onmouseover = function(){ |
| 408 | 408 | objposicaocursor.dentroDomapa = true; |
| 409 | 409 | this.onmousemove=function(exy){ |
| 410 | + //var executar = new Function("i3GEO.eventos.mouseParado().call"); | |
| 410 | 411 | i3GEO.eventos.posicaoMouseMapa(exy); |
| 411 | 412 | try{ |
| 412 | 413 | try |
| ... | ... | @@ -414,7 +415,7 @@ i3GEO.eventos = { |
| 414 | 415 | catch(e){ |
| 415 | 416 | if(typeof(console) !== 'undefined'){console.error(e);} |
| 416 | 417 | } |
| 417 | - i3GEO.eventos.TIMERPARADO = setTimeout('i3GEO.eventos.mouseParado()',i3GEO.configura.tempoMouseParado); | |
| 418 | + i3GEO.eventos.TIMERPARADO = setTimeout(function(){i3GEO.eventos.mouseParado();},i3GEO.configura.tempoMouseParado); | |
| 418 | 419 | } |
| 419 | 420 | catch(e){ |
| 420 | 421 | if(typeof(console) !== 'undefined'){console.error(e);} | ... | ... |
classesjs/classe_i3geo.js
| ... | ... | @@ -314,8 +314,13 @@ i3GEO = { |
| 314 | 314 | // |
| 315 | 315 | if($i("ajuda")) //para efeitos de compatibilidade com as versões anteriores a 4.1 |
| 316 | 316 | {i3GEO.ajuda.DIVAJUDA = "ajuda";} |
| 317 | - if(i3GEO.util.pegaCookie("botoesAjuda") === "nao") | |
| 318 | - {i3GEO.barraDeBotoes.AJUDA = false;} | |
| 317 | + abreJM = "sim"; | |
| 318 | + if(i3GEO.util.pegaCookie("botoesAjuda")){ | |
| 319 | + abreJM = i3GEO.util.pegaCookie("botoesAjuda"); | |
| 320 | + i3GEO.barraDeBotoes.AJUDA = (abreJM === "sim") ? true : false; | |
| 321 | + } | |
| 322 | + //if(i3GEO.util.pegaCookie("botoesAjuda") === "nao") | |
| 323 | + //{i3GEO.barraDeBotoes.AJUDA = false;} | |
| 319 | 324 | abreJM = "sim"; |
| 320 | 325 | if(i3GEO.util.pegaCookie("g_janelaMen")){ |
| 321 | 326 | abreJM = i3GEO.util.pegaCookie("g_janelaMen"); | ... | ... |
classesjs/classe_navega.js
| ... | ... | @@ -652,8 +652,8 @@ i3GEO.navega = { |
| 652 | 652 | i.height=0; |
| 653 | 653 | i.visibility="visible"; |
| 654 | 654 | i.display="block"; |
| 655 | - i.left = objposicaocursor.telax + g_postpx; | |
| 656 | - i.top = objposicaocursor.telay + g_postpx; | |
| 655 | + i.left = objposicaocursor.telax; | |
| 656 | + i.top = objposicaocursor.telay; | |
| 657 | 657 | boxxini = objposicaocursor.telax; |
| 658 | 658 | boxyini = objposicaocursor.telay; |
| 659 | 659 | tamanhox = 0; |
| ... | ... | @@ -960,7 +960,7 @@ i3GEO.navega = { |
| 960 | 960 | document.body.appendChild(novoel); |
| 961 | 961 | } |
| 962 | 962 | temp = $i('boxlente').style; |
| 963 | - temp.borderWidth = '1' + g_postpx; | |
| 963 | + temp.borderWidth = '1'; | |
| 964 | 964 | temp.borderColor = "red"; |
| 965 | 965 | temp.display = "block"; |
| 966 | 966 | $i("lente").style.display = "block"; |
| ... | ... | @@ -1049,8 +1049,10 @@ i3GEO.navega = { |
| 1049 | 1049 | clipt = "rect("+ (topo - 40) + " " + (esq + 40) + " " + (topo + 40) + " " + (esq - 40) +")"; |
| 1050 | 1050 | i = $i("lente").style; |
| 1051 | 1051 | i.clip = clipt; |
| 1052 | - eval("i." + g_tipotop + "= (pos[1] - (topo - 40)) + g_postpx"); | |
| 1053 | - eval("i." + g_tipoleft + "= (pos[0] - (esq - 40)) + g_postpx"); | |
| 1052 | + i.top = pos[1] - (topo - 40); | |
| 1053 | + i.left = pos[0] - (esq - 40); | |
| 1054 | + //eval("i." + g_tipotop + "= (pos[1] - (topo - 40))"); | |
| 1055 | + //eval("i." + g_tipoleft + "= (pos[0] - (esq - 40)"); | |
| 1054 | 1056 | } |
| 1055 | 1057 | } |
| 1056 | 1058 | catch(e){ | ... | ... |
classesjs/classe_selecao.js
| ... | ... | @@ -87,8 +87,8 @@ i3GEO.selecao = { |
| 87 | 87 | i.height=0; |
| 88 | 88 | i.visibility="visible"; |
| 89 | 89 | i.display="block"; |
| 90 | - i.left = objposicaocursor.imgx + adicionaxyBox[0] + g_postpx; | |
| 91 | - i.top = objposicaocursor.imgy + adicionaxyBox[1] + g_postpx; | |
| 90 | + i.left = objposicaocursor.imgx + adicionaxyBox[0]; | |
| 91 | + i.top = objposicaocursor.imgy + adicionaxyBox[1]; | |
| 92 | 92 | |
| 93 | 93 | boxxini = objposicaocursor.imgx + adicionaxyBox[0]; |
| 94 | 94 | boxyini = objposicaocursor.imgy + adicionaxyBox[1]; | ... | ... |
classesjs/classe_social.js
| ... | ... | @@ -41,7 +41,7 @@ i3GEO.social = { |
| 41 | 41 | if(tipo === "comtotal") |
| 42 | 42 | {return "<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=160&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:160px; height:21px;' allowTransparency='true'></iframe>";} |
| 43 | 43 | if(tipo === "semtotal") |
| 44 | - {return "<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&width=75&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:75px; height:21px;' allowTransparency='true'></iframe>";} | |
| 44 | + {return "<iframe src='http://www.facebook.com/plugins/like.php?href="+url+"&layout=button_count&show_faces=false&action=like&colorscheme=light&height=21' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:21px;' allowTransparency='true'></iframe>";} | |
| 45 | 45 | }, |
| 46 | 46 | publicarTwitter: function(url,tipo){ |
| 47 | 47 | if(tipo === "comtotal") |
| ... | ... | @@ -89,9 +89,9 @@ i3GEO.social = { |
| 89 | 89 | tabela += "<td>"+i3GEO.social.publicarTwitter(urlpt,tipo)+"</td>"; |
| 90 | 90 | } |
| 91 | 91 | if(urlcf !== ""){ |
| 92 | + //tabela += "<td><img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+urlcf+"\")' title='Compartilhar'/></td>"; | |
| 92 | 93 | tabela += "<td>"+i3GEO.social.curtirFacebook(urlcf,tipo)+"</td>"; |
| 93 | - tabela += "<td><img style='cursor:pointer' src='"+locaplic+"/imagens/facebook.gif' onclick='javascript:window.open(\"http://www.facebook.com/sharer.php?u="+urlcf+"\")' title='Compartilhar'/></td>"; | |
| 94 | - } | |
| 94 | + } | |
| 95 | 95 | tabela += "</tr></table>"; |
| 96 | 96 | if(id !== "") |
| 97 | 97 | {onde.innerHTML = tabela;} | ... | ... |
classesjs/classe_util.js
| 1 | -/*jslint plusplus:false,white:false,undef: false, rhino: true, onevar: true, evil: true */ | |
| 1 | +/*jslint plusplus:false,white:false,undef: false, rhino: true, onevar: true, evil: false */ | |
| 2 | 2 | /* |
| 3 | 3 | Title: Utilitários |
| 4 | 4 | |
| ... | ... | @@ -104,6 +104,7 @@ Quando o usuário clica no mapa, essa variável é pesquisada para definir o tipo d |
| 104 | 104 | */ |
| 105 | 105 | g_tipoacao = "zoomli"; |
| 106 | 106 | |
| 107 | +/* | |
| 107 | 108 | g_postpx = "px"; |
| 108 | 109 | g_tipotop = "top"; |
| 109 | 110 | g_tipoleft = "left"; |
| ... | ... | @@ -113,7 +114,7 @@ if (navm) |
| 113 | 114 | g_tipotop = "pixelTop"; //utilizado para crossbrowser |
| 114 | 115 | g_tipoleft = "pixelLeft"; //utilizado para crossbrowser |
| 115 | 116 | } |
| 116 | - | |
| 117 | +*/ | |
| 117 | 118 | /* |
| 118 | 119 | Function: $i |
| 119 | 120 | |
| ... | ... | @@ -279,13 +280,17 @@ i3GEO.util = { |
| 279 | 280 | */ |
| 280 | 281 | criaBotaoAplicar: function (nomeFuncao,titulo,classe,obj) { |
| 281 | 282 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.criaBotaoAplicar()");} |
| 282 | - try | |
| 283 | - {clearTimeout(tempoBotaoAplicar);} | |
| 283 | + try{ | |
| 284 | + if(typeof(tempoBotaoAplicar) !== 'undefined') | |
| 285 | + {clearTimeout(tempoBotaoAplicar);} | |
| 286 | + } | |
| 284 | 287 | catch(e){ |
| 285 | 288 | if(typeof(console) !== 'undefined'){console.error(e);} |
| 286 | 289 | } |
| 287 | - var novoel,xy; | |
| 288 | - tempoBotaoAplicar = eval("setTimeout('"+nomeFuncao+"\(\)',(i3GEO.configura.tempoAplicar))"); | |
| 290 | + var executar = new Function(nomeFuncao+"().call;clearTimeout(tempoBotaoAplicar);"), | |
| 291 | + novoel,xy; | |
| 292 | + //tempoBotaoAplicar = eval("setTimeout('"+nomeFuncao+"\(\)',(i3GEO.configura.tempoAplicar))"); | |
| 293 | + tempoBotaoAplicar = setTimeout(executar,(i3GEO.configura.tempoAplicar)); | |
| 289 | 294 | autoRedesenho("reinicia"); |
| 290 | 295 | if(arguments.length === 1) |
| 291 | 296 | {titulo = "Aplicar";} | ... | ... |
css/geral.css
| ... | ... | @@ -66,7 +66,7 @@ select |
| 66 | 66 | .executar |
| 67 | 67 | {cursor:pointer;color:white;text-align:left;background-color:gray;background-image:URL('../imagens/tic.png');background-repeat:no-repeat;border-style:outset;background-position: right;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;} |
| 68 | 68 | .inputsb |
| 69 | -{font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #2F4632;background-color: #FFFFFF;padding: 0;border: 1px solid gray;text-align: center;cursor: text;} | |
| 69 | +{font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10px;color: #2F4632;background-color: #FFFFFF;padding: 0;border: 0px solid gray;text-align: center;cursor: text;} | |
| 70 | 70 | .legendatemas |
| 71 | 71 | {cursor:pointer;text-align:left;background-color:none;vertical-align: top;border: 0px solid gray;margin:0;padding:0;font-family: Verdana, Arial, Helvetica, sans-serif;} |
| 72 | 72 | .legendatemas td | ... | ... |
ferramentas/inserexy2/index.js.php
| ... | ... | @@ -288,6 +288,7 @@ i3GEOF.inserexy = { |
| 288 | 288 | i3GEO.eventos.MOUSECLIQUE.remove("i3GEOF.inserexy.adicionaClique()"); |
| 289 | 289 | }; |
| 290 | 290 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); |
| 291 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores,"crosshair",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | |
| 291 | 292 | }, |
| 292 | 293 | /* |
| 293 | 294 | Function: ativaFoco | ... | ... |
ferramentas/selecao/index.js.php
| ... | ... | @@ -218,6 +218,7 @@ i3GEOF.selecao = { |
| 218 | 218 | if(i3GEO.eventos.MOUSECLIQUE.toString().search("i3GEOF.selecao.clique()") < 0) |
| 219 | 219 | {i3GEO.eventos.MOUSECLIQUE.push("i3GEOF.selecao.clique()");} |
| 220 | 220 | temp = function(){ |
| 221 | + i3GEO.barraDeBotoes.ativaPadrao(); | |
| 221 | 222 | i3GEO.eventos.MOUSECLIQUE.remove("i3GEOF.selecao.clique()"); |
| 222 | 223 | try{ |
| 223 | 224 | i3GEO.desenho.richdraw.fecha; |
| ... | ... | @@ -228,6 +229,7 @@ i3GEOF.selecao = { |
| 228 | 229 | if($i("pontosins")){document.body.removeChild($i("pontosins"));} |
| 229 | 230 | }; |
| 230 | 231 | YAHOO.util.Event.addListener(janela[0].close, "click", temp); |
| 232 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores,"crosshair",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | |
| 231 | 233 | }, |
| 232 | 234 | /* |
| 233 | 235 | Function: ativaFoco |
| ... | ... | @@ -235,7 +237,7 @@ i3GEOF.selecao = { |
| 235 | 237 | Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado |
| 236 | 238 | */ |
| 237 | 239 | ativaFoco: function(){ |
| 238 | - i3GEO.util.mudaCursor(i3GEO.configura.cursores,"pointer",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | |
| 240 | + i3GEO.util.mudaCursor(i3GEO.configura.cursores,"crosshair",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | |
| 239 | 241 | i3GEO.barraDeBotoes.ativaIcone("selecao"); |
| 240 | 242 | i3GEOF.selecao.pegaTemasSel(); |
| 241 | 243 | g_tipoacao='selecao'; |
| ... | ... | @@ -262,10 +264,6 @@ i3GEOF.selecao = { |
| 262 | 264 | if($i("i3GEOselecaopoli")) |
| 263 | 265 | {$i("i3GEOselecaopoli").style.border = "1px solid RGB(230,230,230)";} |
| 264 | 266 | i3GEO.desenho.richdraw.fecha; |
| 265 | - if($i(i3GEO.Interface.IDMAPA)){ | |
| 266 | - $i(i3GEO.Interface.IDMAPA).title = ""; | |
| 267 | - i3GEO.util.mudaCursor(i3GEO.configura.cursores,"identifica",i3GEO.Interface.IDMAPA,i3GEO.configura.locaplic); | |
| 268 | - } | |
| 269 | 267 | }, |
| 270 | 268 | /* |
| 271 | 269 | Function: pegaTemasSel |
| ... | ... | @@ -380,22 +378,21 @@ i3GEOF.selecao = { |
| 380 | 378 | */ |
| 381 | 379 | inicia: function(){ |
| 382 | 380 | if($i("i3GEOselecaotemasLigados").value === "") |
| 383 | - {alert("Escolha um tema");return;} | |
| 381 | + {alert("Escolha um tema");return;} | |
| 384 | 382 | if(g_tipoacao !== 'selecaobox') |
| 385 | 383 | {return;} |
| 384 | + i3geoOL.removeControl(OLpanel); | |
| 386 | 385 | i3GEOF.selecao.box.criaBox(); |
| 387 | 386 | adicionaxyBox = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO)); |
| 388 | 387 | var i = $i("i3geoboxSel").style; |
| 389 | - i.width=0; | |
| 390 | - i.height=0; | |
| 388 | + i.width="10px"; | |
| 389 | + i.height="10px"; | |
| 391 | 390 | i.visibility="visible"; |
| 392 | 391 | i.display="block"; |
| 393 | - i.left = objposicaocursor.imgx + adicionaxyBox[0] + g_postpx; | |
| 394 | - i.top = objposicaocursor.imgy + adicionaxyBox[1] + g_postpx; | |
| 392 | + i.left = objposicaocursor.imgx + adicionaxyBox[0] - 5; | |
| 393 | + i.top = objposicaocursor.imgy + adicionaxyBox[1] - 5; | |
| 395 | 394 | boxxini = objposicaocursor.imgx + adicionaxyBox[0]; |
| 396 | 395 | boxyini = objposicaocursor.imgy + adicionaxyBox[1]; |
| 397 | - tamanhox = 0; | |
| 398 | - tamanhoy = 0; | |
| 399 | 396 | if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEOF.selecao.box.desloca()") < 0) |
| 400 | 397 | {i3GEO.eventos.MOUSEMOVE.push("i3GEOF.selecao.box.desloca()");} |
| 401 | 398 | if(i3GEO.eventos.MOUSEUP.toString().search("i3GEOF.selecao.box.termina()") < 0) |
| ... | ... | @@ -407,55 +404,46 @@ i3GEOF.selecao = { |
| 407 | 404 | Cria o DIV que será utilizado para desenhar o box no mapa |
| 408 | 405 | */ |
| 409 | 406 | criaBox: function(){ |
| 410 | - try{i3GEO.desenho.richdraw.fecha;} | |
| 411 | - catch(e){ | |
| 412 | - if(typeof(console) !== 'undefined'){console.error(e);} | |
| 407 | + if(i3GEO.Interface.ATUAL !== "openlayers"){ | |
| 408 | + try{i3GEO.desenho.richdraw.fecha;} | |
| 409 | + catch(e){ | |
| 410 | + if(typeof(console) !== 'undefined'){console.error(e);} | |
| 411 | + } | |
| 412 | + i3GEO.desenho.criaContainerRichdraw(); | |
| 413 | + i3GEO.desenho.richdraw.lineColor = "red"; | |
| 414 | + i3GEO.desenho.richdraw.lineWidth = "2px"; | |
| 413 | 415 | } |
| 414 | - i3GEO.desenho.criaContainerRichdraw(); | |
| 415 | - i3GEO.desenho.richdraw.lineColor = "red"; | |
| 416 | - i3GEO.desenho.richdraw.lineWidth = "2px"; | |
| 417 | 416 | var novoel,temp; |
| 418 | 417 | if(!$i("i3geoboxSel")){ |
| 419 | 418 | novoel = document.createElement("div"); |
| 420 | - novoel.style.width = "0px"; | |
| 421 | - novoel.style.height = "0px"; | |
| 419 | + novoel.style.width = "10px"; | |
| 420 | + novoel.style.height = "10px"; | |
| 422 | 421 | novoel.id = "i3geoboxSel"; |
| 423 | - novoel.style.display = "none"; | |
| 422 | + novoel.style.display = "block"; | |
| 424 | 423 | novoel.style.fontSize = "0px"; |
| 425 | - if(navn) | |
| 426 | - {novoel.style.opacity = 0.25;} | |
| 424 | + YAHOO.util.Dom.setStyle(novoel,"opacity",0.25); | |
| 427 | 425 | novoel.style.backgroundColor = "yellow"; |
| 428 | 426 | novoel.style.position="absolute"; |
| 429 | 427 | novoel.style.border = "2px solid #ff0000"; |
| 430 | - if (navm) | |
| 431 | - {novoel.style.filter = "alpha(opacity=25)";} | |
| 432 | 428 | novoel.onmousemove = function(){ |
| 433 | 429 | var b,wb,hb; |
| 434 | 430 | b = $i("i3geoboxSel").style; |
| 435 | 431 | wb = parseInt(b.width,10); |
| 436 | 432 | hb = parseInt(b.height,10); |
| 437 | - if (navm){ | |
| 438 | - if(wb > 2) | |
| 439 | - {b.width = wb - 2;} | |
| 440 | - if(hb > 2) | |
| 441 | - {b.height = hb - 2;} | |
| 442 | - } | |
| 443 | - else{ | |
| 444 | - b.width = wb - 2 + "px"; | |
| 445 | - b.height = hb - 2 + "px"; | |
| 446 | - } | |
| 433 | + if(wb > 2) | |
| 434 | + {b.width = wb - 2;} | |
| 435 | + if(hb > 2) | |
| 436 | + {b.height = hb - 2;} | |
| 447 | 437 | }; |
| 448 | 438 | novoel.onmouseup = function() |
| 449 | 439 | {i3GEOF.selecao.box.termina();}; |
| 450 | 440 | document.body.appendChild(novoel); |
| 451 | 441 | } |
| 452 | - i3GEO.util.mudaCursor(i3GEO.configura.cursores,"zoom","i3geoboxSel",i3GEO.configura.locaplic); | |
| 453 | 442 | if($i("img")){ |
| 454 | 443 | $i("img").title = ""; |
| 455 | 444 | temp = "zoom"; |
| 456 | 445 | if(i3GEO.Interface.ATIVAMENUCONTEXTO) |
| 457 | 446 | {temp = "zoom_contexto";} |
| 458 | - i3GEO.util.mudaCursor(i3GEO.configura.cursores,temp,"img",i3GEO.configura.locaplic); | |
| 459 | 447 | } |
| 460 | 448 | }, |
| 461 | 449 | /* |
| ... | ... | @@ -472,7 +460,7 @@ i3GEOF.selecao = { |
| 472 | 460 | {return;} |
| 473 | 461 | ppx = objposicaocursor.imgx + adicionaxyBox[0]; |
| 474 | 462 | py = objposicaocursor.imgy + adicionaxyBox[1]; |
| 475 | - if (navm){ | |
| 463 | + if (navn){ | |
| 476 | 464 | if ((ppx > boxxini) && ((ppx - boxxini - 2) > 0)) |
| 477 | 465 | {bxs.width = ppx - boxxini - 2;} |
| 478 | 466 | if ((py > boxyini) && ((py - boxyini - 2) > 0)) |
| ... | ... | @@ -511,8 +499,8 @@ i3GEOF.selecao = { |
| 511 | 499 | var bxs = $i("i3geoboxSel").style; |
| 512 | 500 | bxs.display="none"; |
| 513 | 501 | bxs.visibility="hidden"; |
| 514 | - bxs.width = 0; | |
| 515 | - bxs.height = 0; | |
| 502 | + bxs.width = "0px"; | |
| 503 | + bxs.height = "0px"; | |
| 516 | 504 | }; |
| 517 | 505 | if((x1 === x2) || (y1 === y2)) |
| 518 | 506 | {limpa.call();return;} |
| ... | ... | @@ -611,9 +599,8 @@ i3GEOF.selecao = { |
| 611 | 599 | inicia: function(){ |
| 612 | 600 | try |
| 613 | 601 | {i3GEO.desenho.richdraw.fecha;} |
| 614 | - catch(e){ | |
| 615 | - if(typeof(console) !== 'undefined'){console.error(e);} | |
| 616 | - } | |
| 602 | + catch(e) | |
| 603 | + {if(typeof(console) !== 'undefined'){console.error(e);}} | |
| 617 | 604 | pontosdistobj = []; |
| 618 | 605 | i3GEO.util.insereMarca.limpa(); |
| 619 | 606 | g_tipoacao = "selecaopoli"; | ... | ... |
guia_de_migracao.txt
| ... | ... | @@ -37,6 +37,12 @@ Para a versão 4.5 |
| 37 | 37 | css/i3geo_ferramentas45.css |
| 38 | 38 | |
| 39 | 39 | Testado o uso de zlib.output_compression = On no php.ini |
| 40 | + | |
| 41 | + Variáveis ou funções removidas | |
| 42 | + i3GEO.interface (utilize i3GEO.Interface, com "I" maiúsculo) | |
| 43 | + g_postpx | |
| 44 | + g_tipotop | |
| 45 | + g_tipoleft | |
| 40 | 46 | |
| 41 | 47 | ------------------------------------------------------------------------------------------------- |
| 42 | 48 | Para a versão 4.4 | ... | ... |
interface/geral.htm
| ... | ... | @@ -213,7 +213,7 @@ i3GEO.barraDeBotoes.COMPORTAMENTO = "laranja" |
| 213 | 213 | i3GEO.barraDeBotoes.AUTO = true //as barras de botões serão construídas automaticamente |
| 214 | 214 | |
| 215 | 215 | i3GEO.idioma.IDSELETOR = "seletorIdiomas" |
| 216 | -i3GEO.interface.ATIVAMENUCONTEXTO = true; | |
| 216 | +i3GEO.Interface.ATIVAMENUCONTEXTO = true; | |
| 217 | 217 | |
| 218 | 218 | //i3GEO.gadgets.PARAMETROS.mostraCoordenadasUTM.idhtml = ""; |
| 219 | 219 | ... | ... |