Commit 209a9e98123b363cb5a42af454986a0267a12202
1 parent
faaf7ab3
Exists in
master
and in
7 other branches
Adaptação da ferramenta Conexão do catálogo de temas
Showing
4 changed files
with
155 additions
and
211 deletions
Show diff stats
ferramentas/conectarservicos/index.js
| @@ -6,187 +6,163 @@ if (typeof (i3GEOF) === 'undefined') { | @@ -6,187 +6,163 @@ if (typeof (i3GEOF) === 'undefined') { | ||
| 6 | */ | 6 | */ |
| 7 | i3GEOF.conectarservicos = | 7 | i3GEOF.conectarservicos = |
| 8 | { | 8 | { |
| 9 | - /** | ||
| 10 | - * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | ||
| 11 | - */ | ||
| 12 | - MUSTACHE : "", | ||
| 13 | - /** | ||
| 14 | - * Susbtitutos para o template | ||
| 15 | - */ | ||
| 16 | - mustacheHash : function() { | ||
| 17 | - var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.conectarservicos.dicionario); | ||
| 18 | - dicionario["locaplic"] = i3GEO.configura.locaplic; | ||
| 19 | - return dicionario; | ||
| 20 | - }, | ||
| 21 | - /* | ||
| 22 | - * Function: iniciaDicionario (Depreciado na versao 6.0) | ||
| 23 | - * | ||
| 24 | - */ | ||
| 25 | - iniciaDicionario : function() { | ||
| 26 | - i3GEOF.conectarservicos.iniciaJanelaFlutuante(); | ||
| 27 | - }, | ||
| 28 | - /* | ||
| 29 | - * Function: inicia | ||
| 30 | - * | ||
| 31 | - * Inicia a ferramenta. É chamado por criaJanelaFlutuante | ||
| 32 | - * | ||
| 33 | - * Parametro: | ||
| 34 | - * | ||
| 35 | - * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | ||
| 36 | - */ | ||
| 37 | - inicia : function(iddiv) { | ||
| 38 | - if(i3GEOF.conectarservicos.MUSTACHE == ""){ | ||
| 39 | - $.get(i3GEO.configura.locaplic + "/ferramentas/conectarservicos/template_mst.html", function(template) { | ||
| 40 | - i3GEOF.conectarservicos.MUSTACHE = template; | ||
| 41 | - i3GEOF.conectarservicos.inicia(iddiv); | ||
| 42 | - }); | ||
| 43 | - return; | ||
| 44 | - } | ||
| 45 | - $i(iddiv).innerHTML = i3GEOF.conectarservicos.html(); | ||
| 46 | - new YAHOO.widget.Button("i3GEOFconectarservicosKml", { | ||
| 47 | - onclick : { | ||
| 48 | - fn : function() { | ||
| 49 | - i3GEO.util.scriptTag(i3GEO.configura.locaplic | ||
| 50 | - + "/ferramentas/carregakml/dependencias.php", | ||
| 51 | - "i3GEOF.carregakml.iniciaJanelaFlutuante()", | ||
| 52 | - "i3GEOF.carregakml_script"); | ||
| 53 | - } | 9 | + /** |
| 10 | + * Template no formato mustache. E preenchido na carga do javascript com o programa dependencias.php | ||
| 11 | + */ | ||
| 12 | + MUSTACHE : "", | ||
| 13 | + /** | ||
| 14 | + * Susbtitutos para o template | ||
| 15 | + */ | ||
| 16 | + mustacheHash : function() { | ||
| 17 | + var dicionario = i3GEO.idioma.objetoIdioma(i3GEOF.conectarservicos.dicionario); | ||
| 18 | + dicionario["locaplic"] = i3GEO.configura.locaplic; | ||
| 19 | + return dicionario; | ||
| 20 | + }, | ||
| 21 | + /* | ||
| 22 | + * Function: iniciaDicionario (Depreciado na versao 6.0) | ||
| 23 | + * | ||
| 24 | + */ | ||
| 25 | + iniciaDicionario : function() { | ||
| 26 | + i3GEOF.conectarservicos.iniciaJanelaFlutuante(); | ||
| 27 | + }, | ||
| 28 | + /* | ||
| 29 | + * Function: inicia | ||
| 30 | + * | ||
| 31 | + * Inicia a ferramenta. É chamado por criaJanelaFlutuante | ||
| 32 | + * | ||
| 33 | + * Parametro: | ||
| 34 | + * | ||
| 35 | + * iddiv {String} - id do div que receberá o conteudo HTML da ferramenta | ||
| 36 | + */ | ||
| 37 | + inicia : function(iddiv) { | ||
| 38 | + if(i3GEOF.conectarservicos.MUSTACHE == ""){ | ||
| 39 | + $.get(i3GEO.configura.locaplic + "/ferramentas/conectarservicos/template_mst.html", function(template) { | ||
| 40 | + i3GEOF.conectarservicos.MUSTACHE = template; | ||
| 41 | + i3GEOF.conectarservicos.inicia(iddiv); | ||
| 42 | + }); | ||
| 43 | + return; | ||
| 54 | } | 44 | } |
| 55 | - }); | ||
| 56 | - new YAHOO.widget.Button("i3GEOFconectarservicosWms", { | ||
| 57 | - onclick : { | ||
| 58 | - fn : function() { | ||
| 59 | - i3GEO.janela | ||
| 60 | - .cria( | ||
| 61 | - "400px", | ||
| 62 | - "300px", | ||
| 63 | - i3GEO.configura.locaplic | ||
| 64 | - + "/ferramentas/conectarwms/index.htm", | ||
| 65 | - "", | ||
| 66 | - "", | ||
| 67 | - | ||
| 68 | - + "</div><a class='i3GeoTituloJanelaBs' target=_blank href='" | ||
| 69 | - + i3GEO.configura.locaplic | ||
| 70 | - + "/ajuda_usuario.php?idcategoria=4&idajuda=28' >" + $trad("a4") + "</a>", | ||
| 71 | - "i3GEO.conectarwms", | ||
| 72 | - false, | ||
| 73 | - "hd", | ||
| 74 | - "", | ||
| 75 | - "", | ||
| 76 | - "", | ||
| 77 | - true | ||
| 78 | - ); | ||
| 79 | - } | 45 | + $i(iddiv).innerHTML = i3GEOF.conectarservicos.html(); |
| 46 | + }, | ||
| 47 | + geojson: function(){ | ||
| 48 | + i3GEO.util.scriptTag(i3GEO.configura.locaplic | ||
| 49 | + + "/ferramentas/conectargeojson/dependencias.php", | ||
| 50 | + "i3GEOF.conectargeojson.iniciaJanelaFlutuante()", | ||
| 51 | + "i3GEOF.conectargeojson_script"); | ||
| 52 | + }, | ||
| 53 | + georss: function(){ | ||
| 54 | + i3GEO.janela.cria( | ||
| 55 | + "400px", | ||
| 56 | + "300px", | ||
| 57 | + i3GEO.configura.locaplic | ||
| 58 | + + "/ferramentas/conectargeorss/index.htm", | ||
| 59 | + "", | ||
| 60 | + "", | ||
| 61 | + $trad("x47") | ||
| 62 | + + " <a class=ajuda_usuario target=_blank href='" | ||
| 63 | + + i3GEO.configura.locaplic | ||
| 64 | + + "/ajuda_usuario.php?idcategoria=4&idajuda=29' ><b> </b></a>", | ||
| 65 | + "i3GEO.conectargeorss", | ||
| 66 | + false, | ||
| 67 | + "hd", | ||
| 68 | + "", | ||
| 69 | + "", | ||
| 70 | + "", | ||
| 71 | + true | ||
| 72 | + ); | ||
| 73 | + }, | ||
| 74 | + wmst: function(){ | ||
| 75 | + i3GEO.janela.cria( | ||
| 76 | + "600px", | ||
| 77 | + "400px", | ||
| 78 | + i3GEO.configura.locaplic | ||
| 79 | + + "/ferramentas/wmstime/index.htm", | ||
| 80 | + "", | ||
| 81 | + "", | ||
| 82 | + $trad("x46") | ||
| 83 | + + " <a class=ajuda_usuario target=_blank href='" | ||
| 84 | + + i3GEO.configura.locaplic | ||
| 85 | + + "/ajuda_usuario.php?idcategoria=4&idajuda=76' ><b> </b></a>", | ||
| 86 | + "i3GEO.conectarwmst", | ||
| 87 | + false, | ||
| 88 | + "hd", | ||
| 89 | + "", | ||
| 90 | + "", | ||
| 91 | + "", | ||
| 92 | + true | ||
| 93 | + ); | ||
| 94 | + }, | ||
| 95 | + wms: function(){ | ||
| 96 | + i3GEO.janela.cria( | ||
| 97 | + "400px", | ||
| 98 | + "300px", | ||
| 99 | + i3GEO.configura.locaplic | ||
| 100 | + + "/ferramentas/conectarwms/index.htm", | ||
| 101 | + "", | ||
| 102 | + "", | ||
| 103 | + "</div><a class='i3GeoTituloJanelaBs' target=_blank href='" | ||
| 104 | + + i3GEO.configura.locaplic | ||
| 105 | + + "/ajuda_usuario.php?idcategoria=4&idajuda=28' >" + $trad("a4") + "</a>", | ||
| 106 | + "i3GEO.conectarwms", | ||
| 107 | + false, | ||
| 108 | + "hd", | ||
| 109 | + "", | ||
| 110 | + "", | ||
| 111 | + "", | ||
| 112 | + true | ||
| 113 | + ); | ||
| 114 | + }, | ||
| 115 | + kml: function() { | ||
| 116 | + i3GEO.util.scriptTag(i3GEO.configura.locaplic | ||
| 117 | + + "/ferramentas/carregakml/dependencias.php", | ||
| 118 | + "i3GEOF.carregakml.iniciaJanelaFlutuante()", | ||
| 119 | + "i3GEOF.carregakml_script"); | ||
| 120 | + }, | ||
| 121 | + /* | ||
| 122 | + * Function: html | ||
| 123 | + * | ||
| 124 | + * Gera o código html para apresentação das opções da ferramenta | ||
| 125 | + * | ||
| 126 | + * Retorno: | ||
| 127 | + * | ||
| 128 | + * String com o código html | ||
| 129 | + */ | ||
| 130 | + html : function() { | ||
| 131 | + var ins = Mustache.render(i3GEOF.conectarservicos.MUSTACHE, i3GEOF.conectarservicos.mustacheHash()); | ||
| 132 | + return ins; | ||
| 133 | + }, | ||
| 134 | + /* | ||
| 135 | + * Function: criaJanelaFlutuante | ||
| 136 | + * | ||
| 137 | + * Cria a janela flutuante para controle da ferramenta. | ||
| 138 | + */ | ||
| 139 | + iniciaJanelaFlutuante : function() { | ||
| 140 | + var cabecalho, janela, divid, titulo; | ||
| 141 | + if($i("i3GEOF.conectarservicos")){ | ||
| 142 | + return; | ||
| 80 | } | 143 | } |
| 81 | - }); | ||
| 82 | - new YAHOO.widget.Button("i3GEOFconectarservicosWmst", { | ||
| 83 | - onclick : { | ||
| 84 | - fn : function() { | ||
| 85 | - i3GEO.janela | ||
| 86 | - .cria( | ||
| 87 | - "600px", | ||
| 88 | - "400px", | ||
| 89 | - i3GEO.configura.locaplic | ||
| 90 | - + "/ferramentas/wmstime/index.htm", | ||
| 91 | - "", | ||
| 92 | - "", | ||
| 93 | - $trad("x46") | ||
| 94 | - + " <a class=ajuda_usuario target=_blank href='" | ||
| 95 | - + i3GEO.configura.locaplic | ||
| 96 | - + "/ajuda_usuario.php?idcategoria=4&idajuda=76' ><b> </b></a>", | ||
| 97 | - "i3GEO.conectarwmst", | ||
| 98 | - false, | ||
| 99 | - "hd", | ||
| 100 | - "", | ||
| 101 | - "", | 144 | + cabecalho = function() { |
| 145 | + }; | ||
| 146 | + // cria a janela flutuante | ||
| 147 | + titulo = "</div><div class='i3GeoTituloJanelaBs'>" + $trad("conexao",i3GEOF.conectarservicos.dicionario)+"</div>"; | ||
| 148 | + janela = | ||
| 149 | + i3GEO.janela.cria( | ||
| 150 | + "230px", | ||
| 151 | + "270px", | ||
| 102 | "", | 152 | "", |
| 103 | - true | ||
| 104 | - ); | ||
| 105 | - } | ||
| 106 | - } | ||
| 107 | - }); | ||
| 108 | - new YAHOO.widget.Button("i3GEOFconectarservicosGeorss", { | ||
| 109 | - onclick : { | ||
| 110 | - fn : function() { | ||
| 111 | - i3GEO.janela | ||
| 112 | - .cria( | ||
| 113 | - "400px", | ||
| 114 | - "300px", | ||
| 115 | - i3GEO.configura.locaplic | ||
| 116 | - + "/ferramentas/conectargeorss/index.htm", | ||
| 117 | "", | 153 | "", |
| 118 | "", | 154 | "", |
| 119 | - $trad("x47") | ||
| 120 | - + " <a class=ajuda_usuario target=_blank href='" | ||
| 121 | - + i3GEO.configura.locaplic | ||
| 122 | - + "/ajuda_usuario.php?idcategoria=4&idajuda=29' ><b> </b></a>", | ||
| 123 | - "i3GEO.conectargeorss", | 155 | + titulo, |
| 156 | + "i3GEOF.conectarservicos", | ||
| 124 | false, | 157 | false, |
| 125 | "hd", | 158 | "hd", |
| 126 | - "", | 159 | + cabecalho, |
| 127 | "", | 160 | "", |
| 128 | "", | 161 | "", |
| 129 | true | 162 | true |
| 130 | - ); | ||
| 131 | - } | ||
| 132 | - } | ||
| 133 | - }); | ||
| 134 | - new YAHOO.widget.Button("i3GEOFconectarservicosGeojson", { | ||
| 135 | - onclick : { | ||
| 136 | - fn : function() { | ||
| 137 | - i3GEO.util.scriptTag(i3GEO.configura.locaplic | ||
| 138 | - + "/ferramentas/conectargeojson/dependencias.php", | ||
| 139 | - "i3GEOF.conectargeojson.iniciaJanelaFlutuante()", | ||
| 140 | - "i3GEOF.conectargeojson_script"); | ||
| 141 | - } | ||
| 142 | - } | ||
| 143 | - }); | ||
| 144 | - }, | ||
| 145 | - /* | ||
| 146 | - * Function: html | ||
| 147 | - * | ||
| 148 | - * Gera o código html para apresentação das opções da ferramenta | ||
| 149 | - * | ||
| 150 | - * Retorno: | ||
| 151 | - * | ||
| 152 | - * String com o código html | ||
| 153 | - */ | ||
| 154 | - html : function() { | ||
| 155 | - var ins = Mustache.render(i3GEOF.conectarservicos.MUSTACHE, i3GEOF.conectarservicos.mustacheHash()); | ||
| 156 | - return ins; | ||
| 157 | - }, | ||
| 158 | - /* | ||
| 159 | - * Function: criaJanelaFlutuante | ||
| 160 | - * | ||
| 161 | - * Cria a janela flutuante para controle da ferramenta. | ||
| 162 | - */ | ||
| 163 | - iniciaJanelaFlutuante : function() { | ||
| 164 | - var cabecalho, janela, divid, titulo; | ||
| 165 | - if($i("i3GEOF.conectarservicos")){ | ||
| 166 | - return; | 163 | + ); |
| 164 | + divid = janela[2].id; | ||
| 165 | + $i("i3GEOF.conectarservicos_corpo").style.backgroundColor = "white"; | ||
| 166 | + i3GEOF.conectarservicos.inicia(divid); | ||
| 167 | } | 167 | } |
| 168 | - cabecalho = function() { | ||
| 169 | - }; | ||
| 170 | - // cria a janela flutuante | ||
| 171 | - titulo = "</div><div class='i3GeoTituloJanelaBs'>" + $trad("conexao",i3GEOF.conectarservicos.dicionario)+"</div>"; | ||
| 172 | - janela = | ||
| 173 | - i3GEO.janela.cria( | ||
| 174 | - "230px", | ||
| 175 | - "180px", | ||
| 176 | - "", | ||
| 177 | - "", | ||
| 178 | - "", | ||
| 179 | - titulo, | ||
| 180 | - "i3GEOF.conectarservicos", | ||
| 181 | - false, | ||
| 182 | - "hd", | ||
| 183 | - cabecalho, | ||
| 184 | - "", | ||
| 185 | - "", | ||
| 186 | - true | ||
| 187 | - ); | ||
| 188 | - divid = janela[2].id; | ||
| 189 | - $i("i3GEOF.conectarservicos_corpo").style.backgroundColor = "white"; | ||
| 190 | - i3GEOF.conectarservicos.inicia(divid); | ||
| 191 | - } | ||
| 192 | }; | 168 | }; |
ferramentas/conectarservicos/template_mst.html
| 1 | -<style> | ||
| 2 | -.yui-button#i3GEOFconectarservicosKml button { | ||
| 3 | - background: url('../imagens/oxygen/16x16/text-xml.png') 5% 50% no-repeat; | ||
| 4 | - width: 200px; | ||
| 5 | -} | ||
| 6 | -.yui-button#i3GEOFconectarservicosWms button { | ||
| 7 | - background: url('../imagens/oxygen/16x16/text-html.png') 5% 50% no-repeat; | ||
| 8 | - width: 200px; | ||
| 9 | -} | ||
| 10 | -.yui-button#i3GEOFconectarservicosWmst button { | ||
| 11 | - background: url('../imagens/oxygen/16x16/text-html.png') 5% 50% no-repeat; | ||
| 12 | - width: 200px; | ||
| 13 | -} | ||
| 14 | -.yui-button#i3GEOFconectarservicosGeorss button { | ||
| 15 | - background: url('../imagens/oxygen/16x16/application-rss+xml.png') 5% 50% no-repeat; | ||
| 16 | - width: 200px; | ||
| 17 | -} | ||
| 18 | -.yui-button#i3GEOFconectarservicosGeojson button { | ||
| 19 | - background: url('../imagens/oxygen/16x16/code-context.png') 5% 50% no-repeat; | ||
| 20 | - width: 200px; | ||
| 21 | -} | ||
| 22 | -</style> | ||
| 23 | -<div style='margin-left: 5px'> | ||
| 24 | - <p class='paragrafo'> | ||
| 25 | - <input id='i3GEOFconectarservicosKml' type='button' value='KML' /> | ||
| 26 | - </p> | ||
| 27 | - <p class='paragrafo'> | ||
| 28 | - <input id='i3GEOFconectarservicosWms' type='button' value='WMS' /> | ||
| 29 | - </p> | ||
| 30 | - <p class='paragrafo'> | ||
| 31 | - <input id='i3GEOFconectarservicosWmst' type='button' value='WMS-T' /> | ||
| 32 | - </p> | ||
| 33 | - <p class='paragrafo'> | ||
| 34 | - <input id='i3GEOFconectarservicosGeorss' type='button' value='GeoRSS' /> | ||
| 35 | - </p> | ||
| 36 | - <p class='paragrafo'> | ||
| 37 | - <input id='i3GEOFconectarservicosGeojson' type='button' value='GeoJson' /> | ||
| 38 | - </p> | ||
| 39 | -</div> | 1 | +<div class='container-fluid'> |
| 2 | + <a href='javascript:void(0)' onclick="i3GEOF.conectarservicos.kml()" class='btn btn-primary btn-lg btn-block btn-raised'>KML</a> | ||
| 3 | + <a href='javascript:void(0)' onclick="i3GEOF.conectarservicos.wms()" class='btn btn-primary btn-lg btn-block btn-raised'>WMS</a> | ||
| 4 | + <a href='javascript:void(0)' onclick="i3GEOF.conectarservicos.wmst()" class='btn btn-primary btn-lg btn-block btn-raised'>WMS-T</a> | ||
| 5 | + <a href='javascript:void(0)' onclick="i3GEOF.conectarservicos.georss()" class='btn btn-primary btn-lg btn-block btn-raised'>GeoRSS</a> | ||
| 6 | + <a href='javascript:void(0)' onclick="i3GEOF.conectarservicos.geojson()" class='btn btn-primary btn-lg btn-block btn-raised'>GeoJson</a> | ||
| 7 | +</div> | ||
| 40 | \ No newline at end of file | 8 | \ No newline at end of file |