Commit 60e38c459daaf9f4762e496600a03e76ff2fada6
1 parent
5c7e998e
Exists in
master
and in
7 other branches
Adaptação da ferramenta de filtro de imagem, que permite processar as imagens do…
…s tiles que formam o mapa (filtros de tons de cinza, pe.e), para bootstrap
Showing
58 changed files
with
246 additions
and
200 deletions
Show diff stats
css/default.css
ferramentas/tipoimagem/index.js
... | ... | @@ -32,34 +32,34 @@ Você deve ter recebido uma cópia da Licença Pública G |
32 | 32 | GNU junto com este programa; se não, escreva para a |
33 | 33 | Free Software Foundation, Inc., no endereço |
34 | 34 | 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. |
35 | -*/ | |
35 | + */ | |
36 | 36 | if(typeof(i3GEOF) === 'undefined'){ |
37 | 37 | var i3GEOF = {}; |
38 | 38 | } |
39 | 39 | /* |
40 | 40 | Classe: i3GEOF.tipoimagem |
41 | -*/ | |
41 | + */ | |
42 | 42 | i3GEOF.tipoimagem = { |
43 | - /* | |
43 | + /* | |
44 | 44 | Variavel: aguarde |
45 | 45 | |
46 | 46 | Estilo do objeto DOM com a imagem de aguarde existente no cabeçalho da janela. |
47 | - */ | |
48 | - aguarde: "", | |
49 | - /** | |
50 | - * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
51 | - */ | |
52 | - MUSTACHE : "", | |
53 | - /** | |
54 | - * Susbtitutos para o template | |
55 | - */ | |
56 | - mustacheHash : function() { | |
57 | - var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.tipoimagem.dicionario); | |
58 | - dicionario["locaplic"] = i3GEO.configura.locaplic; | |
59 | - dicionario["asp"] = '"'; | |
60 | - return dicionario; | |
61 | - }, | |
62 | - /* | |
47 | + */ | |
48 | + aguarde: "", | |
49 | + /** | |
50 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | |
51 | + */ | |
52 | + MUSTACHE : "", | |
53 | + /** | |
54 | + * Susbtitutos para o template | |
55 | + */ | |
56 | + mustacheHash : function() { | |
57 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.tipoimagem.dicionario); | |
58 | + dicionario["locaplic"] = i3GEO.configura.locaplic; | |
59 | + dicionario["asp"] = '"'; | |
60 | + return dicionario; | |
61 | + }, | |
62 | + /* | |
63 | 63 | Function: inicia |
64 | 64 | |
65 | 65 | Inicia a ferramenta. É chamado por criaJanelaFlutuante |
... | ... | @@ -67,26 +67,28 @@ i3GEOF.tipoimagem = { |
67 | 67 | Parametro: |
68 | 68 | |
69 | 69 | iddiv {String} - id do div que receberá o conteudo HTML da ferramenta |
70 | - */ | |
71 | - inicia: function(iddiv){ | |
72 | - if(i3GEOF.tipoimagem.MUSTACHE == ""){ | |
73 | - $.get(i3GEO.configura.locaplic + "/ferramentas/tipoimagem/template_mst.html", function(template) { | |
74 | - i3GEOF.tipoimagem.MUSTACHE = template; | |
75 | - i3GEOF.tipoimagem.inicia(iddiv); | |
76 | - }); | |
77 | - return; | |
78 | - } | |
70 | + */ | |
71 | + inicia: function(iddiv){ | |
72 | + if(i3GEOF.tipoimagem.MUSTACHE == ""){ | |
73 | + $.get(i3GEO.configura.locaplic + "/ferramentas/tipoimagem/template_mst.html", function(template) { | |
74 | + i3GEOF.tipoimagem.MUSTACHE = template; | |
75 | + i3GEOF.tipoimagem.inicia(iddiv); | |
76 | + }); | |
77 | + return; | |
78 | + } | |
79 | 79 | var f; |
80 | 80 | |
81 | 81 | $i(iddiv).innerHTML += i3GEOF.tipoimagem.html(); |
82 | - | |
83 | - f = i3GEO.configura.tipoimagem; | |
84 | - if(f == 'nenhum'){ | |
85 | - f = ""; | |
86 | - } | |
87 | - $i("i3GEOFtipoImagemListaDeFiltros").value = f; | |
88 | - }, | |
89 | - /* | |
82 | + if(i3GEO.configura.tipoimagem != "nenhum"){ | |
83 | + var aplica = i3GEO.configura.tipoimagem.split(" "); | |
84 | + $( "#tipoimagemForm input" ).each(function( index ) { | |
85 | + if(jQuery.inArray($( this ).prop("name"), aplica) !== -1){ | |
86 | + $( this ).prop("checked",true); | |
87 | + } | |
88 | + }); | |
89 | + } | |
90 | + }, | |
91 | + /* | |
90 | 92 | Function: html |
91 | 93 | |
92 | 94 | Gera o código html para apresentação das opções da ferramenta |
... | ... | @@ -94,72 +96,67 @@ i3GEOF.tipoimagem = { |
94 | 96 | Retorno: |
95 | 97 | |
96 | 98 | String com o código html |
97 | - */ | |
98 | - html:function() { | |
99 | - var ins = Mustache.render(i3GEOF.tipoimagem.MUSTACHE, i3GEOF.tipoimagem.mustacheHash()); | |
100 | - return ins; | |
101 | - }, | |
102 | - /* | |
99 | + */ | |
100 | + html:function() { | |
101 | + var ins = Mustache.render(i3GEOF.tipoimagem.MUSTACHE, i3GEOF.tipoimagem.mustacheHash()); | |
102 | + return ins; | |
103 | + }, | |
104 | + /* | |
103 | 105 | Function: iniciaJanelaFlutuante |
104 | 106 | |
105 | 107 | Cria a janela flutuante para controle da ferramenta. |
106 | - */ | |
107 | - iniciaJanelaFlutuante: function(){ | |
108 | - var janela,divid,titulo,cabecalho,minimiza; | |
109 | - if ($i("i3GEOF.tipoimagem")) { | |
110 | - return; | |
111 | - } | |
112 | - cabecalho = function(){}; | |
113 | - minimiza = function(){ | |
114 | - i3GEO.janela.minimiza("i3GEOF.tipoimagem",200); | |
115 | - }; | |
116 | - //cria a janela flutuante | |
117 | - titulo = "<span class='i3GeoTituloJanelaBsNolink' >" + $trad("p2") + "</span></div>"; | |
118 | - janela = i3GEO.janela.cria( | |
119 | - "310px", | |
120 | - "260px", | |
121 | - "", | |
122 | - "", | |
123 | - "", | |
124 | - titulo, | |
125 | - "i3GEOF.tipoimagem", | |
126 | - false, | |
127 | - "hd", | |
128 | - cabecalho, | |
129 | - minimiza, | |
130 | - "", | |
131 | - true, | |
132 | - "", | |
133 | - "", | |
134 | - "", | |
135 | - "", | |
136 | - "1" | |
137 | - ); | |
138 | - divid = janela[2].id; | |
139 | - $i("i3GEOF.tipoimagem_corpo").style.backgroundColor = "white"; | |
140 | - $i("i3GEOF.tipoimagem_corpo").style.textAlign = "left"; | |
141 | - i3GEOF.tipoimagem.aguarde = $i("i3GEOF.tipoimagem_imagemCabecalho").style; | |
142 | - i3GEOF.tipoimagem.inicia(divid); | |
143 | - }, | |
144 | - /* | |
108 | + */ | |
109 | + iniciaJanelaFlutuante: function(){ | |
110 | + var janela,divid,titulo,cabecalho,minimiza; | |
111 | + if ($i("i3GEOF.tipoimagem")) { | |
112 | + return; | |
113 | + } | |
114 | + cabecalho = function(){}; | |
115 | + minimiza = function(){ | |
116 | + i3GEO.janela.minimiza("i3GEOF.tipoimagem",200); | |
117 | + }; | |
118 | + //cria a janela flutuante | |
119 | + titulo = "<span class='i3GeoTituloJanelaBsNolink' >" + $trad("p2") + "</span></div>"; | |
120 | + janela = i3GEO.janela.cria( | |
121 | + "310px", | |
122 | + "260px", | |
123 | + "", | |
124 | + "", | |
125 | + "", | |
126 | + titulo, | |
127 | + "i3GEOF.tipoimagem", | |
128 | + false, | |
129 | + "hd", | |
130 | + cabecalho, | |
131 | + minimiza, | |
132 | + "", | |
133 | + true, | |
134 | + "", | |
135 | + "", | |
136 | + "", | |
137 | + "", | |
138 | + "1" | |
139 | + ); | |
140 | + divid = janela[2].id; | |
141 | + $i("i3GEOF.tipoimagem_corpo").style.backgroundColor = "white"; | |
142 | + i3GEOF.tipoimagem.aguarde = $i("i3GEOF.tipoimagem_imagemCabecalho").style; | |
143 | + i3GEOF.tipoimagem.inicia(divid); | |
144 | + }, | |
145 | + /* | |
145 | 146 | Function: aplicar |
146 | 147 | |
147 | 148 | Aplica o filtro de imagem escolhido |
148 | - */ | |
149 | - aplicar: function(){ | |
150 | - var filtro = $i("i3GEOFtipoImagemListaDeFiltros").value; | |
151 | - if(filtro == "") | |
152 | - {filtro = 'nenhum';} | |
153 | - i3GEO.configura.tipoimagem = filtro; | |
154 | - i3GEO.Interface.alteraParametroLayers("TIPOIMAGEM",filtro); | |
155 | - i3GEO.Interface.openlayers.atualizaMapa(); | |
156 | - }, | |
157 | - /* | |
158 | - Function: adicionar | |
159 | - | |
160 | - Adiciona um filtro na lista de filtros que serão aplicados | |
161 | - */ | |
162 | - adicionar: function(filtro){ | |
163 | - $i("i3GEOFtipoImagemListaDeFiltros").value = $i("i3GEOFtipoImagemListaDeFiltros").value+" "+filtro; | |
164 | - } | |
149 | + */ | |
150 | + aplicar: function(){ | |
151 | + var f = []; | |
152 | + $( "#tipoimagemForm input:checked" ).each(function( index ) { | |
153 | + f.push($( this ).prop("name")); | |
154 | + }); | |
155 | + if(f.length == 0){ | |
156 | + f = ["nenhum"]; | |
157 | + } | |
158 | + i3GEO.configura.tipoimagem = f.join(" "); | |
159 | + i3GEO.Interface.alteraParametroLayers("TIPOIMAGEM",f.join(" ")); | |
160 | + i3GEO.Interface.openlayers.atualizaMapa(); | |
161 | + } | |
165 | 162 | }; |
166 | 163 | \ No newline at end of file | ... | ... |
ferramentas/tipoimagem/template_mst.html
1 | 1 | <div class="container-fluid"> |
2 | 2 | <h5>{{{selecionaFiltro}}}</h5> |
3 | - <div class='form-group label-fixed condensed'> | |
4 | - <label class="control-label" for="i3GEOFtipoImagemListaDeFiltros">{{{selecionaFiltro}}}</label> | |
5 | - <input class="form-control input-lg" type='text' id='i3GEOFtipoImagemListaDeFiltros' value='' /> | |
6 | - </div> | |
7 | 3 | <button onclick="i3GEOF.tipoimagem.aplicar()" class='btn btn-primary btn-sm btn-raised'>{{{aplica}}}</button> |
8 | - | |
9 | - | |
10 | - | |
11 | - <table class='lista6' style='width: 200px'> | |
12 | - <tr> | |
13 | - <td> | |
14 | - <input onclick='javascript:$i({{{asp}}}i3GEOFtipoImagemListaDeFiltros{{{asp}}}).value = {{{asp}}}{{{asp}}}' style='cursor: pointer; border: 0px solid white;' type='radio' | |
15 | - name='i3GEOtipoimagemtipo' value='nenhum'> | |
16 | - </td> | |
17 | - <td>{{{nenhum}}}</td> | |
18 | - <td> | |
19 | - <img onclick='javascript:$i({{{asp}}}i3GEOFtipoImagemListaDeFiltros{{{asp}}}).value = {{{asp}}}{{{asp}}}' src='{{{locaplic}}}/imagens/filtro_nenhum.png' /> | |
20 | - </td> | |
21 | - </tr> | |
22 | - <tr> | |
23 | - <td> | |
24 | - <input onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}cinza{{{asp}}})' style='cursor: pointer; border: 0px solid white;' type='radio' name='i3GEOtipoimagemtipo' value='cinza'> | |
25 | - </td> | |
26 | - <td>{{{tonsCinza}}}</td> | |
27 | - <td> | |
28 | - <img onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}cinza{{{asp}}})' src='{{{locaplic}}}/imagens/filtro_cinza.png' /> | |
29 | - </td> | |
30 | - </tr> | |
31 | - <tr> | |
32 | - <td> | |
33 | - <input onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}sepiaclara{{{asp}}})' style='cursor: pointer; border: 0px solid white;' type='radio' name='i3GEOtipoimagemtipo' value='sepiaclara'> | |
34 | - </td> | |
35 | - <td>{{{sepiaClara}}}</td> | |
36 | - <td> | |
37 | - <img onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}sepiaclara{{{asp}}})' src='{{{locaplic}}}/imagens/filtro_sepiaclara.png' /> | |
38 | - </td> | |
39 | - </tr> | |
40 | - <tr> | |
41 | - <td> | |
42 | - <input onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}sepianormal{{{asp}}})' style='cursor: pointer; border: 0px solid white;' type='radio' name='i3GEOtipoimagemtipo' value='sepianormal'> | |
43 | - </td> | |
44 | - <td>{{{sepiaNormal}}}</td> | |
45 | - <td> | |
46 | - <img onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}sepianormal{{{asp}}})' src='{{{locaplic}}}/imagens/filtro_sepianormal.png' /> | |
47 | - </td> | |
48 | - </tr> | |
49 | - <tr> | |
50 | - <td> | |
51 | - <input onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}negativo{{{asp}}})' style='cursor: pointer; border: 0px solid white;' type='radio' name='i3GEOtipoimagemtipo' value='negativo'> | |
52 | - </td> | |
53 | - <td>{{{negativo}}}</td> | |
54 | - <td> | |
55 | - <img onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}negativo{{{asp}}})' src='{{{locaplic}}}/imagens/filtro_negativo.png' /> | |
56 | - </td> | |
57 | - </tr> | |
58 | - <tr> | |
59 | - <td> | |
60 | - <input onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}detectaBordas{{{asp}}})' style='cursor: pointer; border: 0px solid white;' type='radio' name='i3GEOtipoimagemtipo' value='detectaBordas'> | |
61 | - </td> | |
62 | - <td>{{{detectaBordas}}}</td> | |
63 | - <td> | |
64 | - <img onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}detectaBordas{{{asp}}})' src='{{{locaplic}}}/imagens/filtro_detectabordas.png' /> | |
65 | - </td> | |
66 | - </tr> | |
67 | - <tr> | |
68 | - <td> | |
69 | - <input onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}embassa{{{asp}}})' style='cursor: pointer; border: 0px solid white;' type='radio' name='i3GEOtipoimagemtipo' value='embassa'> | |
70 | - </td> | |
71 | - <td>emboss</td> | |
72 | - <td> | |
73 | - <img onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}embassa{{{asp}}})' src='{{{locaplic}}}/imagens/filtro_embassa.png' /> | |
74 | - </td> | |
75 | - </tr> | |
76 | - <tr> | |
77 | - <td> | |
78 | - <input onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}gaussian_blur{{{asp}}})' style='cursor: pointer; border: 0px solid white;' type='radio' name='i3GEOtipoimagemtipo' value='gaussian_blur'> | |
79 | - </td> | |
80 | - <td>gaussian blur</td> | |
81 | - <td> | |
82 | - <img onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}gaussian_blur{{{asp}}})' src='{{{locaplic}}}/imagens/filtro_gaussianblur.png' /> | |
83 | - </td> | |
84 | - </tr> | |
85 | - <tr> | |
86 | - <td> | |
87 | - <input onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}selective_blur{{{asp}}})' style='cursor: pointer; border: 0px solid white;' type='radio' name='i3GEOtipoimagemtipo' value='selective_blur'> | |
88 | - </td> | |
89 | - <td>selective blur</td> | |
90 | - <td> | |
91 | - <img onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}selective_blur{{{asp}}})' src='{{{locaplic}}}/imagens/filtro_selectiveblur.png' /> | |
92 | - </td> | |
93 | - </tr> | |
94 | - <tr> | |
95 | - <td> | |
96 | - <input onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}mean_removal{{{asp}}})' style='cursor: pointer; border: 0px solid white;' type='radio' name='i3GEOtipoimagemtipo' value='mean_removal'> | |
97 | - </td> | |
98 | - <td>mean removal</td> | |
99 | - <td> | |
100 | - <img onclick='i3GEOF.tipoimagem.adicionar({{{asp}}}mean_removal{{{asp}}})' src='{{{locaplic}}}/imagens/filtro_meanremoval.png' /> | |
101 | - </td> | |
102 | - </tr> | |
103 | - </table> | |
4 | + <div id="tipoimagemForm"> | |
5 | + <table> | |
6 | + <tbody></tbody> | |
7 | + <tr> | |
8 | + <td> | |
9 | + <img class="img-rounded" src='{{{locaplic}}}/imagens/filtro_cinza.png' /> | |
10 | + </td> | |
11 | + <td> | |
12 | + <div class="checkbox text-left"> | |
13 | + <label> | |
14 | + <input name='cinza' type="checkbox"> | |
15 | + <span class="checkbox-material noprint"> | |
16 | + <span class="check"></span> | |
17 | + </span> | |
18 | + {{{tonsCinza}}} | |
19 | + </label> | |
20 | + </div> | |
21 | + </td> | |
22 | + </tr> | |
23 | + <tr> | |
24 | + <td> | |
25 | + <img class="img-rounded" src='{{{locaplic}}}/imagens/filtro_sepiaclara.png' /> | |
26 | + </td> | |
27 | + <td> | |
28 | + <div class="checkbox text-left"> | |
29 | + <label> | |
30 | + <input name='sepiaclara' type="checkbox"> | |
31 | + <span class="checkbox-material noprint"> | |
32 | + <span class="check"></span> | |
33 | + </span> | |
34 | + {{{sepiaClara}}} | |
35 | + </label> | |
36 | + </div> | |
37 | + </td> | |
38 | + </tr> | |
39 | + <tr> | |
40 | + <td> | |
41 | + <img class="img-rounded" src='{{{locaplic}}}/imagens/filtro_sepianormal.png' /> | |
42 | + </td> | |
43 | + <td> | |
44 | + <div class="checkbox text-left"> | |
45 | + <label> | |
46 | + <input name='sepianormal' type="checkbox"> | |
47 | + <span class="checkbox-material noprint"> | |
48 | + <span class="check"></span> | |
49 | + </span> | |
50 | + {{{sepiaNormal}}} | |
51 | + </label> | |
52 | + </div> | |
53 | + </td> | |
54 | + </tr> | |
55 | + <tr> | |
56 | + <td> | |
57 | + <img class="img-rounded" src='{{{locaplic}}}/imagens/filtro_negativo.png' /> | |
58 | + </td> | |
59 | + <td> | |
60 | + <div class="checkbox text-left"> | |
61 | + <label> | |
62 | + <input name='negativo' type="checkbox"> | |
63 | + <span class="checkbox-material noprint"> | |
64 | + <span class="check"></span> | |
65 | + </span> | |
66 | + {{{negativo}}} | |
67 | + </label> | |
68 | + </div> | |
69 | + </td> | |
70 | + </tr> | |
71 | + <tr> | |
72 | + <td> | |
73 | + <img class="img-rounded" src='{{{locaplic}}}/imagens/filtro_detectabordas.png' /> | |
74 | + </td> | |
75 | + <td> | |
76 | + <div class="checkbox text-left"> | |
77 | + <label> | |
78 | + <input name='detectaBordas' type="checkbox"> | |
79 | + <span class="checkbox-material noprint"> | |
80 | + <span class="check"></span> | |
81 | + </span> | |
82 | + {{{detectaBordas}}} | |
83 | + </label> | |
84 | + </div> | |
85 | + </td> | |
86 | + </tr> | |
87 | + <tr> | |
88 | + <td> | |
89 | + <img class="img-rounded" src='{{{locaplic}}}/imagens/filtro_embassa.png' /> | |
90 | + </td> | |
91 | + <td> | |
92 | + <div class="checkbox text-left"> | |
93 | + <label> | |
94 | + <input name='embassa' type="checkbox"> | |
95 | + <span class="checkbox-material noprint"> | |
96 | + <span class="check"></span> | |
97 | + </span> | |
98 | + emboss | |
99 | + </label> | |
100 | + </div> | |
101 | + </td> | |
102 | + </tr> | |
103 | + <tr> | |
104 | + <td> | |
105 | + <img class="img-rounded" src='{{{locaplic}}}/imagens/filtro_gaussianblur.png' /> | |
106 | + </td> | |
107 | + <td> | |
108 | + <div class="checkbox text-left"> | |
109 | + <label> | |
110 | + <input name='gaussian_blur' type="checkbox"> | |
111 | + <span class="checkbox-material noprint"> | |
112 | + <span class="check"></span> | |
113 | + </span> | |
114 | + gaussian blur | |
115 | + </label> | |
116 | + </div> | |
117 | + </td> | |
118 | + </tr> | |
119 | + <tr> | |
120 | + <td> | |
121 | + <img class="img-rounded" src='{{{locaplic}}}/imagens/filtro_selectiveblur.png' /> | |
122 | + </td> | |
123 | + <td> | |
124 | + <div class="checkbox text-left"> | |
125 | + <label> | |
126 | + <input name='selective_blur' type="checkbox"> | |
127 | + <span class="checkbox-material noprint"> | |
128 | + <span class="check"></span> | |
129 | + </span> | |
130 | + selective blur | |
131 | + </label> | |
132 | + </div> | |
133 | + </td> | |
134 | + </tr> | |
135 | + <tr> | |
136 | + <td> | |
137 | + <img class="img-rounded" src='{{{locaplic}}}/imagens/filtro_meanremoval.png' /> | |
138 | + </td> | |
139 | + <td> | |
140 | + <div class="checkbox text-left"> | |
141 | + <label> | |
142 | + <input name='mean_removal' type="checkbox"> | |
143 | + <span class="checkbox-material noprint"> | |
144 | + <span class="check"></span> | |
145 | + </span> | |
146 | + mean removal | |
147 | + </label> | |
148 | + </div> | |
149 | + </td> | |
150 | + </tr> | |
151 | + </table> | |
152 | + </div> | |
104 | 153 | </div> |
105 | 154 | \ No newline at end of file | ... | ... |
pacotes/yui290/build/container/container_compacto.js
100644 → 100755
pacotes/yui290/build/container/container_core_compacto.js
100644 → 100755
pacotes/yui290/build/utilities/utilities_compacto.js
100644 → 100755