Commit 72f85895a7f5f48a5971ee89f77a582f082e047f
1 parent
592a0a01
Exists in
master
and in
6 other branches
Correção no carregamento dos javascripts do editor de mapfile (i3Geo). Estava fa…
…ltando o carregamento do core.js
Showing
4 changed files
with
23 additions
and
5 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/black_editor.php
| ... | ... | @@ -24,6 +24,7 @@ session_write_close(); |
| 24 | 24 | <title>i3GEO - OpenLayers</title> |
| 25 | 25 | <script src="../pacotes/ol4/ol.js"></script> |
| 26 | 26 | <script src="../js/i3geo.js"></script> |
| 27 | +<script src="js/core.js"></script> | |
| 27 | 28 | <!-- lista com os links que serao mostrados na guia ferramentas --> |
| 28 | 29 | <script src="../js/listaDeFerramentas.js"></script> |
| 29 | 30 | <!-- configuracoes default tipo pode ser OL (openLayers) ou GM (googlemaps) --> | ... | ... |
js/plugini3geo.js
| ... | ... | @@ -1030,7 +1030,7 @@ i3GEO.pluginI3geo = |
| 1030 | 1030 | return; |
| 1031 | 1031 | } |
| 1032 | 1032 | var linhas=[],temp,mustache, n, i, parametros, ins = "", configDefault = |
| 1033 | - '{"plugin":"parametrossql","ativo":"sim","parametros":[{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""}]}'; | |
| 1033 | + '{"plugin":"parametrossql","ativo":"sim","janela":{"w":"300px","h":"400px"},"parametros":[{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""},{"titulo":"","tipo":"input","valores":[],"chave":"","prog":""}]}'; | |
| 1034 | 1034 | if (config === "") { |
| 1035 | 1035 | config = configDefault; |
| 1036 | 1036 | } |
| ... | ... | @@ -1047,6 +1047,10 @@ i3GEO.pluginI3geo = |
| 1047 | 1047 | config.ativoSim = ""; |
| 1048 | 1048 | config.ativoNao = "selected"; |
| 1049 | 1049 | } |
| 1050 | + //parametros da janela | |
| 1051 | + if (config.janela == undefined) { | |
| 1052 | + config.janela = JSON.parse(configDefault).janela; | |
| 1053 | + } | |
| 1050 | 1054 | for (i = 0; i < n; i++) { |
| 1051 | 1055 | temp = {}; |
| 1052 | 1056 | temp.titulo = parametros[i].titulo; |
| ... | ... | @@ -1063,7 +1067,9 @@ i3GEO.pluginI3geo = |
| 1063 | 1067 | "sim": config.sim, |
| 1064 | 1068 | "nao": config.nao, |
| 1065 | 1069 | "salvaPlugin": salva, |
| 1066 | - "removePlugin": remove | |
| 1070 | + "removePlugin": remove, | |
| 1071 | + "janelaw": config.janela.w, | |
| 1072 | + "janelah": config.janela.h | |
| 1067 | 1073 | }; |
| 1068 | 1074 | ins = Mustache.render( |
| 1069 | 1075 | i3GEO.template.parametrossql, |
| ... | ... | @@ -1082,9 +1088,8 @@ i3GEO.pluginI3geo = |
| 1082 | 1088 | }, |
| 1083 | 1089 | // pega os valores do formulario quando e aberto no sistema de |
| 1084 | 1090 | // administracao |
| 1085 | - | |
| 1086 | 1091 | parametrosFormAdmin : function(onde) { |
| 1087 | - var campo = 0, nlinhas = 4, ncampos = 5, campos = onde.getElementsByTagName("input"), par = [], temp = [], i, j; | |
| 1092 | + var janela, campo = 0, nlinhas = 4, ncampos = 5, campos = onde.getElementsByTagName("input"), par = [], temp = [], i, j; | |
| 1088 | 1093 | for (j = 0; j < nlinhas; j++) { |
| 1089 | 1094 | temp = []; |
| 1090 | 1095 | for (i = 0; i < ncampos; i++) { |
| ... | ... | @@ -1095,7 +1100,9 @@ i3GEO.pluginI3geo = |
| 1095 | 1100 | } |
| 1096 | 1101 | par.push("{" + temp.join(",") + "}"); |
| 1097 | 1102 | } |
| 1098 | - return '{"plugin":"parametrossql","ativo":"' + $i("parametrosSqlAtivo").value + '","parametros":[' + par.join(",") + ']}'; | |
| 1103 | + //parametros de confiuracao da janela | |
| 1104 | + janela = '{"w":"' + $i("parametrosSqljanelaw").value + '","h":"' + $i("parametrosSqljanelah").value + '"}'; | |
| 1105 | + return '{"plugin":"parametrossql","ativo":"' + $i("parametrosSqlAtivo").value + '","janela":' + janela + ',"parametros":[' + par.join(",") + ']}'; | |
| 1099 | 1106 | }, |
| 1100 | 1107 | /** |
| 1101 | 1108 | * Constroi um icone que sera adicionado na barra de icones do tema quando for adicionado na arvore de camadas Esse icone e | ... | ... |
js/templates/parametrossqlForm_mst.html
| ... | ... | @@ -16,6 +16,16 @@ |
| 16 | 16 | informações, veja o mapfile i3geo/temas/_llocaliphp.map. O caminho desse arquivo PHP é relativo à pasta i3geo. |
| 17 | 17 | </h5> |
| 18 | 18 | |
| 19 | + <div class='form-group label-fixed condensed' > | |
| 20 | + <label class='control-label' for=''>Largura da janela</label> | |
| 21 | + <input class='form-control input-lg' type='text' id='parametrosSqljanelaw' value='{{{janelaw}}}' /> | |
| 22 | + </div> | |
| 23 | + | |
| 24 | + <div class='form-group label-fixed condensed' > | |
| 25 | + <label class='control-label' for=''>Altura da janela</label> | |
| 26 | + <input class='form-control input-lg' type='text' id='parametrosSqljanelah' value='{{{janelah}}}' /> | |
| 27 | + </div> | |
| 28 | + | |
| 19 | 29 | <div class='form-group label-fixed condensed'> |
| 20 | 30 | <label class="control-label" for="parametrosSqlAtivo">Abre o formulário quando a camada é adicionada ao mapa: (true ou false)</label> |
| 21 | 31 | <div class="input-group"> | ... | ... |