Revert encodeURI
This commit is contained in:
parent
0eb3cd0380
commit
592982b6f3
1 changed files with 19 additions and 19 deletions
|
@ -342,7 +342,7 @@ function doSearch() {
|
|||
var query = $('#fsearch').val();
|
||||
if( query.length > 1 ) {
|
||||
$.ajax(getServer('search'), {
|
||||
data: { 'q': encodeURIComponent(query) },
|
||||
data: { 'q': query },
|
||||
success: zoomToFound
|
||||
});
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ function importInJOSM(method, data ) {
|
|||
var url = getServer(method) + '?' + $.param(data);
|
||||
$.ajax({
|
||||
url: 'http://127.0.0.1:8111/import',
|
||||
data: { url: encodeURIComponent(url), new_layer: 'true', format: '.osm' },
|
||||
data: { url: url, new_layer: 'true', format: '.osm' },
|
||||
complete: function(t) {
|
||||
if( t.status != 200 )
|
||||
window.alert('Please enable remote_control in JOSM');
|
||||
|
@ -443,7 +443,7 @@ function bRename() {
|
|||
return;
|
||||
$('#rename').css('display', 'none');
|
||||
$.ajax(getServer('rename'), {
|
||||
data: { 'name': encodeURIComponent(selectedId), 'newname': encodeURIComponent($('#b_rename').val()) },
|
||||
data: { 'name': selectedId, 'newname': $('#b_rename').val() },
|
||||
success: updateBorders
|
||||
});
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ function bDisable() {
|
|||
if( !selectedId || !(selectedId in borders) )
|
||||
return;
|
||||
$.ajax(getServer(borders[selectedId].disabled ? 'enable' : 'disable'), {
|
||||
data: { 'name': encodeURIComponent(selectedId) },
|
||||
data: { 'name': selectedId },
|
||||
success: updateBorders
|
||||
});
|
||||
}
|
||||
|
@ -463,7 +463,7 @@ function bDelete() {
|
|||
if( !window.confirm('Точно удалить регион ' + selectedId + '?') )
|
||||
return;
|
||||
$.ajax(getServer('delete'), {
|
||||
data: { 'name': encodeURIComponent(selectedId) },
|
||||
data: { 'name': selectedId },
|
||||
success: updateBorders
|
||||
});
|
||||
}
|
||||
|
@ -472,7 +472,7 @@ function sendComment( text ) {
|
|||
if( !selectedId || !(selectedId in borders) )
|
||||
return;
|
||||
$.ajax(getServer('comment'), {
|
||||
data: { 'name': encodeURIComponent(selectedId), 'comment': encodeURIComponent(text) },
|
||||
data: { 'name': selectedId, 'comment': text },
|
||||
type: 'POST',
|
||||
success: updateBorders
|
||||
});
|
||||
|
@ -527,7 +527,7 @@ function bSplitDo() {
|
|||
wkt += L.Util.formatNum(lls[i].lng, 6) + ' ' + L.Util.formatNum(lls[i].lat, 6);
|
||||
}
|
||||
$.ajax(getServer('split'), {
|
||||
data: { 'name': encodeURIComponent(splitSelected), 'line': encodeURIComponent('LINESTRING(' + wkt + ')') },
|
||||
data: { 'name': splitSelected, 'line': 'LINESTRING(' + wkt + ')' },
|
||||
datatype: 'json',
|
||||
success: function(data) { if( data.status != 'ok' ) alert(data.status); else updateBorders(); }
|
||||
});
|
||||
|
@ -580,7 +580,7 @@ function bJoinSelect(layer) {
|
|||
function bJoinDo() {
|
||||
if( joinSelected != null && joinAnother != null ) {
|
||||
$.ajax(getServer('join'), {
|
||||
data: { 'name': encodeURIComponent(joinSelected), 'name2': encodeURIComponent(joinAnother) },
|
||||
data: { 'name': joinSelected, 'name2': joinAnother },
|
||||
success: updateBorders
|
||||
});
|
||||
}
|
||||
|
@ -632,7 +632,7 @@ function pPointSelect(id, name1) {
|
|||
var name = $('#p_name').val();
|
||||
name = name.replace('*', name1);
|
||||
$.ajax(getServer('from_osm'), {
|
||||
data: { 'name': encodeURIComponent(name), 'id': id },
|
||||
data: { 'name': name, 'id': id },
|
||||
success: updateBorders
|
||||
});
|
||||
bPointCancel();
|
||||
|
@ -670,8 +670,8 @@ function bDividePreview() {
|
|||
$('#d_none').css('display', 'none');
|
||||
$.ajax(getServer('divpreview'), {
|
||||
data: {
|
||||
'like': encodeURIComponent($('#d_like').val()),
|
||||
'query': encodeURIComponent($('#d_where').val())
|
||||
'like': $('#d_like').val(),
|
||||
'query': $('#d_where').val()
|
||||
},
|
||||
success: bDivideDrawPreview
|
||||
});
|
||||
|
@ -695,10 +695,10 @@ function bDivideDrawPreview(geojson) {
|
|||
function bDivideDo() {
|
||||
$.ajax(getServer('divide'), {
|
||||
data: {
|
||||
'name': encodeURIComponent(divSelected),
|
||||
'prefix': encodeURIComponent($('#d_prefix').val()),
|
||||
'like': encodeURIComponent($('#d_like').val()),
|
||||
'query': encodeURIComponent($('#d_where').val())
|
||||
'name': divSelected,
|
||||
'prefix': $('#d_prefix').val(),
|
||||
'like': $('#d_like').val(),
|
||||
'query': $('#d_where').val()
|
||||
},
|
||||
success: updateBorders
|
||||
});
|
||||
|
@ -719,7 +719,7 @@ function bLargest() {
|
|||
if( !selectedId || !(selectedId in borders) )
|
||||
return;
|
||||
$.ajax(getServer('chop1'), {
|
||||
data: { 'name': encodeURIComponent(selectedId) },
|
||||
data: { 'name': selectedId },
|
||||
success: updateBorders
|
||||
});
|
||||
}
|
||||
|
@ -728,7 +728,7 @@ function bHull() {
|
|||
if( !selectedId || !(selectedId in borders) )
|
||||
return;
|
||||
$.ajax(getServer('hull'), {
|
||||
data: { 'name': encodeURIComponent(selectedId) },
|
||||
data: { 'name': selectedId },
|
||||
success: updateBorders
|
||||
});
|
||||
}
|
||||
|
@ -890,7 +890,7 @@ function bFixCrossPreview() {
|
|||
$.ajax(getServer('fixcrossing'), {
|
||||
data: {
|
||||
'preview': 1,
|
||||
'region': encodeURIComponent(crossSelected),
|
||||
'region': crossSelected,
|
||||
'ids': Object.keys(selectedCrossings).join(',')
|
||||
},
|
||||
success: bFixCrossDrawPreview
|
||||
|
@ -913,7 +913,7 @@ function bFixCrossDrawPreview(geojson) {
|
|||
function bFixCrossDo() {
|
||||
$.ajax(getServer('fixcrossing'), {
|
||||
data: {
|
||||
'region': encodeURIComponent(crossSelected),
|
||||
'region': crossSelected,
|
||||
'ids': Object.keys(selectedCrossings).join(',')
|
||||
},
|
||||
success: updateBorders
|
||||
|
|
Loading…
Add table
Reference in a new issue