ATLAS-4513 : Delete Term option appears even though there is no term to delete.

Signed-off-by: Pinal Shah <pinal.shah@freestoneinfotech.com>
This commit is contained in:
Farhan Khan 2022-02-14 19:53:35 +05:30 committed by Pinal Shah
parent 0847d6c371
commit 05b27be8b8
1 changed files with 6 additions and 1 deletions

View File

@ -76,6 +76,8 @@ define(['require',
},
onModalClose: function() {
that.ui.createGlossary.removeAttr("disabled");
that.ui.termTree.jstree(true).refresh();
that.ui.categoryTree.jstree(true).refresh();
}
})
};
@ -217,7 +219,7 @@ define(['require',
if (Utils.getUrlState.isGlossaryTab()) {
var obj = this.query[this.viewType],
$tree = this.ui[(this.viewType == "term" ? "termTree" : "categoryTree")];
obj["gId"] = that.value.gId; //this Property added, Because when we toggle the GlossaryViewButton it does not adds the gId which is required for selection.
obj["gId"] = that.value ? that.value.gId : null; //this Property added, Because when we toggle the GlossaryViewButton it does not adds the gId which is required for selection.
if (obj.guid) {
var node = $tree.jstree(true).get_node(obj.guid);
if (node) {
@ -769,6 +771,9 @@ define(['require',
});
},
complete: function() {
if (that.glossaryCollection.fullCollection.length === 0) {
that.guid = null;
}
that.notificationModal.hideButtonLoader();
that.notificationModal.remove();
}