Commit ab67bc41334a1839219f96f7bd417c5216fbf7c2
1 parent
cf279846
Exists in
master
and in
7 other branches
Validação com JSLint
Showing
1 changed file
with
129 additions
and
121 deletions
Show diff stats
classesjs/classe_barradebotoes.js
@@ -192,73 +192,79 @@ i3GEO.barraDeBotoes = { | @@ -192,73 +192,79 @@ i3GEO.barraDeBotoes = { | ||
192 | ativaIcone: function(icone){ | 192 | ativaIcone: function(icone){ |
193 | i3GEO.barraDeBotoes.BOTAOCLICADO = icone; | 193 | i3GEO.barraDeBotoes.BOTAOCLICADO = icone; |
194 | var ko = i3GEO.barraDeBotoes.LISTABOTOES.length-1; | 194 | var ko = i3GEO.barraDeBotoes.LISTABOTOES.length-1; |
195 | + var estilo,temp,ist,cor; | ||
195 | if(i3GEO.barraDeBotoes.COMPORTAMENTO == "padrao"){ | 196 | if(i3GEO.barraDeBotoes.COMPORTAMENTO == "padrao"){ |
196 | - if(ko >= 0){do{ | ||
197 | - var temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); | ||
198 | - if (i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo=="dinamico" && temp) | ||
199 | - { | ||
200 | - var ist = temp.style; | ||
201 | - ist.borderWidth="1px"; | ||
202 | - ist.borderColor='white'; | ||
203 | - ist.borderLeftColor='rgb(50,50,50)'; | ||
204 | - ist.borderBottomColor='rgb(50,50,50)'; | 197 | + if(ko >= 0){ |
198 | + do{ | ||
199 | + temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); | ||
200 | + if (i3GEO.barraDeBotoes.LISTABOTOES[ko].tipo=="dinamico" && temp){ | ||
201 | + ist = temp.style; | ||
202 | + ist.borderWidth="1px"; | ||
203 | + ist.borderColor='white'; | ||
204 | + ist.borderLeftColor='rgb(50,50,50)'; | ||
205 | + ist.borderBottomColor='rgb(50,50,50)'; | ||
206 | + } | ||
205 | } | 207 | } |
206 | - }while(ko--)} | 208 | + while(ko--); |
209 | + } | ||
207 | //ativa o icone | 210 | //ativa o icone |
208 | - if($i(icone)) | ||
209 | - {with ($i(icone).style){ | ||
210 | - if(i3GEO.barraDeBotoes.SOICONES == false){ | ||
211 | - borderColor='white'; | ||
212 | - borderWidth="1px"; | 211 | + if($i(icone)){ |
212 | + estilo = $i(icone).style; | ||
213 | + if(i3GEO.barraDeBotoes.SOICONES === false){ | ||
214 | + estilo.borderColor='white'; | ||
215 | + estilo.borderWidth="1px"; | ||
213 | } | 216 | } |
214 | - }} | 217 | + } |
215 | } | 218 | } |
216 | if(i3GEO.barraDeBotoes.COMPORTAMENTO == "destacado"){ | 219 | if(i3GEO.barraDeBotoes.COMPORTAMENTO == "destacado"){ |
217 | - if(ko >= 0){do{ | ||
218 | - var temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); | ||
219 | - if (temp) | ||
220 | - { | ||
221 | - var ist = temp.style; | ||
222 | - ist.borderWidth="1px"; | ||
223 | - ist.borderColor='white'; | 220 | + if(ko >= 0){ |
221 | + do{ | ||
222 | + temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); | ||
223 | + if (temp){ | ||
224 | + ist = temp.style; | ||
225 | + ist.borderWidth="1px"; | ||
226 | + ist.borderColor='white'; | ||
227 | + } | ||
224 | } | 228 | } |
225 | - }while(ko--)} | 229 | + while(ko--); |
230 | + } | ||
226 | //ativa o icone | 231 | //ativa o icone |
227 | - if($i(icone)) | ||
228 | - {with ($i(icone).style){ | ||
229 | - if(i3GEO.barraDeBotoes.SOICONES == false){ | ||
230 | - borderColor='black'; | ||
231 | - borderWidth="1px"; | 232 | + if($i(icone)){ |
233 | + estilo = $i(icone).style; | ||
234 | + if(i3GEO.barraDeBotoes.SOICONES === false){ | ||
235 | + estilo.borderColor='black'; | ||
236 | + estilo.borderWidth="1px"; | ||
232 | } | 237 | } |
233 | - }} | 238 | + } |
234 | } | 239 | } |
235 | if(i3GEO.barraDeBotoes.COMPORTAMENTO == "laranja" || i3GEO.barraDeBotoes.COMPORTAMENTO == "vermelho" || i3GEO.barraDeBotoes.COMPORTAMENTO == "cinza"){ | 240 | if(i3GEO.barraDeBotoes.COMPORTAMENTO == "laranja" || i3GEO.barraDeBotoes.COMPORTAMENTO == "vermelho" || i3GEO.barraDeBotoes.COMPORTAMENTO == "cinza"){ |
236 | - if(ko >= 0){do{ | ||
237 | - var temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); | ||
238 | - if (temp) | ||
239 | - { | ||
240 | - var ist = temp.style; | ||
241 | - if(i3GEO.barraDeBotoes.SOICONES == false){ | ||
242 | - ist.borderWidth="1px"; | ||
243 | - ist.borderColor='white'; | ||
244 | - ist.backgroundColor='white'; | 241 | + if(ko >= 0){ |
242 | + do{ | ||
243 | + temp = $i(i3GEO.barraDeBotoes.LISTABOTOES[ko].iddiv); | ||
244 | + if (temp){ | ||
245 | + ist = temp.style; | ||
246 | + if(i3GEO.barraDeBotoes.SOICONES === false){ | ||
247 | + ist.borderWidth="1px"; | ||
248 | + ist.borderColor='white'; | ||
249 | + ist.backgroundColor='white'; | ||
250 | + } | ||
251 | + else{ist.backgroundColor='';} | ||
245 | } | 252 | } |
246 | - else{ist.backgroundColor='';} | ||
247 | - | ||
248 | } | 253 | } |
249 | - }while(ko--)} | ||
250 | - if(i3GEO.barraDeBotoes.COMPORTAMENTO == "laranja"){var cor = "orange";} | ||
251 | - if(i3GEO.barraDeBotoes.COMPORTAMENTO == "vermelho"){var cor = "red";} | ||
252 | - if(i3GEO.barraDeBotoes.COMPORTAMENTO == "cinza"){var cor = "gray";} | 254 | + while(ko--); |
255 | + } | ||
256 | + if(i3GEO.barraDeBotoes.COMPORTAMENTO == "laranja"){cor = "orange";} | ||
257 | + if(i3GEO.barraDeBotoes.COMPORTAMENTO == "vermelho"){cor = "red";} | ||
258 | + if(i3GEO.barraDeBotoes.COMPORTAMENTO == "cinza"){cor = "gray";} | ||
253 | //ativa o icone | 259 | //ativa o icone |
254 | - if($i(icone)) | ||
255 | - {with ($i(icone).style){ | ||
256 | - if(i3GEO.barraDeBotoes.SOICONES == false){ | ||
257 | - borderColor='black'; | ||
258 | - borderWidth="1px"; | 260 | + if($i(icone)){ |
261 | + estilo = $i(icone).style; | ||
262 | + if(i3GEO.barraDeBotoes.SOICONES === false){ | ||
263 | + estilo.borderColor='black'; | ||
264 | + estilo.borderWidth="1px"; | ||
259 | } | 265 | } |
260 | backgroundColor=cor; | 266 | backgroundColor=cor; |
261 | - }} | 267 | + } |
262 | } | 268 | } |
263 | }, | 269 | }, |
264 | /* | 270 | /* |
@@ -275,8 +281,8 @@ i3GEO.barraDeBotoes = { | @@ -275,8 +281,8 @@ i3GEO.barraDeBotoes = { | ||
275 | O nome do botao deve estar em LISTABOTOES na propriedade iddiv | 281 | O nome do botao deve estar em LISTABOTOES na propriedade iddiv |
276 | */ | 282 | */ |
277 | ativaBotoes:function(padrao){ | 283 | ativaBotoes:function(padrao){ |
278 | - if(arguments.length == 0) | ||
279 | - {var padrao = i3GEO.barraDeBotoes.BOTAOPADRAO;} | 284 | + if(arguments.length === 0) |
285 | + {padrao = i3GEO.barraDeBotoes.BOTAOPADRAO;} | ||
280 | i3GEO.barraDeBotoes.BOTAOCLICADO = padrao; | 286 | i3GEO.barraDeBotoes.BOTAOCLICADO = padrao; |
281 | var l = i3GEO.barraDeBotoes.LISTABOTOES; | 287 | var l = i3GEO.barraDeBotoes.LISTABOTOES; |
282 | var b = l.length-1; | 288 | var b = l.length-1; |
@@ -334,12 +340,13 @@ i3GEO.barraDeBotoes = { | @@ -334,12 +340,13 @@ i3GEO.barraDeBotoes = { | ||
334 | y {Numeric} - posição y (pixels) da barra em relação ao mapa | 340 | y {Numeric} - posição y (pixels) da barra em relação ao mapa |
335 | */ | 341 | */ |
336 | inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y){ | 342 | inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y){ |
343 | + var numerobotoes,i,temp,elementos,nelementos,e; | ||
337 | var wj = "36px"; | 344 | var wj = "36px"; |
338 | var recuo = "0px"; | 345 | var recuo = "0px"; |
339 | var novoel = document.createElement("div"); | 346 | var novoel = document.createElement("div"); |
340 | novoel.id = idconteudonovo; | 347 | novoel.id = idconteudonovo; |
341 | novoel.style.display="block"; | 348 | novoel.style.display="block"; |
342 | - if(i3GEO.barraDeBotoes.SOICONES == false){ | 349 | + if(i3GEO.barraDeBotoes.SOICONES === false){ |
343 | novoel.style.border="1px solid gray"; | 350 | novoel.style.border="1px solid gray"; |
344 | novoel.style.background="white"; | 351 | novoel.style.background="white"; |
345 | } | 352 | } |
@@ -349,10 +356,10 @@ i3GEO.barraDeBotoes = { | @@ -349,10 +356,10 @@ i3GEO.barraDeBotoes = { | ||
349 | } | 356 | } |
350 | else{ | 357 | else{ |
351 | if (navm){novoel.style.filter='alpha(opacity=90)';} | 358 | if (navm){novoel.style.filter='alpha(opacity=90)';} |
352 | - else{novoel.style.opacity= .85;} | 359 | + else{novoel.style.opacity= 0.85;} |
353 | } | 360 | } |
354 | - var temp = ""; | ||
355 | - if (barraZoom == true) | 361 | + temp = ""; |
362 | + if (barraZoom === true) | ||
356 | {temp += i3GEO.navega.barraDeZoom.cria();} | 363 | {temp += i3GEO.navega.barraDeZoom.cria();} |
357 | temp += '<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:-6px;" ></div>'; | 364 | temp += '<div id="'+idconteudonovo+'_" style="left:'+recuo+';top:-6px;" ></div>'; |
358 | novoel.innerHTML = temp; | 365 | novoel.innerHTML = temp; |
@@ -364,7 +371,7 @@ i3GEO.barraDeBotoes = { | @@ -364,7 +371,7 @@ i3GEO.barraDeBotoes = { | ||
364 | if (navm) | 371 | if (navm) |
365 | {novoel.style.filter='alpha(opacity=90)';} | 372 | {novoel.style.filter='alpha(opacity=90)';} |
366 | else | 373 | else |
367 | - {novoel.style.opacity= .85;} | 374 | + {novoel.style.opacity = 0.85;} |
368 | } | 375 | } |
369 | }; | 376 | }; |
370 | novoel.onmouseout = function(){ | 377 | novoel.onmouseout = function(){ |
@@ -385,25 +392,25 @@ i3GEO.barraDeBotoes = { | @@ -385,25 +392,25 @@ i3GEO.barraDeBotoes = { | ||
385 | $i(idconteudo).innerHTML = ""; | 392 | $i(idconteudo).innerHTML = ""; |
386 | //faz o cálculo do número de botões que devem ficar visíveis em função do tamanho da barra | 393 | //faz o cálculo do número de botões que devem ficar visíveis em função do tamanho da barra |
387 | if(i3GEO.barraDeBotoes.AUTOALTURA){ | 394 | if(i3GEO.barraDeBotoes.AUTOALTURA){ |
388 | - var elementos = $i(idconteudonovo+"_").getElementsByTagName("img"); | 395 | + elementos = $i(idconteudonovo+"_").getElementsByTagName("img"); |
389 | if(elementos[0].id == "sobeferramentas"){ | 396 | if(elementos[0].id == "sobeferramentas"){ |
390 | try{ | 397 | try{ |
391 | - var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); | 398 | + elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
392 | var alturadisponivel = i3GEO.parametros.h - 4; | 399 | var alturadisponivel = i3GEO.parametros.h - 4; |
393 | - var numerobotoes = parseInt(alturadisponivel / 30); | ||
394 | - var nelementos = elementos.length; | ||
395 | - var i = 0; | 400 | + numerobotoes = parseInt(alturadisponivel / 30,10); |
401 | + nelementos = elementos.length; | ||
402 | + i = 0; | ||
396 | do{ | 403 | do{ |
397 | elementos[i].style.display = "none"; | 404 | elementos[i].style.display = "none"; |
398 | - var i = i + 1; | 405 | + i = i + 1; |
399 | } | 406 | } |
400 | - while(i < nelementos) | ||
401 | - var i = 0; | 407 | + while(i < nelementos); |
408 | + i = 0; | ||
402 | do{ | 409 | do{ |
403 | elementos[i].style.display = "inline"; | 410 | elementos[i].style.display = "inline"; |
404 | - var i = i + 1; | 411 | + i = i + 1; |
405 | } | 412 | } |
406 | - while(i < numerobotoes) | 413 | + while(i < numerobotoes); |
407 | }catch(e){} | 414 | }catch(e){} |
408 | //alert(i+" "+numerobotoes) | 415 | //alert(i+" "+numerobotoes) |
409 | if(i <= numerobotoes){ | 416 | if(i <= numerobotoes){ |
@@ -414,58 +421,60 @@ i3GEO.barraDeBotoes = { | @@ -414,58 +421,60 @@ i3GEO.barraDeBotoes = { | ||
414 | } | 421 | } |
415 | } | 422 | } |
416 | YAHOO.namespace("janelaBotoes.xp"); | 423 | YAHOO.namespace("janelaBotoes.xp"); |
417 | - if(i3GEO.barraDeBotoes.AUTOALTURA == false || barraZoom == true ) | ||
418 | - YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false,iframe:false } ); | 424 | + if(i3GEO.barraDeBotoes.AUTOALTURA === false || barraZoom === true ) |
425 | + {YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false,iframe:false } );} | ||
419 | else | 426 | else |
420 | - YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {height:i3GEO.parametros.h - 4,width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false,iframe:false } ); | 427 | + {YAHOO.janelaBotoes.xp.panel = new YAHOO.widget.Panel(idconteudonovo, {height:i3GEO.parametros.h - 4,width:wj, fixedcenter: false, constraintoviewport: false, underlay:"none", close:i3GEO.barraDeBotoes.PERMITEFECHAR, visible:true, draggable:i3GEO.barraDeBotoes.PERMITEDESLOCAR, modal:false,iframe:false } );} |
421 | 428 | ||
422 | - if(i3GEO.barraDeBotoes.SOICONES == true){ | ||
423 | - var temp = $i("i3geo_barra2"); | ||
424 | - if(temp){temp.style.borderWidth="0 0 0 0";} | ||
425 | - var temp = $i("i3geo_barra1"); | ||
426 | - if(temp){temp.style.borderWidth="0 0 0 0";} | 429 | + if(i3GEO.barraDeBotoes.SOICONES === true){ |
430 | + temp = $i("i3geo_barra2"); | ||
431 | + if(temp) | ||
432 | + {temp.style.borderWidth="0 0 0 0";} | ||
433 | + temp = $i("i3geo_barra1"); | ||
434 | + if(temp) | ||
435 | + {temp.style.borderWidth="0 0 0 0";} | ||
427 | } | 436 | } |
428 | - if((barraZoom == true) && i3GEO.Interface.ATUAL == "padrao") | 437 | + if((barraZoom === true) && i3GEO.Interface.ATUAL == "padrao") |
429 | {i3GEO.navega.barraDeZoom.ativa();} | 438 | {i3GEO.navega.barraDeZoom.ativa();} |
430 | YAHOO.janelaBotoes.xp.panel.render(); | 439 | YAHOO.janelaBotoes.xp.panel.render(); |
431 | - if(i3GEO.barraDeBotoes.AUTOALTURA == true){ | ||
432 | - var y = y - i3GEO.Interface.BARRABOTOESTOP + 2; | ||
433 | - var x = x - 3; | 440 | + if(i3GEO.barraDeBotoes.AUTOALTURA === true){ |
441 | + y = y - i3GEO.Interface.BARRABOTOESTOP + 2; | ||
442 | + x = x - 3; | ||
434 | } | 443 | } |
435 | YAHOO.janelaBotoes.xp.panel.moveTo(x,y); | 444 | YAHOO.janelaBotoes.xp.panel.moveTo(x,y); |
436 | if($i("sobeferramentas")){ | 445 | if($i("sobeferramentas")){ |
437 | $i("sobeferramentas").onclick = function(){ | 446 | $i("sobeferramentas").onclick = function(){ |
438 | - var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); | ||
439 | - var nelementos = elementos.length; | ||
440 | - if(elementos[0].style.display == "inline" && elementos[0].id == "") | 447 | + elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
448 | + nelementos = elementos.length; | ||
449 | + if(elementos[0].style.display == "inline" && elementos[0].id === "") | ||
441 | {return;} | 450 | {return;} |
442 | - if(elementos[1].style.display == "inline" && elementos[1].id == "") | 451 | + if(elementos[1].style.display == "inline" && elementos[1].id === "") |
443 | {return;} | 452 | {return;} |
444 | if(nelementos > 0){ | 453 | if(nelementos > 0){ |
445 | var mostra = elementos[0]; | 454 | var mostra = elementos[0]; |
446 | var i = 0; | 455 | var i = 0; |
447 | do{ | 456 | do{ |
448 | if(elementos[i].style){ | 457 | if(elementos[i].style){ |
449 | - if(elementos[i].style.display == "inline" && elementos[i].id == "") | 458 | + if(elementos[i].style.display == "inline" && elementos[i].id === "") |
450 | {break;} | 459 | {break;} |
451 | - if(elementos[i].style.display == "none" && elementos[i].id == "") | ||
452 | - {var mostra = elementos[i];} | 460 | + if(elementos[i].style.display == "none" && elementos[i].id === "") |
461 | + {mostra = elementos[i];} | ||
453 | } | 462 | } |
454 | - var i = i + 1; | 463 | + i = i + 1; |
455 | } | 464 | } |
456 | - while(i < nelementos) | 465 | + while(i < nelementos); |
457 | mostra.style.display="inline"; | 466 | mostra.style.display="inline"; |
458 | //esconde o último botao | 467 | //esconde o último botao |
459 | - var i = nelementos - 1; | ||
460 | - var mostra = elementos[i]; | 468 | + i = nelementos - 1; |
469 | + mostra = elementos[i]; | ||
461 | do{ | 470 | do{ |
462 | if(elementos[i].style){ | 471 | if(elementos[i].style){ |
463 | if(elementos[i].style.display == "inline") | 472 | if(elementos[i].style.display == "inline") |
464 | - {var mostra = elementos[i];break;} | 473 | + {mostra = elementos[i];break;} |
465 | } | 474 | } |
466 | - var i = i - 1; | 475 | + i = i - 1; |
467 | } | 476 | } |
468 | - while(i >= 0) | 477 | + while(i >= 0); |
469 | mostra.style.display="none"; | 478 | mostra.style.display="none"; |
470 | } | 479 | } |
471 | }; | 480 | }; |
@@ -474,38 +483,38 @@ i3GEO.barraDeBotoes = { | @@ -474,38 +483,38 @@ i3GEO.barraDeBotoes = { | ||
474 | $i("desceferramentas").onclick = function(){ | 483 | $i("desceferramentas").onclick = function(){ |
475 | var tipo = "inline"; | 484 | var tipo = "inline"; |
476 | if($i(idconteudonovo+"_")){ | 485 | if($i(idconteudonovo+"_")){ |
477 | - var elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); | 486 | + elementos = $i(idconteudonovo+"_").getElementsByTagName("div"); |
478 | if(elementos[elementos.length - 1].style.display == tipo) | 487 | if(elementos[elementos.length - 1].style.display == tipo) |
479 | {return;} | 488 | {return;} |
480 | - var nelementos = elementos.length; | 489 | + nelementos = elementos.length; |
481 | if(nelementos > 0){ | 490 | if(nelementos > 0){ |
482 | //esconde o primeiro botao | 491 | //esconde o primeiro botao |
483 | - var i = 0; | 492 | + i = 0; |
484 | do{ | 493 | do{ |
485 | - var e = elementos[i]; | 494 | + e = elementos[i]; |
486 | if(e.style){ | 495 | if(e.style){ |
487 | - if((e.style.display == "block") || (e.style.display == "inline") || (e.style.display == "")){ | ||
488 | - if(e.id == "") | 496 | + if((e.style.display == "block") || (e.style.display == "inline") || (e.style.display === "")){ |
497 | + if(e.id === "") | ||
489 | {e.style.display="none";break;} | 498 | {e.style.display="none";break;} |
490 | } | 499 | } |
491 | } | 500 | } |
492 | - var i = i + 1; | 501 | + i = i + 1; |
493 | } | 502 | } |
494 | - while(i < nelementos) | 503 | + while(i < nelementos); |
495 | //mostra o último botao | 504 | //mostra o último botao |
496 | - var i = nelementos-1; | 505 | + i = nelementos-1; |
497 | var mostra = elementos[i]; | 506 | var mostra = elementos[i]; |
498 | do{ | 507 | do{ |
499 | - var e = elementos[i]; | 508 | + e = elementos[i]; |
500 | if(e.style){ | 509 | if(e.style){ |
501 | if(e.style.display == tipo) | 510 | if(e.style.display == tipo) |
502 | {break;} | 511 | {break;} |
503 | if(e.style.display == "none") | 512 | if(e.style.display == "none") |
504 | - {var mostra = e;} | 513 | + {mostra = e;} |
505 | } | 514 | } |
506 | - var i = i - 1; | 515 | + i = i - 1; |
507 | } | 516 | } |
508 | - while(i >= 0) | 517 | + while(i >= 0); |
509 | mostra.style.display=tipo; | 518 | mostra.style.display=tipo; |
510 | } | 519 | } |
511 | } | 520 | } |
@@ -520,7 +529,7 @@ i3GEO.barraDeBotoes = { | @@ -520,7 +529,7 @@ i3GEO.barraDeBotoes = { | ||
520 | i3GEO.barraDeBotoes.ativaMenuContexto(idconteudonovo); | 529 | i3GEO.barraDeBotoes.ativaMenuContexto(idconteudonovo); |
521 | } | 530 | } |
522 | if($i(idconteudonovo+"_h")) | 531 | if($i(idconteudonovo+"_h")) |
523 | - $i(idconteudonovo+"_h").className = "hd2"; | 532 | + {$i(idconteudonovo+"_h").className = "hd2";} |
524 | }, | 533 | }, |
525 | /* | 534 | /* |
526 | Function: ativaMenuContexto | 535 | Function: ativaMenuContexto |
@@ -532,9 +541,8 @@ i3GEO.barraDeBotoes = { | @@ -532,9 +541,8 @@ i3GEO.barraDeBotoes = { | ||
532 | idbarra - {string} id da barra de botões onde o evento será ativado | 541 | idbarra - {string} id da barra de botões onde o evento será ativado |
533 | */ | 542 | */ |
534 | ativaMenuContexto: function(idbarra){ | 543 | ativaMenuContexto: function(idbarra){ |
535 | - function executar(a,b,c){ | ||
536 | - eval(c) | ||
537 | - }; | 544 | + function executar(a,b,c) |
545 | + {eval(c);} | ||
538 | var oFieldContextMenuItemData = [ | 546 | var oFieldContextMenuItemData = [ |
539 | { text: " <span class='container-close'></span>"}, | 547 | { text: " <span class='container-close'></span>"}, |
540 | { text: "Fechar barra", onclick: { fn: executar, obj: "i3GEO.barraDeBotoes.fecha('"+idbarra+"')" } }, | 548 | { text: "Fechar barra", onclick: { fn: executar, obj: "i3GEO.barraDeBotoes.fecha('"+idbarra+"')" } }, |
@@ -572,12 +580,11 @@ i3GEO.barraDeBotoes = { | @@ -572,12 +580,11 @@ i3GEO.barraDeBotoes = { | ||
572 | */ | 580 | */ |
573 | reativa: function(indice){ | 581 | reativa: function(indice){ |
574 | if(arguments.length == 1) | 582 | if(arguments.length == 1) |
575 | - i3GEO.barraDeBotoes.BARRAS[indice].show(); | 583 | + {i3GEO.barraDeBotoes.BARRAS[indice].show();} |
576 | else{ | 584 | else{ |
577 | var n = i3GEO.barraDeBotoes.BARRAS.length; | 585 | var n = i3GEO.barraDeBotoes.BARRAS.length; |
578 | - for(i=0;i<n;i++){ | ||
579 | - i3GEO.barraDeBotoes.BARRAS[i].show(); | ||
580 | - } | 586 | + for(i=0;i<n;i++) |
587 | + {i3GEO.barraDeBotoes.BARRAS[i].show();} | ||
581 | } | 588 | } |
582 | }, | 589 | }, |
583 | /* | 590 | /* |
@@ -604,16 +611,17 @@ i3GEO.barraDeBotoes = { | @@ -604,16 +611,17 @@ i3GEO.barraDeBotoes = { | ||
604 | document.body.appendChild(novoel); | 611 | document.body.appendChild(novoel); |
605 | //verifica se tem o slide de zoom | 612 | //verifica se tem o slide de zoom |
606 | var barraZoom = false; | 613 | var barraZoom = false; |
607 | - var temp = $i("vertMaisZoom"); | 614 | + temp = $i("vertMaisZoom"); |
608 | if(temp){ | 615 | if(temp){ |
609 | if(navm) | 616 | if(navm) |
610 | - var temp = temp.parentNode; | 617 | + {temp = temp.parentNode;} |
611 | else | 618 | else |
612 | - var temp = temp.parentNode.parentNode; | ||
613 | - if(temp.id == id){var barraZoom = true;} | 619 | + {temp = temp.parentNode.parentNode;} |
620 | + if(temp.id == id) | ||
621 | + {barraZoom = true;} | ||
614 | } | 622 | } |
615 | - var x = parseInt($i(i3GEO.barraDeBotoes.BARRAS[i].id+"_c").style.left); | ||
616 | - var y = parseInt($i(i3GEO.Interface.IDCORPO).style.top)+10;//parseInt($i(i3GEO.barraDeBotoes.BARRAS[i].id+"_c").style.top); | 623 | + var x = parseInt($i(i3GEO.barraDeBotoes.BARRAS[i].id+"_c").style.left,10); |
624 | + var y = parseInt($i(i3GEO.Interface.IDCORPO).style.top,10)+10;//parseInt($i(i3GEO.barraDeBotoes.BARRAS[i].id+"_c").style.top); | ||
617 | i3GEO.barraDeBotoes.BARRAS[i].destroy(); | 625 | i3GEO.barraDeBotoes.BARRAS[i].destroy(); |
618 | i3GEO.barraDeBotoes.inicializaBarra(novoel.id,i3GEO.barraDeBotoes.BARRAS[i].id+"x",barraZoom,x,y); | 626 | i3GEO.barraDeBotoes.inicializaBarra(novoel.id,i3GEO.barraDeBotoes.BARRAS[i].id+"x",barraZoom,x,y); |
619 | } | 627 | } |