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,10 +278,7 @@ i3GEO.analise = { | ||
278 | * Ferramenta centróide | 278 | * Ferramenta centróide |
279 | */ | 279 | */ |
280 | centroide : function() { | 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 | * Function: dissolve | 284 | * Function: dissolve |
classesjs/classe_arvoredetemas.js
@@ -2943,7 +2943,7 @@ i3GEO.arvoreDeTemas = { | @@ -2943,7 +2943,7 @@ i3GEO.arvoreDeTemas = { | ||
2943 | */ | 2943 | */ |
2944 | carregaKml : function() { | 2944 | carregaKml : function() { |
2945 | i3GEO.util.scriptTag(i3GEO.configura.locaplic | 2945 | i3GEO.util.scriptTag(i3GEO.configura.locaplic |
2946 | - + "/ferramentas/carregakml/index.js", | 2946 | + + "/ferramentas/carregakml/dependencias.php", |
2947 | "i3GEOF.carregakml.criaJanelaFlutuante()", | 2947 | "i3GEOF.carregakml.criaJanelaFlutuante()", |
2948 | "i3GEOF.carregakml_script"); | 2948 | "i3GEOF.carregakml_script"); |
2949 | }, | 2949 | }, |
@@ -2966,7 +2966,7 @@ i3GEO.arvoreDeTemas = { | @@ -2966,7 +2966,7 @@ i3GEO.arvoreDeTemas = { | ||
2966 | */ | 2966 | */ |
2967 | buscaInde : function() { | 2967 | buscaInde : function() { |
2968 | i3GEO.util.scriptTag(i3GEO.configura.locaplic | 2968 | i3GEO.util.scriptTag(i3GEO.configura.locaplic |
2969 | - + "/ferramentas/buscainde/index.js", | 2969 | + + "/ferramentas/buscainde/dependencias.php", |
2970 | "i3GEOF.buscainde.criaJanelaFlutuante()", | 2970 | "i3GEOF.buscainde.criaJanelaFlutuante()", |
2971 | "i3GEOF.buscainde_script"); | 2971 | "i3GEOF.buscainde_script"); |
2972 | }, | 2972 | }, |
classesjs/classe_mapa.js
@@ -779,7 +779,7 @@ i3GEO.mapa = | @@ -779,7 +779,7 @@ i3GEO.mapa = | ||
779 | * Abre a janela de dialogo da ferramenta carregamapa | 779 | * Abre a janela de dialogo da ferramenta carregamapa |
780 | */ | 780 | */ |
781 | carregaMapa : function() { | 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 | * Function: convertews | 785 | * Function: convertews |
ferramentas/aplicarsld/dicionario.js
1 | //+$trad(1,i3GEOF.aplicarsld.dicionario)+ | 1 | //+$trad(1,i3GEOF.aplicarsld.dicionario)+ |
2 | i3GEOF.aplicarsld.dicionario = { | 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,6 +64,7 @@ i3GEOF.aplicarsld = { | ||
64 | mustacheHash : function() { | 64 | mustacheHash : function() { |
65 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.aplicarsld.dicionario); | 65 | var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.aplicarsld.dicionario); |
66 | dicionario["locaplic"] = i3GEO.configura.locaplic; | 66 | dicionario["locaplic"] = i3GEO.configura.locaplic; |
67 | + dicionario["temaAtivo"] = i3GEO.temaAtivo; | ||
67 | return dicionario; | 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 | <p class='paragrafo'> | 2 | <p class='paragrafo'> |
3 | {{{arquivo}}}: <br> | 3 | {{{arquivo}}}: <br> |
4 | <input type='file' size='18' name='i3GEOaplicarsld' style='top: 0px; left: 0px; cursor: pointer;'> | 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,6 +63,18 @@ i3GEOF.bufferpt = { | ||
63 | criaJanelaFlutuante: function(x,y){ | 63 | criaJanelaFlutuante: function(x,y){ |
64 | i3GEOF.bufferpt.iniciaDicionario(x,y); | 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 | Function: iniciaDicionario | 79 | Function: iniciaDicionario |
68 | 80 | ||
@@ -115,11 +127,8 @@ i3GEOF.bufferpt = { | @@ -115,11 +127,8 @@ i3GEOF.bufferpt = { | ||
115 | 127 | ||
116 | String com o código html | 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 | return ins; | 132 | return ins; |
124 | }, | 133 | }, |
125 | /* | 134 | /* |
ferramentas/buscainde/index.js
@@ -46,7 +46,7 @@ Classe: i3GEOF.buscainde | @@ -46,7 +46,7 @@ Classe: i3GEOF.buscainde | ||
46 | i3GEOF.buscainde = { | 46 | i3GEOF.buscainde = { |
47 | /* | 47 | /* |
48 | Variavel: aguarde | 48 | Variavel: aguarde |
49 | - | 49 | + |
50 | Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. | 50 | Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. |
51 | */ | 51 | */ |
52 | aguarde: "", | 52 | aguarde: "", |
@@ -56,13 +56,25 @@ i3GEOF.buscainde = { | @@ -56,13 +56,25 @@ i3GEOF.buscainde = { | ||
56 | criaJanelaFlutuante: function(){ | 56 | criaJanelaFlutuante: function(){ |
57 | i3GEOF.buscainde.iniciaDicionario(); | 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 | Function: iniciaDicionario | 72 | Function: iniciaDicionario |
61 | - | 73 | + |
62 | Carrega o dicionário e chama a função que inicia a ferramenta | 74 | Carrega o dicionário e chama a função que inicia a ferramenta |
63 | - | 75 | + |
64 | O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script | 76 | O Javascript é carregado com o id i3GEOF.nomedaferramenta.dicionario_script |
65 | - */ | 77 | + */ |
66 | iniciaDicionario: function(){ | 78 | iniciaDicionario: function(){ |
67 | if(typeof(i3GEOF.buscainde.dicionario) === 'undefined'){ | 79 | if(typeof(i3GEOF.buscainde.dicionario) === 'undefined'){ |
68 | i3GEO.util.scriptTag( | 80 | i3GEO.util.scriptTag( |
@@ -74,14 +86,14 @@ i3GEOF.buscainde = { | @@ -74,14 +86,14 @@ i3GEOF.buscainde = { | ||
74 | else{ | 86 | else{ |
75 | i3GEOF.buscainde.iniciaJanelaFlutuante(); | 87 | i3GEOF.buscainde.iniciaJanelaFlutuante(); |
76 | } | 88 | } |
77 | - }, | 89 | + }, |
78 | /* | 90 | /* |
79 | Function: inicia | 91 | Function: inicia |
80 | - | 92 | + |
81 | Inicia a ferramenta. É chamado por criaJanelaFlutuante | 93 | Inicia a ferramenta. É chamado por criaJanelaFlutuante |
82 | - | 94 | + |
83 | Parametro: | 95 | Parametro: |
84 | - | 96 | + |
85 | iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | 97 | iddiv {String} - id do div que receberá o conteudo HTML da ferramenta |
86 | */ | 98 | */ |
87 | inicia: function(iddiv){ | 99 | inicia: function(iddiv){ |
@@ -92,22 +104,22 @@ i3GEOF.buscainde = { | @@ -92,22 +104,22 @@ i3GEOF.buscainde = { | ||
92 | }, | 104 | }, |
93 | /* | 105 | /* |
94 | Function: html | 106 | Function: html |
95 | - | 107 | + |
96 | Gera o código html para apresentação das opções da ferramenta | 108 | Gera o código html para apresentação das opções da ferramenta |
97 | - | 109 | + |
98 | Retorno: | 110 | Retorno: |
99 | - | 111 | + |
100 | String com o código html | 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 | return ins; | 116 | return ins; |
105 | }, | 117 | }, |
106 | /* | 118 | /* |
107 | Function: iniciaJanelaFlutuante | 119 | Function: iniciaJanelaFlutuante |
108 | - | 120 | + |
109 | Cria a janela flutuante para controle da ferramenta. | 121 | Cria a janela flutuante para controle da ferramenta. |
110 | - */ | 122 | + */ |
111 | iniciaJanelaFlutuante: function(){ | 123 | iniciaJanelaFlutuante: function(){ |
112 | var janela,divid,titulo,cabecalho,minimiza; | 124 | var janela,divid,titulo,cabecalho,minimiza; |
113 | cabecalho = function(){}; | 125 | cabecalho = function(){}; |
ferramentas/carregakml/index.js
@@ -55,6 +55,20 @@ i3GEOF.carregakml = { | @@ -55,6 +55,20 @@ i3GEOF.carregakml = { | ||
55 | criaJanelaFlutuante: function(){ | 55 | criaJanelaFlutuante: function(){ |
56 | i3GEOF.carregakml.iniciaDicionario(); | 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 | Function: iniciaDicionario | 73 | Function: iniciaDicionario |
60 | 74 | ||
@@ -116,14 +130,8 @@ i3GEOF.carregakml = { | @@ -116,14 +130,8 @@ i3GEOF.carregakml = { | ||
116 | 130 | ||
117 | String com o código html | 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 | return ins; | 135 | return ins; |
128 | }, | 136 | }, |
129 | /* | 137 | /* |
ferramentas/carregakml/template_mst.html
1 | <p class='paragrafo'> | 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 | <br> | 4 | <br> |
5 | <br> | 5 | <br> |
6 | -<input id='i3GEOcarregakmlbotao1' type='button' value=' +$trad(" p14")+' /> | ||
7 | \ No newline at end of file | 6 | \ No newline at end of file |
7 | +<input id='i3GEOcarregakmlbotao1' type='button' value='{{{botao}}}' /> | ||
8 | \ No newline at end of file | 8 | \ No newline at end of file |
ferramentas/carregamapa/index.js
@@ -51,6 +51,19 @@ i3GEOF.carregaMapa = { | @@ -51,6 +51,19 @@ i3GEOF.carregaMapa = { | ||
51 | criaJanelaFlutuante: function(){ | 51 | criaJanelaFlutuante: function(){ |
52 | i3GEOF.carregaMapa.iniciaDicionario(); | 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 | Function: iniciaDicionario | 68 | Function: iniciaDicionario |
56 | 69 | ||
@@ -100,18 +113,8 @@ i3GEOF.carregaMapa = { | @@ -100,18 +113,8 @@ i3GEOF.carregaMapa = { | ||
100 | 113 | ||
101 | String com o código html | 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 | return ins; | 118 | return ins; |
116 | }, | 119 | }, |
117 | /* | 120 | /* |
ferramentas/carregamapa/template_mst.html
@@ -7,7 +7,7 @@ | @@ -7,7 +7,7 @@ | ||
7 | <p class='paragrafo'> | 7 | <p class='paragrafo'> |
8 | <input id='i3GEOcarregamapabotao1' type='button' value='{{{carregaArquivo}}}' size='12' name='submit'> | 8 | <input id='i3GEOcarregamapabotao1' type='button' value='{{{carregaArquivo}}}' size='12' name='submit'> |
9 | <br> | 9 | <br> |
10 | - <input type='hidden' name='g_sid' value='+i3GEO.configura.sid+'> | 10 | + <input type='hidden' name='g_sid' value='{{{sid}}}'> |
11 | <input type='hidden' name='MAX_FILE_SIZE' value='100000'> | 11 | <input type='hidden' name='MAX_FILE_SIZE' value='100000'> |
12 | </form> | 12 | </form> |
13 | <br> | 13 | <br> |
ferramentas/centroide/index.js
@@ -54,6 +54,18 @@ i3GEOF.centroide = { | @@ -54,6 +54,18 @@ i3GEOF.centroide = { | ||
54 | criaJanelaFlutuante: function(){ | 54 | criaJanelaFlutuante: function(){ |
55 | i3GEOF.centroide.iniciaDicionario(); | 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 | Function: iniciaDicionario | 70 | Function: iniciaDicionario |
59 | 71 | ||
@@ -98,12 +110,8 @@ i3GEOF.centroide = { | @@ -98,12 +110,8 @@ i3GEOF.centroide = { | ||
98 | 110 | ||
99 | String com o código html | 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 | return ins; | 115 | return ins; |
108 | }, | 116 | }, |
109 | /* | 117 | /* |