fixes bug with repository items dropdown [fixes SCI-2434]

This commit is contained in:
zmagod 2018-06-11 14:57:27 +02:00
parent acd6efae57
commit 256e502982
2 changed files with 17 additions and 3 deletions

View file

@ -928,9 +928,9 @@ var RepositoryDatatable = (function(global) {
// Helper functions
function _listItemDropdown(options, current_value, column_id) {
var html = '<select class="form-control selectpicker" ';
var html = '<select class="form-control selectpicker repository-dropdown" ';
html += 'data-abs-min-length="2" data-live-search="true" ';
html += 'column_id="' + column_id +'">';
html += 'data-container="body" column_id="' + column_id +'">';
html += '<option value="-1"></option>';
$.each(options, function(index, value) {
var selected = (current_value === value[1]) ? 'selected' : '';
@ -955,7 +955,8 @@ var RepositoryDatatable = (function(global) {
}).done(function(data) {
$.each(data.list_items, function(index, el) {
massage_response.push([el.id, el.data]);
})
});
TABLE.columns.adjust();
});
return _listItemDropdown(massage_response, '-1', column_id);
}

View file

@ -43,3 +43,16 @@
margin-left: 5px;
}
}
.repository-dropdown {
max-width: 174px;
width: 174px;
.dropdown-menu.open {
width: 174px;
.selected > a {
display: inline-block;
}
}
}