Commit b9c74976 authored by Claudio Valerio's avatar Claudio Valerio

update to show the default icon

parent a788638a
......@@ -71,20 +71,18 @@
// We use titleNoFormatting so that no HTML tags are left in the
// title
title.innerHTML = result.title;
if (thumbnails) {
var newImg = document.createElement('img');
// There is also a result.file property which has the escaped version
if (thumbnails) {
newImg.src = result.file;
var imgWidth = (result.tbWidth > minWidth)?result.tbWidth:minWidth;
var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight;
imgContainer.width(imgWidth).height(imgHeight);
imgContainer.append($(newImg));
} else {
newImg.src = "./images/thumbnail_icon.png";
}
var imgWidth = (result.tbWidth > minWidth)?result.tbWidth:minWidth;
var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight;
imgContainer.width(imgWidth).height(imgHeight);
}
imgContainer.append($(newImg));
iUrl.attr("value", result.file);
iContent.attr("value", result.title);
iHeight.attr("value", result.height);
......
......@@ -71,20 +71,18 @@
// We use titleNoFormatting so that no HTML tags are left in the
// title
title.innerHTML = result.title;
if (thumbnails) {
var newImg = document.createElement('img');
// There is also a result.file property which has the escaped version
if (thumbnails) {
newImg.src = result.file;
var imgWidth = (result.tbWidth > minWidth)?result.tbWidth:minWidth;
var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight;
imgContainer.width(imgWidth).height(imgHeight);
imgContainer.append($(newImg));
} else {
newImg.src = "./images/thumbnail_icon.png";
}
var imgWidth = (result.tbWidth > minWidth)?result.tbWidth:minWidth;
var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight;
imgContainer.width(imgWidth).height(imgHeight);
}
imgContainer.append($(newImg));
iUrl.attr("value", result.file);
iContent.attr("value", result.title);
iHeight.attr("value", result.height);
......
......@@ -71,20 +71,18 @@
// We use titleNoFormatting so that no HTML tags are left in the
// title
title.innerHTML = result.title;
if (thumbnails) {
var newImg = document.createElement('img');
// There is also a result.file property which has the escaped version
if (thumbnails) {
newImg.src = result.file;
var imgWidth = (result.tbWidth > minWidth)?result.tbWidth:minWidth;
var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight;
imgContainer.width(imgWidth).height(imgHeight);
imgContainer.append($(newImg));
} else {
newImg.src = "./images/thumbnail_icon.png";
}
var imgWidth = (result.tbWidth > minWidth)?result.tbWidth:minWidth;
var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight;
imgContainer.width(imgWidth).height(imgHeight);
}
imgContainer.append($(newImg));
iUrl.attr("value", result.file);
iContent.attr("value", result.title);
iHeight.attr("value", result.height);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment