Fix css issues in manage tags modal [SCI-9168] (#6208)

This commit is contained in:
wandji 2023-09-13 14:00:04 +01:00 committed by GitHub
parent 110e2ced6c
commit e0ed027211
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 13 deletions

View file

@ -51,16 +51,17 @@
editDiv.find('input[type=text]').val(li.data('name'));
editDiv.find('.edit-tag-color').colorselector('setColor', li.data('color'));
editDiv.find('.dropdown-colorselector > .dropdown-menu li a')
.on('click', function() {
// Change background of the <li>
const colorSelector = $(this);
const colorItem = colorSelector.parents('li.list-group-item');
colorItem.css('background-color', colorSelector.data('value'));
});
li.find('div.tag-show').hide();
editDiv.show();
});
manageTagsModalBody.find('div.tag-edit .dropdown-colorselector > .dropdown-menu li a')
.on('click', function() {
// Change background of the <li>
var $this = $(this);
var li = $this.parents('li.list-group-item');
li.css('background-color', $this.data('value'));
});
manageTagsModalBody.find('.remove-tag-link')
.on('ajax:success', function(e, data) {
dropdownSelector.removeValue('#module-tags-selector', this.dataset.tagId, '', true);
@ -144,7 +145,7 @@
manageTagsModalBody.html('');
});
// initialize my_module tab remote loading
$('#experimentTable, .my-modules-protocols-index')
$('#experimentTable, .my-modules-protocols-index, #experiment-canvas')
.on('ajax:before', '.edit-tags-link', function() {
manageTagsModal.modal('show');
})

View file

@ -418,11 +418,6 @@
.dropdown-menu {
outline: none;
li > a:hover,
li > a:focus {
background-color: $color-concrete;
}
}
}

View file

@ -66,6 +66,7 @@
<!-- Manage tags modal -->
<%= render partial: "my_modules/modals/manage_module_tags_modal", locals: { my_module: nil } %>
<%= javascript_include_tag("my_modules/tags") %>
<!-- Initialize dropdown actions -->
<%= javascript_include_tag("experiments/dropdown_actions") %>