Skip to content

Commit

Permalink
Style fixes for name dropdown. Closes #281.
Browse files Browse the repository at this point in the history
  • Loading branch information
impworks committed Feb 4, 2024
1 parent 5adfd22 commit c65f249
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Bonsai/Areas/Admin/Scripts/page-editor-autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@

function renderElem(idx) {
var isActive = idx === resultIdx;
var text = results[idx].title;
var elem = results[idx];

var $elem = $('<div>').addClass('eac-popup-item clickable')
.text(text);
var $elem = $('<div>').addClass('eac-popup-item clickable');
if(elem.mainPhotoPath)
$elem.append($('<img>').prop('src', elem.mainPhotoPath).addClass('eac-popup-icon'));
$elem.append($('<span>').text(elem.title));

if (isActive)
$elem.addClass('active');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
position: absolute;
border: 1px #d4d4d4 solid;
border-radius: 4px;
background: #ffffff;
z-index: 100;

.eac-popup-item {
Expand All @@ -18,6 +19,12 @@
&:not(:last-child) {
border-bottom: 1px #aaa solid;
}

.eac-popup-icon {
width: 24px;
height: 24px;
margin-right: 8px;
}
}

.eac-popup-empty {
Expand Down

0 comments on commit c65f249

Please sign in to comment.