Commit 94533ada23434c6bc3e29a4d1379ee7d9c969674
1 parent
fcba7736
Exists in
master
and in
7 other branches
Validação com jslint
Showing
1 changed file
with
15 additions
and
16 deletions
Show diff stats
classesjs/classe_i3geo.js
@@ -183,7 +183,6 @@ i3GEO = { | @@ -183,7 +183,6 @@ i3GEO = { | ||
183 | cria:function(){ | 183 | cria:function(){ |
184 | if (window.location.href.split("?")[1]){ | 184 | if (window.location.href.split("?")[1]){ |
185 | i3GEO.configura.sid = window.location.href.split("?")[1]; | 185 | i3GEO.configura.sid = window.location.href.split("?")[1]; |
186 | - g_sid = i3GEO.configura.sid; | ||
187 | // | 186 | // |
188 | //a biblioteca YUI, por algum motivo, acrescenta # na URL. O # precisa ser removido, caso contrário, a opção de reload da página pelo browser as vezes não funciona | 187 | //a biblioteca YUI, por algum motivo, acrescenta # na URL. O # precisa ser removido, caso contrário, a opção de reload da página pelo browser as vezes não funciona |
189 | // | 188 | // |
@@ -192,8 +191,11 @@ i3GEO = { | @@ -192,8 +191,11 @@ i3GEO = { | ||
192 | } | 191 | } |
193 | else | 192 | else |
194 | {i3GEO.configura.sid = "";} | 193 | {i3GEO.configura.sid = "";} |
194 | + // | ||
195 | //para efeitos de compatibilidade | 195 | //para efeitos de compatibilidade |
196 | + // | ||
196 | g_panM = "nao"; | 197 | g_panM = "nao"; |
198 | + g_sid = i3GEO.configura.sid; | ||
197 | try {i3GEO.configura.locaplic = g_locaplic;} | 199 | try {i3GEO.configura.locaplic = g_locaplic;} |
198 | catch(e){g_locaplic = i3GEO.configura.locaplic;} | 200 | catch(e){g_locaplic = i3GEO.configura.locaplic;} |
199 | try{i3GEO.configura.diminuixM = g_diminuixM;}catch(e){} | 201 | try{i3GEO.configura.diminuixM = g_diminuixM;}catch(e){} |
@@ -208,11 +210,9 @@ i3GEO = { | @@ -208,11 +210,9 @@ i3GEO = { | ||
208 | // | 210 | // |
209 | //subtrai barra de rolagem | 211 | //subtrai barra de rolagem |
210 | // | 212 | // |
211 | - try{ | ||
212 | - var a = i3GEO.util.getScrollerWidth(); | ||
213 | - diminuiy += a; | ||
214 | - } | ||
215 | - catch(r){} | 213 | + try{diminuiy += i3GEO.util.getScrollerWidth();} |
214 | + catch(e){} | ||
215 | + // | ||
216 | var menos = 0; | 216 | var menos = 0; |
217 | if ($i("contemFerramentas")) | 217 | if ($i("contemFerramentas")) |
218 | {menos += parseInt($i("contemFerramentas").style.width,10);} | 218 | {menos += parseInt($i("contemFerramentas").style.width,10);} |
@@ -247,9 +247,10 @@ i3GEO = { | @@ -247,9 +247,10 @@ i3GEO = { | ||
247 | {var h = parseInt(temp.style.height,10);} | 247 | {var h = parseInt(temp.style.height,10);} |
248 | } | 248 | } |
249 | } | 249 | } |
250 | - if($i("contemImg")){ | ||
251 | - $i("contemImg").style.height=h + "px"; | ||
252 | - $i("contemImg").style.width=w + "px"; | 250 | + var temp = $i("contemImg"); |
251 | + if(temp){ | ||
252 | + temp.style.height=h + "px"; | ||
253 | + temp.style.width=w + "px"; | ||
253 | } | 254 | } |
254 | i3GEO.Interface.cria(w,h); | 255 | i3GEO.Interface.cria(w,h); |
255 | i3GEO.parametros = { | 256 | i3GEO.parametros = { |
@@ -323,7 +324,7 @@ i3GEO = { | @@ -323,7 +324,7 @@ i3GEO = { | ||
323 | if (titulo !== "") | 324 | if (titulo !== "") |
324 | {top.document.title = titulo;} | 325 | {top.document.title = titulo;} |
325 | } | 326 | } |
326 | - catch(e){var e = "";} | 327 | + catch(e){} |
327 | i3GEO.ajuda.mostraJanela("Tempo de desenho em segundos: "+tempo,""); | 328 | i3GEO.ajuda.mostraJanela("Tempo de desenho em segundos: "+tempo,""); |
328 | i3GEO.parametros.mapexten= mapexten; | 329 | i3GEO.parametros.mapexten= mapexten; |
329 | i3GEO.parametros.mapscale= parseInt(mapscale,10); | 330 | i3GEO.parametros.mapscale= parseInt(mapscale,10); |
@@ -389,10 +390,7 @@ i3GEO = { | @@ -389,10 +390,7 @@ i3GEO = { | ||
389 | var abreJM = "sim"; | 390 | var abreJM = "sim"; |
390 | if (i3GEO.util.pegaCookie("g_janelaMen")){ | 391 | if (i3GEO.util.pegaCookie("g_janelaMen")){ |
391 | var abreJM = i3GEO.util.pegaCookie("g_janelaMen"); | 392 | var abreJM = i3GEO.util.pegaCookie("g_janelaMen"); |
392 | - if(abreJM == "sim") | ||
393 | - {i3GEO.configura.iniciaJanelaMensagens = true;} | ||
394 | - else | ||
395 | - {i3GEO.configura.iniciaJanelaMensagens = false;} | 393 | + i3GEO.configura.iniciaJanelaMensagens = (abreJM == "sim") ? true : false; |
396 | } | 394 | } |
397 | if(i3GEO.configura.iniciaJanelaMensagens === true) | 395 | if(i3GEO.configura.iniciaJanelaMensagens === true) |
398 | {i3GEO.ajuda.abreJanela();} | 396 | {i3GEO.ajuda.abreJanela();} |
@@ -407,7 +405,7 @@ i3GEO = { | @@ -407,7 +405,7 @@ i3GEO = { | ||
407 | if($i("mst")) | 405 | if($i("mst")) |
408 | {$i("mst").style.visibility ="hidden";} | 406 | {$i("mst").style.visibility ="hidden";} |
409 | // | 407 | // |
410 | - //se g_sid="", o html foi aberto diretamente | 408 | + //se i3GEO.configura.sid = "", o html foi aberto diretamente |
411 | //então, é necessário criar os arquivos temporários do mapa | 409 | //então, é necessário criar os arquivos temporários do mapa |
412 | //essa operação deve ser assíncrona | 410 | //essa operação deve ser assíncrona |
413 | // | 411 | // |
@@ -520,7 +518,8 @@ i3GEO = { | @@ -520,7 +518,8 @@ i3GEO = { | ||
520 | catch(e){} | 518 | catch(e){} |
521 | i3GEO.Interface.redesenha(); | 519 | i3GEO.Interface.redesenha(); |
522 | //caso esteja na função de identificação | 520 | //caso esteja na função de identificação |
523 | - if($i("i3GEOidentificalistaTemas")){g_tipoacao = "identifica";g_operacao='identifica';} | 521 | + if($i("i3GEOidentificalistaTemas")) |
522 | + {g_tipoacao = "identifica";g_operacao='identifica';} | ||
524 | else | 523 | else |
525 | {g_operacao = "";} | 524 | {g_operacao = "";} |
526 | i3GEO.parametros.mapexten = mapexten; | 525 | i3GEO.parametros.mapexten = mapexten; |