From 4ccf61a343c2437fb574bf00e4e3da5e48e17548 Mon Sep 17 00:00:00 2001
From: John Christopher Anderson ")
- .find("th").text(JSON.stringify(record)).end()
+ .find("th").text(JSON.stringify(resp)).end()
.appendTo("#records tbody.content");
- });
- $("#records tbody tr").removeClass("odd").filter(":odd").addClass("odd");
- $("#records tbody.footer td").text("Replication session " + resp.session_id);
+ $("#records tbody tr").removeClass("odd").filter(":odd").addClass("odd");
+ } else {
+ $.each(resp.history, function(idx, record) {
+ $(" ")
+ .find("th").text(JSON.stringify(record)).end()
+ .appendTo("#records tbody.content");
+ });
+ $("#records tbody tr").removeClass("odd").filter(":odd").addClass("odd");
+ $("#records tbody.footer td").text("Replication session " + resp.session_id);
+ }
}
- });
+ }, repOpts);
});
});
@@ -123,6 +134,7 @@ specific language governing permissions and limitations under the License.
+
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js index efd646a4..11d11d0d 100644 --- a/share/www/script/jquery.couch.js +++ b/share/www/script/jquery.couch.js @@ -547,11 +547,14 @@ ); }, - replicate: function(source, target, ajaxOptions, replicationOptions) { - replicationOptions = $.extend({source: source, target: target}, replicationOptions); + replicate: function(source, target, ajaxOptions, repOpts) { + $.extend(repOpts, {source: source, target: target}); + if (repOpts.continuous) { + ajaxOptions.successStatus = 202; + } ajax({ type: "POST", url: this.urlPrefix + "/_replicate", - data: JSON.stringify(replicationOptions), + data: JSON.stringify(repOpts), contentType: "application/json" }, ajaxOptions, -- cgit v1.2.3