Commit 9775a2d6061223032f06fe318610ac625d2a1717
1 parent
db13a81f
Exists in
master
and in
7 other branches
Guia móvel à esquerda
Showing
4 changed files
with
1324 additions
and
656 deletions
Show diff stats
admin/admin.db
No preview for this file type
classesjs/classe_guias.js
@@ -33,183 +33,264 @@ Você deve ter recebido uma cópia da Licença Pública G | @@ -33,183 +33,264 @@ Você deve ter recebido uma cópia da Licença Pública G | ||
33 | GNU junto com este programa; se não, escreva para a | 33 | GNU junto com este programa; se não, escreva para a |
34 | Free Software Foundation, Inc., no endereço | 34 | Free Software Foundation, Inc., no endereço |
35 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. | 35 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
36 | -*/ | ||
37 | -if(typeof(i3GEO) === 'undefined'){ | 36 | + */ |
37 | +if (typeof (i3GEO) === 'undefined') { | ||
38 | var i3GEO = {}; | 38 | var i3GEO = {}; |
39 | } | 39 | } |
40 | i3GEO.guias = { | 40 | i3GEO.guias = { |
41 | /* | 41 | /* |
42 | - Variavel: ATUAL | ||
43 | - | ||
44 | - Guia que está ativa ou que será ativada ao iniciar o mapa | ||
45 | - | ||
46 | - O nome da guia é a definida na variável i3GEO.guias.CONFIGURA | ||
47 | - | ||
48 | - Tipo: | ||
49 | - {string} | ||
50 | - | ||
51 | - Default: | ||
52 | - {"temas"} | ||
53 | - */ | ||
54 | - ATUAL: "temas", | 42 | + * Variavel: ATUAL |
43 | + * | ||
44 | + * Guia que está ativa ou que será ativada ao iniciar o mapa | ||
45 | + * | ||
46 | + * O nome da guia é a definida na variável | ||
47 | + * i3GEO.guias.CONFIGURA | ||
48 | + * | ||
49 | + * Tipo: {string} | ||
50 | + * | ||
51 | + * Default: {"temas"} | ||
52 | + */ | ||
53 | + ATUAL : "temas", | ||
55 | /* | 54 | /* |
56 | - Propriedade: ALTURACORPOGUIAS | ||
57 | - | ||
58 | - Altura em pixels que será aplicado em cada guia | ||
59 | - | ||
60 | - Por default, a altura é calculada automaticamente, mas em alguns casos, pode ser necessário especificar o valor para permitir um melhor ajuste do layout do mapa | ||
61 | - | ||
62 | - Mantenha como 0 para que o cálculo seja automático | ||
63 | - | ||
64 | - Tipo: | ||
65 | - {numeric} | ||
66 | - | ||
67 | - Default: 0 | ||
68 | - */ | ||
69 | - ALTURACORPOGUIAS: 0, | 55 | + * Propriedade: ALTURACORPOGUIAS |
56 | + * | ||
57 | + * Altura em pixels que será aplicado em cada guia | ||
58 | + * | ||
59 | + * Por default, a altura é calculada automaticamente, mas em alguns | ||
60 | + * casos, pode ser necessário especificar o valor para permitir um | ||
61 | + * melhor ajuste do layout do mapa | ||
62 | + * | ||
63 | + * Mantenha como 0 para que o cálculo seja automático | ||
64 | + * | ||
65 | + * Tipo: {numeric} | ||
66 | + * | ||
67 | + * Default: 0 | ||
68 | + */ | ||
69 | + ALTURACORPOGUIAS : 0, | ||
70 | /* | 70 | /* |
71 | - Propriedade: CONFIGURA | ||
72 | - | ||
73 | - Define os parâmetros de cada guia que será mostrada no mapa, como título, conteúdo, etc. | ||
74 | - | ||
75 | - Você pode modificar o nome de uma guia como no exemplo | ||
76 | - | ||
77 | - i3GEO.guias.CONFIGURA.legenda.titulo = "nome diferente"; | ||
78 | - | ||
79 | - Por padrão são definidas as guias legenda, temas, adiciona e mapas (links) | ||
80 | - | ||
81 | - Exemplo | ||
82 | - | ||
83 | - i3GEO.guias.CONFIGURA.legenda = { | ||
84 | - titulo:"Legenda do mapa", | ||
85 | - id:"guia4", | ||
86 | - idconteudo:"guia4obj",//id do elemento HTML que contém o conteúdo da guia | ||
87 | - click: function(){ | ||
88 | - i3GEO.guias.mostra("legenda");//mostra a guia | ||
89 | - i3GEO.mapa.legendaHTML.cria("guia4obj"); | ||
90 | - } | ||
91 | - } | ||
92 | - | ||
93 | - Tipo: | ||
94 | - {JSON} | ||
95 | - */ | ||
96 | - CONFIGURA: { | ||
97 | - "temas":{ | ||
98 | - icone:"imagens/gisicons/show-layers.png", | ||
99 | - titulo:$trad("g4a"), | ||
100 | - id:"guia1", | ||
101 | - idconteudo:"guia1obj", | ||
102 | - click:"" | 71 | + * Propriedade: CONFIGURA |
72 | + * | ||
73 | + * Define os parâmetros de cada guia que será mostrada no mapa, | ||
74 | + * como título, conteúdo, etc. | ||
75 | + * | ||
76 | + * Você pode modificar o nome de uma guia como no exemplo | ||
77 | + * | ||
78 | + * i3GEO.guias.CONFIGURA.legenda.titulo = "nome diferente"; | ||
79 | + * | ||
80 | + * Por padrão são definidas as guias legenda, temas, adiciona | ||
81 | + * e mapas (links) | ||
82 | + * | ||
83 | + * Exemplo | ||
84 | + * | ||
85 | + * i3GEO.guias.CONFIGURA.legenda = { titulo:"Legenda do mapa", id:"guia4", | ||
86 | + * idconteudo:"guia4obj",//id do elemento HTML que contém o | ||
87 | + * conteúdo da guia click: function(){ | ||
88 | + * i3GEO.guias.mostra("legenda");//mostra a guia | ||
89 | + * i3GEO.mapa.legendaHTML.cria("guia4obj"); } } | ||
90 | + * | ||
91 | + * Tipo: {JSON} | ||
92 | + */ | ||
93 | + CONFIGURA : { | ||
94 | + "temas" : { | ||
95 | + icone : "imagens/gisicons/show-layers.png", | ||
96 | + titulo : $trad("g4a"), | ||
97 | + id : "guia1", | ||
98 | + idconteudo : "guia1obj", | ||
99 | + click : "" | ||
103 | }, | 100 | }, |
104 | - "adiciona":{ | ||
105 | - icone:"imagens/gisicons/show-catalog.png", | ||
106 | - titulo:$trad("g1a"), | ||
107 | - id:"guia2", | ||
108 | - idconteudo:"guia2obj", | ||
109 | - click: function(){ | 101 | + "adiciona" : { |
102 | + icone : "imagens/gisicons/show-catalog.png", | ||
103 | + titulo : $trad("g1a"), | ||
104 | + id : "guia2", | ||
105 | + idconteudo : "guia2obj", | ||
106 | + click : function() { | ||
110 | var ondeArvore; | 107 | var ondeArvore; |
111 | i3GEO.guias.mostra("adiciona"); | 108 | i3GEO.guias.mostra("adiciona"); |
112 | - if(!$i("arvoreAdicionaTema")) | ||
113 | - { | ||
114 | - try{ondeArvore = objmapa.guiaMenu+"obj";} | ||
115 | - catch(e){ondeArvore = "guia2obj";} | 109 | + if (!$i("arvoreAdicionaTema")) { |
110 | + try { | ||
111 | + ondeArvore = objmapa.guiaMenu | ||
112 | + + "obj"; | ||
113 | + } catch (e) { | ||
114 | + ondeArvore = "guia2obj"; | ||
115 | + } | ||
116 | + } else { | ||
117 | + ondeArvore = "arvoreAdicionaTema"; | ||
116 | } | 118 | } |
117 | - else | ||
118 | - {ondeArvore = "arvoreAdicionaTema";} | ||
119 | - //para efeitos de compatibilidade | ||
120 | - if(document.getElementById("outrasOpcoesAdiciona")){ | 119 | + // para efeitos de compatibilidade |
120 | + if (document.getElementById("outrasOpcoesAdiciona")) { | ||
121 | i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde = "outrasOpcoesAdiciona"; | 121 | i3GEO.arvoreDeTemas.OPCOESADICIONAIS.idonde = "outrasOpcoesAdiciona"; |
122 | i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore = false; | 122 | i3GEO.arvoreDeTemas.OPCOESADICIONAIS.incluiArvore = false; |
123 | } | 123 | } |
124 | - i3GEO.arvoreDeTemas.cria(i3GEO.configura.sid,i3GEO.configura.locaplic,ondeArvore); | 124 | + i3GEO.arvoreDeTemas.cria( |
125 | + i3GEO.configura.sid, | ||
126 | + i3GEO.configura.locaplic, | ||
127 | + ondeArvore); | ||
125 | } | 128 | } |
126 | }, | 129 | }, |
127 | - "legenda":{ | ||
128 | - icone:"imagens/gisicons/show-legend.png", | ||
129 | - titulo:$trad("g3"), | ||
130 | - id:"guia4", | ||
131 | - idconteudo:"guia4obj", | ||
132 | - click: function(){ | 130 | + "legenda" : { |
131 | + icone : "imagens/gisicons/show-legend.png", | ||
132 | + titulo : $trad("g3"), | ||
133 | + id : "guia4", | ||
134 | + idconteudo : "guia4obj", | ||
135 | + click : function() { | ||
133 | i3GEO.guias.mostra("legenda"); | 136 | i3GEO.guias.mostra("legenda"); |
134 | i3GEO.mapa.legendaHTML.cria("guia4obj"); | 137 | i3GEO.mapa.legendaHTML.cria("guia4obj"); |
135 | } | 138 | } |
136 | }, | 139 | }, |
137 | - "mapas":{ | ||
138 | - icone:"imagens/gisicons/show-links.png", | ||
139 | - titulo:"Links", | ||
140 | - id:"guia5", | ||
141 | - idconteudo:"guia5obj", | ||
142 | - mostraLink: function(id,url){ | ||
143 | - $i("i3geoMapasLink_"+id).innerHTML = "<a href='"+url+"' target=_blank >"+url+"</a>"; | 140 | + "mapas" : { |
141 | + icone : "imagens/gisicons/show-links.png", | ||
142 | + titulo : "Links", | ||
143 | + id : "guia5", | ||
144 | + idconteudo : "guia5obj", | ||
145 | + mostraLink : function(id, url) { | ||
146 | + $i("i3geoMapasLink_" | ||
147 | + + id).innerHTML = "<a href='" | ||
148 | + + url | ||
149 | + + "' target=_blank >" | ||
150 | + + url | ||
151 | + + "</a>"; | ||
144 | }, | 152 | }, |
145 | - click: function(onde){ | ||
146 | - if(!onde){ | 153 | + click : function(onde) { |
154 | + if (!onde) { | ||
147 | onde = i3GEO.guias.CONFIGURA.mapas.idconteudo; | 155 | onde = i3GEO.guias.CONFIGURA.mapas.idconteudo; |
148 | } | 156 | } |
149 | - var pegaMapas = function(retorno){ | ||
150 | - var ins,mapa,ig1lt,ig1,nome,lkd,link,temp,combo,urlinterface; | ||
151 | - ins = "<br><div id='banners' style='overflow:auto;text-align:center'>" + | ||
152 | - "<a href='"+i3GEO.configura.locaplic+"/admin/html/mapas.html' target=_blank >"+$trad("x89")+"</a><br><br>"; | 157 | + var pegaMapas = function(retorno) { |
158 | + var ins, mapa, ig1lt, ig1, nome, lkd, link, temp, combo, urlinterface; | ||
159 | + ins = "<br><div id='banners' style='overflow:auto;text-align:center'>" | ||
160 | + + "<a href='" | ||
161 | + + i3GEO.configura.locaplic | ||
162 | + + "/admin/html/mapas.html' target=_blank >" | ||
163 | + + $trad("x89") | ||
164 | + + "</a><br><br>"; | ||
153 | mapa = retorno.data.mapas; | 165 | mapa = retorno.data.mapas; |
154 | ig1lt = mapa.length; | 166 | ig1lt = mapa.length; |
155 | - ig1=0; | ||
156 | - urlinterface = window.location.origin+window.location.pathname; | ||
157 | - if(ig1lt > 0){ | ||
158 | - do{ | 167 | + ig1 = 0; |
168 | + urlinterface = window.location.origin | ||
169 | + + window.location.pathname; | ||
170 | + if (ig1lt > 0) { | ||
171 | + do { | ||
159 | temp = mapa[ig1]; | 172 | temp = mapa[ig1]; |
160 | nome = temp.NOME; | 173 | nome = temp.NOME; |
161 | - if(temp.PUBLICADO){ | ||
162 | - if(temp.PUBLICADO.toLowerCase() === "nao") | ||
163 | - {nome = "<s>"+nome+"</s>";} | 174 | + if (temp.PUBLICADO) { |
175 | + if (temp.PUBLICADO.toLowerCase() === "nao") { | ||
176 | + nome = "<s>" | ||
177 | + + nome | ||
178 | + + "</s>"; | ||
179 | + } | ||
164 | } | 180 | } |
165 | lkd = temp.LINK; | 181 | lkd = temp.LINK; |
166 | - link = i3GEO.configura.locaplic+"/ms_criamapa.php?temasa="+temp.TEMAS+"&layers="+temp.LIGADOS; | ||
167 | - if (temp.EXTENSAO !== "") | ||
168 | - {link += "&mapext="+temp.EXTENSAO;} | ||
169 | - if (temp.OUTROS !== "") | ||
170 | - {link += "&"+temp.OUTROS;} | ||
171 | - if (lkd !== "") | ||
172 | - {link = lkd;} | 182 | + link = i3GEO.configura.locaplic |
183 | + + "/ms_criamapa.php?temasa=" | ||
184 | + + temp.TEMAS | ||
185 | + + "&layers=" | ||
186 | + + temp.LIGADOS; | ||
187 | + if (temp.EXTENSAO !== "") { | ||
188 | + link += "&mapext=" | ||
189 | + + temp.EXTENSAO; | ||
190 | + } | ||
191 | + if (temp.OUTROS !== "") { | ||
192 | + link += "&" | ||
193 | + + temp.OUTROS; | ||
194 | + } | ||
195 | + if (lkd !== "") { | ||
196 | + link = lkd; | ||
197 | + } | ||
173 | ins += "<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >"; | 198 | ins += "<div style='width:170px;background-color:white;padding:5px;margin:auto;border: 1px solid #F0F0F0;border-radius: 5px;box-shadow: 1px 1px 1px 1px #D3D3D3;' >"; |
174 | 199 | ||
175 | - if(temp.IMAGEM && temp.IMAGEM != ""){ | ||
176 | - ins += "<div style=text-align:center ><a href='"+link+"' style=text-align:center;text-decoration:none; >" + | ||
177 | - "<img src='"+temp.IMAGEM+"'></a></div><br>"; | 200 | + if (temp.IMAGEM |
201 | + && temp.IMAGEM != "") { | ||
202 | + ins += "<div style=text-align:center ><a href='" | ||
203 | + + link | ||
204 | + + "' style=text-align:center;text-decoration:none; >" | ||
205 | + + "<img src='" | ||
206 | + + temp.IMAGEM | ||
207 | + + "'></a></div><br>"; | ||
178 | } | 208 | } |
179 | - //verifica se o mapfile esta salvo no banco diretamente | ||
180 | - if(temp.CONTEMMAPFILE == "nao"){ | ||
181 | - ins += "<div><p class=paragrafo style=text-align:center;cursor:pointer >" + | ||
182 | - "<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a></p></div>"; | ||
183 | - } | ||
184 | - else{ | ||
185 | - //combo de opcoes para abrir os mapas salvos como mapfiles | ||
186 | - //esses links tambem sao colocados em admin/php/xml.php geraRSSmapas | ||
187 | - combo = "<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink("+ig1+",this.value)'>" + | ||
188 | - "<option value=''>" + $trad("x103") + ":</option>" + | ||
189 | - "<option value='"+link+"'>Como foi salvo</option>" + | ||
190 | - "<option value='"+link+"&interface="+urlinterface+"'>Com a interface atual</option>" + | ||
191 | - "<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm'>Openlayers com todos os botoes</option>" + | ||
192 | - "<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=est_wms'>Sem o fundo</option>" + | ||
193 | - "<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>" + | ||
194 | - "<option value='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?restauramapa="+temp.ID_MAPA+"&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>" + | ||
195 | - "</select>"; | ||
196 | - ins += "<div>" + | ||
197 | - "<p class=paragrafo style=text-align:center;cursor:pointer >" + | ||
198 | - "<img style=text-align:center src='"+i3GEO.configura.locaplic+"/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa="+temp.ID_MAPA+"'><br><br>" + | ||
199 | - "<a href='"+link+"' style=text-align:center;text-decoration:none; >"+nome+" ("+temp.ID_MAPA+")</a>" + | ||
200 | - //"<br><a target=_blank href='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?"+temp.OUTROS+"&fundo=e_wsm' style=text-align:center;text-decoration:none;color:gray; >Preview</a>" + | ||
201 | - "<br>"+combo + | ||
202 | - "<br><div style='cursor:pointer;' id='i3geoMapasLink_"+ig1+"' ></div>" + | ||
203 | - "</p></div>"; | 209 | + // verifica se o mapfile esta salvo no banco |
210 | + // diretamente | ||
211 | + if (temp.CONTEMMAPFILE == "nao") { | ||
212 | + ins += "<div><p class=paragrafo style=text-align:center;cursor:pointer >" | ||
213 | + + "<a href='" | ||
214 | + + link | ||
215 | + + "' style=text-align:center;text-decoration:none; >" | ||
216 | + + nome | ||
217 | + + " (" | ||
218 | + + temp.ID_MAPA | ||
219 | + + ")</a></p></div>"; | ||
220 | + } else { | ||
221 | + // combo de opcoes para abrir os mapas salvos | ||
222 | + // como mapfiles | ||
223 | + // esses links tambem sao colocados em | ||
224 | + // admin/php/xml.php geraRSSmapas | ||
225 | + combo = "<select style='width:170px;' onchange='i3GEO.guias.CONFIGURA.mapas.mostraLink(" | ||
226 | + + ig1 | ||
227 | + + ",this.value)'>" | ||
228 | + + "<option value=''>" | ||
229 | + + $trad("x103") | ||
230 | + + ":</option>" | ||
231 | + + "<option value='" | ||
232 | + + link | ||
233 | + + "'>Como foi salvo</option>" | ||
234 | + + "<option value='" | ||
235 | + + link | ||
236 | + + "&interface=" | ||
237 | + + urlinterface | ||
238 | + + "'>Com a interface atual</option>" | ||
239 | + + "<option value='" | ||
240 | + + i3GEO.configura.locaplic | ||
241 | + + "/mashups/openlayers.php?restauramapa=" | ||
242 | + + temp.ID_MAPA | ||
243 | + + "&fundo=e_wsm'>Openlayers com todos os botoes</option>" | ||
244 | + + "<option value='" | ||
245 | + + i3GEO.configura.locaplic | ||
246 | + + "/mashups/openlayers.php?restauramapa=" | ||
247 | + + temp.ID_MAPA | ||
248 | + + "&fundo=est_wms'>Sem o fundo</option>" | ||
249 | + + "<option value='" | ||
250 | + + i3GEO.configura.locaplic | ||
251 | + + "/mashups/openlayers.php?restauramapa=" | ||
252 | + + temp.ID_MAPA | ||
253 | + + "&fundo=e_wsm&botoes=legenda pan zoombox zoomtot zoomin zoomout distancia area identifica'>Com booes principais</option>" | ||
254 | + + "<option value='" | ||
255 | + + i3GEO.configura.locaplic | ||
256 | + + "/mashups/openlayers.php?restauramapa=" | ||
257 | + + temp.ID_MAPA | ||
258 | + + "&botoes=legenda pan zoombox zoomtot zoomin zoomout'>Botoes de navegacao</option>" | ||
259 | + + "</select>"; | ||
260 | + ins += "<div>" | ||
261 | + + "<p class=paragrafo style=text-align:center;cursor:pointer >" | ||
262 | + + "<img style=text-align:center src='" | ||
263 | + + i3GEO.configura.locaplic | ||
264 | + + "/ferramentas/salvamapa/geraminiatura.php?w=100&h=67&restauramapa=" | ||
265 | + + temp.ID_MAPA | ||
266 | + + "'><br><br>" | ||
267 | + + "<a href='" | ||
268 | + + link | ||
269 | + + "' style=text-align:center;text-decoration:none; >" | ||
270 | + + nome | ||
271 | + + " (" | ||
272 | + + temp.ID_MAPA | ||
273 | + + ")</a>" | ||
274 | + + | ||
275 | + // "<br><a target=_blank | ||
276 | + // href='"+i3GEO.configura.locaplic+"/mashups/openlayers.php?"+temp.OUTROS+"&fundo=e_wsm' | ||
277 | + // style=text-align:center;text-decoration:none;color:gray; | ||
278 | + // >Preview</a>" + | ||
279 | + "<br>" | ||
280 | + + combo | ||
281 | + + "<br><div style='cursor:pointer;' id='i3geoMapasLink_" | ||
282 | + + ig1 | ||
283 | + + "' ></div>" | ||
284 | + + "</p></div>"; | ||
204 | } | 285 | } |
205 | ins += "</div><br>"; | 286 | ins += "</div><br>"; |
206 | ig1++; | 287 | ig1++; |
207 | - } | ||
208 | - while(ig1<ig1lt); | 288 | + } while (ig1 < ig1lt); |
209 | } | 289 | } |
210 | - $i(onde).innerHTML = ins+"</div>"; | 290 | + $i(onde).innerHTML = ins |
291 | + + "</div>"; | ||
211 | }; | 292 | }; |
212 | - if($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)){ | 293 | + if ($i(i3GEO.guias.CONFIGURA.mapas.idconteudo)) { |
213 | $i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML = "Aguarde..."; | 294 | $i(i3GEO.guias.CONFIGURA.mapas.idconteudo).innerHTML = "Aguarde..."; |
214 | } | 295 | } |
215 | i3GEO.guias.mostra("mapas"); | 296 | i3GEO.guias.mostra("mapas"); |
@@ -218,264 +299,347 @@ i3GEO.guias = { | @@ -218,264 +299,347 @@ i3GEO.guias = { | ||
218 | } | 299 | } |
219 | }, | 300 | }, |
220 | /* | 301 | /* |
221 | - Propriedade: ORDEM | ||
222 | - | ||
223 | - Ordem de inclusão das guias no mapa. Essa opção é mais útil no caso do tipo sanfona, pois nesse caso, | ||
224 | - a primeira guia é sempre a que fica ativa. Se esse par�metro for uma string vazia, a ordem | ||
225 | - utilizada será a ordem existente em i3GEO.guias.CONFIGURA. | ||
226 | - | ||
227 | - Ao ser definida, apenas as guias indicadas no array serão incluídas | ||
228 | - | ||
229 | - Exemplo: | ||
230 | - | ||
231 | - i3GEO.guias.ORDEM = ["temas","adiciona","legenda"]; | ||
232 | - | ||
233 | - Tipo: | ||
234 | - {array} | ||
235 | - | ||
236 | - Default: | ||
237 | - {""} | ||
238 | - */ | ||
239 | - ORDEM: "", | 302 | + * Propriedade: ORDEM |
303 | + * | ||
304 | + * Ordem de inclusão das guias no mapa. Essa opção | ||
305 | + * é mais útil no caso do tipo sanfona, pois nesse caso, a | ||
306 | + * primeira guia é sempre a que fica ativa. Se esse par�metro for uma | ||
307 | + * string vazia, a ordem utilizada será a ordem existente em | ||
308 | + * i3GEO.guias.CONFIGURA. | ||
309 | + * | ||
310 | + * Ao ser definida, apenas as guias indicadas no array serão | ||
311 | + * incluídas | ||
312 | + * | ||
313 | + * Exemplo: | ||
314 | + * | ||
315 | + * i3GEO.guias.ORDEM = ["temas","adiciona","legenda"]; | ||
316 | + * | ||
317 | + * Tipo: {array} | ||
318 | + * | ||
319 | + * Default: {""} | ||
320 | + */ | ||
321 | + ORDEM : "", | ||
240 | /* | 322 | /* |
241 | - Propriedade: TIPO | ||
242 | - | ||
243 | - Tipo de guia | ||
244 | - | ||
245 | - Quando TIPO = "movel", a inicialização da guia é feita em i3GEO.inicia | ||
246 | - Isso é ne cessário pq a guia móvel só pode ser criada após o posicionamento do corpo do mapa | ||
247 | - | ||
248 | - Tipo: | ||
249 | - {string} | ||
250 | - | ||
251 | - Default: | ||
252 | - {"guia"} | ||
253 | - | ||
254 | - Values: | ||
255 | - guia|sanfona|tablet|movel | ||
256 | - */ | ||
257 | - TIPO: "guia", | 323 | + * Propriedade: TIPO |
324 | + * | ||
325 | + * Tipo de guia | ||
326 | + * | ||
327 | + * Quando TIPO = "movel", a inicialização da guia é | ||
328 | + * feita em i3GEO.inicia Isso é ne cessário pq a guia | ||
329 | + * móvel só pode ser criada após o posicionamento do | ||
330 | + * corpo do mapa | ||
331 | + * | ||
332 | + * Tipo: {string} | ||
333 | + * | ||
334 | + * Default: {"guia"} | ||
335 | + * | ||
336 | + * Values: guia|sanfona|tablet|movel | ||
337 | + */ | ||
338 | + TIPO : "guia", | ||
258 | /* | 339 | /* |
259 | - Propriedade: idguias | ||
260 | - | ||
261 | - ID do elemento DOM, criado pelo YUI, onde serão inseridas as guias | ||
262 | - | ||
263 | - Tipo: | ||
264 | - {String} | ||
265 | - | ||
266 | - Default: | ||
267 | - {"guiasYUI"} | ||
268 | - */ | ||
269 | - IDGUIAS: "guiasYUI", | 340 | + * Propriedade: idguias |
341 | + * | ||
342 | + * ID do elemento DOM, criado pelo YUI, onde serão inseridas as guias | ||
343 | + * | ||
344 | + * Tipo: {String} | ||
345 | + * | ||
346 | + * Default: {"guiasYUI"} | ||
347 | + */ | ||
348 | + IDGUIAS : "guiasYUI", | ||
270 | /* | 349 | /* |
271 | - Function: cria | ||
272 | - | ||
273 | - Cria as guias com base na variável i3GEO.guias.CONFIGURA | ||
274 | - | ||
275 | - As guias podem ser definidas no HTML do mapa, sem necessariamente estarem na variável configura.<b> | ||
276 | - As guias, nesse caso, devem ter como ID "guia'n'", por exemplo id="guia6". Para cada uma dessas guias | ||
277 | - deve haver um DIV com o conteúdo. Esse DIV deve ter como ID "guia'n'obj", por exemplo id="guia6obj". | ||
278 | - No caso de ser utilizado a guia móvel, com i3GEO.guias.TIPO = "movel" , "guia'n" não é necessário, uma vez que são | ||
279 | - utilizados os ícones definidos em i3GEO.guias.CONFIGURA | ||
280 | - | ||
281 | - Parametro: | ||
282 | - | ||
283 | - onde {String} - id do elemento que conterá as guias | ||
284 | - */ | ||
285 | - cria: function(onde){ | ||
286 | - | ||
287 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.cria()");} | 350 | + * Function: cria |
351 | + * | ||
352 | + * Cria as guias com base na variável i3GEO.guias.CONFIGURA | ||
353 | + * | ||
354 | + * As guias podem ser definidas no HTML do mapa, sem necessariamente estarem | ||
355 | + * na variável configura.<b> As guias, nesse caso, devem ter como ID | ||
356 | + * "guia'n'", por exemplo id="guia6". Para cada uma dessas guias deve haver | ||
357 | + * um DIV com o conteúdo. Esse DIV deve ter como ID "guia'n'obj", por | ||
358 | + * exemplo id="guia6obj". No caso de ser utilizado a guia móvel, com | ||
359 | + * i3GEO.guias.TIPO = "movel" , "guia'n" não é | ||
360 | + * necessário, uma vez que são utilizados os ícones | ||
361 | + * definidos em i3GEO.guias.CONFIGURA | ||
362 | + * | ||
363 | + * Parametro: | ||
364 | + * | ||
365 | + * onde {String} - id do elemento que conterá as guias | ||
366 | + */ | ||
367 | + cria : function(onde) { | ||
368 | + | ||
369 | + if (typeof (console) !== 'undefined') { | ||
370 | + console.info("i3GEO.guias.cria()"); | ||
371 | + } | ||
288 | // | 372 | // |
289 | - //obtém outras guias que podem existir no mapa | 373 | + // obtém outras guias que podem existir no mapa |
290 | // | 374 | // |
291 | - var nguiasreal = 0,guiaconteudo,id,guia,g,re,ng,tituloguia,i,ins,altura,temp, | ||
292 | - CONFIGURA = i3GEO.guias.CONFIGURA, | ||
293 | - guias = i3GEO.util.listaChaves(CONFIGURA), | ||
294 | - nguias = guias.length; | 375 | + var nguiasreal = 0, guiaconteudo, id, guia, g, re, ng, tituloguia, i, ins, altura, temp, CONFIGURA = i3GEO.guias.CONFIGURA, guias = i3GEO.util.listaChaves(CONFIGURA), nguias = guias.length; |
295 | // | 376 | // |
296 | - //no caso de TIPO === "movel", as guias não são construídas de imediato, apenas é criado um objeto | ||
297 | - //com os parâmetros necessários para a criação das guias | 377 | + // no caso de TIPO === "movel", as guias não são |
378 | + // construídas de imediato, apenas é criado um objeto | ||
379 | + // com os parâmetros necessários para a | ||
380 | + // criação das guias | ||
298 | // | 381 | // |
299 | - if(i3GEO.guias.TIPO === "movel"){ | 382 | + if (i3GEO.guias.TIPO === "movel") { |
300 | i3GEO.guias.IDGUIAS = "i3GEOguiaMovelConteudo"; | 383 | i3GEO.guias.IDGUIAS = "i3GEOguiaMovelConteudo"; |
301 | - for(ng=0;ng<nguias;ng++){ | ||
302 | - if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)){ | 384 | + for (ng = 0; ng < nguias; ng++) { |
385 | + if ($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)) { | ||
303 | i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id); | 386 | i3GEO.guias.guiaMovel.config.guias.ids.push(i3GEO.guias.CONFIGURA[guias[ng]].id); |
304 | i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo); | 387 | i3GEO.guias.guiaMovel.config.guias.idsconteudos.push(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo); |
305 | - if(i3GEO.guias.CONFIGURA[guias[ng]].icone !== undefined) | ||
306 | - {i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone);} | ||
307 | - else | ||
308 | - {i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png");} | 388 | + if (i3GEO.guias.CONFIGURA[guias[ng]].icone !== undefined) { |
389 | + i3GEO.guias.guiaMovel.config.guias.icones.push(i3GEO.guias.CONFIGURA[guias[ng]].icone); | ||
390 | + } else { | ||
391 | + i3GEO.guias.guiaMovel.config.guias.icones.push("imagens/gisicons/open1.png"); | ||
392 | + } | ||
309 | i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo); | 393 | i3GEO.guias.guiaMovel.config.guias.titulos.push(i3GEO.guias.CONFIGURA[guias[ng]].titulo); |
310 | i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng]); | 394 | i3GEO.guias.guiaMovel.config.guias.chaves.push(guias[ng]); |
311 | } | 395 | } |
312 | } | 396 | } |
313 | return; | 397 | return; |
314 | } | 398 | } |
315 | - try{ | ||
316 | - for(g=0;g<12;g++){ | 399 | + try { |
400 | + for (g = 0; g < 12; g++) { | ||
317 | tituloguia = ""; | 401 | tituloguia = ""; |
318 | - if($i("guia"+g)){ | ||
319 | - tituloguia = $i("guia"+g).innerHTML; | 402 | + if ($i("guia" |
403 | + + g)) { | ||
404 | + tituloguia = $i("guia" | ||
405 | + + g).innerHTML; | ||
320 | re = new RegExp(" ", "g"); | 406 | re = new RegExp(" ", "g"); |
321 | - tituloguia = tituloguia.replace(re,''); | ||
322 | - for(ng=0;ng<nguias;ng++){ | ||
323 | - if(CONFIGURA[guias[ng]].id === "guia"+g){ | 407 | + tituloguia = tituloguia.replace( |
408 | + re, | ||
409 | + ''); | ||
410 | + for (ng = 0; ng < nguias; ng++) { | ||
411 | + if (CONFIGURA[guias[ng]].id === "guia" | ||
412 | + + g) { | ||
324 | tituloguia = ""; | 413 | tituloguia = ""; |
325 | } | 414 | } |
326 | } | 415 | } |
327 | - if (tituloguia !== ""){ | ||
328 | - i3GEO.guias.CONFIGURA["guia"+g] = []; | ||
329 | - i3GEO.guias.CONFIGURA["guia"+g].titulo = tituloguia; | ||
330 | - i3GEO.guias.CONFIGURA["guia"+g].id = "guia"+g; | ||
331 | - i3GEO.guias.CONFIGURA["guia"+g].idconteudo = "guia"+g+"obj"; | ||
332 | - if($i('guia'+g).onclick){ | ||
333 | - i3GEO.guias.CONFIGURA["guia"+g].click = $i("guia"+g).onclick; | 416 | + if (tituloguia !== "") { |
417 | + i3GEO.guias.CONFIGURA["guia" | ||
418 | + + g] = []; | ||
419 | + i3GEO.guias.CONFIGURA["guia" | ||
420 | + + g].titulo = tituloguia; | ||
421 | + i3GEO.guias.CONFIGURA["guia" | ||
422 | + + g].id = "guia" | ||
423 | + + g; | ||
424 | + i3GEO.guias.CONFIGURA["guia" | ||
425 | + + g].idconteudo = "guia" | ||
426 | + + g | ||
427 | + + "obj"; | ||
428 | + if ($i('guia' | ||
429 | + + g).onclick) { | ||
430 | + i3GEO.guias.CONFIGURA["guia" | ||
431 | + + g].click = $i("guia" | ||
432 | + + g).onclick; | ||
334 | } | 433 | } |
335 | } | 434 | } |
336 | } | 435 | } |
337 | } | 436 | } |
338 | - if(i3GEO.guias.ORDEM === "") | ||
339 | - {guias = i3GEO.util.listaChaves(CONFIGURA);} | ||
340 | - else | ||
341 | - {guias = i3GEO.guias.ORDEM;} | 437 | + if (i3GEO.guias.ORDEM === "") { |
438 | + guias = i3GEO.util.listaChaves(CONFIGURA); | ||
439 | + } else { | ||
440 | + guias = i3GEO.guias.ORDEM; | ||
441 | + } | ||
342 | nguias = guias.length; | 442 | nguias = guias.length; |
343 | // | 443 | // |
344 | - //verifica o div que contém as guias caso não tenha sido passado como par�metro | 444 | + // verifica o div que contém as guias caso não tenha |
445 | + // sido passado como par�metro | ||
345 | // | 446 | // |
346 | - if(arguments.length === 0){ | ||
347 | - for(ng=0;ng<nguias;ng++){ | 447 | + if (arguments.length === 0) { |
448 | + for (ng = 0; ng < nguias; ng++) { | ||
348 | i = $i(i3GEO.guias.CONFIGURA[guias[ng]].id); | 449 | i = $i(i3GEO.guias.CONFIGURA[guias[ng]].id); |
349 | - if(i){onde = i.parentNode;} | 450 | + if (i) { |
451 | + onde = i.parentNode; | ||
452 | + } | ||
350 | } | 453 | } |
454 | + } else { | ||
455 | + onde = $i(onde); | ||
456 | + } | ||
457 | + if (!onde) { | ||
458 | + return; | ||
351 | } | 459 | } |
352 | - else | ||
353 | - {onde = $i(onde);} | ||
354 | - if(!onde){return;} | ||
355 | onde.id = i3GEO.guias.IDGUIAS; | 460 | onde.id = i3GEO.guias.IDGUIAS; |
356 | onde.className = "yui-navset"; | 461 | onde.className = "yui-navset"; |
357 | // | 462 | // |
358 | - //constroi as TAGs para as guias | 463 | + // constroi as TAGs para as guias |
359 | // | 464 | // |
360 | - if(i3GEO.guias.TIPO === "guia" || i3GEO.guias.TIPO === "tablet"){ | 465 | + if (i3GEO.guias.TIPO === "guia" |
466 | + || i3GEO.guias.TIPO === "tablet") { | ||
361 | ins = '<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">'; | 467 | ins = '<ul class="yui-nav" style="border-width:0pt 0pt 0px;border-color:rgb(240,240,240);border-bottom-color:white;text-align:center;">'; |
362 | - for(ng=0;ng<nguias;ng++){ | ||
363 | - if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){ | ||
364 | - if($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)) | ||
365 | - {ins += '<li><a alt="" title=""><em><div id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</div></em></a></li>';} | 468 | + for (ng = 0; ng < nguias; ng++) { |
469 | + if ($i(i3GEO.guias.CONFIGURA[guias[ng]].id)) { | ||
470 | + if ($i(i3GEO.guias.CONFIGURA[guias[ng]].idconteudo)) { | ||
471 | + ins += '<li><a alt="" title=""><em><div id="' | ||
472 | + + i3GEO.guias.CONFIGURA[guias[ng]].id | ||
473 | + + '" >' | ||
474 | + + i3GEO.guias.CONFIGURA[guias[ng]].titulo | ||
475 | + + '</div></em></a></li>'; | ||
476 | + } | ||
366 | } | 477 | } |
367 | } | 478 | } |
368 | - //adiciona uma guia que permite esconder todas as outras guias se for do tipo tablet | 479 | + // adiciona uma guia que permite esconder todas as outras guias |
480 | + // se for do tipo tablet | ||
369 | ins += "</ul>"; | 481 | ins += "</ul>"; |
370 | onde.innerHTML = ins; | 482 | onde.innerHTML = ins; |
371 | } | 483 | } |
372 | - if(i3GEO.guias.TIPO === "sanfona"){ | ||
373 | - ins = '<dl id=sanfona'+onde.id+' class="accordion" >'; | ||
374 | - //verifica a quantidade certa de guias | ||
375 | - if(i3GEO.guias.ORDEM === ""){ | ||
376 | - for(ng=0;ng<nguias;ng++){ | ||
377 | - if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){ | 484 | + if (i3GEO.guias.TIPO === "sanfona") { |
485 | + ins = '<dl id=sanfona' | ||
486 | + + onde.id | ||
487 | + + ' class="accordion" >'; | ||
488 | + // verifica a quantidade certa de guias | ||
489 | + if (i3GEO.guias.ORDEM === "") { | ||
490 | + for (ng = 0; ng < nguias; ng++) { | ||
491 | + if ($i(i3GEO.guias.CONFIGURA[guias[ng]].id)) { | ||
378 | nguiasreal++; | 492 | nguiasreal++; |
379 | } | 493 | } |
380 | } | 494 | } |
495 | + } else { | ||
496 | + nguiasreal = i3GEO.guias.ORDEM.length; | ||
381 | } | 497 | } |
382 | - else | ||
383 | - {nguiasreal = i3GEO.guias.ORDEM.length;} | ||
384 | 498 | ||
385 | - if(navn) | ||
386 | - {altura = i3GEO.parametros.h - (nguiasreal * 25) - 1;} | ||
387 | - else | ||
388 | - {altura = i3GEO.parametros.h - (nguiasreal * 23) + 1;} | ||
389 | - for(ng=0;ng<nguias;ng++){ | ||
390 | - if($i(i3GEO.guias.CONFIGURA[guias[ng]].id)){ | 499 | + if (navn) { |
500 | + altura = i3GEO.parametros.h | ||
501 | + - (nguiasreal * 25) | ||
502 | + - 1; | ||
503 | + } else { | ||
504 | + altura = i3GEO.parametros.h | ||
505 | + - (nguiasreal * 23) | ||
506 | + + 1; | ||
507 | + } | ||
508 | + for (ng = 0; ng < nguias; ng++) { | ||
509 | + if ($i(i3GEO.guias.CONFIGURA[guias[ng]].id)) { | ||
391 | id = i3GEO.guias.CONFIGURA[guias[ng]].idconteudo; | 510 | id = i3GEO.guias.CONFIGURA[guias[ng]].idconteudo; |
392 | temp = $i(id); | 511 | temp = $i(id); |
393 | - if(temp){ | 512 | + if (temp) { |
394 | guiaconteudo = temp.innerHTML; | 513 | guiaconteudo = temp.innerHTML; |
395 | temp.innerHTML = ""; | 514 | temp.innerHTML = ""; |
396 | temp.style.display = "none"; | 515 | temp.style.display = "none"; |
397 | temp.id = ""; | 516 | temp.id = ""; |
398 | - ins += '<dt style=height:17px id="'+i3GEO.guias.CONFIGURA[guias[ng]].id+'" >' + | ||
399 | - '<table class=accordiontable ><tr><td width="98%" >'+i3GEO.guias.CONFIGURA[guias[ng]].titulo+'</td><td width="2%" ><img id="" src="'+i3GEO.configura.locaplic+'/imagens/branco.gif" style="width:10px;" /></td></tr></table>' + | ||
400 | - '<dd clas=close >' + | ||
401 | - '<div class=bd >' + | ||
402 | - '<div id="'+id+'" >'+guiaconteudo+'</div></div></dd>'; | 517 | + ins += '<dt style=height:17px id="' |
518 | + + i3GEO.guias.CONFIGURA[guias[ng]].id | ||
519 | + + '" >' | ||
520 | + + '<table class=accordiontable ><tr><td width="98%" >' | ||
521 | + + i3GEO.guias.CONFIGURA[guias[ng]].titulo | ||
522 | + + '</td><td width="2%" ><img id="" src="' | ||
523 | + + i3GEO.configura.locaplic | ||
524 | + + '/imagens/branco.gif" style="width:10px;" /></td></tr></table>' | ||
525 | + + '<dd clas=close >' | ||
526 | + + '<div class=bd >' | ||
527 | + + '<div id="' | ||
528 | + + id | ||
529 | + + '" >' | ||
530 | + + guiaconteudo | ||
531 | + + '</div></div></dd>'; | ||
403 | } | 532 | } |
404 | } | 533 | } |
405 | } | 534 | } |
406 | ins += "</dl>"; | 535 | ins += "</dl>"; |
407 | onde.innerHTML = ins; | 536 | onde.innerHTML = ins; |
408 | - onde.style.height = altura+"px"; | ||
409 | - YAHOO.lutsr.accordion.init(true,5,false,"sanfona"+onde.id,altura); | 537 | + onde.style.height = altura |
538 | + + "px"; | ||
539 | + YAHOO.lutsr.accordion.init( | ||
540 | + true, | ||
541 | + 5, | ||
542 | + false, | ||
543 | + "sanfona" | ||
544 | + + onde.id, | ||
545 | + altura); | ||
410 | i3GEO.guias.ALTURACORPOGUIAS = altura; | 546 | i3GEO.guias.ALTURACORPOGUIAS = altura; |
411 | } | 547 | } |
412 | - for(g=0;g<nguias;g++) | ||
413 | - { | 548 | + for (g = 0; g < nguias; g++) { |
414 | guia = i3GEO.guias.CONFIGURA[guias[g]]; | 549 | guia = i3GEO.guias.CONFIGURA[guias[g]]; |
415 | id = guia.id; | 550 | id = guia.id; |
416 | guiaconteudo = $i(id); | 551 | guiaconteudo = $i(id); |
417 | - if(guiaconteudo){ | ||
418 | - if(guia.click === "" || guia.click === undefined) | ||
419 | - {eval('$i("'+id+'").onclick = function(event){i3GEO.guias.mostra("'+guias[g]+'");}');} | ||
420 | - else | ||
421 | - {guiaconteudo.onclick = guia.click;} | ||
422 | - YAHOO.util.Event.addListener($i(id), "click", YAHOO.util.Event.preventDefault); | ||
423 | - YAHOO.util.Event.addListener($i(id), "click", YAHOO.util.Event.stopPropagation); | ||
424 | - YAHOO.util.Event.addFocusListener($i(id), YAHOO.util.Event.preventDefault); | ||
425 | - guiaconteudo.onmouseover = function(){}; | ||
426 | - guiaconteudo.onmouseout = function(){}; | 552 | + if (guiaconteudo) { |
553 | + if (guia.click === "" | ||
554 | + || guia.click === undefined) { | ||
555 | + eval('$i("' | ||
556 | + + id | ||
557 | + + '").onclick = function(event){i3GEO.guias.mostra("' | ||
558 | + + guias[g] | ||
559 | + + '");}'); | ||
560 | + } else { | ||
561 | + guiaconteudo.onclick = guia.click; | ||
562 | + } | ||
563 | + YAHOO.util.Event.addListener( | ||
564 | + $i(id), | ||
565 | + "click", | ||
566 | + YAHOO.util.Event.preventDefault); | ||
567 | + YAHOO.util.Event.addListener( | ||
568 | + $i(id), | ||
569 | + "click", | ||
570 | + YAHOO.util.Event.stopPropagation); | ||
571 | + YAHOO.util.Event.addFocusListener( | ||
572 | + $i(id), | ||
573 | + YAHOO.util.Event.preventDefault); | ||
574 | + guiaconteudo.onmouseover = function() { | ||
575 | + }; | ||
576 | + guiaconteudo.onmouseout = function() { | ||
577 | + }; | ||
427 | temp = $i(guia.idconteudo); | 578 | temp = $i(guia.idconteudo); |
428 | - if(temp){ | ||
429 | - temp.style.overflow="auto"; | ||
430 | - if(i3GEO.guias.TIPO === "guia"){ | ||
431 | - if(i3GEO.guias.ALTURACORPOGUIAS === 0) | ||
432 | - {temp.style.height = i3GEO.parametros.h + "px";} | ||
433 | - else | ||
434 | - {temp.style.height = i3GEO.guias.ALTURACORPOGUIAS + "px";} | 579 | + if (temp) { |
580 | + temp.style.overflow = "auto"; | ||
581 | + if (i3GEO.guias.TIPO === "guia") { | ||
582 | + if (i3GEO.guias.ALTURACORPOGUIAS === 0) { | ||
583 | + temp.style.height = i3GEO.parametros.h | ||
584 | + + "px"; | ||
585 | + } else { | ||
586 | + temp.style.height = i3GEO.guias.ALTURACORPOGUIAS | ||
587 | + + "px"; | ||
588 | + } | ||
589 | + } else { | ||
590 | + temp.style.height = onde.style.height; | ||
435 | } | 591 | } |
436 | - else | ||
437 | - {temp.style.height = onde.style.height;} | ||
438 | } | 592 | } |
439 | } | 593 | } |
440 | } | 594 | } |
595 | + } catch (e) { | ||
596 | + if (typeof (console) !== 'undefined') { | ||
597 | + console.error("i3GEO.guias.cria " | ||
598 | + + e); | ||
599 | + } | ||
441 | } | 600 | } |
442 | - catch(e){ | ||
443 | - if(typeof(console) !== 'undefined'){console.error("i3GEO.guias.cria "+e);} | ||
444 | - } | ||
445 | - if(i3GEO.guias.TIPO !== "tablet"){ | 601 | + if (i3GEO.guias.TIPO !== "tablet") { |
446 | i3GEO.guias.mostra(i3GEO.guias.ATUAL); | 602 | i3GEO.guias.mostra(i3GEO.guias.ATUAL); |
447 | i3GEO.guias.ativa(i3GEO.guias.ATUAL); | 603 | i3GEO.guias.ativa(i3GEO.guias.ATUAL); |
604 | + } else { | ||
605 | + i3GEO.guias.escondeGuias(); | ||
448 | } | 606 | } |
449 | - else | ||
450 | - {i3GEO.guias.escondeGuias();} | ||
451 | }, | 607 | }, |
452 | /* | 608 | /* |
453 | - Ajusta a altura das guias conforme a altura da imagem do mapa | ||
454 | - */ | ||
455 | - ajustaAltura: function(){ | ||
456 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.ajustaAltura()");} | ||
457 | - var guia,guias,nguias,temp,temps,n,i,g, | ||
458 | - altura=0; | ||
459 | - if(i3GEO.guias.ALTURACORPOGUIAS != 0) | ||
460 | - {altura = i3GEO.guias.ALTURACORPOGUIAS;} | 609 | + * Ajusta a altura das guias conforme a altura da imagem do mapa |
610 | + */ | ||
611 | + ajustaAltura : function() { | ||
612 | + if (typeof (console) !== 'undefined') { | ||
613 | + console.info("i3GEO.guias.ajustaAltura()"); | ||
614 | + } | ||
615 | + var guia, guias, nguias, temp, temps, n, i, g, altura = 0; | ||
616 | + if (i3GEO.guias.ALTURACORPOGUIAS != 0) { | ||
617 | + altura = i3GEO.guias.ALTURACORPOGUIAS; | ||
618 | + } | ||
461 | guias = i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA); | 619 | guias = i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA); |
462 | nguias = guias.length; | 620 | nguias = guias.length; |
463 | - for(g=0;g<nguias;g++){ | 621 | + for (g = 0; g < nguias; g++) { |
464 | guia = $i(this.CONFIGURA[guias[g]].idconteudo); | 622 | guia = $i(this.CONFIGURA[guias[g]].idconteudo); |
465 | - if(guia){ | ||
466 | - guia.style.overflow="auto"; | ||
467 | - if(this.TIPO === "guia") | ||
468 | - {guia.style.height = altura + "px";} | ||
469 | - if(this.TIPO === "sanfona"){ | ||
470 | - guia.style.height = altura + "px"; | 623 | + if (guia) { |
624 | + guia.style.overflow = "auto"; | ||
625 | + if (this.TIPO === "guia") { | ||
626 | + guia.style.height = altura | ||
627 | + + "px"; | ||
628 | + } | ||
629 | + if (this.TIPO === "sanfona") { | ||
630 | + guia.style.height = altura | ||
631 | + + "px"; | ||
471 | temp = $i("guiasYUI"); | 632 | temp = $i("guiasYUI"); |
472 | - if(temp){ | ||
473 | - temp.style.height = altura + "px"; | 633 | + if (temp) { |
634 | + temp.style.height = altura | ||
635 | + + "px"; | ||
474 | temps = temp.getElementsByTagName("dd"); | 636 | temps = temp.getElementsByTagName("dd"); |
475 | n = temps.length; | 637 | n = temps.length; |
476 | - for(i=0;i<n;i++){ | ||
477 | - if(temps[i].style.visibility == "visible") | ||
478 | - {temps[i].style.height = altura + "px";} | 638 | + for (i = 0; i < n; i++) { |
639 | + if (temps[i].style.visibility == "visible") { | ||
640 | + temps[i].style.height = altura | ||
641 | + + "px"; | ||
642 | + } | ||
479 | } | 643 | } |
480 | } | 644 | } |
481 | YAHOO.lutsr.accordion.properties.altura = altura; | 645 | YAHOO.lutsr.accordion.properties.altura = altura; |
@@ -484,494 +648,673 @@ i3GEO.guias = { | @@ -484,494 +648,673 @@ i3GEO.guias = { | ||
484 | } | 648 | } |
485 | }, | 649 | }, |
486 | /* | 650 | /* |
487 | - Esconde todas as guias | ||
488 | - */ | ||
489 | - escondeGuias: function(){ | ||
490 | - var guias,nguias,g,temp,attributes,anim; | 651 | + * Esconde todas as guias |
652 | + */ | ||
653 | + escondeGuias : function() { | ||
654 | + var guias, nguias, g, temp, attributes, anim; | ||
491 | guias = i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA); | 655 | guias = i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA); |
492 | nguias = guias.length; | 656 | nguias = guias.length; |
493 | - for(g=0;g<nguias;g++){ | 657 | + for (g = 0; g < nguias; g++) { |
494 | temp = $i(this.CONFIGURA[guias[g]].idconteudo); | 658 | temp = $i(this.CONFIGURA[guias[g]].idconteudo); |
495 | - if(temp){ | ||
496 | - if(i3GEO.guias.TIPO === "tablet" && temp.style.display === "block"){ | 659 | + if (temp) { |
660 | + if (i3GEO.guias.TIPO === "tablet" | ||
661 | + && temp.style.display === "block") { | ||
497 | temp.style.overflow = "hidden"; | 662 | temp.style.overflow = "hidden"; |
498 | attributes = { | 663 | attributes = { |
499 | - height: { to: 0 }, | ||
500 | - id: this.CONFIGURA[guias[g]].idconteudo | 664 | + height : { |
665 | + to : 0 | ||
666 | + }, | ||
667 | + id : this.CONFIGURA[guias[g]].idconteudo | ||
501 | }; | 668 | }; |
502 | anim = new YAHOO.util.Anim(temp, attributes, 1, YAHOO.util.Easing.easeNone); | 669 | anim = new YAHOO.util.Anim(temp, attributes, 1, YAHOO.util.Easing.easeNone); |
503 | - anim.onComplete.subscribe(function(){ | 670 | + anim.onComplete.subscribe(function() { |
504 | var temp = $i(anim.attributes.id); | 671 | var temp = $i(anim.attributes.id); |
505 | temp.style.overflow = "auto"; | 672 | temp.style.overflow = "auto"; |
506 | - temp.style.display="none"; | ||
507 | - if(i3GEO.barraDeBotoes.BARRAS[0]) | ||
508 | - {i3GEO.barraDeBotoes.BARRAS[0].show();} | 673 | + temp.style.display = "none"; |
674 | + if (i3GEO.barraDeBotoes.BARRAS[0]) { | ||
675 | + i3GEO.barraDeBotoes.BARRAS[0].show(); | ||
676 | + } | ||
509 | }); | 677 | }); |
510 | anim.animate(); | 678 | anim.animate(); |
679 | + } else { | ||
680 | + temp.style.display = "none"; | ||
511 | } | 681 | } |
512 | - else | ||
513 | - {temp.style.display="none";} | ||
514 | } | 682 | } |
515 | - if($i(this.CONFIGURA[guias[g]].id) && i3GEO.guias.TIPO !== "movel") | ||
516 | - {$i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent";} | 683 | + if ($i(this.CONFIGURA[guias[g]].id) |
684 | + && i3GEO.guias.TIPO !== "movel") { | ||
685 | + $i(this.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background = "transparent"; | ||
686 | + } | ||
517 | } | 687 | } |
518 | }, | 688 | }, |
519 | /* | 689 | /* |
520 | - Mostra no mapa uma determinada guia | ||
521 | - | ||
522 | - Parametro: | ||
523 | - | ||
524 | - guia {String} - nome da guia | ||
525 | - */ | ||
526 | - mostra: function(guia){ | ||
527 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.mostra()");} | ||
528 | - var guias,nguias,g,temp,attributes,anim; | 690 | + * Mostra no mapa uma determinada guia |
691 | + * | ||
692 | + * Parametro: | ||
693 | + * | ||
694 | + * guia {String} - nome da guia | ||
695 | + */ | ||
696 | + mostra : function(guia) { | ||
697 | + if (typeof (console) !== 'undefined') { | ||
698 | + console.info("i3GEO.guias.mostra()"); | ||
699 | + } | ||
700 | + var guias, nguias, g, temp, attributes, anim; | ||
529 | guias = i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA); | 701 | guias = i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA); |
530 | nguias = guias.length; | 702 | nguias = guias.length; |
531 | // | 703 | // |
532 | - //se a guia clicada já estiver aberta na interface com TABLET | 704 | + // se a guia clicada já estiver aberta na interface com TABLET |
533 | // | 705 | // |
534 | - if(!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)){ | 706 | + if (!$i(i3GEO.guias.CONFIGURA[guia].idconteudo)) { |
535 | return; | 707 | return; |
536 | } | 708 | } |
537 | - if($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display === "block" && i3GEO.guias.TIPO === "tablet"){ | 709 | + if ($i(i3GEO.guias.CONFIGURA[guia].idconteudo).style.display === "block" |
710 | + && i3GEO.guias.TIPO === "tablet") { | ||
538 | i3GEO.guias.escondeGuias(); | 711 | i3GEO.guias.escondeGuias(); |
539 | return; | 712 | return; |
540 | } | 713 | } |
541 | - if(i3GEO.guias.TIPO !== "movel"){ | ||
542 | - for(g=0;g<nguias;g++){ | ||
543 | - if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)) | ||
544 | - {$i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display="none";} | ||
545 | - if($i(i3GEO.guias.CONFIGURA[guias[g]].id)) | ||
546 | - {$i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background="transparent";} | 714 | + if (i3GEO.guias.TIPO !== "movel") { |
715 | + for (g = 0; g < nguias; g++) { | ||
716 | + if ($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)) { | ||
717 | + $i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style.display = "none"; | ||
718 | + } | ||
719 | + if ($i(i3GEO.guias.CONFIGURA[guias[g]].id)) { | ||
720 | + $i(i3GEO.guias.CONFIGURA[guias[g]].id).parentNode.parentNode.style.background = "transparent"; | ||
721 | + } | ||
547 | } | 722 | } |
548 | } | 723 | } |
549 | // | 724 | // |
550 | - //verifica se o nome da guia passado como parametro está correto ou é o id da guia | 725 | + // verifica se o nome da guia passado como parametro está correto |
726 | + // ou é o id da guia | ||
551 | // | 727 | // |
552 | - if(i3GEO.guias.CONFIGURA.toString().search(guia) < 0){ | ||
553 | - for(g=0;g<nguias;g++){ | ||
554 | - if(i3GEO.guias.CONFIGURA[guias[g]].id === guia) | ||
555 | - {guia = guias[g];} | 728 | + if (i3GEO.guias.CONFIGURA.toString().search( |
729 | + guia) < 0) { | ||
730 | + for (g = 0; g < nguias; g++) { | ||
731 | + if (i3GEO.guias.CONFIGURA[guias[g]].id === guia) { | ||
732 | + guia = guias[g]; | ||
733 | + } | ||
556 | } | 734 | } |
557 | } | 735 | } |
558 | - if(i3GEO.guias.CONFIGURA[guia]){ | 736 | + if (i3GEO.guias.CONFIGURA[guia]) { |
559 | temp = $i(i3GEO.guias.CONFIGURA[guia].idconteudo); | 737 | temp = $i(i3GEO.guias.CONFIGURA[guia].idconteudo); |
560 | - if(temp){ | ||
561 | - if(i3GEO.guias.TIPO === "tablet"){ | ||
562 | - if(i3GEO.barraDeBotoes.BARRAS[0]) | ||
563 | - {i3GEO.barraDeBotoes.BARRAS[0].hide();} | ||
564 | - temp.style.left = (i3GEO.parametros.w / 2) - 150 + "px"; | ||
565 | - temp.style.height = 0;//i3GEO.parametros.h - 10 + "px"; | 738 | + if (temp) { |
739 | + if (i3GEO.guias.TIPO === "tablet") { | ||
740 | + if (i3GEO.barraDeBotoes.BARRAS[0]) { | ||
741 | + i3GEO.barraDeBotoes.BARRAS[0].hide(); | ||
742 | + } | ||
743 | + temp.style.left = (i3GEO.parametros.w / 2) | ||
744 | + - 150 | ||
745 | + + "px"; | ||
746 | + temp.style.height = 0;// i3GEO.parametros.h - 10 + "px"; | ||
566 | temp.style.display = "block"; | 747 | temp.style.display = "block"; |
567 | temp.style.zIndex = 9000; | 748 | temp.style.zIndex = 9000; |
568 | temp.style.overflow = "hidden"; | 749 | temp.style.overflow = "hidden"; |
569 | attributes = { | 750 | attributes = { |
570 | - height: { to: i3GEO.parametros.h - 10 } | 751 | + height : { |
752 | + to : i3GEO.parametros.h - 10 | ||
753 | + } | ||
571 | }; | 754 | }; |
572 | anim = new YAHOO.util.Anim(temp, attributes, 1, YAHOO.util.Easing.easeNone); | 755 | anim = new YAHOO.util.Anim(temp, attributes, 1, YAHOO.util.Easing.easeNone); |
573 | - anim.onComplete.subscribe(function(){ | 756 | + anim.onComplete.subscribe(function() { |
574 | temp.style.overflow = "auto"; | 757 | temp.style.overflow = "auto"; |
575 | temp.style.display = "block"; | 758 | temp.style.display = "block"; |
576 | }); | 759 | }); |
577 | - if(DetectaMobile("DetectAndroid") === true){ | 760 | + if (DetectaMobile("DetectAndroid") === true) { |
578 | temp.style.height = ""; | 761 | temp.style.height = ""; |
579 | temp.style.overflow = "auto"; | 762 | temp.style.overflow = "auto"; |
763 | + } else { | ||
764 | + anim.animate(); | ||
580 | } | 765 | } |
581 | - else | ||
582 | - {anim.animate();} | 766 | + } else { |
767 | + temp.style.display = "block"; | ||
768 | + } | ||
769 | + if (i3GEO.guias.TIPO !== "movel") { | ||
770 | + $i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor = "white"; | ||
583 | } | 771 | } |
584 | - else | ||
585 | - {temp.style.display="block";} | ||
586 | - if(i3GEO.guias.TIPO !== "movel") | ||
587 | - {$i(i3GEO.guias.CONFIGURA[guia].id).parentNode.parentNode.style.backgroundColor="white";} | ||
588 | i3GEO.guias.ATUAL = guia; | 772 | i3GEO.guias.ATUAL = guia; |
589 | } | 773 | } |
590 | } | 774 | } |
591 | }, | 775 | }, |
592 | /* | 776 | /* |
593 | - Function: ativa | ||
594 | - | ||
595 | - Ativa uma determinada guia | ||
596 | - | ||
597 | - Parametro: | ||
598 | - | ||
599 | - guia {String} - guia que será ativada | ||
600 | - */ | ||
601 | - ativa: function(guia){ | ||
602 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.ativa()");} | ||
603 | - try{ | ||
604 | - i3GEO.guias.ATUAL = guia; | ||
605 | - if(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click !== "") | ||
606 | - {i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call();} | 777 | + * Function: ativa |
778 | + * | ||
779 | + * Ativa uma determinada guia | ||
780 | + * | ||
781 | + * Parametro: | ||
782 | + * | ||
783 | + * guia {String} - guia que será ativada | ||
784 | + */ | ||
785 | + ativa : function(guia) { | ||
786 | + if (typeof (console) !== 'undefined') { | ||
787 | + console.info("i3GEO.guias.ativa()"); | ||
607 | } | 788 | } |
608 | - catch(e){ | ||
609 | - if(typeof(console) !== 'undefined'){console.error(e);} | 789 | + try { |
790 | + i3GEO.guias.ATUAL = guia; | ||
791 | + if (i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click !== "") { | ||
792 | + i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].click.call(); | ||
793 | + } | ||
794 | + } catch (e) { | ||
795 | + if (typeof (console) !== 'undefined') { | ||
796 | + console.error(e); | ||
797 | + } | ||
610 | } | 798 | } |
611 | }, | 799 | }, |
612 | /* | 800 | /* |
613 | - Libera as guias do local atual, colocando-as em uma janela flutuante sobre o mapa. | ||
614 | - */ | ||
615 | - libera: function(){ | ||
616 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.libera()");} | ||
617 | - if (!$i("conteudojanelaguias")){ | ||
618 | - var i,w,pos,a,l,temp; | 801 | + * Libera as guias do local atual, colocando-as em uma janela flutuante |
802 | + * sobre o mapa. | ||
803 | + */ | ||
804 | + libera : function() { | ||
805 | + if (typeof (console) !== 'undefined') { | ||
806 | + console.info("i3GEO.guias.libera()"); | ||
807 | + } | ||
808 | + if (!$i("conteudojanelaguias")) { | ||
809 | + var i, w, pos, a, l, temp; | ||
619 | $i(i3GEO.Interface.IDCORPO).style.left = "0px"; | 810 | $i(i3GEO.Interface.IDCORPO).style.left = "0px"; |
620 | - if($i(this.IDGUIAS)) | ||
621 | - {$i(this.IDGUIAS).style.display="none";} | 811 | + if ($i(this.IDGUIAS)) { |
812 | + $i(this.IDGUIAS).style.display = "none"; | ||
813 | + } | ||
622 | i = $i("contemFerramentas"); | 814 | i = $i("contemFerramentas"); |
623 | - //if(i) | ||
624 | - //{i.style.display = "none";} | ||
625 | - w = parseInt($i("contemFerramentas").style.width,10); | 815 | + // if(i) |
816 | + // {i.style.display = "none";} | ||
817 | + w = parseInt( | ||
818 | + $i("contemFerramentas").style.width, | ||
819 | + 10); | ||
626 | $i("contemFerramentas").style.width = "0px"; | 820 | $i("contemFerramentas").style.width = "0px"; |
627 | - //visual foi depreciado na 4.7 | ||
628 | - //i = $i("visual"); | ||
629 | - //if (i) | ||
630 | - //{i.style.width="0px";i.innerHTML="";} | 821 | + // visual foi depreciado na 4.7 |
822 | + // i = $i("visual"); | ||
823 | + // if (i) | ||
824 | + // {i.style.width="0px";i.innerHTML="";} | ||
631 | pos = "px"; | 825 | pos = "px"; |
632 | a = i3GEO.parametros.h; | 826 | a = i3GEO.parametros.h; |
633 | - l = i3GEO.parametros.w + w; | 827 | + l = i3GEO.parametros.w |
828 | + + w; | ||
634 | i3GEO.parametros.h = a; | 829 | i3GEO.parametros.h = a; |
635 | i3GEO.parametros.w = l; | 830 | i3GEO.parametros.w = l; |
636 | - //if (navm) | ||
637 | - //{pos = "";} | 831 | + // if (navm) |
832 | + // {pos = "";} | ||
638 | i = $i(i3GEO.Interface.IDCORPO); | 833 | i = $i(i3GEO.Interface.IDCORPO); |
639 | - if(i){ | ||
640 | - i.style.width= l+pos; | ||
641 | - i.style.height= a+pos; | 834 | + if (i) { |
835 | + i.style.width = l | ||
836 | + + pos; | ||
837 | + i.style.height = a | ||
838 | + + pos; | ||
642 | } | 839 | } |
643 | i = $i(i3GEO.Interface.IDMAPA); | 840 | i = $i(i3GEO.Interface.IDMAPA); |
644 | - if(i){ | ||
645 | - i.style.width= l+pos; | ||
646 | - i.style.height= a+pos; | ||
647 | - i.style.clip = 'rect('+0+" "+(l*1+2)+" "+(a*1+2)+" "+0+')'; | 841 | + if (i) { |
842 | + i.style.width = l | ||
843 | + + pos; | ||
844 | + i.style.height = a | ||
845 | + + pos; | ||
846 | + i.style.clip = 'rect(' | ||
847 | + + 0 | ||
848 | + + " " | ||
849 | + + (l * 1 + 2) | ||
850 | + + " " | ||
851 | + + (a * 1 + 2) | ||
852 | + + " " | ||
853 | + + 0 | ||
854 | + + ')'; | ||
648 | } | 855 | } |
649 | i = $i("mst"); | 856 | i = $i("mst"); |
650 | - if(i) | ||
651 | - {i.style.width = l + 1 + pos;} | 857 | + if (i) { |
858 | + i.style.width = l | ||
859 | + + 1 | ||
860 | + + pos; | ||
861 | + } | ||
652 | i3GEO.mapa.ajustaPosicao(); | 862 | i3GEO.mapa.ajustaPosicao(); |
653 | - temp = function(retorno){ | ||
654 | - //carrega janela | ||
655 | - var novoel,temp,i,g,guias,nguias,janela; | 863 | + temp = function(retorno) { |
864 | + // carrega janela | ||
865 | + var novoel, temp, i, g, guias, nguias, janela; | ||
656 | novoel = document.createElement("div"); | 866 | novoel = document.createElement("div"); |
657 | novoel.id = "janelaguias"; | 867 | novoel.id = "janelaguias"; |
658 | - novoel.style.display="block"; | 868 | + novoel.style.display = "block"; |
659 | novoel.innerHTML = '<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>'; | 869 | novoel.innerHTML = '<div class="hd">Guias <div onclick ="i3GEO.janela.minimiza(\'conteudojanelaguias\')" id="janelaguias_minimizaCabecalho" class="container-minimiza" ></div></div><div class="bd" id="conteudojanelaguias_corpo" style=padding:0px ></div>'; |
660 | - temp = $i("i3geo") ? $i("i3geo").appendChild(novoel) : document.body.appendChild(novoel); | ||
661 | - janela = new YAHOO.widget.Panel("janelaguias", {width:"270px", fixedcenter: true, constraintoviewport: false, underlay:"none", close:false, visible:true, draggable:true, modal:false,iframe:true } ); | 870 | + temp = $i("i3geo") ? $i( |
871 | + "i3geo").appendChild( | ||
872 | + novoel) : document.body.appendChild(novoel); | ||
873 | + janela = new YAHOO.widget.Panel("janelaguias", { | ||
874 | + width : "270px", | ||
875 | + fixedcenter : true, | ||
876 | + constraintoviewport : false, | ||
877 | + underlay : "none", | ||
878 | + close : false, | ||
879 | + visible : true, | ||
880 | + draggable : true, | ||
881 | + modal : false, | ||
882 | + iframe : true | ||
883 | + }); | ||
662 | YAHOO.i3GEO.janela.manager.register(janela); | 884 | YAHOO.i3GEO.janela.manager.register(janela); |
663 | janela.render(); | 885 | janela.render(); |
664 | janela.show(); | 886 | janela.show(); |
665 | - janela.cfg.setProperty("y", 0); | 887 | + janela.cfg.setProperty( |
888 | + "y", | ||
889 | + 0); | ||
666 | i = $i(i3GEO.guias.IDGUIAS); | 890 | i = $i(i3GEO.guias.IDGUIAS); |
667 | - $i("conteudojanelaguias_corpo").appendChild(i); | ||
668 | - i.style.borderLeft="1px solid black"; | ||
669 | - i.style.borderRight="1px solid black"; | 891 | + $i( |
892 | + "conteudojanelaguias_corpo").appendChild( | ||
893 | + i); | ||
894 | + i.style.borderLeft = "1px solid black"; | ||
895 | + i.style.borderRight = "1px solid black"; | ||
670 | guias = i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA); | 896 | guias = i3GEO.util.listaChaves(i3GEO.guias.CONFIGURA); |
671 | nguias = guias.length; | 897 | nguias = guias.length; |
672 | - for(g=0;g<nguias;g++){ | ||
673 | - if($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)){ | ||
674 | - $i("conteudojanelaguias_corpo").appendChild($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)); | 898 | + for (g = 0; g < nguias; g++) { |
899 | + if ($i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)) { | ||
900 | + $i( | ||
901 | + "conteudojanelaguias_corpo").appendChild( | ||
902 | + $i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo)); | ||
675 | temp = $i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style; | 903 | temp = $i(i3GEO.guias.CONFIGURA[guias[g]].idconteudo).style; |
676 | - temp.background="white"; | ||
677 | - temp.border="1px solid black"; | ||
678 | - temp.borderTop="0px solid black"; | ||
679 | - temp.width="270px"; | ||
680 | - temp.left="-1px"; | ||
681 | - temp.height = i3GEO.parametros.h - 90 + "px"; | 904 | + temp.background = "white"; |
905 | + temp.border = "1px solid black"; | ||
906 | + temp.borderTop = "0px solid black"; | ||
907 | + temp.width = "270px"; | ||
908 | + temp.left = "-1px"; | ||
909 | + temp.height = i3GEO.parametros.h | ||
910 | + - 90 | ||
911 | + + "px"; | ||
682 | } | 912 | } |
683 | } | 913 | } |
684 | i3GEO.atualiza(""); | 914 | i3GEO.atualiza(""); |
685 | - i.style.display="block"; | 915 | + i.style.display = "block"; |
686 | i.style.left = "-1px"; | 916 | i.style.left = "-1px"; |
687 | i.style.width = "270px"; | 917 | i.style.width = "270px"; |
688 | }; | 918 | }; |
689 | - i3GEO.php.mudatamanho(temp,a,l); | ||
690 | - } | ||
691 | - else{ | 919 | + i3GEO.php.mudatamanho( |
920 | + temp, | ||
921 | + a, | ||
922 | + l); | ||
923 | + } else { | ||
692 | janela = YAHOO.i3GEO.janela.manager.find(id); | 924 | janela = YAHOO.i3GEO.janela.manager.find(id); |
693 | janela.show(); | 925 | janela.show(); |
694 | janela.bringToTop(); | 926 | janela.bringToTop(); |
695 | } | 927 | } |
696 | }, | 928 | }, |
697 | /* | 929 | /* |
698 | - Mostra uma determinada guia em uma janela do tipo ferramenta. | ||
699 | - | ||
700 | - As guias são construídas pelo construtor da ferramenta | ||
701 | - | ||
702 | - Parametros: | ||
703 | - | ||
704 | - guia {String} - O elemento html cujo id for igual a guia+"obj" terá seu estilo (display) definido como block, tornando-o visível | ||
705 | - | ||
706 | - namespace {String} - Todos os elementos html que tiverem como id o namespace, seguindo por um número e "obj", terão seu estilo alterado para none, tornando-se invisíveis | ||
707 | - | ||
708 | - */ | ||
709 | - mostraGuiaFerramenta: function(guia,namespace){ | ||
710 | - if(typeof(console) !== 'undefined'){console.info("i3GEO.guias.mostraGuiaFerramenta()");} | 930 | + * Mostra uma determinada guia em uma janela do tipo ferramenta. |
931 | + * | ||
932 | + * As guias são construídas pelo construtor da ferramenta | ||
933 | + * | ||
934 | + * Parametros: | ||
935 | + * | ||
936 | + * guia {String} - O elemento html cujo id for igual a guia+"obj" | ||
937 | + * terá seu estilo (display) definido como block, tornando-o | ||
938 | + * visível | ||
939 | + * | ||
940 | + * namespace {String} - Todos os elementos html que tiverem como id o | ||
941 | + * namespace, seguindo por um número e "obj", terão seu estilo | ||
942 | + * alterado para none, tornando-se invisíveis | ||
943 | + * | ||
944 | + */ | ||
945 | + mostraGuiaFerramenta : function(guia, namespace) { | ||
946 | + if (typeof (console) !== 'undefined') { | ||
947 | + console.info("i3GEO.guias.mostraGuiaFerramenta()"); | ||
948 | + } | ||
711 | var g, Dom = YAHOO.util.Dom; | 949 | var g, Dom = YAHOO.util.Dom; |
712 | - if(!namespace) | ||
713 | - {namespace = "guia";} | ||
714 | - for(g=0;g<12;g++){ | ||
715 | - Dom.setStyle(namespace+g+"obj","display","none"); | 950 | + if (!namespace) { |
951 | + namespace = "guia"; | ||
716 | } | 952 | } |
717 | - Dom.setStyle(guia+"obj","display","block"); | 953 | + for (g = 0; g < 12; g++) { |
954 | + Dom.setStyle( | ||
955 | + namespace | ||
956 | + + g | ||
957 | + + "obj", | ||
958 | + "display", | ||
959 | + "none"); | ||
960 | + } | ||
961 | + Dom.setStyle( | ||
962 | + guia | ||
963 | + + "obj", | ||
964 | + "display", | ||
965 | + "block"); | ||
718 | }, | 966 | }, |
719 | /* | 967 | /* |
720 | - Function: guiaMovel | ||
721 | - | ||
722 | - Controla as guias do tipo "movel", que apresenta uma janela retrátil onde as opções são mostradas | ||
723 | - */ | ||
724 | - guiaMovel: { | 968 | + * Function: guiaMovel |
969 | + * | ||
970 | + * Controla as guias do tipo "movel", que apresenta uma janela | ||
971 | + * retrátil onde as opções são mostradas | ||
972 | + */ | ||
973 | + guiaMovel : { | ||
725 | /* | 974 | /* |
726 | - Propriedade: ABERTA | ||
727 | - | ||
728 | - Indica se a guia inicializará aberta | ||
729 | - | ||
730 | - Type: | ||
731 | - {boolean} | ||
732 | - */ | ||
733 | - ABERTA: false, | 975 | + * Propriedade: ABERTA |
976 | + * | ||
977 | + * Indica se a guia inicializará aberta | ||
978 | + * | ||
979 | + * Type: {boolean} | ||
980 | + */ | ||
981 | + ABERTA : false, | ||
734 | /* | 982 | /* |
735 | - Define os valores de posicionamento dos elementos que compõem a guia | ||
736 | - */ | ||
737 | - config: { | ||
738 | - larguraPuxador: 50, | ||
739 | - alturaPuxador: 319, | ||
740 | - alturaGuiaMovel: 0, | ||
741 | - larguraGuiaMovel: 320, | ||
742 | - topGuiaMovel:0, | ||
743 | - guias: { | ||
744 | - icones: [], | ||
745 | - ids: [], | ||
746 | - idsconteudos: [], | ||
747 | - titulos: [], | ||
748 | - chaves: [] | ||
749 | - } | 983 | + * Define os valores de posicionamento dos elementos que compõem |
984 | + * a guia | ||
985 | + */ | ||
986 | + config : { | ||
987 | + larguraPuxador : 50, | ||
988 | + alturaPuxador : 319, | ||
989 | + alturaGuiaMovel : 0, | ||
990 | + larguraGuiaMovel : 320, | ||
991 | + topGuiaMovel : 0, | ||
992 | + guias : { | ||
993 | + icones : [], | ||
994 | + ids : [], | ||
995 | + idsconteudos : [], | ||
996 | + titulos : [], | ||
997 | + chaves : [] | ||
998 | + }, | ||
999 | + posicao : [ | ||
1000 | + "c", "r" | ||
1001 | + ] | ||
1002 | + // vertical, orizontal | ||
750 | }, | 1003 | }, |
751 | /* | 1004 | /* |
752 | - Valor de posicionamento a esquerda, calculado na inicialização | ||
753 | - */ | ||
754 | - left: 0, | 1005 | + * Valor de posicionamento a esquerda, calculado na |
1006 | + * inicialização | ||
1007 | + */ | ||
1008 | + left : 0, | ||
755 | /* | 1009 | /* |
756 | - Function: inicia | ||
757 | - | ||
758 | - Inicializa a guia móvel | ||
759 | - */ | ||
760 | - inicia: function(){ | ||
761 | - var posMapa = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)), | ||
762 | - centroY = posMapa[1] + (i3GEO.parametros.h / 2), | ||
763 | - config = i3GEO.guias.guiaMovel.config, | ||
764 | - temp; | ||
765 | - | ||
766 | - if(i3GEO.guias.ALTURACORPOGUIAS === 0 && config.alturaGuiaMovel === 0) | ||
767 | - {i3GEO.guias.guiaMovel.config.alturaGuiaMovel = i3GEO.parametros.h;} | ||
768 | - else | ||
769 | - {i3GEO.guias.guiaMovel.config.alturaGuiaMovel = i3GEO.guias.ALTURACORPOGUIAS;} | 1010 | + * Function: inicia |
1011 | + * | ||
1012 | + * Inicializa a guia móvel | ||
1013 | + */ | ||
1014 | + inicia : function() { | ||
1015 | + var posMapa = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.Interface.IDMAPA)), centroY = posMapa[1] | ||
1016 | + + (i3GEO.parametros.h / 2), config = i3GEO.guias.guiaMovel.config, temp; | ||
1017 | + | ||
1018 | + if (i3GEO.guias.ALTURACORPOGUIAS === 0 | ||
1019 | + && config.alturaGuiaMovel === 0) { | ||
1020 | + i3GEO.guias.guiaMovel.config.alturaGuiaMovel = i3GEO.parametros.h; | ||
1021 | + } else { | ||
1022 | + i3GEO.guias.guiaMovel.config.alturaGuiaMovel = i3GEO.guias.ALTURACORPOGUIAS; | ||
1023 | + } | ||
770 | config = i3GEO.guias.guiaMovel.config; | 1024 | config = i3GEO.guias.guiaMovel.config; |
771 | 1025 | ||
772 | temp = $i("i3GEOguiaMovel").style; | 1026 | temp = $i("i3GEOguiaMovel").style; |
773 | - //temp.height = config.alturaGuiaMovel + "px"; | ||
774 | - temp.left = (posMapa[0] + i3GEO.parametros.w - config.larguraPuxador) + "px"; | ||
775 | - //aberta temp.left = (posMapa[0] + i3GEO.parametros.w - config.larguraPuxador - config.larguraGuiaMovel) + "px"; | ||
776 | - i3GEO.guias.guiaMovel.left = parseInt(temp.left,10) + "px"; | ||
777 | - if(config.topGuiaMovel === 0) | ||
778 | - {temp.top = (centroY - ((config.alturaGuiaMovel - 42) / 2)) + "px";} | ||
779 | - else | ||
780 | - {temp.top = config.topGuiaMovel + "px";} | ||
781 | - temp.width = config.larguraPuxador + "px"; | ||
782 | - temp.height = config.alturaGuiaMovel + "px"; | ||
783 | - //aberta temp.width = config.larguraPuxador + config.larguraGuiaMovel + "px"; | 1027 | + if (config.posicao[1] === "r") { |
1028 | + temp.left = (posMapa[0] | ||
1029 | + + i3GEO.parametros.w - config.larguraPuxador) | ||
1030 | + + "px"; | ||
1031 | + i3GEO.guias.guiaMovel.left = parseInt( | ||
1032 | + temp.left, | ||
1033 | + 10) | ||
1034 | + + "px"; | ||
1035 | + } | ||
1036 | + if (config.posicao[1] === "l") { | ||
1037 | + temp.left = posMapa[0] | ||
1038 | + + "px"; | ||
1039 | + i3GEO.guias.guiaMovel.left = parseInt( | ||
1040 | + temp.left, | ||
1041 | + 10) | ||
1042 | + + "px"; | ||
1043 | + } | ||
1044 | + if (config.topGuiaMovel === 0) { | ||
1045 | + temp.top = (centroY - ((config.alturaGuiaMovel - 42) / 2)) | ||
1046 | + + "px"; | ||
1047 | + } else { | ||
1048 | + temp.top = config.topGuiaMovel | ||
1049 | + + "px"; | ||
1050 | + } | ||
1051 | + temp.width = config.larguraPuxador | ||
1052 | + + "px"; | ||
1053 | + temp.height = config.alturaGuiaMovel | ||
1054 | + + "px"; | ||
1055 | + // aberta temp.width = config.larguraPuxador + | ||
1056 | + // config.larguraGuiaMovel + "px"; | ||
784 | 1057 | ||
785 | temp = $i("i3GEOguiaMovelMolde").style; | 1058 | temp = $i("i3GEOguiaMovelMolde").style; |
786 | temp.top = "0px"; | 1059 | temp.top = "0px"; |
787 | - temp.left = config.larguraPuxador + "px"; | ||
788 | - //temp.width = "0px"; //config.larguraGuiaMovel + "px"; | ||
789 | - temp.height = config.alturaGuiaMovel + "px"; | 1060 | + if (config.posicao[1] === "r") { |
1061 | + temp.left = config.larguraPuxador | ||
1062 | + + "px"; | ||
1063 | + } | ||
1064 | + if (config.posicao[1] === "l") { | ||
1065 | + temp.left = "1px"; | ||
1066 | + } | ||
1067 | + | ||
1068 | + temp.height = config.alturaGuiaMovel | ||
1069 | + + "px"; | ||
790 | temp.backgroundColor = "white"; | 1070 | temp.backgroundColor = "white"; |
791 | - //temp.boxShadow = "0 2px 10px 0 #888888"; | ||
792 | 1071 | ||
793 | - if($i("i3GEOguiaMovelPuxador")){ | 1072 | + if ($i("i3GEOguiaMovelPuxador")) { |
794 | temp = $i("i3GEOguiaMovelPuxador").style; | 1073 | temp = $i("i3GEOguiaMovelPuxador").style; |
795 | - temp.top = ((config.alturaGuiaMovel - config.alturaPuxador) / 2 ) + "px"; | 1074 | + temp.top = ((config.alturaGuiaMovel - config.alturaPuxador) / 2) |
1075 | + + "px"; | ||
796 | temp.left = "0px"; | 1076 | temp.left = "0px"; |
797 | - temp.width = config.larguraPuxador + "px"; | ||
798 | - temp.height = config.alturaPuxador + "px"; | 1077 | + temp.width = config.larguraPuxador |
1078 | + + "px"; | ||
1079 | + temp.height = config.alturaPuxador | ||
1080 | + + "px"; | ||
799 | } | 1081 | } |
800 | - | ||
801 | temp = $i("i3GEOguiaMovelIcones"); | 1082 | temp = $i("i3GEOguiaMovelIcones"); |
802 | - if(temp){ | 1083 | + if (temp) { |
803 | temp = temp.style; | 1084 | temp = temp.style; |
804 | temp.left = "1px"; | 1085 | temp.left = "1px"; |
805 | temp.top = "1px"; | 1086 | temp.top = "1px"; |
806 | - temp.width = (config.larguraGuiaMovel - 1) + "px"; | 1087 | + temp.width = (config.larguraGuiaMovel - 1) |
1088 | + + "px"; | ||
807 | temp.height = "35px"; | 1089 | temp.height = "35px"; |
808 | - | ||
809 | - if(navm) | ||
810 | - {temp.height = "37px";} | 1090 | + |
1091 | + if (navm) { | ||
1092 | + temp.height = "37px"; | ||
1093 | + } | ||
811 | temp.zIndex = 5; | 1094 | temp.zIndex = 5; |
812 | temp.paddingTop = "2px"; | 1095 | temp.paddingTop = "2px"; |
813 | - YAHOO.util.Dom.setStyle("i3GEOguiaMovelIcones", "opacity", 0.90); | 1096 | + YAHOO.util.Dom.setStyle( |
1097 | + "i3GEOguiaMovelIcones", | ||
1098 | + "opacity", | ||
1099 | + 0.90); | ||
814 | } | 1100 | } |
815 | temp = $i("i3GEOguiaMovelConteudo").style; | 1101 | temp = $i("i3GEOguiaMovelConteudo").style; |
816 | temp.left = "1px"; | 1102 | temp.left = "1px"; |
817 | - if(temp.top == ""){ | 1103 | + if (temp.top == "") { |
818 | temp.top = "38px"; | 1104 | temp.top = "38px"; |
819 | } | 1105 | } |
820 | - temp.height = (config.alturaGuiaMovel - 39) +"px"; | ||
821 | - if(navm) | ||
822 | - {temp.width = (config.larguraGuiaMovel - 1) + "px";} | ||
823 | - else | ||
824 | - {temp.width = (config.larguraGuiaMovel - 5) + "px";} | 1106 | + temp.height = (config.alturaGuiaMovel - 39) |
1107 | + + "px"; | ||
1108 | + if (navm) { | ||
1109 | + temp.width = (config.larguraGuiaMovel - 1) | ||
1110 | + + "px"; | ||
1111 | + } else { | ||
1112 | + temp.width = (config.larguraGuiaMovel - 5) | ||
1113 | + + "px"; | ||
1114 | + } | ||
825 | temp.paddingLeft = "4px"; | 1115 | temp.paddingLeft = "4px"; |
826 | 1116 | ||
827 | - YAHOO.util.Dom.setStyle("i3GEOguiaMovelConteudo", "opacity", 0.90); | ||
828 | - | ||
829 | - YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde", "opacity", 0.10); | ||
830 | - $i("i3GEOguiaMovelMolde").onmouseover = function(){ | ||
831 | - if($i("i3GEOguiaMovelConteudo").style.display === "block") | ||
832 | - {YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde", "opacity", 0.9);} | ||
833 | - if($i("i3GEOguiaMovelIcones") && $i("i3GEOguiaMovelIcones").innerHTML === "") | ||
834 | - {i3GEO.guias.guiaMovel.mostraIcones();} | 1117 | + YAHOO.util.Dom.setStyle( |
1118 | + "i3GEOguiaMovelConteudo", | ||
1119 | + "opacity", | ||
1120 | + 0.90); | ||
1121 | + | ||
1122 | + YAHOO.util.Dom.setStyle( | ||
1123 | + "i3GEOguiaMovelMolde", | ||
1124 | + "opacity", | ||
1125 | + 0.10); | ||
1126 | + $i("i3GEOguiaMovelMolde").onmouseover = function() { | ||
1127 | + if ($i("i3GEOguiaMovelConteudo").style.display === "block") { | ||
1128 | + YAHOO.util.Dom.setStyle( | ||
1129 | + "i3GEOguiaMovelMolde", | ||
1130 | + "opacity", | ||
1131 | + 0.9); | ||
1132 | + } | ||
1133 | + if ($i("i3GEOguiaMovelIcones") | ||
1134 | + && $i("i3GEOguiaMovelIcones").innerHTML === "") { | ||
1135 | + i3GEO.guias.guiaMovel.mostraIcones(); | ||
1136 | + } | ||
835 | }; | 1137 | }; |
836 | - $i("i3GEOguiaMovelMolde").onmouseout = function(){ | ||
837 | - YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde", "opacity", 0.90); | ||
838 | - if($i("i3GEOguiaMovelIcones") && $i("i3GEOguiaMovelIcones").innerHTML === "") | ||
839 | - {i3GEO.guias.guiaMovel.mostraIcones();} | 1138 | + $i("i3GEOguiaMovelMolde").onmouseout = function() { |
1139 | + YAHOO.util.Dom.setStyle( | ||
1140 | + "i3GEOguiaMovelMolde", | ||
1141 | + "opacity", | ||
1142 | + 0.90); | ||
1143 | + if ($i("i3GEOguiaMovelIcones") | ||
1144 | + && $i("i3GEOguiaMovelIcones").innerHTML === "") { | ||
1145 | + i3GEO.guias.guiaMovel.mostraIcones(); | ||
1146 | + } | ||
840 | }; | 1147 | }; |
841 | - if(i3GEO.guias.guiaMovel.ABERTA === true){ | 1148 | + if (i3GEO.guias.guiaMovel.ABERTA === true) { |
842 | i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL); | 1149 | i3GEO.guias.guiaMovel.ativa(i3GEO.guias.ATUAL); |
843 | } | 1150 | } |
844 | i3GEO.guias.guiaMovel.mostraIcones(); | 1151 | i3GEO.guias.guiaMovel.mostraIcones(); |
845 | $i("i3GEOguiaMovel").style.visibility = "visible"; | 1152 | $i("i3GEOguiaMovel").style.visibility = "visible"; |
846 | - i3GEO.util.aparece("i3GEOguiaMovel",300,100); | ||
847 | - | 1153 | + i3GEO.util.aparece( |
1154 | + "i3GEOguiaMovel", | ||
1155 | + 300, | ||
1156 | + 100); | ||
848 | }, | 1157 | }, |
849 | /* | 1158 | /* |
850 | - Mostra os ícones que acionam cada guia | ||
851 | - */ | ||
852 | - mostraIcones: function(){ | ||
853 | - if($i("i3GEOguiaMovelIcones") && $i("i3GEOguiaMovelIcones").innerHTML != "") | ||
854 | - {return;} | ||
855 | - var n = i3GEO.guias.guiaMovel.config.guias.icones.length, | ||
856 | - i, | ||
857 | - temp = i3GEO.guias.guiaMovel.config.guias, | ||
858 | - ins = "", | ||
859 | - ico; | ||
860 | - if(i3GEO.guias.ORDEM !== "") | ||
861 | - {temp.chaves = i3GEO.guias.ORDEM;} | ||
862 | - for(i=0;i<n;i++){ | ||
863 | - if(temp.chaves[i]){ | ||
864 | - ico = "<button title='"+temp.titulos[i]+"' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\""+temp.chaves[i]+"\")' class=iconeGuiaMovel ><img id='"+temp.ids[i]+"' src='"+i3GEO.configura.locaplic+"/"+temp.icones[i]+"' style='cursor:pointer;' /></button>"; | ||
865 | - //verifica se existe um id na interface | ||
866 | - //se existir, o icone e inserido nesse id | ||
867 | - if(!$i("iconeGuia_"+temp.chaves[i])){ | 1159 | + * Mostra os ícones que acionam cada guia |
1160 | + */ | ||
1161 | + mostraIcones : function() { | ||
1162 | + if ($i("i3GEOguiaMovelIcones") | ||
1163 | + && $i("i3GEOguiaMovelIcones").innerHTML != "") { | ||
1164 | + return; | ||
1165 | + } | ||
1166 | + var n = i3GEO.guias.guiaMovel.config.guias.icones.length, i, temp = i3GEO.guias.guiaMovel.config.guias, ins = "", ico; | ||
1167 | + if (i3GEO.guias.ORDEM !== "") { | ||
1168 | + temp.chaves = i3GEO.guias.ORDEM; | ||
1169 | + } | ||
1170 | + for (i = 0; i < n; i++) { | ||
1171 | + if (temp.chaves[i]) { | ||
1172 | + ico = "<button title='" | ||
1173 | + + temp.titulos[i] | ||
1174 | + + "' onmouseout='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOut\"' onmouseover='javascript:this.className = \"iconeGuiaMovel iconeGuiaMovelMouseOver\"' onclick='i3GEO.guias.guiaMovel.ativa(\"" | ||
1175 | + + temp.chaves[i] | ||
1176 | + + "\")' class=iconeGuiaMovel ><img id='" | ||
1177 | + + temp.ids[i] | ||
1178 | + + "' src='" | ||
1179 | + + i3GEO.configura.locaplic | ||
1180 | + + "/" | ||
1181 | + + temp.icones[i] | ||
1182 | + + "' style='cursor:pointer;' /></button>"; | ||
1183 | + // verifica se existe um id na interface | ||
1184 | + // se existir, o icone e inserido nesse id | ||
1185 | + if (!$i("iconeGuia_" | ||
1186 | + + temp.chaves[i])) { | ||
868 | ins += ico; | 1187 | ins += ico; |
869 | - } | ||
870 | - else{ | ||
871 | - $i("iconeGuia_"+temp.chaves[i]).innerHTML = ico; | 1188 | + } else { |
1189 | + $i("iconeGuia_" | ||
1190 | + + temp.chaves[i]).innerHTML = ico; | ||
872 | } | 1191 | } |
873 | } | 1192 | } |
874 | } | 1193 | } |
875 | - if($i("i3GEOguiaMovelIcones")){ | 1194 | + if ($i("i3GEOguiaMovelIcones")) { |
876 | $i("i3GEOguiaMovelIcones").innerHTML = ins; | 1195 | $i("i3GEOguiaMovelIcones").innerHTML = ins; |
877 | } | 1196 | } |
878 | i3GEO.guias.guiaMovel.desativaIcones(); | 1197 | i3GEO.guias.guiaMovel.desativaIcones(); |
879 | - if(i3GEO.guias.ATUAL != ""){ | 1198 | + if (i3GEO.guias.ATUAL != "") { |
880 | ico = $i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id); | 1199 | ico = $i(i3GEO.guias.CONFIGURA[i3GEO.guias.ATUAL].id); |
881 | - if(ico){ | ||
882 | - YAHOO.util.Dom.setStyle(ico, "opacity", 0.9); | 1200 | + if (ico) { |
1201 | + YAHOO.util.Dom.setStyle( | ||
1202 | + ico, | ||
1203 | + "opacity", | ||
1204 | + 0.9); | ||
883 | ico.parentNode.style.boxShadow = "none"; | 1205 | ico.parentNode.style.boxShadow = "none"; |
884 | } | 1206 | } |
885 | } | 1207 | } |
886 | }, | 1208 | }, |
887 | /* | 1209 | /* |
888 | - Altera a cor do fundo dos ícones, voltando ao original | ||
889 | - */ | ||
890 | - desativaIcones:function(){ | 1210 | + * Altera a cor do fundo dos ícones, voltando ao original |
1211 | + */ | ||
1212 | + desativaIcones : function() { | ||
891 | var ims, n, i; | 1213 | var ims, n, i; |
892 | 1214 | ||
893 | ims = $i("i3GEOguiaMovelIcones"); | 1215 | ims = $i("i3GEOguiaMovelIcones"); |
894 | - if(ims){ | 1216 | + if (ims) { |
895 | ims = ims.getElementsByTagName("button"); | 1217 | ims = ims.getElementsByTagName("button"); |
896 | n = ims.length; | 1218 | n = ims.length; |
897 | - for(i=0;i<n;i++){ | ||
898 | - YAHOO.util.Dom.setStyle(ims[i], "opacity", 0.7); | 1219 | + for (i = 0; i < n; i++) { |
1220 | + YAHOO.util.Dom.setStyle( | ||
1221 | + ims[i], | ||
1222 | + "opacity", | ||
1223 | + 0.7); | ||
899 | ims[i].style.boxShadow = ""; | 1224 | ims[i].style.boxShadow = ""; |
900 | } | 1225 | } |
901 | } | 1226 | } |
902 | - //verifica se existem icones fora do container | 1227 | + // verifica se existem icones fora do container |
903 | n = i3GEO.guias.guiaMovel.config.guias.icones.length; | 1228 | n = i3GEO.guias.guiaMovel.config.guias.icones.length; |
904 | temp = i3GEO.guias.guiaMovel.config.guias; | 1229 | temp = i3GEO.guias.guiaMovel.config.guias; |
905 | - for(i=0;i<n;i++){ | ||
906 | - if($i("iconeGuia_"+temp.chaves[i])){ | ||
907 | - ims = $i("iconeGuia_"+temp.chaves[i]).getElementsByTagName("button"); | ||
908 | - if(ims.length > 0){ | 1230 | + for (i = 0; i < n; i++) { |
1231 | + if ($i("iconeGuia_" | ||
1232 | + + temp.chaves[i])) { | ||
1233 | + ims = $i( | ||
1234 | + "iconeGuia_" | ||
1235 | + + temp.chaves[i]).getElementsByTagName( | ||
1236 | + "button"); | ||
1237 | + if (ims.length > 0) { | ||
909 | ims[0].style.backgroundColor = "white"; | 1238 | ims[0].style.backgroundColor = "white"; |
910 | ims[0].style.boxShadow = ""; | 1239 | ims[0].style.boxShadow = ""; |
911 | ims[0].style.margin = "0px"; | 1240 | ims[0].style.margin = "0px"; |
912 | ims[0].style.padding = "0px"; | 1241 | ims[0].style.padding = "0px"; |
913 | - if(chro === true){ | 1242 | + if (chro === true) { |
914 | ims[0].style.padding = "1.7px"; | 1243 | ims[0].style.padding = "1.7px"; |
915 | } | 1244 | } |
916 | ims[0].style.border = "1px solid gray"; | 1245 | ims[0].style.border = "1px solid gray"; |
917 | - ims[0].style.borderRight = "2px solid white"; | ||
918 | - YAHOO.util.Dom.setStyle(ims[0], "opacity", 0.6); | 1246 | + if (i3GEO.guias.guiaMovel.config.posicao[1] === "l"){ |
1247 | + ims[0].style.borderLeft = "2px solid white"; | ||
1248 | + } | ||
1249 | + else{ | ||
1250 | + ims[0].style.borderRight = "2px solid white"; | ||
1251 | + } | ||
1252 | + | ||
1253 | + YAHOO.util.Dom.setStyle( | ||
1254 | + ims[0], | ||
1255 | + "opacity", | ||
1256 | + 0.6); | ||
919 | ims[0].blur(); | 1257 | ims[0].blur(); |
920 | } | 1258 | } |
921 | } | 1259 | } |
922 | } | 1260 | } |
923 | }, | 1261 | }, |
924 | /* | 1262 | /* |
925 | - Ativa o conteúdo de determinada guia | ||
926 | - | ||
927 | - Parametro: | ||
928 | - | ||
929 | - chave {string} - código da guia, definido em i3GEO.guias.CONFIGURA | ||
930 | - */ | ||
931 | - ativa: function(chave){ | ||
932 | - if(chave === ""){ | 1263 | + * Ativa o conteúdo de determinada guia |
1264 | + * | ||
1265 | + * Parametro: | ||
1266 | + * | ||
1267 | + * chave {string} - código da guia, definido em | ||
1268 | + * i3GEO.guias.CONFIGURA | ||
1269 | + */ | ||
1270 | + ativa : function(chave) { | ||
1271 | + if (chave === "") { | ||
933 | i3GEO.guias.guiaMovel.desativaIcones(); | 1272 | i3GEO.guias.guiaMovel.desativaIcones(); |
934 | return; | 1273 | return; |
935 | } | 1274 | } |
936 | i3GEO.guias.escondeGuias(); | 1275 | i3GEO.guias.escondeGuias(); |
937 | i3GEO.guias.guiaMovel.desativaIcones(); | 1276 | i3GEO.guias.guiaMovel.desativaIcones(); |
938 | - if(i3GEO.guias.ATUAL === chave && $i("i3GEOguiaMovelMolde").style.display === "block"){ | 1277 | + if (i3GEO.guias.ATUAL === chave |
1278 | + && $i("i3GEOguiaMovelMolde").style.display === "block") { | ||
939 | i3GEO.guias.ATUAL = ""; | 1279 | i3GEO.guias.ATUAL = ""; |
940 | i3GEO.guias.guiaMovel.abreFecha("fecha"); | 1280 | i3GEO.guias.guiaMovel.abreFecha("fecha"); |
941 | - } | ||
942 | - else{ | 1281 | + } else { |
943 | i3GEO.guias.ATUAL = chave; | 1282 | i3GEO.guias.ATUAL = chave; |
944 | i3GEO.guias.guiaMovel.abreFecha("abre"); | 1283 | i3GEO.guias.guiaMovel.abreFecha("abre"); |
945 | - if(i3GEO.guias.CONFIGURA[chave].click){ | 1284 | + if (i3GEO.guias.CONFIGURA[chave].click) { |
946 | i3GEO.guias.CONFIGURA[chave].click.call(); | 1285 | i3GEO.guias.CONFIGURA[chave].click.call(); |
947 | } | 1286 | } |
948 | i3GEO.guias.mostra(chave); | 1287 | i3GEO.guias.mostra(chave); |
949 | 1288 | ||
950 | var ico = $i(i3GEO.guias.CONFIGURA[chave].id); | 1289 | var ico = $i(i3GEO.guias.CONFIGURA[chave].id); |
951 | - if(ico){ | 1290 | + if (ico) { |
952 | ico.parentNode.blur(); | 1291 | ico.parentNode.blur(); |
953 | - YAHOO.util.Dom.setStyle(ico.parentNode, "opacity", 0.9); | 1292 | + YAHOO.util.Dom.setStyle( |
1293 | + ico.parentNode, | ||
1294 | + "opacity", | ||
1295 | + 0.9); | ||
954 | ico.parentNode.style.boxShadow = "none"; | 1296 | ico.parentNode.style.boxShadow = "none"; |
955 | - //verifica se esta fora do lugar normal e muda a borda | ||
956 | - if($i("iconeGuia_"+chave)){ | ||
957 | - ico.parentNode.style.borderRight = "2px solid white"; | 1297 | + // verifica se esta fora do lugar normal e muda a borda |
1298 | + if ($i("iconeGuia_" | ||
1299 | + + chave)) { | ||
1300 | + if (i3GEO.guias.guiaMovel.config.posicao[1] === "l"){ | ||
1301 | + ico.parentNode.style.borderLeft = "2px solid white"; | ||
1302 | + } | ||
1303 | + else{ | ||
1304 | + ico.parentNode.style.borderRight = "2px solid white"; | ||
1305 | + } | ||
958 | } | 1306 | } |
959 | } | 1307 | } |
960 | } | 1308 | } |
961 | }, | 1309 | }, |
962 | /* | 1310 | /* |
963 | - Reposiciona a guia móvel quando o mapa muda de tamanho | ||
964 | - */ | ||
965 | - reposiciona: function(){ | 1311 | + * Reposiciona a guia móvel quando o mapa muda de tamanho |
1312 | + */ | ||
1313 | + reposiciona : function() { | ||
966 | var temp = $i("i3GEOguiaMovel").style.top; | 1314 | var temp = $i("i3GEOguiaMovel").style.top; |
967 | - //i3GEO.guias.guiaMovel.config.guias.icones = []; | ||
968 | - //i3GEO.guias.guiaMovel.config.guias.ids = []; | ||
969 | - //i3GEO.guias.guiaMovel.config.guias.idsconteudos = []; | ||
970 | - //i3GEO.guias.guiaMovel.config.guias.titulos = []; | ||
971 | - //i3GEO.guias.guiaMovel.config.guias.chaves = []; | ||
972 | i3GEO.guias.guiaMovel.config.alturaGuiaMovel = 0; | 1315 | i3GEO.guias.guiaMovel.config.alturaGuiaMovel = 0; |
973 | i3GEO.guias.ALTURACORPOGUIAS = 0; | 1316 | i3GEO.guias.ALTURACORPOGUIAS = 0; |
974 | - if($i("i3GEOguiaMovelIcones")){ | 1317 | + if ($i("i3GEOguiaMovelIcones")) { |
975 | $i("i3GEOguiaMovelIcones").style.display = "none"; | 1318 | $i("i3GEOguiaMovelIcones").style.display = "none"; |
976 | } | 1319 | } |
977 | $i("i3GEOguiaMovelConteudo").style.display = "none"; | 1320 | $i("i3GEOguiaMovelConteudo").style.display = "none"; |
@@ -981,75 +1324,119 @@ i3GEO.guias = { | @@ -981,75 +1324,119 @@ i3GEO.guias = { | ||
981 | $i("i3GEOguiaMovel").style.top = temp; | 1324 | $i("i3GEOguiaMovel").style.top = temp; |
982 | }, | 1325 | }, |
983 | /* | 1326 | /* |
984 | - Function: abreFecha | ||
985 | - | ||
986 | - Abre ou fecha a guia móvel | ||
987 | - */ | ||
988 | - abreFecha: function(forca){ | ||
989 | - var molde = $i("i3GEOguiaMovelMolde"), | ||
990 | - guia = $i("i3GEOguiaMovel"), | ||
991 | - attributes, | ||
992 | - anim, | ||
993 | - anim1, | ||
994 | - temp; | ||
995 | - //para efeitos de compatibilidade caso seja chamado com i3GEO.guias.guiaMovel.abreFecha() | ||
996 | - if(!forca){ | ||
997 | - if(molde.style.display === "block"){ | 1327 | + * Function: abreFecha |
1328 | + * | ||
1329 | + * Abre ou fecha a guia móvel | ||
1330 | + */ | ||
1331 | + abreFecha : function(forca) { | ||
1332 | + var molde = $i("i3GEOguiaMovelMolde"), guia = $i("i3GEOguiaMovel"), attributes, anim, anim1, anim2, temp; | ||
1333 | + // para efeitos de compatibilidade caso seja chamado com | ||
1334 | + // i3GEO.guias.guiaMovel.abreFecha() | ||
1335 | + if (!forca) { | ||
1336 | + if (molde.style.display === "block") { | ||
998 | forca = "fecha"; | 1337 | forca = "fecha"; |
999 | - } | ||
1000 | - else{ | 1338 | + } else { |
1001 | temp = i3GEO.guias.ATUAL; | 1339 | temp = i3GEO.guias.ATUAL; |
1002 | i3GEO.guias.ATUAL = ""; | 1340 | i3GEO.guias.ATUAL = ""; |
1003 | i3GEO.guias.guiaMovel.ativa(temp); | 1341 | i3GEO.guias.guiaMovel.ativa(temp); |
1004 | return; | 1342 | return; |
1005 | } | 1343 | } |
1006 | } | 1344 | } |
1007 | - if(forca === "fecha"){//esconde | ||
1008 | - if($i("i3GEOguiaMovelIcones")){ | 1345 | + if (forca === "fecha") {// esconde |
1346 | + if ($i("i3GEOguiaMovelIcones")) { | ||
1009 | $i("i3GEOguiaMovelIcones").style.display = "none"; | 1347 | $i("i3GEOguiaMovelIcones").style.display = "none"; |
1010 | } | 1348 | } |
1011 | $i("i3GEOguiaMovelConteudo").style.display = "none"; | 1349 | $i("i3GEOguiaMovelConteudo").style.display = "none"; |
1012 | attributes = { | 1350 | attributes = { |
1013 | - left: { to: parseInt(i3GEO.guias.guiaMovel.left,10) }, | ||
1014 | - id: "i3GEOguiaMovel" | 1351 | + left : { |
1352 | + to : parseInt( | ||
1353 | + i3GEO.guias.guiaMovel.left, | ||
1354 | + 10) | ||
1355 | + }, | ||
1356 | + id : "i3GEOguiaMovel" | ||
1015 | }; | 1357 | }; |
1016 | anim = new YAHOO.util.Anim(guia, attributes, 1, YAHOO.util.Easing.easeNone); | 1358 | anim = new YAHOO.util.Anim(guia, attributes, 1, YAHOO.util.Easing.easeNone); |
1017 | attributes = { | 1359 | attributes = { |
1018 | - width: { to: 0 }, | ||
1019 | - id: "i3GEOguiaMovelMolde" | 1360 | + width : { |
1361 | + to : 0 | ||
1362 | + }, | ||
1363 | + id : "i3GEOguiaMovelMolde" | ||
1020 | }; | 1364 | }; |
1021 | anim1 = new YAHOO.util.Anim(molde, attributes, 1, YAHOO.util.Easing.easeNone); | 1365 | anim1 = new YAHOO.util.Anim(molde, attributes, 1, YAHOO.util.Easing.easeNone); |
1022 | anim.duration = 0.5; | 1366 | anim.duration = 0.5; |
1023 | anim1.duration = 0.5; | 1367 | anim1.duration = 0.5; |
1024 | - anim.animate(); | ||
1025 | - anim1.animate(); | ||
1026 | - anim1.onComplete.subscribe(function(){ | 1368 | + anim1.onComplete.subscribe(function() { |
1027 | molde.style.display = "none"; | 1369 | molde.style.display = "none"; |
1028 | }); | 1370 | }); |
1029 | - } | ||
1030 | - else if(molde.style.display != "block"){ | ||
1031 | - //conteudo.style.display = "block"; | ||
1032 | - molde.style.display = "block"; | ||
1033 | - attributes = { | ||
1034 | - left: { to: parseInt(guia.style.left,10) - i3GEO.guias.guiaMovel.config.larguraGuiaMovel }, | ||
1035 | - id: "i3GEOguiaMovel" | ||
1036 | - }; | 1371 | + if (i3GEO.guias.guiaMovel.config.posicao[1] === "l" |
1372 | + && $i("i3GEOguiaMovelIconesPuxador")) { | ||
1373 | + attributes = { | ||
1374 | + left : { | ||
1375 | + to : 0 | ||
1376 | + } | ||
1377 | + }; | ||
1378 | + anim2 = new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador", attributes, 1, YAHOO.util.Easing.easeNone); | ||
1379 | + anim2.duration = 0.5; | ||
1380 | + anim2.animate(); | ||
1381 | + } | ||
1382 | + anim.animate(); | ||
1383 | + anim1.animate(); | ||
1384 | + | ||
1385 | + } else if (molde.style.display != "block") { | ||
1386 | + molde.style.display = "block"; | ||
1387 | + if (i3GEO.guias.guiaMovel.config.posicao[1] === "l") { | ||
1388 | + attributes = { | ||
1389 | + rigth : { | ||
1390 | + to : (parseInt( | ||
1391 | + guia.style.left, | ||
1392 | + 10) - i3GEO.guias.guiaMovel.config.larguraGuiaMovel) | ||
1393 | + * -1 | ||
1394 | + }, | ||
1395 | + id : "i3GEOguiaMovel" | ||
1396 | + }; | ||
1397 | + } else { | ||
1398 | + attributes = { | ||
1399 | + left : { | ||
1400 | + to : parseInt( | ||
1401 | + guia.style.left, | ||
1402 | + 10) | ||
1403 | + - i3GEO.guias.guiaMovel.config.larguraGuiaMovel | ||
1404 | + }, | ||
1405 | + id : "i3GEOguiaMovel" | ||
1406 | + }; | ||
1407 | + } | ||
1037 | anim = new YAHOO.util.Anim(guia, attributes, 1, YAHOO.util.Easing.easeNone); | 1408 | anim = new YAHOO.util.Anim(guia, attributes, 1, YAHOO.util.Easing.easeNone); |
1038 | attributes = { | 1409 | attributes = { |
1039 | - width: { to: i3GEO.guias.guiaMovel.config.larguraGuiaMovel }, | ||
1040 | - id: "i3GEOguiaMovelMolde" | 1410 | + width : { |
1411 | + to : i3GEO.guias.guiaMovel.config.larguraGuiaMovel | ||
1412 | + }, | ||
1413 | + id : "i3GEOguiaMovelMolde" | ||
1041 | }; | 1414 | }; |
1042 | anim1 = new YAHOO.util.Anim(molde, attributes, 1, YAHOO.util.Easing.easeNone); | 1415 | anim1 = new YAHOO.util.Anim(molde, attributes, 1, YAHOO.util.Easing.easeNone); |
1043 | anim.duration = 0.5; | 1416 | anim.duration = 0.5; |
1044 | anim1.duration = 0.5; | 1417 | anim1.duration = 0.5; |
1045 | - anim1.onComplete.subscribe(function(){ | ||
1046 | - if($i("i3GEOguiaMovelIcones")){ | 1418 | + anim1.onComplete.subscribe(function() { |
1419 | + if ($i("i3GEOguiaMovelIcones")) { | ||
1047 | $i("i3GEOguiaMovelIcones").style.display = "block"; | 1420 | $i("i3GEOguiaMovelIcones").style.display = "block"; |
1048 | } | 1421 | } |
1049 | $i("i3GEOguiaMovelConteudo").style.display = "block"; | 1422 | $i("i3GEOguiaMovelConteudo").style.display = "block"; |
1050 | - //i3GEO.guias.guiaMovel.mostraIcones(); | ||
1051 | - YAHOO.util.Dom.setStyle("i3GEOguiaMovelMolde", "opacity", 0.9); | 1423 | + // i3GEO.guias.guiaMovel.mostraIcones(); |
1424 | + YAHOO.util.Dom.setStyle( | ||
1425 | + "i3GEOguiaMovelMolde", | ||
1426 | + "opacity", | ||
1427 | + 0.9); | ||
1052 | }); | 1428 | }); |
1429 | + if (i3GEO.guias.guiaMovel.config.posicao[1] === "l" | ||
1430 | + && $i("i3GEOguiaMovelIconesPuxador")) { | ||
1431 | + attributes = { | ||
1432 | + left : { | ||
1433 | + to : i3GEO.guias.guiaMovel.config.larguraGuiaMovel | ||
1434 | + } | ||
1435 | + }; | ||
1436 | + anim2 = new YAHOO.util.Anim("i3GEOguiaMovelIconesPuxador", attributes, 1, YAHOO.util.Easing.easeNone); | ||
1437 | + anim2.duration = 0.5; | ||
1438 | + anim2.animate(); | ||
1439 | + } | ||
1053 | anim.animate(); | 1440 | anim.animate(); |
1054 | anim1.animate(); | 1441 | anim1.animate(); |
1055 | } | 1442 | } |
@@ -0,0 +1,281 @@ | @@ -0,0 +1,281 @@ | ||
1 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> | ||
2 | +<html> | ||
3 | +<head> | ||
4 | +<meta http-equiv="Category" content="i3Geo Mapa interativo MMA geoprocessamento sig mobile"> | ||
5 | +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> | ||
6 | +<title>i3GEO - OpenLayers</title> | ||
7 | +<style> | ||
8 | +.olControlEditingToolbar1 div { | ||
9 | + background-image: url(../mashups/openlayers.png); | ||
10 | + background-repeat: no-repeat; | ||
11 | + float: right; | ||
12 | + right: 0px; | ||
13 | + height: 29px; | ||
14 | + margin: 2px; | ||
15 | + width: 29px; | ||
16 | + cursor: pointer; | ||
17 | + top: 10px; | ||
18 | +} | ||
19 | +</style> | ||
20 | +<script src="../classesjs/i3geonaocompacto.js"></script> | ||
21 | +<script src="../pacotes/openlayers/OpenLayers2131.js.php"></script> | ||
22 | +<link rel="stylesheet" type="text/css" href="../css/black.css"> | ||
23 | +</head> | ||
24 | +<body id="i3geo" style='margin-left: 7px; background: white;'> | ||
25 | + <!-- inclui o nome do usuario logado --> | ||
26 | + <div id="i3GEONomeLogin" style="position: absolute; left: 10px; top: 12px; font-size: 11px; z-index: 50000"></div> | ||
27 | + <table id='mst' summary="" style='display: none;' width=100% cellspacing='0'> | ||
28 | + <tr> | ||
29 | + <td id="contemMenu" style="background: black; height: 30px; text-align: right; border-width: 0pt 0pt 1px; border-color: rgb(240, 240, 240)"> | ||
30 | + <!--menu suspenso--> | ||
31 | + <div id="menus" style="height: 0px;"></div> | ||
32 | + </td> | ||
33 | + </tr> | ||
34 | + <tr> | ||
35 | + <td style="vertical-align: top; border-width: 0px;"> | ||
36 | + <table width="100%" style="vertical-align: top; border-width: 0px"> | ||
37 | + <tr> | ||
38 | + <td class=verdeclaro id=contemImg> | ||
39 | + <div id=corpoMapa style="position: relative; background-image: url('../imagens/i3geo1bw.jpg');"></div> | ||
40 | + </td> | ||
41 | + </tr> | ||
42 | + </table> | ||
43 | + </td> | ||
44 | + </tr> | ||
45 | + <tr> | ||
46 | + <td> | ||
47 | + <table style="width: 100%; height: 28px"> | ||
48 | + <tr> | ||
49 | + <td class=fundoRodape style="width: 25%"> | ||
50 | + <!-- aqui será incluída a escala numérica --> | ||
51 | + <div id=escala style="margin: auto; text-align: right; left: 15px;"></div> | ||
52 | + </td> | ||
53 | + <td class=fundoRodape style="width: 5%"></td> | ||
54 | + <td class=fundoRodape style="width: 40%"> | ||
55 | + <!-- aqui será incluído o gadget que mostra a coordenada geográfica da posição do mouse --> | ||
56 | + <div id=localizarxy style="margin: auto; text-align: left; font-size: 10px; display: inline-table"></div> | ||
57 | + </td> | ||
58 | + <td class=fundoRodape style="width: 20%"> | ||
59 | + <!-- botão de compartilhamento em redes sociais--> <!--<div id=i3GEOcompartilhar style="width: 170px; margin: auto; text-align: left; padding-top: 1px"></div> --> <!-- aqui será incluído o contador de tempo quando o temporizador de redesenho do mapa estiver ativo --> | ||
60 | + <div id=tempoRedesenho style="z-index: 100; position: absolute; top: 0px; color: green; background-color: black; width: 50px; display: none"></div> | ||
61 | + </td> | ||
62 | + <!-- aqui serão incluídas as bandeiras que permitem a troca de idioma --> | ||
63 | + <td class=fundoRodape style="width: 10%;"> | ||
64 | + <div id=seletorIdiomas style="right: 15px;"></div> | ||
65 | + </td> | ||
66 | + </tr> | ||
67 | + </table> | ||
68 | + </td> | ||
69 | + </tr> | ||
70 | + </table> | ||
71 | + <table id="i3GEOlogoMarca" style='margin: 0px auto; box-shadow: 0 1px 13px gray; border-radius: 5px;'> | ||
72 | + <tr> | ||
73 | + <td style="height: 30px"><div id=versaoi3geo></div> | ||
74 | + <h2 style="font-weight: normal; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;">i3Geo - Software livre para criação de mapas interativos e geoprocessamento</h2> | ||
75 | + <h3 style="font-weight: normal; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif;">Baseado no Mapserver, é licenciado sob GPL e integra o Portal do Software Público Brasileiro</h3></td> | ||
76 | + </tr> | ||
77 | + <tr> | ||
78 | + <td style="padding: 10px;"><img style="width: 560px; height: 81px" alt="" src='../imagens/logo_inicio.png'></td> | ||
79 | + </tr> | ||
80 | + <tr> | ||
81 | + <td> | ||
82 | + <!-- | ||
83 | + <script id="ohloh" type="text/javascript" src="http://www.ohloh.net/p/150688/widgets/project_users.js?style=red"></script> | ||
84 | + --> | ||
85 | + </td> | ||
86 | + </tr> | ||
87 | + </table> | ||
88 | + | ||
89 | + <div id="i3GEOguiaMovel" style="visibility: hidden; position: absolute; display: block; border: 0px solid white; text-align: left; z-index: 2000; background-color: none"> | ||
90 | + <div id="i3GEOguiaMovelIconesPuxador" style="cursor: pointer; position: absolute; top: 50%; margin-top: -65px; width: 50px; z-index: 5000; left: 0px; right:0px"> | ||
91 | + <img src='../imagens/openbars2.png' style="width: 48px; position: absolute; height: 412px; top: -160px;right:0px"> | ||
92 | + <div id="iconeGuia_temas" style="text-align:left"></div> | ||
93 | + <div id="iconeGuia_adiciona" style="text-align:left;margin-top: 3px;"></div> | ||
94 | + <div id="iconeGuia_legenda" style="text-align:left;margin-top: 3px;"></div> | ||
95 | + </div> | ||
96 | + <div id="i3GEOguiaMovelMolde" style="top: 0px; box-shadow: 0 2px 10px 0 #888888; border-radius: 5px 0px 0px 5px; position: absolute; display: none; border: 0px solid white; text-align: left; z-index: 1000; background-color: gray"> | ||
97 | + <div id="i3GEOguiaMovelConteudo" style='top: 10px; overflow: auto; display: none; position: absolute; border-color: gray; border-width: 0px 0 0px 0px; left: 0px; height: 0px; background-color: white'> | ||
98 | + <div id='guia1obj' style='display: none;'> | ||
99 | + <!-- Esta div acrescenta a opção de busca rápida, caso vc queira colocá-la em um lugar específico --> | ||
100 | + <div style='left: 5px; top: 10px;' id=buscaRapida></div> | ||
101 | + <!-- Esta div acrescenta a lista de propriedades do mapa --> | ||
102 | + <div id=listaPropriedades style='top: 15px;'></div> | ||
103 | + <!-- Esta div acrescenta a lista de de camadas do tipo 'baselayers' específicas da interface Openlayers. Veja também a opção i3GEO.Interface.openlayers.GADGETS.LayerSwitcher --> | ||
104 | + <div id=listaLayersBase style='top: 15px;'></div> | ||
105 | + <!-- Esta div acrescenta a lista de de camadas disponíveis no mapa atual --> | ||
106 | + <div id=listaTemas style='top: 15px;'></div> | ||
107 | + </div> | ||
108 | + <div id='guia2obj' style='display: none;'> | ||
109 | + Aguarde... | ||
110 | + <img alt="" src="../imagens/branco.gif" width=248 /> | ||
111 | + </div> | ||
112 | + <div id='guia4obj' style='display: none; text-align: left'> | ||
113 | + <div id='legenda' style='text-align: left'></div> | ||
114 | + </div> | ||
115 | + </div> | ||
116 | + </div> | ||
117 | + </div> | ||
118 | + <script> | ||
119 | + i3GEO.configura.locaplic = i3GEO.util.protocolo() | ||
120 | + + "://" | ||
121 | + + window.location.host | ||
122 | + + "/i3geo"; | ||
123 | + | ||
124 | + i3GEO.guias.guiaMovel.config = { | ||
125 | + larguraPuxador : 50, | ||
126 | + alturaPuxador : 319, | ||
127 | + alturaGuiaMovel : 0, | ||
128 | + larguraGuiaMovel : 320, | ||
129 | + topGuiaMovel : 0, | ||
130 | + guias : { | ||
131 | + icones : [], | ||
132 | + ids : [], | ||
133 | + idsconteudos : [], | ||
134 | + titulos : [], | ||
135 | + chaves : [] | ||
136 | + }, | ||
137 | + posicao : [ | ||
138 | + "c", "l" | ||
139 | + ] | ||
140 | + //vertical, orizontal | ||
141 | + }; | ||
142 | + | ||
143 | + i3GEO.configura.autotamanho = false; | ||
144 | + i3GEO.Interface.ATUAL = "openlayers"; | ||
145 | + i3GEO.Interface.IDCORPO = "contemImg"; | ||
146 | + i3GEO.Interface.openlayers.TILES = true; | ||
147 | + i3GEO.configura.oMenuData.submenus["interface"] = [ | ||
148 | + { | ||
149 | + id : "omenudataInterface0a", | ||
150 | + text : '<span style=color:gray;text-decoration:underline; ><b>' | ||
151 | + + $trad("d27") | ||
152 | + + '</b></span>', | ||
153 | + url : "#" | ||
154 | + }, { | ||
155 | + id : "omenudataInterface2", | ||
156 | + text : "OpenLayers", | ||
157 | + url : "javascript:window.location = i3GEO.configura.locaplic+'/interface/black_ol.htm?'+i3GEO.configura.sid" | ||
158 | + }, { | ||
159 | + id : "omenudataInterface2a", | ||
160 | + text : "OpenLayers OSM", | ||
161 | + url : "javascript:window.location = i3GEO.configura.locaplic+'/interface/black_osm.htm?'+i3GEO.configura.sid" | ||
162 | + }, { | ||
163 | + id : "omenudataInterface4", | ||
164 | + text : "Google Maps", | ||
165 | + url : "javascript:window.location = i3GEO.configura.locaplic+'/interface/black_gm.phtml?'+i3GEO.configura.sid" | ||
166 | + }, { | ||
167 | + id : "omenudataInterface5", | ||
168 | + text : "Google Earth", | ||
169 | + url : "javascript:window.location = i3GEO.configura.locaplic+'/interface/googleearth.phtml?'+i3GEO.configura.sid" | ||
170 | + }, { | ||
171 | + id : "omenudataInterface0b", | ||
172 | + text : '<span style=color:gray;text-decoration:underline; ><b>' | ||
173 | + + $trad("u27") | ||
174 | + + '</b></span>', | ||
175 | + url : "#" | ||
176 | + }, { | ||
177 | + id : "omenudataInterface6", | ||
178 | + text : $trad("u21"), | ||
179 | + url : "javascript:var w = window.open(i3GEO.configura.locaplic+'/geradordelinks.htm')" | ||
180 | + }, { | ||
181 | + id : "omenudataInterface7", | ||
182 | + text : "Serviços WMS", | ||
183 | + url : "javascript:var w = window.open(i3GEO.configura.locaplic+'/ogc.htm')" | ||
184 | + }, { | ||
185 | + id : "omenudataInterface9", | ||
186 | + text : "Download de dados", | ||
187 | + url : "javascript:var w = window.open(i3GEO.configura.locaplic+'/datadownload.htm')" | ||
188 | + }, { | ||
189 | + id : "omenudataInterface11", | ||
190 | + text : $trad("p20"), | ||
191 | + url : "javascript:i3GEO.mapa.dialogo.telaRemota()" | ||
192 | + } | ||
193 | + ]; | ||
194 | + | ||
195 | + i3GEO.gadgets.PARAMETROS.mostraMenuSuspenso.finaliza = 'if($i("omenudataInterface1")){i3GEOoMenuBar.getMenuItem("omenudataInterface1").cfg.setProperty("text", " ");}'; | ||
196 | + | ||
197 | + i3GEO.cria(); | ||
198 | + i3GEO.configura.mapaRefDisplay = "none"; | ||
199 | + i3GEO.barraDeBotoes.TIPO = "olhodepeixe"; | ||
200 | + //ajusta o deslocamento da barra de botoes | ||
201 | + i3GEO.barraDeBotoes.OFFSET = 11; | ||
202 | + //ajusta a posicao da barra de botoes no IE | ||
203 | + if (navm) { | ||
204 | + i3GEO.barraDeBotoes.OFFSET = 5; | ||
205 | + } | ||
206 | + if (chro) { | ||
207 | + i3GEO.barraDeBotoes.OFFSET = 15; | ||
208 | + } | ||
209 | + | ||
210 | + i3GEO.configura.oMenuData["submenus"]["janelas"] = []; | ||
211 | + i3GEO.ajuda.ATIVAJANELA = false; | ||
212 | + i3GEO.idioma.IDSELETOR = "seletorIdiomas"; | ||
213 | + i3GEO.Interface.ATIVAMENUCONTEXTO = false; | ||
214 | + //i3GEO.arvoreDeTemas.TIPOBOTAO = "radio"; | ||
215 | + i3GEO.arvoreDeTemas.OPCOESADICIONAIS.comentarios = true; | ||
216 | + i3GEO.arvoreDeCamadas.VERIFICAABRANGENCIATEMAS = true; | ||
217 | + i3GEO.arvoreDeCamadas.MOSTRALISTAKML = false; | ||
218 | + i3GEO.mapa.AUTORESIZE = true; | ||
219 | + i3GEO.guias.TIPO = "movel"; | ||
220 | + i3GEO.guias.guiaMovel.config.topGuiaMovel = 36; | ||
221 | + i3GEO.janela.ativaAlerta(); | ||
222 | + i3GEO.finaliza = function() { | ||
223 | + if ($i("i3GEOlogoMarca")) { | ||
224 | + $i("i3GEOlogoMarca").style.display = "none"; | ||
225 | + } | ||
226 | + i3GEO.mapa.insereDobraPagina( | ||
227 | + "googlemaps", | ||
228 | + "../imagens/dobragooglemaps.png"); | ||
229 | + }; | ||
230 | + //indica se a opcao de navegacao nas pastas do servidor sera ativada | ||
231 | + i3GEO.arvoreDeTemas.OPCOESADICIONAIS.navegacaoDir = true; | ||
232 | + i3GEO.janela.TRANSICAOSUAVE = true; | ||
233 | + | ||
234 | + OpenLayers.ImgPath = "../pacotes/openlayers/img/"; | ||
235 | + (function() { | ||
236 | + var oce = new OpenLayers.Layer.ArcGIS93Rest("ESRI Ocean Basemap", "http://server.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer/export", { | ||
237 | + format : "jpeg" | ||
238 | + }, { | ||
239 | + isBaseLayer : true, | ||
240 | + visibility : false | ||
241 | + }); | ||
242 | + var ims = new OpenLayers.Layer.ArcGIS93Rest("ESRI Imagery World 2D", "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/export", { | ||
243 | + format : "jpeg" | ||
244 | + }, { | ||
245 | + isBaseLayer : true, | ||
246 | + visibility : false | ||
247 | + }); | ||
248 | + var wsm = new OpenLayers.Layer.ArcGIS93Rest("ESRI World Street Map", "http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer/export", { | ||
249 | + format : "jpeg" | ||
250 | + }, { | ||
251 | + isBaseLayer : true, | ||
252 | + visibility : false | ||
253 | + }); | ||
254 | + var bra = new OpenLayers.Layer.WMS("Base carto MMA", "http://mapas.mma.gov.br/cgi-bin/mapserv?map=/opt/www/html/webservices/baseraster.map", { | ||
255 | + layers : "baseraster", | ||
256 | + srs : "EPSG:4618", | ||
257 | + format : "image/png", | ||
258 | + isBaseLayer : false | ||
259 | + }, { | ||
260 | + isBaseLayer : true, | ||
261 | + visibility : false | ||
262 | + }); | ||
263 | + | ||
264 | + var tms = new OpenLayers.Layer.TMS("OSGEO", "http://tilecache.osgeo.org/wms-c/Basic.py/", { | ||
265 | + layername : "basic", | ||
266 | + type : "png", | ||
267 | + // set if different than the bottom left of map.maxExtent | ||
268 | + tileOrigin : new OpenLayers.LonLat(-180, -90), | ||
269 | + isBaseLayer : true, | ||
270 | + visibility : false | ||
271 | + }); | ||
272 | + | ||
273 | + i3GEO.Interface.openlayers.LAYERSADICIONAIS = [ | ||
274 | + oce, ims, wsm, tms, bra | ||
275 | + ]; | ||
276 | + })(); | ||
277 | + | ||
278 | + i3GEO.inicia(); | ||
279 | + </script> | ||
280 | +</body> | ||
281 | +</html> |
2.53 KB