Commit afc8fdbf1fc45d153d2170eb998e1517593d4556
1 parent
458fb0ef
Exists in
master
and in
7 other branches
Incluida a propriedade ATIVA em classe_barradebotoes.js que permite iniciar o ma…
…pa com ou sem a barra de botões ativada
Showing
3 changed files
with
46 additions
and
6 deletions
Show diff stats
classesjs/classe_barradebotoes.js
@@ -41,6 +41,18 @@ Veja também classe_interface.js (i3GEO.Interface) que possuí parâmetros que perm | @@ -41,6 +41,18 @@ Veja também classe_interface.js (i3GEO.Interface) que possuí parâmetros que perm | ||
41 | */ | 41 | */ |
42 | i3GEO.barraDeBotoes = { | 42 | i3GEO.barraDeBotoes = { |
43 | /* | 43 | /* |
44 | + Propriedade: ATIVA | ||
45 | + | ||
46 | + Indica se a barra de botões será ou não cosntruída automaticamente no processo de inicialização do mapa. | ||
47 | + | ||
48 | + Tipo: | ||
49 | + {boolean} | ||
50 | + | ||
51 | + Default: | ||
52 | + {true} | ||
53 | + */ | ||
54 | + ATIVA: true, | ||
55 | + /* | ||
44 | Propriedade: TIPO | 56 | Propriedade: TIPO |
45 | 57 | ||
46 | Tipo de barra. | 58 | Tipo de barra. |
@@ -513,13 +525,15 @@ i3GEO.barraDeBotoes = { | @@ -513,13 +525,15 @@ i3GEO.barraDeBotoes = { | ||
513 | Utilizado para restaurar o status padrão da barra, principalmente por ferramentas que alteram ícones e outras propriedades do mapa | 525 | Utilizado para restaurar o status padrão da barra, principalmente por ferramentas que alteram ícones e outras propriedades do mapa |
514 | */ | 526 | */ |
515 | ativaPadrao: function(){ | 527 | ativaPadrao: function(){ |
516 | - try{ | ||
517 | - var botao = i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO); | ||
518 | - if(botao.funcaoonclick){ | ||
519 | - botao.funcaoonclick.call(); | 528 | + if(i3GEO.barraDeBotoes.ATIVA === true){ |
529 | + try{ | ||
530 | + var botao = i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO); | ||
531 | + if(botao.funcaoonclick){ | ||
532 | + botao.funcaoonclick.call(); | ||
533 | + } | ||
520 | } | 534 | } |
535 | + catch(e){} | ||
521 | } | 536 | } |
522 | - catch(e){} | ||
523 | }, | 537 | }, |
524 | /* | 538 | /* |
525 | Function: ativaIcone | 539 | Function: ativaIcone |
@@ -535,6 +549,9 @@ i3GEO.barraDeBotoes = { | @@ -535,6 +549,9 @@ i3GEO.barraDeBotoes = { | ||
535 | */ | 549 | */ |
536 | ativaIcone: function(icone){ | 550 | ativaIcone: function(icone){ |
537 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaIcone()");} | 551 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaIcone()");} |
552 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | ||
553 | + return; | ||
554 | + } | ||
538 | // | 555 | // |
539 | //desativa a função de zoom por box nativa do OpenLayers | 556 | //desativa a função de zoom por box nativa do OpenLayers |
540 | // | 557 | // |
@@ -650,6 +667,9 @@ i3GEO.barraDeBotoes = { | @@ -650,6 +667,9 @@ i3GEO.barraDeBotoes = { | ||
650 | */ | 667 | */ |
651 | ativaBotoes:function(padrao){ | 668 | ativaBotoes:function(padrao){ |
652 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaBotoes()");} | 669 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaBotoes()");} |
670 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | ||
671 | + return; | ||
672 | + } | ||
653 | var l,b,temp; | 673 | var l,b,temp; |
654 | if(arguments.length === 0) | 674 | if(arguments.length === 0) |
655 | {padrao = this.BOTAOPADRAO;} | 675 | {padrao = this.BOTAOPADRAO;} |
@@ -697,6 +717,9 @@ i3GEO.barraDeBotoes = { | @@ -697,6 +717,9 @@ i3GEO.barraDeBotoes = { | ||
697 | y {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse | 717 | y {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse |
698 | */ | 718 | */ |
699 | execBotao: function(id,x,y,posX,posY){ | 719 | execBotao: function(id,x,y,posX,posY){ |
720 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | ||
721 | + return; | ||
722 | + } | ||
700 | var temp, | 723 | var temp, |
701 | botao = i3GEO.barraDeBotoes.defBotao(id); | 724 | botao = i3GEO.barraDeBotoes.defBotao(id); |
702 | i3GEO.barraDeBotoes.BOTAOCLICADO = id; | 725 | i3GEO.barraDeBotoes.BOTAOCLICADO = id; |
@@ -752,6 +775,9 @@ i3GEO.barraDeBotoes = { | @@ -752,6 +775,9 @@ i3GEO.barraDeBotoes = { | ||
752 | 775 | ||
753 | */ | 776 | */ |
754 | inicializaBarraOP: function(){ | 777 | inicializaBarraOP: function(){ |
778 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | ||
779 | + return; | ||
780 | + } | ||
755 | i3GEO.barraDeBotoes.AJUDA = false; | 781 | i3GEO.barraDeBotoes.AJUDA = false; |
756 | euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/"; | 782 | euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/"; |
757 | var botao, | 783 | var botao, |
@@ -902,6 +928,9 @@ i3GEO.barraDeBotoes = { | @@ -902,6 +928,9 @@ i3GEO.barraDeBotoes = { | ||
902 | onde {String} - (opcional) id do elemento HTML onde os botões serão inseridos | 928 | onde {String} - (opcional) id do elemento HTML onde os botões serão inseridos |
903 | */ | 929 | */ |
904 | inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){ | 930 | inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){ |
931 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | ||
932 | + return; | ||
933 | + } | ||
905 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.inicializaBarra()");} | 934 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.inicializaBarra()");} |
906 | if (i3GEO.configura.map3d === "") | 935 | if (i3GEO.configura.map3d === "") |
907 | {i3GEO.barraDeBotoes.INCLUIBOTAO.v3d = false;} | 936 | {i3GEO.barraDeBotoes.INCLUIBOTAO.v3d = false;} |
@@ -1167,6 +1196,9 @@ i3GEO.barraDeBotoes = { | @@ -1167,6 +1196,9 @@ i3GEO.barraDeBotoes = { | ||
1167 | idbarra - {string} id da barra de botões onde o evento será ativado | 1196 | idbarra - {string} id da barra de botões onde o evento será ativado |
1168 | */ | 1197 | */ |
1169 | ativaMenuContexto: function(idbarra){ | 1198 | ativaMenuContexto: function(idbarra){ |
1199 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | ||
1200 | + return; | ||
1201 | + } | ||
1170 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaMenuContexto()");} | 1202 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaMenuContexto()");} |
1171 | var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender; | 1203 | var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender; |
1172 | function executar(a,b,c) | 1204 | function executar(a,b,c) |
@@ -1207,6 +1239,9 @@ i3GEO.barraDeBotoes = { | @@ -1207,6 +1239,9 @@ i3GEO.barraDeBotoes = { | ||
1207 | as barras Se não for definido, todas as barras serão reativadas | 1239 | as barras Se não for definido, todas as barras serão reativadas |
1208 | */ | 1240 | */ |
1209 | reativa: function(indice){ | 1241 | reativa: function(indice){ |
1242 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | ||
1243 | + return; | ||
1244 | + } | ||
1210 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.reativa()");} | 1245 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.reativa()");} |
1211 | var abre = function(){ | 1246 | var abre = function(){ |
1212 | var i, | 1247 | var i, |
@@ -1235,6 +1270,9 @@ i3GEO.barraDeBotoes = { | @@ -1235,6 +1270,9 @@ i3GEO.barraDeBotoes = { | ||
1235 | id {String} - id da barra | 1270 | id {String} - id da barra |
1236 | */ | 1271 | */ |
1237 | recria: function(id){ | 1272 | recria: function(id){ |
1273 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | ||
1274 | + return; | ||
1275 | + } | ||
1238 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.recria()");} | 1276 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.recria()");} |
1239 | if(i3GEO.barraDeBotoes.TIPO === "olhodepeixe"){ | 1277 | if(i3GEO.barraDeBotoes.TIPO === "olhodepeixe"){ |
1240 | euEnv.euDockArray = []; | 1278 | euEnv.euDockArray = []; |
classesjs/classe_gadgets.js
@@ -134,7 +134,7 @@ i3GEO.gadgets = { | @@ -134,7 +134,7 @@ i3GEO.gadgets = { | ||
134 | "mostraVersao": | 134 | "mostraVersao": |
135 | {idhtml:"versaoi3geo"}, | 135 | {idhtml:"versaoi3geo"}, |
136 | "mostraEmail": | 136 | "mostraEmail": |
137 | - {idhtml:"emailInstituicao"} | 137 | + {idhtml:"emailInstituicao"} |
138 | }, | 138 | }, |
139 | /* | 139 | /* |
140 | Function: mostraEmail | 140 | Function: mostraEmail |
interface/openlayers.htm
@@ -198,6 +198,8 @@ i3GEO.barraDeBotoes.OFFSET = -3; | @@ -198,6 +198,8 @@ i3GEO.barraDeBotoes.OFFSET = -3; | ||
198 | //i3GEO.barraDeBotoes.MAXBOTOES = 10; | 198 | //i3GEO.barraDeBotoes.MAXBOTOES = 10; |
199 | //remove itens dos menus que não são necessários, já que estão como ícones na barra de botões | 199 | //remove itens dos menus que não são necessários, já que estão como ícones na barra de botões |
200 | i3GEO.configura.oMenuData["submenus"]["janelas"] = []; | 200 | i3GEO.configura.oMenuData["submenus"]["janelas"] = []; |
201 | +//a barra de botões será mostrada no mapa conforme o construtor padrão | ||
202 | +i3GEO.barraDeBotoes.ATIVA = true; | ||
201 | // | 203 | // |
202 | //barra de botoes normal. descomente para usar | 204 | //barra de botoes normal. descomente para usar |
203 | /* | 205 | /* |