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 = { ...@@ -96,6 +96,10 @@ const GlobalSearch = {
// Process results and create corresponding entries. // Process results and create corresponding entries.
$.each(value.content, function(index, result) { $.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. // Create single result entry.
var single = $(`<a href="${result.url}" role="listitem" ${dataDialog}>`), var single = $(`<a href="${result.url}" role="listitem" ${dataDialog}>`),
data = $('<div class="globalsearch-result-data">'), data = $('<div class="globalsearch-result-data">'),
...@@ -105,11 +109,6 @@ const GlobalSearch = { ...@@ -105,11 +109,6 @@ const GlobalSearch = {
single.addClass('globalsearch-extended-result'); 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... // Optional image...
if (result.img !== null) { if (result.img !== null) {
$(`<img src="${result.img}" alt="">`) $(`<img src="${result.img}" alt="">`)
......
...@@ -175,6 +175,7 @@ ...@@ -175,6 +175,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: nowrap; flex-wrap: nowrap;
gap: 6px;
padding: 6px 6px 6px 0; padding: 6px 6px 6px 0;
...@@ -200,7 +201,6 @@ ...@@ -200,7 +201,6 @@
.globalsearch-result-img { .globalsearch-result-img {
flex: 0; flex: 0;
margin-left: 6px; margin-left: 6px;
margin-right: 6px;
img { img {
@include square(36px); @include square(36px);
...@@ -210,7 +210,6 @@ ...@@ -210,7 +210,6 @@
.globalsearch-result-data { .globalsearch-result-data {
flex: 1; flex: 1;
overflow: hidden; overflow: hidden;
margin-right: 6px;
white-space: nowrap; white-space: nowrap;
.globalsearch-result-title { .globalsearch-result-title {
...@@ -235,7 +234,7 @@ ...@@ -235,7 +234,7 @@
} }
.globalsearch-result-expand { .globalsearch-result-expand {
flex: auto; flex: 0;
margin: 20px 0 0 -32px; margin: 20px 0 0 -32px;
a { a {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment