From b9c74976361f849d5543b5c6826b704edab30143 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 5 Jun 2012 11:08:03 +0200 Subject: [PATCH] update to show the default icon --- .../search/PlaneteAudioSearch.wgs/index.html | 14 ++++++-------- .../search/PlaneteFlashSearch.wgs/index.html | 14 ++++++-------- .../library/search/PlaneteImgSearch.wgs/index.html | 14 ++++++-------- 3 files changed, 18 insertions(+), 24 deletions(-) diff --git a/resources/library/search/PlaneteAudioSearch.wgs/index.html b/resources/library/search/PlaneteAudioSearch.wgs/index.html index 618b1c17..4664c60e 100755 --- a/resources/library/search/PlaneteAudioSearch.wgs/index.html +++ b/resources/library/search/PlaneteAudioSearch.wgs/index.html @@ -71,21 +71,19 @@ // 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 - newImg.src = result.file; + if (thumbnails) { + newImg.src = result.file; + } 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)); - } else { - var imgWidth = (result.tbWidth > minWidth)?result.tbWidth:minWidth; - var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight; - imgContainer.width(imgWidth).height(imgHeight); - } - iUrl.attr("value", result.file); + iUrl.attr("value", result.file); iContent.attr("value", result.title); iHeight.attr("value", result.height); iWidth.attr("value", result.width); diff --git a/resources/library/search/PlaneteFlashSearch.wgs/index.html b/resources/library/search/PlaneteFlashSearch.wgs/index.html index bdb996d7..f55fc292 100755 --- a/resources/library/search/PlaneteFlashSearch.wgs/index.html +++ b/resources/library/search/PlaneteFlashSearch.wgs/index.html @@ -71,21 +71,19 @@ // 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 - newImg.src = result.file; + if (thumbnails) { + newImg.src = result.file; + } 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)); - } else { - var imgWidth = (result.tbWidth > minWidth)?result.tbWidth:minWidth; - var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight; - imgContainer.width(imgWidth).height(imgHeight); - } - iUrl.attr("value", result.file); + iUrl.attr("value", result.file); iContent.attr("value", result.title); iHeight.attr("value", result.height); iWidth.attr("value", result.width); diff --git a/resources/library/search/PlaneteImgSearch.wgs/index.html b/resources/library/search/PlaneteImgSearch.wgs/index.html index a772d7b1..a8cb5afb 100755 --- a/resources/library/search/PlaneteImgSearch.wgs/index.html +++ b/resources/library/search/PlaneteImgSearch.wgs/index.html @@ -71,21 +71,19 @@ // 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 - newImg.src = result.file; + if (thumbnails) { + newImg.src = result.file; + } 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)); - } else { - var imgWidth = (result.tbWidth > minWidth)?result.tbWidth:minWidth; - var imgHeight = (result.tbHeight > minHeight)?result.tbHeight:minHeight; - imgContainer.width(imgWidth).height(imgHeight); - } - iUrl.attr("value", result.file); + iUrl.attr("value", result.file); iContent.attr("value", result.title); iHeight.attr("value", result.height); iWidth.attr("value", result.width);