Commit b5691fdc6cb8be3a3114e0c415ea3023f4f84bfe
1 parent
097f2b4f
Exists in
master
and in
7 other branches
Correção do código
Showing
13 changed files
with
106 additions
and
68 deletions
Show diff stats
classesjs/classe_analise.js
... | ... | @@ -278,10 +278,7 @@ i3GEO.analise = { |
278 | 278 | * Ferramenta centróide |
279 | 279 | */ |
280 | 280 | centroide : function() { |
281 | - i3GEO.util.dialogoFerramenta( | |
282 | - "i3GEO.analise.dialogo.centroide()", | |
283 | - "centroide", | |
284 | - "centroide"); | |
281 | + i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.centroide()","centroide","centroide","dependencias.php","i3GEOF.centroide.iniciaJanelaFlutuante()"); | |
285 | 282 | }, |
286 | 283 | /** |
287 | 284 | * Function: dissolve | ... | ... |
classesjs/classe_arvoredetemas.js
... | ... | @@ -2943,7 +2943,7 @@ i3GEO.arvoreDeTemas = { |
2943 | 2943 | */ |
2944 | 2944 | carregaKml : function() { |
2945 | 2945 | i3GEO.util.scriptTag(i3GEO.configura.locaplic |
2946 | - + "/ferramentas/carregakml/index.js", | |
2946 | + + "/ferramentas/carregakml/dependencias.php", | |
2947 | 2947 | "i3GEOF.carregakml.criaJanelaFlutuante()", |
2948 | 2948 | "i3GEOF.carregakml_script"); |
2949 | 2949 | }, |
... | ... | @@ -2966,7 +2966,7 @@ i3GEO.arvoreDeTemas = { |
2966 | 2966 | */ |
2967 | 2967 | buscaInde : function() { |
2968 | 2968 | i3GEO.util.scriptTag(i3GEO.configura.locaplic |
2969 | - + "/ferramentas/buscainde/index.js", | |
2969 | + + "/ferramentas/buscainde/dependencias.php", | |
2970 | 2970 | "i3GEOF.buscainde.criaJanelaFlutuante()", |
2971 | 2971 | "i3GEOF.buscainde_script"); |
2972 | 2972 | }, | ... | ... |
classesjs/classe_mapa.js
... | ... | @@ -779,7 +779,7 @@ i3GEO.mapa = |
779 | 779 | * Abre a janela de dialogo da ferramenta carregamapa |
780 | 780 | */ |
781 | 781 | carregaMapa : function() { |
782 | - i3GEO.util.dialogoFerramenta("i3GEO.mapa.dialogo.carregaMapa()", "carregamapa", "carregaMapa"); | |
782 | + i3GEO.util.dialogoFerramenta("i3GEO.tema.dialogo.carregaMapa()","carregamapa","carregaMapa","dependencias.php","i3GEOF.carregaMapa.iniciaJanelaFlutuante()"); | |
783 | 783 | }, |
784 | 784 | /** |
785 | 785 | * Function: convertews | ... | ... |
ferramentas/aplicarsld/dicionario.js
1 | 1 | //+$trad(1,i3GEOF.aplicarsld.dicionario)+ |
2 | 2 | i3GEOF.aplicarsld.dicionario = { |
3 | -'arquivo': [{ | |
4 | -pt:"Arquivo SLD", | |
5 | -en:"", | |
6 | -es:"" | |
7 | -}], | |
8 | -'aplica': [{ | |
9 | -pt:"Aplicar", | |
10 | -en:"", | |
11 | -es:"" | |
12 | -}] | |
3 | + 'arquivo': [{ | |
4 | + pt:"Arquivo SLD", | |
5 | + en:"", | |
6 | + es:"" | |
7 | + }], | |
8 | + 'aplica': [{ | |
9 | + pt:"Aplicar", | |
10 | + en:"", | |
11 | + es:"" | |
12 | + }] | |
13 | 13 | }; | ... | ... |
ferramentas/aplicarsld/index.js
... | ... | @@ -64,6 +64,7 @@ i3GEOF.aplicarsld = { |
64 | 64 | mustacheHash : function() { |
65 | 65 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.aplicarsld.dicionario); |
66 | 66 | dicionario["locaplic"] = i3GEO.configura.locaplic; |
67 | + dicionario["temaAtivo"] = i3GEO.temaAtivo; | |
67 | 68 | return dicionario; |
68 | 69 | }, |
69 | 70 | /* | ... | ... |
ferramentas/aplicarsld/template_mst.html
1 | -<form id='i3GEOaplicarsldf' target='i3GEOaplicarsldiframe' action='{{{locaplic}}}/ferramentas/aplicarsld/upload.php?tema='+i3GEO.temaAtivo+' method='post' ENCTYPE='multipart/form-data'> | |
1 | +<form id='i3GEOaplicarsldf' target='i3GEOaplicarsldiframe' action='{{{locaplic}}}/ferramentas/aplicarsld/upload.php?tema={{{temaAtivo}}}' method='post' ENCTYPE='multipart/form-data'> | |
2 | 2 | <p class='paragrafo'> |
3 | 3 | {{{arquivo}}}: <br> |
4 | 4 | <input type='file' size='18' name='i3GEOaplicarsld' style='top: 0px; left: 0px; cursor: pointer;'> | ... | ... |
ferramentas/bufferpt/index.js
... | ... | @@ -63,6 +63,18 @@ i3GEOF.bufferpt = { |
63 | 63 | criaJanelaFlutuante: function(x,y){ |
64 | 64 | i3GEOF.bufferpt.iniciaDicionario(x,y); |
65 | 65 | }, |
66 | + /** | |
67 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
68 | + */ | |
69 | + MUSTACHE : "", | |
70 | + /** | |
71 | + * Susbtitutos para o template | |
72 | + */ | |
73 | + mustacheHash : function() { | |
74 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.bufferpt.dicionario); | |
75 | + dicionario["distancia"] = $inputText('','','i3GEOFbufferptDistancia','',10,0); | |
76 | + return dicionario; | |
77 | + }, | |
66 | 78 | /* |
67 | 79 | Function: iniciaDicionario |
68 | 80 | |
... | ... | @@ -115,11 +127,8 @@ i3GEOF.bufferpt = { |
115 | 127 | |
116 | 128 | String com o código html |
117 | 129 | */ |
118 | - html:function(){ | |
119 | - var ins = '' + | |
120 | - '<p class=paragrafo >'+$trad('entorno',i3GEOF.bufferpt.dicionario)+'</p>' + | |
121 | - $inputText("","","i3GEOFbufferptDistancia","",10,0) + | |
122 | - '<br><br><p class=paragrafo ><input id=i3GEObufferptbotao1 size=16 type=button value="'+$trad('criaEntorno',i3GEOF.bufferpt.dicionario)+'"/>'; | |
130 | + html:function(idjanela) { | |
131 | + var ins = Mustache.render(i3GEOF.bufferpt.MUSTACHE, i3GEOF.bufferpt.mustacheHash(idjanela)); | |
123 | 132 | return ins; |
124 | 133 | }, |
125 | 134 | /* | ... | ... |
ferramentas/buscainde/index.js
... | ... | @@ -46,7 +46,7 @@ Classe: i3GEOF.buscainde |
46 | 46 | i3GEOF.buscainde = { |
47 | 47 | /* |
48 | 48 | Variavel: aguarde |
49 | - | |
49 | + | |
50 | 50 | Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. |
51 | 51 | */ |
52 | 52 | aguarde: "", |
... | ... | @@ -56,13 +56,25 @@ i3GEOF.buscainde = { |
56 | 56 | criaJanelaFlutuante: function(){ |
57 | 57 | i3GEOF.buscainde.iniciaDicionario(); |
58 | 58 | }, |
59 | + /** | |
60 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
61 | + */ | |
62 | + MUSTACHE : "", | |
63 | + /** | |
64 | + * Susbtitutos para o template | |
65 | + */ | |
66 | + mustacheHash : function() { | |
67 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.buscainde.dicionario); | |
68 | + dicionario["locaplic"] = i3GEO.configura.locaplic; | |
69 | + return dicionario; | |
70 | + }, | |
59 | 71 | /* |
60 | 72 | Function: iniciaDicionario |
61 | - | |
73 | + | |
62 | 74 | Carrega o dicionário e chama a função que inicia a ferramenta |
63 | - | |
75 | + | |
64 | 76 | O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script |
65 | - */ | |
77 | + */ | |
66 | 78 | iniciaDicionario: function(){ |
67 | 79 | if(typeof(i3GEOF.buscainde.dicionario) === 'undefined'){ |
68 | 80 | i3GEO.util.scriptTag( |
... | ... | @@ -74,14 +86,14 @@ i3GEOF.buscainde = { |
74 | 86 | else{ |
75 | 87 | i3GEOF.buscainde.iniciaJanelaFlutuante(); |
76 | 88 | } |
77 | - }, | |
89 | + }, | |
78 | 90 | /* |
79 | 91 | Function: inicia |
80 | - | |
92 | + | |
81 | 93 | Inicia a ferramenta. É chamado por criaJanelaFlutuante |
82 | - | |
94 | + | |
83 | 95 | Parametro: |
84 | - | |
96 | + | |
85 | 97 | iddiv {String} - id do div que receberá o conteudo HTML da ferramenta |
86 | 98 | */ |
87 | 99 | inicia: function(iddiv){ |
... | ... | @@ -92,22 +104,22 @@ i3GEOF.buscainde = { |
92 | 104 | }, |
93 | 105 | /* |
94 | 106 | Function: html |
95 | - | |
107 | + | |
96 | 108 | Gera o código html para apresentação das opções da ferramenta |
97 | - | |
109 | + | |
98 | 110 | Retorno: |
99 | - | |
111 | + | |
100 | 112 | String com o código html |
101 | 113 | */ |
102 | - html:function(){ | |
103 | - var ins = '<iframe style="width:99%;height:99%;border:0px" src="'+i3GEO.configura.locaplic+'/pacotes/cswclient/csw.html"></iframe>'; | |
114 | + html:function() { | |
115 | + var ins = Mustache.render(i3GEOF.buscainde.MUSTACHE, i3GEOF.buscainde.mustacheHash()); | |
104 | 116 | return ins; |
105 | 117 | }, |
106 | 118 | /* |
107 | 119 | Function: iniciaJanelaFlutuante |
108 | - | |
120 | + | |
109 | 121 | Cria a janela flutuante para controle da ferramenta. |
110 | - */ | |
122 | + */ | |
111 | 123 | iniciaJanelaFlutuante: function(){ |
112 | 124 | var janela,divid,titulo,cabecalho,minimiza; |
113 | 125 | cabecalho = function(){}; | ... | ... |
ferramentas/carregakml/index.js
... | ... | @@ -55,6 +55,20 @@ i3GEOF.carregakml = { |
55 | 55 | criaJanelaFlutuante: function(){ |
56 | 56 | i3GEOF.carregakml.iniciaDicionario(); |
57 | 57 | }, |
58 | + /** | |
59 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
60 | + */ | |
61 | + MUSTACHE : "", | |
62 | + /** | |
63 | + * Susbtitutos para o template | |
64 | + */ | |
65 | + mustacheHash : function() { | |
66 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.carregakml.dicionario); | |
67 | + dicionario["nomeArquivo"] = $inputText('','','i3GEOcarregakmlurl','',40,''); | |
68 | + dicionario["digite"] = $trad("o1"); | |
69 | + dicionario["botao"] = $trad("p14"); | |
70 | + return dicionario; | |
71 | + }, | |
58 | 72 | /* |
59 | 73 | Function: iniciaDicionario |
60 | 74 | |
... | ... | @@ -116,14 +130,8 @@ i3GEOF.carregakml = { |
116 | 130 | |
117 | 131 | String com o código html |
118 | 132 | */ |
119 | - html:function(){ | |
120 | - var ins = '' + | |
121 | - '<p class="paragrafo" >'+$trad('insereKml',i3GEOF.carregakml.dicionario)+':<br><br>' + | |
122 | - $inputText("","","i3GEOcarregakmlurl","",30,"") + | |
123 | - '<br><br>' + | |
124 | - '<div id="i3GEOcarregakmlCombo" style="left:1px;display:block;width:315px;text-align:left;">' + $trad("o1") + | |
125 | - '</div>' + | |
126 | - '<br><br><input id=i3GEOcarregakmlbotao1 type="buttom" value="'+$trad("p14")+'" />'; | |
133 | + html:function() { | |
134 | + var ins = Mustache.render(i3GEOF.carregakml.MUSTACHE, i3GEOF.carregakml.mustacheHash()); | |
127 | 135 | return ins; |
128 | 136 | }, |
129 | 137 | /* | ... | ... |
ferramentas/carregakml/template_mst.html
1 | 1 | <p class='paragrafo'> |
2 | - {{{insereKml}}}:<br> <br> $inputText('','','i3GEOcarregakmlurl','',40,'') <br> <br> ' + $trad("o1") | |
3 | -<div id='i3GEOcarregakmlCombo' style='left: 1px; display: block; width: 315px; text-align: left;'></div> | |
2 | + {{{insereKml}}}:<br> <br> {{{nomeArquivo}}} <br> <br> | |
3 | +<div id='i3GEOcarregakmlCombo' style='left: 1px; display: block; width: 315px; text-align: left;'>{{{digite}}}</div> | |
4 | 4 | <br> |
5 | 5 | <br> |
6 | -<input id='i3GEOcarregakmlbotao1' type='button' value=' +$trad(" p14")+' /> | |
7 | 6 | \ No newline at end of file |
7 | +<input id='i3GEOcarregakmlbotao1' type='button' value='{{{botao}}}' /> | |
8 | 8 | \ No newline at end of file | ... | ... |
ferramentas/carregamapa/index.js
... | ... | @@ -51,6 +51,19 @@ i3GEOF.carregaMapa = { |
51 | 51 | criaJanelaFlutuante: function(){ |
52 | 52 | i3GEOF.carregaMapa.iniciaDicionario(); |
53 | 53 | }, |
54 | + /** | |
55 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
56 | + */ | |
57 | + MUSTACHE : "", | |
58 | + /** | |
59 | + * Susbtitutos para o template | |
60 | + */ | |
61 | + mustacheHash : function() { | |
62 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.carregaMapa.dicionario); | |
63 | + dicionario["locaplic"] = i3GEO.configura.locaplic; | |
64 | + dicionario["sid"] = i3GEO.configura.sid; | |
65 | + return dicionario; | |
66 | + }, | |
54 | 67 | /* |
55 | 68 | Function: iniciaDicionario |
56 | 69 | |
... | ... | @@ -100,18 +113,8 @@ i3GEOF.carregaMapa = { |
100 | 113 | |
101 | 114 | String com o código html |
102 | 115 | */ |
103 | - html:function(){ | |
104 | - var ins = ''; | |
105 | - ins += '<form id=i3GEOcarregamapaf target="i3GEOcarregamaiframe" action="'+i3GEO.configura.locaplic+'/ferramentas/carregamapa/upload.php" method="post" ENCTYPE="multipart/form-data" >' + | |
106 | - '<p class="paragrafo" >'+$trad('insereArquivo',i3GEOF.carregaMapa.dicionario)+ | |
107 | - '<br><br>' + | |
108 | - '<p class="paragrafo" ><input type="file" name="i3GEOcarregamapafilemap" size="22" style="top:0px;left:0px;cursor:pointer;">' + | |
109 | - '<br><br>' + | |
110 | - '<p class="paragrafo" ><input id=i3GEOcarregamapabotao1 type="button" value="'+$trad('carregaArquivo',i3GEOF.carregaMapa.dicionario)+'" size=12 name="submit"><br>' + | |
111 | - '<input type=hidden name=g_sid value="'+i3GEO.configura.sid+'" >' + | |
112 | - '<input type="hidden" name="MAX_FILE_SIZE" value="100000" >' + | |
113 | - '</form>' + | |
114 | - '<br><iframe name=i3GEOcarregamaiframe width="98%" height="70px" style="text-align:left;border:1px solid gray;" ></iframe>'; | |
116 | + html:function() { | |
117 | + var ins = Mustache.render(i3GEOF.carregaMapa.MUSTACHE, i3GEOF.carregaMapa.mustacheHash()); | |
115 | 118 | return ins; |
116 | 119 | }, |
117 | 120 | /* | ... | ... |
ferramentas/carregamapa/template_mst.html
... | ... | @@ -7,7 +7,7 @@ |
7 | 7 | <p class='paragrafo'> |
8 | 8 | <input id='i3GEOcarregamapabotao1' type='button' value='{{{carregaArquivo}}}' size='12' name='submit'> |
9 | 9 | <br> |
10 | - <input type='hidden' name='g_sid' value='+i3GEO.configura.sid+'> | |
10 | + <input type='hidden' name='g_sid' value='{{{sid}}}'> | |
11 | 11 | <input type='hidden' name='MAX_FILE_SIZE' value='100000'> |
12 | 12 | </form> |
13 | 13 | <br> | ... | ... |
ferramentas/centroide/index.js
... | ... | @@ -54,6 +54,18 @@ i3GEOF.centroide = { |
54 | 54 | criaJanelaFlutuante: function(){ |
55 | 55 | i3GEOF.centroide.iniciaDicionario(); |
56 | 56 | }, |
57 | + /** | |
58 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
59 | + */ | |
60 | + MUSTACHE : "", | |
61 | + /** | |
62 | + * Susbtitutos para o template | |
63 | + */ | |
64 | + mustacheHash : function() { | |
65 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.centroide.dicionario); | |
66 | + dicionario["locaplic"] = i3GEO.configura.locaplic; | |
67 | + return dicionario; | |
68 | + }, | |
57 | 69 | /* |
58 | 70 | Function: iniciaDicionario |
59 | 71 | |
... | ... | @@ -98,12 +110,8 @@ i3GEOF.centroide = { |
98 | 110 | |
99 | 111 | String com o código html |
100 | 112 | */ |
101 | - html:function(){ | |
102 | - var ins = ''; | |
103 | - ins += '<div style="padding:5px;background-color:#F2F2F2;top:0px;left:0px;display:block;width:98%;" id="i3GEOcentroideresultado" >'; | |
104 | - ins += '</div>'; | |
105 | - ins += '<div style="top:10px;left:0px;display:block;width:98%;color:red" id="i3GEOcentroidefim" >'; | |
106 | - ins += '</div>'; | |
113 | + html:function() { | |
114 | + var ins = Mustache.render(i3GEOF.centroide.MUSTACHE, i3GEOF.centroide.mustacheHash()); | |
107 | 115 | return ins; |
108 | 116 | }, |
109 | 117 | /* | ... | ... |