mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-10 08:21:37 +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() {
|
function initAddTagForm() {
|
||||||
manageTagsModalBody.find('.add-tag-form')
|
manageTagsModalBody.find('.add-tag-form')
|
||||||
.submit(function() {
|
.submit(function() {
|
||||||
var selectOptions = manageTagsModalBody.find('.add-tag-form .dropdown-menu li').length;
|
var selectOptions = manageTagsModalBody.find('#new_my_module_tag .dropdown-menu li').length;
|
||||||
if (selectOptions === 0) return false;
|
if (selectOptions === 0 && this.id === 'new_my_module_tag') return false;
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.on('ajax:success', function(e, data) {
|
.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
|
$('.protocol-description-content').on('ajax:success', () => {
|
||||||
$(document).on('ajax:success', () => {
|
|
||||||
updateRecentProtocolsStatus();
|
updateRecentProtocolsStatus();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -797,8 +797,8 @@ function bindEditTagsAjax(elements) {
|
||||||
function initAddTagForm() {
|
function initAddTagForm() {
|
||||||
manageTagsModalBody.find(".add-tag-form")
|
manageTagsModalBody.find(".add-tag-form")
|
||||||
.submit(function() {
|
.submit(function() {
|
||||||
var selectOptions = manageTagsModalBody.find('.add-tag-form .dropdown-menu li').length;
|
var selectOptions = manageTagsModalBody.find('#new_my_module_tag .dropdown-menu li').length;
|
||||||
if (selectOptions === 0) return false;
|
if (selectOptions === 0 && this.id == 'new_my_module_tag') return false;
|
||||||
return true;
|
return true;
|
||||||
})
|
})
|
||||||
.on("ajax:success", function (e, data) {
|
.on("ajax:success", function (e, data) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue