From dd5e72cb27d47a957938bd281c69359a1cf7c5e2 Mon Sep 17 00:00:00 2001 From: Brett Slatkin Date: Sun, 23 Dec 2012 15:25:39 -0800 Subject: [PATCH] newui: BlobItemContainer can show results from ServerConnection recent blobs Change-Id: I9784dc6462309a08fe7cb0a6ff8fe9283f9967ef --- .../camlistored/newui/blob_item_container.js | 9 +- .../newui/blob_item_container_test.html | 111 +++++++++++++----- 2 files changed, 88 insertions(+), 32 deletions(-) diff --git a/server/camlistored/newui/blob_item_container.js b/server/camlistored/newui/blob_item_container.js index 706889633..44b9bf5ff 100644 --- a/server/camlistored/newui/blob_item_container.js +++ b/server/camlistored/newui/blob_item_container.js @@ -112,6 +112,11 @@ camlistore.BlobItemContainer.prototype.showRecent_ = function() { * @param {Object} result JSON response to this request. */ camlistore.BlobItemContainer.prototype.showRecentDone_ = function(result) { - console.log('Done getting blobs'); - console.log(result); + this.removeChildren(true); + + for (var i = 0, n = result.recent.length; i < n; i++) { + var blobRef = result.recent[i].blobref; + var item = new camlistore.BlobItem(blobRef, result); + this.addChild(item, true); + } }; diff --git a/server/camlistored/newui/blob_item_container_test.html b/server/camlistored/newui/blob_item_container_test.html index 26366a97c..0dc258e8c 100644 --- a/server/camlistored/newui/blob_item_container_test.html +++ b/server/camlistored/newui/blob_item_container_test.html @@ -13,32 +13,90 @@