Commit dc086f297528201db847087c8a10bb3507686c49
1 parent
b96db170
Exists in
master
and in
7 other branches
Alteração no estilo dos cabeçalhos das janelas flutuantes
Showing
6 changed files
with
83 additions
and
14 deletions
Show diff stats
classesjs/classe_ajuda.js
... | ... | @@ -163,7 +163,7 @@ i3GEO.ajuda = { |
163 | 163 | ny = i3GEO.parametros.h - 78; |
164 | 164 | } |
165 | 165 | texto = '<div id="janelaMenTexto" style="text-align:left;font-size:10px;color:rgb(80,80,80)">'+i3GEO.ajuda.MENSAGEMPADRAO+'</div>'; |
166 | - janela = i3GEO.janela.cria(largura,"auto","",nx,ny," ","i3geo_janelaMensagens",false); | |
166 | + janela = i3GEO.janela.cria(largura,"auto","",nx,ny," ","i3geo_janelaMensagens",false,"","","",true); | |
167 | 167 | janela[2].innerHTML = texto; |
168 | 168 | YAHOO.util.Event.addListener(janela[0].close, "click", i3GEO.ajuda.fechaJanela); |
169 | 169 | i3GEO.ajuda.ativaCookie(); | ... | ... |
classesjs/classe_barradebotoes.js
... | ... | @@ -596,6 +596,8 @@ i3GEO.barraDeBotoes = { |
596 | 596 | else |
597 | 597 | {novoel.style.opacity = 0.85;} |
598 | 598 | } |
599 | + if(i3GEO.barraDeBotoes.PERMITEFECHAR == true) | |
600 | + {novoel.getElementsByClassName('container-close')[0].style.display='block';} | |
599 | 601 | }; |
600 | 602 | novoel.onmouseout = function(){ |
601 | 603 | if(i3GEO.barraDeBotoes.TRANSICAOSUAVE){ |
... | ... | @@ -650,6 +652,8 @@ i3GEO.barraDeBotoes = { |
650 | 652 | YAHOO.namespace("janelaBotoes.xp"); |
651 | 653 | if(i3GEO.barraDeBotoes.AUTOALTURA === false || barraZoom === true || (elementos.length > numerobotoes)) |
652 | 654 | {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 } );} |
655 | + else | |
656 | + {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 } );} | |
653 | 657 | |
654 | 658 | if(i3GEO.barraDeBotoes.SOICONES === true){ |
655 | 659 | temp = $i("i3geo_barra2"); |
... | ... | @@ -665,7 +669,7 @@ i3GEO.barraDeBotoes = { |
665 | 669 | if(i3GEO.barraDeBotoes.AUTOALTURA === true){ |
666 | 670 | temp = $i("i3geo_barra2"); |
667 | 671 | if(temp) |
668 | - {temp.style.height = i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - 2 + "px";} | |
672 | + {temp.style.height = i3GEO.parametros.h - i3GEO.Interface.BARRABOTOESTOP - 1 + "px";} | |
669 | 673 | } |
670 | 674 | YAHOO.janelaBotoes.xp.panel.moveTo(x,y); |
671 | 675 | if($i("sobeferramentas")){ |
... | ... | @@ -756,6 +760,18 @@ i3GEO.barraDeBotoes = { |
756 | 760 | } |
757 | 761 | if($i(idconteudonovo+"_h")) |
758 | 762 | {$i(idconteudonovo+"_h").className = "hd2";} |
763 | + // | |
764 | + //esconde x | |
765 | + // | |
766 | + if(i3GEO.barraDeBotoes.PERMITEFECHAR == true){ | |
767 | + var id = $i(idconteudonovo); | |
768 | + if(id){ | |
769 | + var iconex = id.getElementsByClassName("container-close")[0]; | |
770 | + if(iconex){ | |
771 | + iconex.style.display='none'; | |
772 | + } | |
773 | + } | |
774 | + } | |
759 | 775 | }, |
760 | 776 | /* |
761 | 777 | Function: ativaMenuContexto | ... | ... |
classesjs/classe_janela.js
... | ... | @@ -170,14 +170,18 @@ i3GEO.janela = { |
170 | 170 | funcaoCabecalho {function} - (opcional) funcao que será executada quando o usuário clicar no cabecalho |
171 | 171 | |
172 | 172 | funcaoMinimiza {function} - (opcional) funcao que será executada para minimizar a janela |
173 | + | |
174 | + escondeX {boolean} - esconde ou não o botão de fechar, de forma que ele apenas apareça ao posicionar o mouse sobre o cabeçalho da janela | |
173 | 175 | |
174 | 176 | Return: |
175 | 177 | |
176 | 178 | {Array} Array contendo: objeto YAHOO.panel criado,elemento HTML com o cabecalho, elemento HTML com o corpo |
177 | 179 | */ |
178 | - cria: function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza){ | |
180 | + cria: function(wlargura,waltura,wsrc,nx,ny,texto,id,modal,classe,funcaoCabecalho,funcaoMinimiza,escondeX){ | |
179 | 181 | if(typeof(console) !== 'undefined'){console.info("i3GEO.janela.cria()");} |
180 | 182 | var i,wlargura_,ins,novoel,wdocaiframe,pos,temp,fix,underlay,ifr; |
183 | + if(!escondeX) | |
184 | + {escondeX = false;} | |
181 | 185 | if(i3GEO.janela.ANTESCRIA){ |
182 | 186 | for(i=0;i<i3GEO.janela.ANTESCRIA.length;i++) |
183 | 187 | {eval(i3GEO.janela.ANTESCRIA[i]);} |
... | ... | @@ -217,12 +221,16 @@ i3GEO.janela = { |
217 | 221 | {$i("i3geo").removeChild($i(id+"_c"));} |
218 | 222 | if($i(id)) |
219 | 223 | {$i("i3geo").removeChild($i(id));} |
220 | - ins = '<div id="'+id+'_cabecalho" class="hd" style="background-color:white;">'; | |
224 | + //var mouseout = "$i('"+id+"').getElementsByClassName('container-close')[0].style.display='none';"; | |
225 | + var mouseover = "$i('"+id+"').getElementsByClassName('container-close')[0].style.display='block';"; | |
226 | + if(funcaoMinimiza) | |
227 | + {mouseover += "$i('"+id+"_minimizaCabecalho').style.display='block';";} | |
228 | + ins = '<div onmouseover="'+mouseover+'" id="'+id+'_cabecalho" class="hd" style="background-color:white;">'; | |
221 | 229 | if(i3GEO.configura !== undefined) |
222 | 230 | {ins += "<img id='"+id+"_imagemCabecalho' style='position:absolute;left:3px;top:2px;visibility:hidden;' src=\'"+i3GEO.configura.locaplic+"/imagens/aguarde.gif\' />";} |
223 | 231 | ins += texto; |
224 | 232 | if(funcaoMinimiza) |
225 | - {ins += "<div id='"+id+"_minimizaCabecalho' class='container-minimiza' ></div>";} | |
233 | + {ins += "<div id='"+id+"_minimizaCabecalho' class='container-minimiza'></div>";} | |
226 | 234 | ins += '</div><div id="'+id+'_corpo" class="bd" style="'+i3GEO.janela.ESTILOBD+'">'; |
227 | 235 | if(wsrc !== "") |
228 | 236 | {ins += '<iframe name="'+id+'i" id="'+id+'i" valign="top" style="border:0px white solid"></iframe>';} |
... | ... | @@ -288,6 +296,17 @@ i3GEO.janela = { |
288 | 296 | {$i(id+"_minimizaCabecalho").onclick = funcaoMinimiza;} |
289 | 297 | YAHOO.util.Event.addListener(YAHOO.janelaDoca.xp.panel.close, "click", i3GEO.janela.fecha,YAHOO.janelaDoca.xp.panel,{id:id},true); |
290 | 298 | i3GEO.janela.ULTIMOZINDEX++; |
299 | + // | |
300 | + //esconde/mostra ícone de fechar a janela | |
301 | + // | |
302 | + if(escondeX == true){ | |
303 | + var iconex = $i(id).getElementsByClassName("container-close")[0]; | |
304 | + if(iconex) | |
305 | + {iconex.style.display='none';} | |
306 | + iconex = $i(id+"_minimizaCabecalho"); | |
307 | + if(iconex) | |
308 | + {iconex.style.display='none';} | |
309 | + } | |
291 | 310 | return([YAHOO.janelaDoca.xp.panel,$i(id+"_cabecalho"),$i(id+"_corpo")]); |
292 | 311 | }, |
293 | 312 | /* | ... | ... |
classesjs/classe_maparef.js
... | ... | @@ -152,16 +152,18 @@ i3GEO.maparef = { |
152 | 152 | novoel.id = "i3geo_winRef"; |
153 | 153 | novoel.style.display="none"; |
154 | 154 | novoel.style.borderColor="gray"; |
155 | + | |
155 | 156 | ins = ""; |
156 | 157 | if(i3GEO.maparef.PERMITEDESLOCAR){ |
157 | - ins += '<div class="hd" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">'; | |
158 | - ins += '<span id=maparefmaismenosZoom > '; | |
158 | + var over = "$i('refDinamico').style.display='inline-block';$i('i3geo_winRef').getElementsByClassName('container-close')[0].style.display='block'"; | |
159 | + ins += '<div class="hd" onmouseover="'+over+'" style="text-align:left;z-index:20;padding-left: 0px;padding-bottom: 3px;padding-top: 1px;">'; | |
160 | + ins += '<span id=maparefmaismenosZoom style=display:none > '; | |
159 | 161 | temp = "javascript:if(i3GEO.maparef.fatorZoomDinamico == -1){i3GEO.maparef.fatorZoomDinamico = 1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico + 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();"; |
160 | 162 | ins += "<img class=mais onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" />"; |
161 | 163 | temp = "javascript:if(i3GEO.maparef.fatorZoomDinamico == 1){i3GEO.maparef.fatorZoomDinamico = -1};i3GEO.maparef.fatorZoomDinamico = i3GEO.maparef.fatorZoomDinamico - 1 ;$i(\"refDinamico\").checked = true;i3GEO.maparef.atualiza();"; |
162 | 164 | ins += "<img class=menos onclick='"+temp+"' src="+i3GEO.util.$im("branco.gif")+" /></span> "; |
163 | 165 | if(i3GEO.maparef.SELETORTIPO){ |
164 | - ins += "<select style='font-size:9px;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>"; | |
166 | + ins += "<select style='font-size:9px;display:none;' id='refDinamico' onchange='javascript:i3GEO.parametros.celularef=\"\";i3GEO.maparef.atualiza()'>"; | |
165 | 167 | ins += "<option value='fixo' select >fixo</option>"; |
166 | 168 | ins += "<option value='mapa' >mapa</option>"; |
167 | 169 | ins += "<option value='dinamico' >dinâmico</option>"; |
... | ... | @@ -234,6 +236,13 @@ i3GEO.maparef = { |
234 | 236 | $i("i3geo_winRef_h").className = "hd2"; |
235 | 237 | if(navm) |
236 | 238 | {$i("i3geo_winRef_h").style.width = "156px";} |
239 | + var id = $i("i3geo_winRef"); | |
240 | + if(id){ | |
241 | + var iconex = id.getElementsByClassName("container-close")[0]; | |
242 | + if(iconex){ | |
243 | + iconex.style.display='none'; | |
244 | + } | |
245 | + } | |
237 | 246 | }, |
238 | 247 | /* |
239 | 248 | Function: atualiza | ... | ... |
classesjs/classe_util.js
... | ... | @@ -1277,11 +1277,16 @@ i3GEO.util = { |
1277 | 1277 | ini - funcao do JS que será executada ao ser carregado o script (pode ser "") |
1278 | 1278 | |
1279 | 1279 | id - id do elemento script que será criado |
1280 | + | |
1281 | + aguarde {boolena} - mostra ou não a janela de aguarde | |
1280 | 1282 | */ |
1281 | - scriptTag: function(js,ini,id){ | |
1283 | + scriptTag: function(js,ini,id,aguarde){ | |
1282 | 1284 | if(typeof(console) !== 'undefined'){console.info("i3GEO.util.scriptTag()");} |
1283 | - var head,script; | |
1285 | + if(!aguarde){var aguarde = true;} | |
1286 | + var head,script, tipojanela = i3GEO.janela.ESTILOAGUARDE; | |
1284 | 1287 | if(!$i(id) || id === ""){ |
1288 | + i3GEO.janela.ESTILOAGUARDE = "reduzida"; | |
1289 | + i3GEO.janela.abreAguarde(id+"aguarde","Carregando JS"); | |
1285 | 1290 | head= document.getElementsByTagName('head')[0]; |
1286 | 1291 | script= document.createElement('script'); |
1287 | 1292 | script.type= 'text/javascript'; |
... | ... | @@ -1289,11 +1294,20 @@ i3GEO.util = { |
1289 | 1294 | if(navm){ |
1290 | 1295 | script.onreadystatechange = function(){ |
1291 | 1296 | if(this.readyState === 'loaded' || this.readyState === 'complete') |
1292 | - {eval(ini);} | |
1297 | + { | |
1298 | + i3GEO.janela.fechaAguarde(id+"aguarde"); | |
1299 | + i3GEO.janela.ESTILOAGUARDE = tipojanela; | |
1300 | + eval(ini); | |
1301 | + } | |
1302 | + }; | |
1303 | + } | |
1304 | + else{ | |
1305 | + script.onload=function(){ | |
1306 | + i3GEO.janela.fechaAguarde(id+"aguarde"); | |
1307 | + i3GEO.janela.ESTILOAGUARDE = tipojanela; | |
1308 | + eval(ini); | |
1293 | 1309 | }; |
1294 | 1310 | } |
1295 | - else | |
1296 | - {script.onload=function(){eval(ini);};} | |
1297 | 1311 | } |
1298 | 1312 | script.src= js; |
1299 | 1313 | if(id !== "") | ... | ... |
css/corrigeyui_geral.css
... | ... | @@ -68,12 +68,19 @@ height:20px; |
68 | 68 | } |
69 | 69 | |
70 | 70 | .yui-skin-sam .yui-panel .hd2 { |
71 | -background:transparent url(../pacotes/yui270/build/assets/skins/sam/sprite.png) repeat-x scroll 0 0px; | |
71 | +background:transparent url(../pacotes/yui270/build/assets/skins/sam/sprite.png) repeat-x scroll 0 -200px; | |
72 | 72 | color:#000000; |
73 | 73 | font-size:70%; |
74 | 74 | font-weight:bold; |
75 | 75 | line-height:2; |
76 | 76 | padding:0 10px; |
77 | +opacity:.80; | |
78 | +filter:alpha(opacity=80); | |
79 | +} | |
80 | + | |
81 | +.yui-skin-sam .yui-panel .hd { | |
82 | +opacity:.80; | |
83 | +filter:alpha(opacity=80); | |
77 | 84 | } |
78 | 85 | |
79 | 86 | .yui-skin-sam .container-close { |
... | ... | @@ -85,6 +92,8 @@ right:1px; |
85 | 92 | top:1px; |
86 | 93 | width:25px; |
87 | 94 | z-index:2001; |
95 | +opacity:.80; | |
96 | +filter:alpha(opacity=80); | |
88 | 97 | } |
89 | 98 | |
90 | 99 | .yui-skin-sam .container-minimiza { |
... | ... | @@ -96,6 +105,8 @@ right:30px; |
96 | 105 | top:1px; |
97 | 106 | width:25px; |
98 | 107 | z-index:2001; |
108 | +opacity:.8; | |
109 | +filter:alpha(opacity=80); | |
99 | 110 | } |
100 | 111 | |
101 | 112 | .yui-skin-sam .yui-simple-dialog .bd .yui-icon { | ... | ... |