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
9d08de5c
Commit
9d08de5c
authored
Feb 14, 2018
by
Gradl, Tobias
Browse files
977: Limit queries to custom search to predefined datamodel
Task-Url:
https://pm.winseda.de/issues/977
parent
1051e15a
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/customSearch/list.js
View file @
9d08de5c
...
...
@@ -86,7 +86,7 @@ CustomSearchEditor.prototype.showCustomSearches = function(data) {
element += '<span class="glyphicon glyphicon-eye-close" title="' + __translator.translate("~eu.dariah.de.minfba.search.view.custom_search.view.info.not_shared") + '"><input type="hidden" class="user-collection-shared" value="false" /></span> ';
}*/
if
(
uc
.
brandedSearch
Active
)
{
if
(
uc
.
brandedSearch
)
{
element
+=
'
<span class="glyphicon glyphicon-globe"></span>
'
;
}
...
...
@@ -189,8 +189,28 @@ CustomSearchEditor.prototype.refreshDetails = function() {
success
:
function
(
data
)
{
$
(
"
#user-collection-detail-name
"
).
text
(
data
.
name
);
$
(
"
#user-collection-detail-description
"
).
text
(
data
.
description
);
$
(
"
#user-collection-detail-is_branded
"
).
html
(
data
.
brandedSearchActive
?
"
<span class=
\"
glyphicon glyphicon-ok
\"
aria-hidden=
\"
true
\"
></span>
"
:
"
<span class=
\"
glyphicon glyphicon-remove
\"
aria-hidden=
\"
true
\"
></span>
"
);
$
(
"
#user-collection-detail-uri_prefix
"
).
text
(
data
.
uriPrefix
);
$
(
"
#user-collection-detail-is_branded
"
).
html
(
data
.
brandedSearch
?
"
<span class=
\"
glyphicon glyphicon-ok
\"
aria-hidden=
\"
true
\"
></span>
"
:
"
<span class=
\"
glyphicon glyphicon-remove
\"
aria-hidden=
\"
true
\"
></span>
"
);
if
(
data
.
url
!==
null
&&
data
.
url
!==
undefined
&&
data
.
url
!==
""
)
{
var
url
=
location
.
protocol
+
"
//
"
+
data
.
url
;
$
(
"
#user-collection-detail-uri_prefix
"
).
html
(
data
.
prefix
+
"
(
"
+
"
<a href='
"
+
url
+
"
' target='_blank'>
"
+
"
<i class='fa fa-external-link' aria-hidden='true'></i>
"
+
url
+
"
</a>
"
+
"
)
"
);
}
else
{
$
(
"
#user-collection-detail-uri_prefix
"
).
text
(
data
.
prefix
);
}
if
(
data
.
datamodelName
!==
undefined
&&
data
.
datamodelName
!==
null
&&
data
.
datamodelName
!==
""
)
{
$
(
"
#user-collection-detail-datamodel
"
).
text
(
data
.
datamodelName
+
"
(
"
+
data
.
datamodelId
+
"
)
"
);
}
else
{
$
(
"
#user-collection-detail-datamodel
"
).
text
(
data
.
datamodelId
);
}
$
(
"
#user-collection-detail-dark_color
"
).
text
(
data
.
darkThemeColor
);
$
(
"
#user-collection-detail-light_color
"
).
text
(
data
.
lightThemeColor
);
$
(
"
#user-collection-detail-contrast_color
"
).
text
(
data
.
contrastThemeColor
);
...
...
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