Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
3146be4c
Commit
3146be4c
authored
Oct 10, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue with xwiki widgets
parent
d4cb4b2b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
173 additions
and
170 deletions
+173
-170
index.html
resources/library/search/Image Planete.wgs/index.html
+5
-1
UBFeaturesWidget.cpp
src/gui/UBFeaturesWidget.cpp
+168
-169
No files found.
resources/library/search/Image Planete.wgs/index.html
View file @
3146be4c
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
var
iHeight
=
$
(
"<input type='hidden'/>"
);
var
iHeight
=
$
(
"<input type='hidden'/>"
);
var
iWidth
=
$
(
"<input type='hidden'/>"
);
var
iWidth
=
$
(
"<input type='hidden'/>"
);
var
iTitle
=
$
(
"<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
// We use titleNoFormatting so that no HTML tags are left in the
// title
// title
//title.innerHTML = result.title;
//title.innerHTML = result.title;
...
@@ -96,12 +96,14 @@
...
@@ -96,12 +96,14 @@
iHeight
.
attr
(
"value"
,
result
.
height
);
iHeight
.
attr
(
"value"
,
result
.
height
);
iWidth
.
attr
(
"value"
,
result
.
width
);
iWidth
.
attr
(
"value"
,
result
.
width
);
iTitle
.
attr
(
"value"
,
result
.
title
);
iTitle
.
attr
(
"value"
,
result
.
title
);
iThumbnailUrl
.
attr
(
"value"
,
newImg
.
src
);
//imgContainer.append($(title));
//imgContainer.append($(title));
imgContainer
.
append
(
iUrl
);
imgContainer
.
append
(
iUrl
);
imgContainer
.
append
(
iContent
);
imgContainer
.
append
(
iContent
);
imgContainer
.
append
(
iHeight
);
imgContainer
.
append
(
iHeight
);
imgContainer
.
append
(
iWidth
);
imgContainer
.
append
(
iWidth
);
imgContainer
.
append
(
iTitle
);
imgContainer
.
append
(
iTitle
);
imgContainer
.
append
(
iThumbnailUrl
);
// Put our title + image in the content
// Put our title + image in the content
imgContainer
.
appendTo
(
contentDiv
);
imgContainer
.
appendTo
(
contentDiv
);
...
@@ -252,6 +254,8 @@
...
@@ -252,6 +254,8 @@
parent
.
find
(
"input:hidden"
).
eq
(
3
).
val
()
+
parent
.
find
(
"input:hidden"
).
eq
(
3
).
val
()
+
"</value></data><data><key>Title</key><value>"
+
"</value></data><data><key>Title</key><value>"
+
parent
.
find
(
"input:hidden"
).
eq
(
4
).
val
()
+
parent
.
find
(
"input:hidden"
).
eq
(
4
).
val
()
+
"</value></data><data><key>thumbnailUrl</key><value>"
+
parent
.
find
(
"input:hidden"
).
eq
(
5
).
val
()
+
"</value></data></metadata>"
;
"</value></data></metadata>"
;
return
meta
;
return
meta
;
}
}
...
...
src/gui/UBFeaturesWidget.cpp
View file @
3146be4c
...
@@ -236,7 +236,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
...
@@ -236,7 +236,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
bool
isLocal
=
QFileInfo
(
widgetsUrl
).
exists
();
bool
isLocal
=
QFileInfo
(
widgetsUrl
).
exists
();
if
(
isLocal
)
{
QString
strType
=
UBFileSystemUtils
::
mimeTypeFromFileName
(
widgetsUrl
);
QString
strType
=
UBFileSystemUtils
::
mimeTypeFromFileName
(
widgetsUrl
);
UBMimeType
::
Enum
thumbType
=
UBFileSystemUtils
::
mimeTypeFromString
(
strType
);
UBMimeType
::
Enum
thumbType
=
UBFileSystemUtils
::
mimeTypeFromString
(
strType
);
...
@@ -259,7 +259,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
...
@@ -259,7 +259,7 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
break
;
break
;
}
}
}
else
if
(
!
widgetsThumbsUrl
.
isNull
())
{
if
(
!
widgetsThumbsUrl
.
isNull
())
{
previewImageUrl
=
":/images/libpalette/loading.png"
;
previewImageUrl
=
":/images/libpalette/loading.png"
;
if
(
!
imageGatherer
)
if
(
!
imageGatherer
)
imageGatherer
=
new
UBDownloadHttpFile
(
0
,
this
);
imageGatherer
=
new
UBDownloadHttpFile
(
0
,
this
);
...
@@ -271,9 +271,8 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
...
@@ -271,9 +271,8 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata )
}
}
QString
tmp
=
QUrl
::
fromEncoded
(
metadata
[
"Url"
].
toAscii
()).
toString
();
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
);
feature
.
setMetadata
(
metadata
);
centralWidget
->
showElement
(
feature
,
UBFeaturesCentralWidget
::
FeaturePropertiesList
);
centralWidget
->
showElement
(
feature
,
UBFeaturesCentralWidget
::
FeaturePropertiesList
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment