Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dariah
search-commons-webresources
Commits
64d20b26
Commit
64d20b26
authored
May 04, 2019
by
Gradl, Tobias
Browse files
1289: Finalize initial version of item view
Task-Url:
https://pm.winseda.de/issues/1289
parent
01197d81
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/item/item.js
View file @
64d20b26
...
...
@@ -14,6 +14,10 @@ var ResultItem = function(options) {
},
options
);
this
.
resize
();
this
.
modelId
=
$
(
"
#modelId
"
).
val
();
this
.
itemId
=
$
(
"
#itemId
"
).
val
();
$
(
'
.venobox
'
).
venobox
();
};
...
...
@@ -32,4 +36,28 @@ ResultItem.prototype.resize = function() {
$
(
"
#carousel-item-images
"
).
css
(
"
width
"
,
innerWidth
+
"
px
"
);
$
(
"
.item-image
"
).
css
(
"
height
"
,
innerWidth
+
"
px
"
);
$
(
"
.item-image
"
).
css
(
"
width
"
,
innerWidth
+
"
px
"
);
};
\ No newline at end of file
};
ResultItem
.
prototype
.
loadOriginalData
=
function
(
button
)
{
this
.
loadData
(
"
original
"
,
"
#item-detail-dataset-container
"
,
"
#item-detail-dataset
"
,
button
);
};
ResultItem
.
prototype
.
loadIntegratedData
=
function
(
button
)
{
this
.
loadData
(
"
integrations
"
,
"
#item-detail-integrated-container
"
,
"
#item-detail-integrated
"
,
button
);
};
ResultItem
.
prototype
.
loadData
=
function
(
dataType
,
containerSelector
,
contentSelector
,
button
)
{
$
.
ajax
({
url
:
__util
.
getBaseUrl
()
+
"
item/
"
+
this
.
modelId
+
"
/
"
+
this
.
itemId
+
"
/data?type=
"
+
dataType
,
type
:
"
GET
"
,
dataType
:
"
html
"
,
success
:
function
(
data
,
textStatus
,
jqXHR
)
{
$
(
button
).
hide
();
$
(
containerSelector
).
addClass
(
"
show
"
);
$
(
contentSelector
).
html
(
data
);
},
error
:
__util
.
processServerError
});
};
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