Merge "use thumbnail in blobinfo"

This commit is contained in:
Brad Fitzpatrick 2011-06-17 07:31:56 -07:00 committed by Gerrit Code Review
commit 2520fc8eec
1 changed files with 7 additions and 2 deletions

View File

@ -47,8 +47,13 @@ function blobInfoUpdate(bmap) {
bd.innerHTML = "<a href=''></a>"; bd.innerHTML = "<a href=''></a>";
var fileName = finfo.fileName || blobref; var fileName = finfo.fileName || blobref;
bd.firstChild.href = "./download/" + blobref + "/" + fileName; bd.firstChild.href = "./download/" + blobref + "/" + fileName;
if (binfo.file.mimeType.indexOf("image/") == 0) {
img = "<img src='./thumbnail/" + blobref + "/" + fileName + "?mw=100&mh=100'/>";
bd.firstChild.innerHTML = img;
} else {
bd.firstChild.innerText = fileName; bd.firstChild.innerText = fileName;
bd.innerHTML = "[download: " + bd.innerHTML + "]"; bd.innerHTML = "[download: " + bd.innerHTML + "]";
}
} catch (x) { } catch (x) {
} }
} }