Commit 9475b2bf by Kálmán Viktor

dashboard: minor design fix for group search

parent c9d8c0ae
...@@ -350,9 +350,9 @@ $(function () { ...@@ -350,9 +350,9 @@ $(function () {
} }
} }
for(var i=0; i<5 && i<search_result.length; i++) for(var i=0; i<5 && i<search_result.length; i++)
html += generateGroupHTML(search_result[i].url, search_result[i].name); html += generateGroupHTML(search_result[i].url, search_result[i].name, search_result.length < 5);
if(search_result.length == 0) if(search_result.length == 0)
html += '<div class="list-group-item">No result</div>'; html += '<div class="list-group-item list-group-item-last">No result</div>';
$("#dashboard-group-list").html(html); $("#dashboard-group-list").html(html);
// if there is only one result and ENTER is pressed redirect // if there is only one result and ENTER is pressed redirect
...@@ -396,8 +396,8 @@ function generateVmHTML(pk, name, host, icon, _status, fav, is_last) { ...@@ -396,8 +396,8 @@ function generateVmHTML(pk, name, host, icon, _status, fav, is_last) {
'</a>'; '</a>';
} }
function generateGroupHTML(url, name) { function generateGroupHTML(url, name, is_last) {
return '<a href="' + url + '" class="list-group-item real-link">'+ return '<a href="' + url + '" class="list-group-item real-link' + (is_last ? " list-group-item-last" : "") +'">'+
'<i class="fa fa-users"></i> '+ name + '<i class="fa fa-users"></i> '+ name +
'</a>'; '</a>';
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment