Minor JS cleanups

Change-Id: I2d0628a3438ad6298e6c119ff7bd89e954871533
This commit is contained in:
Brad Fitzpatrick 2012-12-11 18:36:34 -05:00
parent 2347f4b2c2
commit 5905638de3
1 changed files with 5 additions and 11 deletions

View File

@ -22,7 +22,7 @@ function getBlobParam() {
function blobInfoUpdate(bmap) {
var blobmeta = document.getElementById('blobmeta');
var bd = document.getElementById("blobdownload")
var bd = document.getElementById("blobdownload");
bd.innerHTML = "";
var blobref = getBlobParam();
if (!blobref) {
@ -36,9 +36,7 @@ function blobInfoUpdate(bmap) {
}
blobmeta.innerHTML = JSON.stringify(binfo, null, 2);
if (binfo.camliType || (binfo.type && binfo.type.indexOf("text/") == 0)) {
camliGetBlobContents(
blobref,
{
camliGetBlobContents(blobref, {
success: function(data) {
document.getElementById("blobdata").innerHTML = linkifyBlobRefs(data);
var bb = document.getElementById('blobbrowse');
@ -77,16 +75,14 @@ function blobInfoUpdate(bmap) {
var claims = document.getElementById("claimsdiv");
claims.style.visibility = "";
camliGetPermanodeClaims(
blobref,
{
camliGetPermanodeClaims(blobref, {
success: function(data) {
document.getElementById("claims").innerHTML = linkifyBlobRefs(JSON.stringify(data, null, 2));
},
fail: function(msg) {
alert(msg);
}
});
});
}
}
@ -101,9 +97,7 @@ function blobInfoOnLoad() {
var blobdescribe = document.getElementById('blobdescribe');
blobdescribe.innerHTML = "<a href='" + camliDescribeBlogURL(blobref) + "'>describe</a>";
camliDescribeBlob(
blobref,
{
camliDescribeBlob(blobref, {
success: blobInfoUpdate,
fail: function(msg) {
alert("Error describing blob " + blobref + ": " + msg);