fixed issue with xwiki widgets

preferencesAboutTextFull
Claudio Valerio 12 years ago
parent d4cb4b2b01
commit 3146be4c29
  1. 6
      resources/library/search/Image Planete.wgs/index.html
  2. 7
      src/gui/UBFeaturesWidget.cpp

@ -69,7 +69,7 @@
var iHeight = $("<input type='hidden'/>");
var iWidth = $("<input type='hidden'/>");
var iTitle = $("<input type='hidden'/>");
var iThumbnailUrl = $("<input type='hidden'/>");
// We use titleNoFormatting so that no HTML tags are left in the
// title
//title.innerHTML = result.title;
@ -96,12 +96,14 @@
iHeight.attr("value", result.height);
iWidth.attr("value", result.width);
iTitle.attr("value",result.title);
iThumbnailUrl.attr("value",newImg.src);
//imgContainer.append($(title));
imgContainer.append(iUrl);
imgContainer.append(iContent);
imgContainer.append(iHeight);
imgContainer.append(iWidth);
imgContainer.append(iTitle);
imgContainer.append(iThumbnailUrl);
// Put our title + image in the content
imgContainer.appendTo(contentDiv);
@ -252,6 +254,8 @@
parent.find("input:hidden").eq(3).val() +
"</value></data><data><key>Title</key><value>" +
parent.find("input:hidden").eq(4).val() +
"</value></data><data><key>thumbnailUrl</key><value>" +
parent.find("input:hidden").eq(5).val() +
"</value></data></metadata>";
return meta;
}

@ -236,7 +236,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
bool isLocal = QFileInfo(widgetsUrl).exists();
if (isLocal) {
QString strType = UBFileSystemUtils::mimeTypeFromFileName(widgetsUrl);
UBMimeType::Enum thumbType = UBFileSystemUtils::mimeTypeFromString(strType);
@ -259,7 +259,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
break;
}
} else if (!widgetsThumbsUrl.isNull()) {
if (!widgetsThumbsUrl.isNull()) {
previewImageUrl = ":/images/libpalette/loading.png";
if (!imageGatherer)
imageGatherer = new UBDownloadHttpFile(0, this);
@ -271,9 +271,8 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
}
QString tmp = QUrl::fromEncoded(metadata["Url"].toAscii()).toString();
qDebug() << tmp;
UBFeature feature( "/root", QImage(previewImageUrl), QString(), tmp/*metadata["Url"]*/, FEATURE_ITEM );
UBFeature feature( "/root", QImage(previewImageUrl), QString(), widgetsThumbsUrl, FEATURE_ITEM );
feature.setMetadata( metadata );
centralWidget->showElement(feature, UBFeaturesCentralWidget::FeaturePropertiesList);

Loading…
Cancel
Save