Commit 0ffcf54711a1f083cffade304d1b78f3f266a9a7

Authored by Edmar Moretti
1 parent f76db33a

--no commit message

classesjs/classe_coordenadas.js
... ... @@ -591,20 +591,20 @@ i3GEO.coordenadas = {
591 591 //cria a caixa de seleção
592 592 //
593 593 for(i=0;i<n;i += 1){
594   - temp = this.config[tipos[i]];
  594 + temp = i3GEO.coordenadas.config[tipos[i]];
595 595 if(temp.ativo === true){
596 596 caixa += "<option value='"+tipos[i]+"'>"+temp.titulo+"</option>";
597 597 }
598 598 }
599 599 caixa += "</select>";
600   - if(this.formato !== "bloco")
  600 + if(i3GEO.coordenadas.formato !== "bloco")
601 601 {caixa = "";}
602 602 for(i=0;i<n;i += 1){
603   - temp = this.config[tipos[i]];
  603 + temp = i3GEO.coordenadas.config[tipos[i]];
604 604 if(temp.ativo === true){
605 605 if(temp.tipo === "geo"){
606 606 ins += i3GEO.coordenadas.criaMascaraDMS(onde+tipos[i],temp.titulo,caixa);
607   - if(this.formato === "separado"){
  607 + if(i3GEO.coordenadas.formato === "separado"){
608 608 try{$i(temp.idhtml).innerHTML = ins;}
609 609 catch(e){}
610 610 ins = "";
... ... @@ -684,7 +684,7 @@ i3GEO.coordenadas = {
684 684 if(i3GEO.eventos.MOUSEMOVE.toString().search("i3GEO.coordenadas.limpaModoTexto()") < 0)
685 685 {i3GEO.eventos.MOUSEMOVE.push("i3GEO.coordenadas.limpaModoTexto()");}
686 686 }
687   - if(this.formato === "bloco")
  687 + if(i3GEO.coordenadas.formato === "bloco")
688 688 {i3GEO.coordenadas.ativaBloco(onde);}
689 689 }
690 690 catch(men){}
... ...
classesjs/classe_gadgets.js
... ... @@ -132,9 +132,9 @@ i3GEO.gadgets = {
132 132 mostraVersao: function(id){
133 133 if(typeof(console) !== 'undefined'){console.info("i3GEO.gadgets.mostraVersão()");}
134 134 if(arguments.length === 0 || id === "")
135   - {id = this.PARAMETROS.mostraVersao.idhtml;}
  135 + {id = i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml;}
136 136 else
137   - {this.PARAMETROS.mostraVersao.idhtml = id;}
  137 + {i3GEO.gadgets.PARAMETROS.mostraVersao.idhtml = id;}
138 138 i3GEO.util.defineValor(id,"innerHTML",i3GEO.parametros.mensageminicia);
139 139 },
140 140 /*
... ... @@ -176,7 +176,7 @@ i3GEO.gadgets = {
176 176 if(typeof(console) !== 'undefined'){console.info("i3GEO.gadgets.mostraInserirKml()");}
177 177 var i,ins,temp;
178 178 if(arguments.length === 0)
179   - {id = this.PARAMETROS.mostraInserirKml.idhtml;}
  179 + {id = i3GEO.gadgets.PARAMETROS.mostraInserirKml.idhtml;}
180 180 if($i(id)){
181 181 if(!$i("i3geo_urlkml")){
182 182 i = $inputText(id,"280","i3geo_urlkml","kml url","40","");
... ... @@ -206,7 +206,7 @@ i3GEO.gadgets = {
206 206 if(typeof(console) !== 'undefined'){console.info("i3GEO.gadgets.mostraEscalaNumerica()");}
207 207 var i,ins,temp;
208 208 if(arguments.length === 0)
209   - {id = this.PARAMETROS.mostraEscalaNumerica.idhtml;}
  209 + {id = i3GEO.gadgets.PARAMETROS.mostraEscalaNumerica.idhtml;}
210 210 if($i(id)){
211 211 $i(id).style.display = "block";
212 212 atualizaEscalaNumerica = function(escala){
... ... @@ -257,7 +257,7 @@ i3GEO.gadgets = {
257 257 mostraEscalaGrafica: function(id){
258 258 if(typeof(console) !== 'undefined'){console.info("i3GEO.gadgets.mostraEscalaGrafica()");}
259 259 if(arguments.length === 0)
260   - {id = this.PARAMETROS.mostraEscalaGrafica.idhtml;}
  260 + {id = i3GEO.gadgets.PARAMETROS.mostraEscalaGrafica.idhtml;}
261 261 var e,temp,ins;
262 262 if($i(id)){
263 263 atualizaEscalaGrafica = function(){
... ... @@ -299,7 +299,7 @@ i3GEO.gadgets = {
299 299 if(typeof(console) !== 'undefined'){console.info("i3GEO.gadgets.mostraBuscaRapida()");}
300 300 var i,ins,temp;
301 301 if(arguments.length === 0)
302   - {id = this.PARAMETROS.mostraBuscaRapida.idhtml;}
  302 + {id = i3GEO.gadgets.PARAMETROS.mostraBuscaRapida.idhtml;}
303 303 if($i(id)){
304 304 i3geo_buscaRapida = function(){
305 305 if ($i("valorBuscaRapida").value === "")
... ... @@ -765,9 +765,9 @@ i3GEO.gadgets = {
765 765 mostraMenuSuspenso: function(id){
766 766 if(typeof(console) !== 'undefined'){console.info("i3GEO.gadgets.mostraMenuSuspenso()");}
767 767 if(arguments.length === 0)
768   - {id = this.PARAMETROS.mostraMenuSuspenso.idhtml;}
  768 + {id = i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml;}
769 769 else
770   - {this.PARAMETROS.mostraMenuSuspenso.idhtml = id;}
  770 + {i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.idhtml = id;}
771 771 var objid,ins,sobe,alinhamento,n,i,estilo,t,onMenuBarBeforeRender,temp,ifr,
772 772 MM = YAHOO.widget.MenuManager;
773 773 objid = $i(id);
... ... @@ -795,8 +795,8 @@ i3GEO.gadgets = {
795 795 else{
796 796 ins = "";
797 797 alinhamento = "";
798   - if(this.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){
799   - alinhamento = "left:"+this.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;";
  798 + if(i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda){
  799 + alinhamento = "left:"+i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.deslocaEsquerda*-1+"px;";
800 800 }
801 801 ins += '<div class="bd" style="top:0px;'+alinhamento+'display:block;align:right;border: 0px solid white;z-index:6000;line-height:1.4" >' +
802 802 '<ul class="first-of-type" style="display:block;border:0px solid white;top:10px;">';
... ...
classesjs/classe_idioma.js
... ... @@ -114,7 +114,7 @@ i3GEO.idioma = {
114 114 */
115 115 define: function(codigo) {
116 116 if(typeof(console) !== 'undefined'){console.info("i3GEO.idioma.define()");}
117   - this.ATUAL = codigo;
  117 + i3GEO.idioma.ATUAL = codigo;
118 118 i3GEO.util.insereCookie("i3geolingua",codigo);
119 119 },
120 120 /*
... ... @@ -126,7 +126,7 @@ i3GEO.idioma = {
126 126 {string} Código do idioma.
127 127 */
128 128 retornaAtual: function() {
129   - return (this.ATUAL);
  129 + return (i3GEO.idioma.ATUAL);
130 130 },
131 131 /*
132 132 Function: defineDicionario
... ... @@ -153,7 +153,7 @@ i3GEO.idioma = {
153 153 }
154 154 */
155 155 defineDicionario: function(obj) {
156   - this.DICIONARIO = obj;
  156 + i3GEO.idioma.DICIONARIO = obj;
157 157 },
158 158 /*
159 159 Function: alteraDicionario
... ... @@ -168,7 +168,7 @@ i3GEO.idioma = {
168 168  
169 169 */
170 170 alteraDicionario: function(id,novo) {
171   - this.DICIONARIO[id][0][i3GEO.idioma.ATUAL] = novo;
  171 + i3GEO.idioma.DICIONARIO[id][0][i3GEO.idioma.ATUAL] = novo;
172 172 },
173 173 /*
174 174 Function: traduzir
... ... @@ -220,7 +220,7 @@ i3GEO.idioma = {
220 220 for (var k in novodic)
221 221 {
222 222 if(novodic.hasOwnProperty(k))
223   - {this.DICIONARIO[k] = novodic[k];}
  223 + {i3GEO.idioma.DICIONARIO[k] = novodic[k];}
224 224 }
225 225 },
226 226 /*
... ... @@ -231,8 +231,8 @@ i3GEO.idioma = {
231 231 mostraDicionario: function() {
232 232 var w,k;
233 233 w = window.open();
234   - for (k in this.DICIONARIO){
235   - if(this.DICIONARIO.hasOwnProperty(k))
  234 + for (k in i3GEO.idioma.DICIONARIO){
  235 + if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k))
236 236 {w.document.write(k+" = "+i3GEO.idioma.traduzir(k)+"<br>");}
237 237 }
238 238 },
... ... @@ -262,7 +262,7 @@ i3GEO.idioma = {
262 262 {Array} Array com os códigos de idioma disponíveis.
263 263 */
264 264 listaIdiomas: function() {
265   - for(var k in this.DICIONARIO){
  265 + for(var k in i3GEO.idioma.DICIONARIO){
266 266 if(i3GEO.idioma.DICIONARIO.hasOwnProperty(k))
267 267 {return (i3GEO.util.listaChaves(i3GEO.idioma.DICIONARIO[k][0]));}
268 268 }
... ... @@ -277,14 +277,14 @@ i3GEO.idioma = {
277 277 */
278 278 mostraSeletor: function(){
279 279 if(typeof(console) !== 'undefined'){console.info("i3GEO.idioma.mostraSeletor()");}
280   - if(!this.MOSTRASELETOR){return;}
  280 + if(!i3GEO.idioma.MOSTRASELETOR){return;}
281 281 //
282 282 //monta o elemento HTML com as bandeiras
283 283 //
284 284 var ins,n,w,i,pos,novoel,temp,
285 285 iu = i3GEO.util;
286 286 ins = "";
287   - n = this.SELETORES.length;
  287 + n = i3GEO.idioma.SELETORES.length;
288 288 if($i("i3geo") && i3GEO.parametros.w < 550)
289 289 {w = "width:12px;";}
290 290 else {w = "";}
... ... @@ -300,8 +300,8 @@ i3GEO.idioma = {
300 300 if(temp === "it")
301 301 {ins += 'alt="Italiano" id="italiano" />';}
302 302 }
303   - if(this.IDSELETOR !== "" && $i(this.IDSELETOR))
304   - {$i(this.IDSELETOR).innerHTML = ins;}
  303 + if(i3GEO.idioma.IDSELETOR !== "" && $i(i3GEO.idioma.IDSELETOR))
  304 + {$i(i3GEO.idioma.IDSELETOR).innerHTML = ins;}
305 305 else{
306 306 pos = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDCORPO));
307 307 if(!$i("i3geoseletoridiomas")){
... ...
classesjs/classe_interface.js
... ... @@ -679,7 +679,8 @@ i3GEO.Interface = {
679 679 var f,ins,
680 680 mi = i3GEO.Interface.openlayers.MINEXTENT,
681 681 ma = i3GEO.Interface.openlayers.MAXEXTENT,
682   - i = $i(i3GEO.Interface.IDCORPO);
  682 + i = $i(i3GEO.Interface.IDCORPO),
  683 + bb = i3GEO.barraDeBotoes;
683 684 if(i){
684 685 f = $i("openlayers");
685 686 if(!f){
... ... @@ -691,9 +692,9 @@ i3GEO.Interface = {
691 692 f.style.height = h;
692 693 }
693 694 i3GEO.Interface.IDMAPA = "openlayers";
694   - i3GEO.barraDeBotoes.INCLUIBOTAO.zoomli = true;
695   - i3GEO.barraDeBotoes.INCLUIBOTAO.pan = true;
696   - i3GEO.barraDeBotoes.INCLUIBOTAO.zoomtot = true;
  695 + bb.INCLUIBOTAO.zoomli = true;
  696 + bb.INCLUIBOTAO.pan = true;
  697 + bb.INCLUIBOTAO.zoomtot = true;
697 698 i3geoOL = new OpenLayers.Map('openlayers', {
698 699 controls: [],
699 700 fractionalZoom: true,
... ... @@ -708,18 +709,19 @@ i3GEO.Interface = {
708 709 //monta o mapa após receber o resultado da criação do mapfile temporário
709 710 //
710 711 var montaMapa = function(){
711   - var pz,pos,temp,propriedades,layers,nlayers,i,texto,estilo;
712   - i3GEO.Interface.openlayers.criaLayers();
713   - i3GEO.Interface.openlayers.registraEventos();
714   - i3GEO.Interface.openlayers.zoom2ext(i3GEO.parametros.mapexten);
715   - if(i3GEO.Interface.openlayers.GADGETS.PanZoomBar === true){
  712 + var pz,pos,temp,propriedades,layers,nlayers,i,texto,estilo,
  713 + openlayers = i3GEO.Interface.openlayers;
  714 + openlayers.criaLayers();
  715 + openlayers.registraEventos();
  716 + openlayers.zoom2ext(i3GEO.parametros.mapexten);
  717 + if(openlayers.GADGETS.PanZoomBar === true){
716 718 pz = new OpenLayers.Control.PanZoomBar();
717 719 i3geoOL.addControl(pz);
718 720 pz.div.style.zIndex = 5000;
719 721 pz.div.style.top = i3GEO.Interface.BARRADEZOOMTOP+"px";
720 722 pz.div.style.left = i3GEO.Interface.BARRADEZOOMLEFT+"px";
721 723 }
722   - if(i3GEO.Interface.openlayers.GADGETS.PanZoom === true){
  724 + if(openlayers.GADGETS.PanZoom === true){
723 725 pz = new OpenLayers.Control.PanZoom();
724 726 i3geoOL.addControl(pz);
725 727 pz.div.style.zIndex = 5000;
... ... @@ -742,15 +744,15 @@ i3GEO.Interface = {
742 744 i3GEO.util.arvore("<b>"+$trad("p16")+"</b>","listaLayersBase",temp);
743 745 }
744 746 else{
745   - if(i3GEO.Interface.openlayers.GADGETS.LayerSwitcher === true)
  747 + if(openlayers.GADGETS.LayerSwitcher === true)
746 748 {i3geoOL.addControl(new OpenLayers.Control.LayerSwitcher());}
747 749 }
748   - if(i3GEO.Interface.openlayers.GADGETS.ScaleLine === true){
  750 + if(openlayers.GADGETS.ScaleLine === true){
749 751 pz = new OpenLayers.Control.ScaleLine();
750 752 i3geoOL.addControl(pz);
751 753 pz.div.style.left = i3GEO.Interface.BARRADEZOOMLEFT+5+"px";
752 754 }
753   - if(i3GEO.Interface.openlayers.GADGETS.OverviewMap === true)
  755 + if(openlayers.GADGETS.OverviewMap === true)
754 756 {i3geoOL.addControl(new OpenLayers.Control.OverviewMap());}
755 757 //i3geoOL.addControl(new OpenLayers.Control.KeyboardDefaults());
756 758 //
... ... @@ -761,7 +763,7 @@ i3GEO.Interface = {
761 763 OLpanel = new OpenLayers.Control.Panel();
762 764 OLpanel.addControls([OLpan,OLzoom]);
763 765 i3geoOL.addControl(OLpanel);
764   - i3GEO.Interface.openlayers.ativaBotoes();
  766 + openlayers.ativaBotoes();
765 767 if (i3GEO.configura.mapaRefDisplay !== "none"){
766 768 if (i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay"))
767 769 {i3GEO.configura.mapaRefDisplay = i3GEO.util.pegaCookie("i3GEO.configura.mapaRefDisplay");}
... ... @@ -770,19 +772,26 @@ i3GEO.Interface = {
770 772 }
771 773  
772 774 };
  775 + i3GEO.arvoreDeCamadas.ATIVATEMA = "i3GEO.Interface.openlayers.ligaDesliga(this)";
  776 + i3GEO.util.multiStep(
  777 + [i3GEO.coordenadas.mostraCoordenadas,montaMapa,i3GEO.gadgets.mostraMenuSuspenso,
  778 + i3GEO.ajuda.ativaLetreiro,i3GEO.idioma.mostraSeletor,i3GEO.gadgets.mostraEscalaNumerica,
  779 + i3GEO.arvoreDeCamadas.cria,i3GEO.util.arvore],
  780 + [null,null,null,[i3GEO.parametros.mensagens],null,null,
  781 + ["",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic],
  782 + ["<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa]],
  783 + function(){}
  784 + );
  785 + /*
773 786 i3GEO.coordenadas.mostraCoordenadas();
774 787 montaMapa();
775   - //i3GEO.php.openlayers(montaMapa);
776 788 i3GEO.gadgets.mostraMenuSuspenso();
777 789 i3GEO.ajuda.ativaLetreiro(i3GEO.parametros.mensagens);
778 790 i3GEO.idioma.mostraSeletor();
779 791 i3GEO.gadgets.mostraEscalaNumerica();
780   - i3GEO.arvoreDeCamadas.ATIVATEMA = "i3GEO.Interface.openlayers.ligaDesliga(this)";
781   - //
782   - //i3GEO.arvoreDeCamadas.CAMADAS é definido na inicialização (classe_i3geo)
783   - //
784 792 i3GEO.arvoreDeCamadas.cria("",i3GEO.arvoreDeCamadas.CAMADAS,i3GEO.configura.sid,i3GEO.configura.locaplic);
785 793 i3GEO.util.arvore("<b>"+$trad("p13")+"</b>","listaPropriedades",i3GEO.configura.listaDePropriedadesDoMapa);
  794 + */
786 795 },
787 796 criaLayers: function(){
788 797 var url = i3GEO.configura.locaplic+"/classesphp/mapa_openlayers.php?map="+i3GEO.parametros.mapfile+"&TIPOIMAGEM="+i3GEO.configura.tipoimagem,
... ...