Commit 37ecd96b78e3505449f4352af836c253978cc86d

Authored by Edmar Moretti
1 parent 12a37aa4

Correção da opção "salvar" no editor de metadados (sistema de administração). Es…

…sa correção deverá ser incluída no SP1
Showing 1 changed file with 4 additions and 2 deletions   Show diff stats
admin/js/editormapfile.js
@@ -735,7 +735,7 @@ function montaEditorConexao(dados) @@ -735,7 +735,7 @@ function montaEditorConexao(dados)
735 titulo:"Connectiontype",id:"",value:"",div:"<div id=cConnectiontype ></div>",tipo:"text"}, 735 titulo:"Connectiontype",id:"",value:"",div:"<div id=cConnectiontype ></div>",tipo:"text"},
736 {ajuda:"Database connection string to retrieve remote data.An SDE connection string consists of a hostname, instance name, database name, username and password separated by commas.A PostGIS connection string is basically a regular PostgreSQL connection string, it takes the form of 'user=nobody password=****** dbname=dbname host=localhost port=5432' An Oracle connection string: user/pass[@db] . Se vc tiver problemas com acentuação, experimente algo como: user=postgres password=postgres dbname=pgutf8 host=localhost port=5432 options='-c client_encoding=LATIN1'", 736 {ajuda:"Database connection string to retrieve remote data.An SDE connection string consists of a hostname, instance name, database name, username and password separated by commas.A PostGIS connection string is basically a regular PostgreSQL connection string, it takes the form of 'user=nobody password=****** dbname=dbname host=localhost port=5432' An Oracle connection string: user/pass[@db] . Se vc tiver problemas com acentuação, experimente algo como: user=postgres password=postgres dbname=pgutf8 host=localhost port=5432 options='-c client_encoding=LATIN1'",
737 titulo:"Connection",id:"connection",value:dados.connection,tipo:"text"}, 737 titulo:"Connection",id:"connection",value:dados.connection,tipo:"text"},
738 - {ajuda:"Full filename of the spatial data to process. No file extension is necessary for shapefiles. Can be specified relative to the SHAPEPATH option from the Map Object.If this is an SDE layer, the parameter should include the name of the layer as well as the geometry column, i.e. 'mylayer,shape,myversion'.If this is a PostGIS layer, the parameter should be in the form of '<columnname> from <tablename>', where 'columnname' is the name of the column containing the geometry objects and 'tablename' is the name of the table from which the geometry data will be read.For Oracle, use 'shape FROM table' or 'shape FROM (SELECT statement)' or even more complex Oracle compliant queries! Note that there are important performance impacts when using spatial subqueries however. Try using MapServer's FILTER whenever possible instead. You can also see the SQL submitted by forcing an error, for instance by submitting a DATA parameter you know won't work, using for example a bad column name. Exemplo postgis: the_geom FROM (select * FROM biomas) as foo USING UNIQUE gid USING SRID=4291 ", 738 + {ajuda:"Full filename of the spatial data to process. No file extension is necessary for shapefiles. Can be specified relative to the SHAPEPATH option from the Map Object.If this is an SDE layer, the parameter should include the name of the layer as well as the geometry column, i.e. 'mylayer,shape,myversion'.If this is a PostGIS layer, the parameter should be in the form of '<columnname> from <tablename>', where 'columnname' is the name of the column containing the geometry objects and 'tablename' is the name of the table from which the geometry data will be read.For Oracle, use 'shape FROM table' or 'shape FROM (SELECT statement)' or even more complex Oracle compliant queries! Note that there are important performance impacts when using spatial subqueries however. Try using MapServer's FILTER whenever possible instead. You can also see the SQL submitted by forcing an error, for instance by submitting a DATA parameter you know won't work, using for example a bad column name. Exemplo postgis: the_geom FROM (select * FROM biomas) as foo USING UNIQUE gid USING SRID=4291 . Exemplo shapefile: c://ms4w/Apache/htdocs/geodados/brasil/limitespol/localidades.shp",
739 titulo:"Data",id:"data",value:dados.data,tipo:"text"}, 739 titulo:"Data",id:"data",value:dados.data,tipo:"text"},
740 {ajuda:"Item that contains the location of an individual tile, default is 'location'.", 740 {ajuda:"Item that contains the location of an individual tile, default is 'location'.",
741 titulo:"tileitem",id:"tileitem",value:dados.tileitem,tipo:"text"}, 741 titulo:"tileitem",id:"tileitem",value:dados.tileitem,tipo:"text"},
@@ -1146,7 +1146,7 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo, @@ -1146,7 +1146,7 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo,
1146 {alert("Valor de escala incorreto");return;} 1146 {alert("Valor de escala incorreto");return;}
1147 } 1147 }
1148 1148
1149 - var campos = new Array("palletefile","palettestep","arquivodownload","aplicaextensao","classestamanho","classessimbolo","classescor","classesnome","classesitem","mensagem","identifica","extensao","escondido","download","escala","tema","classe","tip","itenslink","itens","itensdesc") 1149 + var campos = new Array("palletefile","palletestep","arquivodownload","aplicaextensao","classestamanho","classessimbolo","classescor","classesnome","classesitem","mensagem","identifica","extensao","escondido","download","escala","tema","classe","tip","itenslink","itens","itensdesc")
1150 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer 1150 var par = "&codigoMap="+codigoMap+"&codigoLayer="+codigoLayer
1151 var prog = "../php/editormapfile.php?funcao=alterarMetadados" 1151 var prog = "../php/editormapfile.php?funcao=alterarMetadados"
1152 } 1152 }
@@ -1183,8 +1183,10 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo, @@ -1183,8 +1183,10 @@ function salvarDadosEditor(tipo,codigoMap,codigoLayer,indiceClasse,indiceEstilo,
1183 var prog = "../php/editormapfile.php?funcao=alterarEstilo" 1183 var prog = "../php/editormapfile.php?funcao=alterarEstilo"
1184 } 1184 }
1185 prog += "&testar="+testar; 1185 prog += "&testar="+testar;
  1186 + try{
1186 for (i=0;i<campos.length;i++) 1187 for (i=0;i<campos.length;i++)
1187 {par += "&"+campos[i]+"="+($i(campos[i]).value)} 1188 {par += "&"+campos[i]+"="+($i(campos[i]).value)}
  1189 + }catch(e){alert(e)}
1188 core_carregando("ativa"); 1190 core_carregando("ativa");
1189 core_carregando(" gravando o registro do layer= "+codigoLayer); 1191 core_carregando(" gravando o registro do layer= "+codigoLayer);
1190 var sUrl = prog+par; 1192 var sUrl = prog+par;