mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-08 07:21:03 +08:00
Fix tags modal issue (#1856)
This commit is contained in:
parent
4e05d720e9
commit
68ebf13bca
3 changed files with 5 additions and 6 deletions
|
|
@ -109,8 +109,8 @@ function bindEditTagsAjax() {
|
|||
function initAddTagForm() {
|
||||
manageTagsModalBody.find('.add-tag-form')
|
||||
.submit(function() {
|
||||
var selectOptions = manageTagsModalBody.find('.add-tag-form .dropdown-menu li').length;
|
||||
if (selectOptions === 0) return false;
|
||||
var selectOptions = manageTagsModalBody.find('#new_my_module_tag .dropdown-menu li').length;
|
||||
if (selectOptions === 0 && this.id === 'new_my_module_tag') return false;
|
||||
return true;
|
||||
})
|
||||
.on('ajax:success', function(e, data) {
|
||||
|
|
|
|||
|
|
@ -450,8 +450,7 @@ function initRecentProtocols() {
|
|||
});
|
||||
});
|
||||
|
||||
// We use here ajax:success, because we want to check any change on this page
|
||||
$(document).on('ajax:success', () => {
|
||||
$('.protocol-description-content').on('ajax:success', () => {
|
||||
updateRecentProtocolsStatus();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -797,8 +797,8 @@ function bindEditTagsAjax(elements) {
|
|||
function initAddTagForm() {
|
||||
manageTagsModalBody.find(".add-tag-form")
|
||||
.submit(function() {
|
||||
var selectOptions = manageTagsModalBody.find('.add-tag-form .dropdown-menu li').length;
|
||||
if (selectOptions === 0) return false;
|
||||
var selectOptions = manageTagsModalBody.find('#new_my_module_tag .dropdown-menu li').length;
|
||||
if (selectOptions === 0 && this.id == 'new_my_module_tag') return false;
|
||||
return true;
|
||||
})
|
||||
.on("ajax:success", function (e, data) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue