Commit 75b86a091755966e88599a3804ec7ec95690b125
1 parent
d7f21506
Exists in
master
and in
7 other branches
--no commit message
Showing
1 changed file
with
11 additions
and
7 deletions
Show diff stats
classesjs/classe_util.js
@@ -1303,20 +1303,24 @@ i3GEO.util = { | @@ -1303,20 +1303,24 @@ i3GEO.util = { | ||
1303 | */ | 1303 | */ |
1304 | scriptTag: function(js,ini,id,aguarde){ | 1304 | scriptTag: function(js,ini,id,aguarde){ |
1305 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.scriptTag()");} | 1305 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.scriptTag()");} |
1306 | - if(!aguarde){aguarde = true;} | ||
1307 | - var head,script, tipojanela = ""; | ||
1308 | - if(i3GEO.janela) | ||
1309 | - {tipojanela = i3GEO.janela.ESTILOAGUARDE;} | 1306 | + if(!aguarde){aguarde = false;} |
1307 | + var head,script, | ||
1308 | + tipojanela = i3GEO.janela.ESTILOAGUARDE; | ||
1309 | + | ||
1310 | if(!$i(id) || id === ""){ | 1310 | if(!$i(id) || id === ""){ |
1311 | - head= document.getElementsByTagName('head')[0]; | ||
1312 | - script= document.createElement('script'); | 1311 | + if(i3GEO.janela && aguarde === true){ |
1312 | + i3GEO.janela.ESTILOAGUARDE = "reduzida"; | ||
1313 | + i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS"); | ||
1314 | + } | ||
1315 | + head = document.getElementsByTagName('head')[0]; | ||
1316 | + script = document.createElement('script'); | ||
1313 | script.type= 'text/javascript'; | 1317 | script.type= 'text/javascript'; |
1314 | if(ini !== ""){ | 1318 | if(ini !== ""){ |
1315 | if(navm){ | 1319 | if(navm){ |
1316 | script.onreadystatechange = function(){ | 1320 | script.onreadystatechange = function(){ |
1317 | if(this.readyState === 'loaded' || this.readyState === 'complete') | 1321 | if(this.readyState === 'loaded' || this.readyState === 'complete') |
1318 | { | 1322 | { |
1319 | - if(i3GEO.janela){ | 1323 | + if(i3GEO.janela && aguarde === true){ |
1320 | i3GEO.janela.fechaAguarde(id+"aguarde"); | 1324 | i3GEO.janela.fechaAguarde(id+"aguarde"); |
1321 | i3GEO.janela.ESTILOAGUARDE = tipojanela; | 1325 | i3GEO.janela.ESTILOAGUARDE = tipojanela; |
1322 | } | 1326 | } |