mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-20 14:45:56 +08:00
fixes bug with repository items dropdown [fixes SCI-2434]
This commit is contained in:
parent
acd6efae57
commit
256e502982
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -43,3 +43,16 @@
|
|||
margin-left: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.repository-dropdown {
|
||||
max-width: 174px;
|
||||
width: 174px;
|
||||
|
||||
.dropdown-menu.open {
|
||||
width: 174px;
|
||||
|
||||
.selected > a {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue