- var changesets = [];
- $("[data-changeset]").each(function () {
- var changeset = $(this).data('changeset');
- if (changeset.bbox) {
- changeset.bounds = L.latLngBounds([changeset.bbox.minlat, changeset.bbox.minlon],
- [changeset.bbox.maxlat, changeset.bbox.maxlon]);
- changesets.push(changeset);
+ $.ajax({
+ url: url,
+ type: method,
+ oauth: true,
+ data: data,
+ success: function () {
+ OSM.loadSidebarContent(window.location.pathname, page.load);
+ },
+ error: function (xhr, xhr_status, http_status) {
+ $(form).find("#comment-error").text(http_status);
+ $(form).find("#comment-error").prop("hidden", false);
+ $(form).find("input[type=submit]").prop("disabled", false);