Skip to content
Snippets Groups Projects
Commit c3805d4d authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fix alignment of expand items in global search, fixes #4617

Closes #4617

Merge request studip/studip!3430
parent 0f9838ce
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,10 @@ const GlobalSearch = {
// Process results and create corresponding entries.
$.each(value.content, function(index, result) {
// Which result types should be opened via dialog?
const openInDialog = ['GlobalSearchFiles', 'GlobalSearchMessages'];
var dataDialog = (openInDialog.indexOf(name) >= 0 ? dataDialog = 'data-dialog' : dataDialog = '');
// Create single result entry.
var single = $(`<a href="${result.url}" role="listitem" ${dataDialog}>`),
data = $('<div class="globalsearch-result-data">'),
......@@ -105,11 +109,6 @@ const GlobalSearch = {
single.addClass('globalsearch-extended-result');
}
// Which result types should be opened via dialog?
const openInDialog = ['GlobalSearchFiles', 'GlobalSearchMessages'];
var dataDialog = (openInDialog.indexOf(name) >= 0 ? dataDialog = 'data-dialog' : dataDialog = '');
//var link = $(`<a href="${result.url}" ${dataDialog}>`).appendTo(single);
// Optional image...
if (result.img !== null) {
$(`<img src="${result.img}" alt="">`)
......
......@@ -175,6 +175,7 @@
display: flex;
flex-direction: row;
flex-wrap: nowrap;
gap: 6px;
padding: 6px 6px 6px 0;
......@@ -200,7 +201,6 @@
.globalsearch-result-img {
flex: 0;
margin-left: 6px;
margin-right: 6px;
img {
@include square(36px);
......@@ -210,7 +210,6 @@
.globalsearch-result-data {
flex: 1;
overflow: hidden;
margin-right: 6px;
white-space: nowrap;
.globalsearch-result-title {
......@@ -235,7 +234,7 @@
}
.globalsearch-result-expand {
flex: auto;
flex: 0;
margin: 20px 0 0 -32px;
a {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment