mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-28 15:15:34 +08:00
Fix dropdown render for columns manage modal
This commit is contained in:
parent
26bdabb0c3
commit
4fc37e12a0
2 changed files with 12 additions and 2 deletions
|
|
@ -163,7 +163,8 @@ var RepositoryColumns = (function() {
|
||||||
optionLabel: delimiterOptionsRender,
|
optionLabel: delimiterOptionsRender,
|
||||||
tagClass: 'delimiter-icon-dropdown',
|
tagClass: 'delimiter-icon-dropdown',
|
||||||
tagLabel: delimiterOptionsRender,
|
tagLabel: delimiterOptionsRender,
|
||||||
disableSearch: true
|
disableSearch: true,
|
||||||
|
labelHTML: true
|
||||||
};
|
};
|
||||||
$.get(modalUrl, (data) => {
|
$.get(modalUrl, (data) => {
|
||||||
$manageModal.find('.modal-content').html(data.html)
|
$manageModal.find('.modal-content').html(data.html)
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@
|
||||||
closeOnSelect: boolean, // Close dropdown after select
|
closeOnSelect: boolean, // Close dropdown after select
|
||||||
disableSearch: boolean, // Disable search
|
disableSearch: boolean, // Disable search
|
||||||
emptyOptionAjax: boolean, // Add empty option for ajax request
|
emptyOptionAjax: boolean, // Add empty option for ajax request
|
||||||
|
labelHTML: bolean, // render as HTMLelement or text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -635,7 +636,15 @@ var dropdownSelector = (function() {
|
||||||
</div>
|
</div>
|
||||||
<i class="fas fa-times ${selector.data('config').singleSelect ? 'hidden' : ''}"></i>
|
<i class="fas fa-times ${selector.data('config').singleSelect ? 'hidden' : ''}"></i>
|
||||||
</div>`).insertBefore(container.find('.input-field .search-field'));
|
</div>`).insertBefore(container.find('.input-field .search-field'));
|
||||||
|
|
||||||
|
console.log(selector.data('config').labelHTML);
|
||||||
|
|
||||||
|
if (selector.data('config').labelHTML) {
|
||||||
|
tag.find('.tag-label').html(label);
|
||||||
|
} else {
|
||||||
tag.find('.tag-label').text(label);
|
tag.find('.tag-label').text(label);
|
||||||
|
}
|
||||||
|
|
||||||
// Now we need add delete action to tag
|
// Now we need add delete action to tag
|
||||||
tag.find('.fa-times').click(function(e) {
|
tag.find('.fa-times').click(function(e) {
|
||||||
var tagLabel = $(this).prev();
|
var tagLabel = $(this).prev();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue