Commit 9963f6811eec79611cbb5e1dd388efe6c8119144

Authored by Edmar Moretti
1 parent 42b0c25c

Correção no campo WKT da ferramenta de conversão wkt2layer. O uso do Mustache es…

…tava inserindo tab e fim de linha no campo textarea
ferramentas/legenda/templateFormEstilo_mst.html 100644 → 100755
ferramentas/wkt2layer/index.js
... ... @@ -45,15 +45,18 @@ i3GEOF.wkt2layer =
45 45 if(i3GEOF.wkt2layer.MUSTACHE == ""){
46 46 $.get(i3GEO.configura.locaplic + "/ferramentas/wkt2layer/template_mst.html", function(template) {
47 47 i3GEOF.wkt2layer.MUSTACHE = template;
48   - i3GEOF.wkt2layer.inicia(iddiv);
  48 + i3GEOF.wkt2layer.inicia(iddiv,wkt,texto);
49 49 });
50 50 return;
51 51 }
52 52 $i(iddiv).innerHTML = i3GEOF.wkt2layer.html(wkt,texto);
  53 + $i("i3GEOFwkt2layerWkt").value = wkt;
  54 +
53 55 new YAHOO.widget.Button("i3GEOFwkt2layerShp", {
54 56 onclick : {
55 57 fn : function() {
56 58 var wkt = $i("i3GEOFwkt2layerWkt").value;
  59 + wkt = $.trim(wkt.replace(/[\t\n]+/g,' '));
57 60 if(wkt.length < 5){
58 61 i3GEO.janela.tempoMsg($trad("mensagem",i3GEOF.wkt2layer.dicionario));
59 62 }
... ... @@ -67,6 +70,7 @@ i3GEOF.wkt2layer =
67 70 onclick : {
68 71 fn : function() {
69 72 var wkt = $i("i3GEOFwkt2layerWkt").value;
  73 + wkt = $.trim(wkt.replace(/[\t\n]+/g,' '));
70 74 if(wkt.length < 5){
71 75 i3GEO.janela.tempoMsg($trad("mensagem",i3GEOF.wkt2layer.dicionario));
72 76 }
... ... @@ -97,7 +101,6 @@ i3GEOF.wkt2layer =
97 101 */
98 102 iniciaJanelaFlutuante : function(wkt,texto) {
99 103 var cabecalho, janela, divid, titulo;
100   -
101 104 if ($i("i3GEOF.wkt2layer")) {
102 105 return;
103 106 }
... ... @@ -198,6 +201,7 @@ i3GEOF.wkt2layer =
198 201 };
199 202 par = i3GEOF.wkt2layer.pegaPar();
200 203 wkt = $i("i3GEOFwkt2layerWkt").value;
  204 + wkt = $.trim(wkt.replace(/[\t]+/g,' '));
201 205 wkt = wkt.split("\n").join("|");
202 206 p = i3GEO.configura.locaplic+"/ferramentas/wkt2layer/exec.php?g_sid="+i3GEO.configura.sid+
203 207 "&funcao=shapefile&"+par;
... ...