mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-04 02:45:53 +08:00
Fix css issues in manage tags modal [SCI-9168] (#6208)
This commit is contained in:
parent
110e2ced6c
commit
e0ed027211
3 changed files with 10 additions and 13 deletions
|
@ -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');
|
||||
})
|
||||
|
|
|
@ -418,11 +418,6 @@
|
|||
|
||||
.dropdown-menu {
|
||||
outline: none;
|
||||
|
||||
li > a:hover,
|
||||
li > a:focus {
|
||||
background-color: $color-concrete;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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") %>
|
||||
|
|
Loading…
Add table
Reference in a new issue