ATLAS-2767: UI : "Create" button is not enabled after an error while createing a classification
Signed-off-by: Madhan Neethiraj <madhan@apache.org>
diff --git a/dashboardv2/public/js/views/tag/TagAttributeItemView.js b/dashboardv2/public/js/views/tag/TagAttributeItemView.js
index 3ce40e2..39ea292 100644
--- a/dashboardv2/public/js/views/tag/TagAttributeItemView.js
+++ b/dashboardv2/public/js/views/tag/TagAttributeItemView.js
@@ -65,9 +65,13 @@
});
},
onCloseButton: function() {
+ var tagName = this.parentView.$el.find('[data-id="tagName"]').val();
if (this.parentView.collection.models.length > 0) {
this.model.destroy();
}
+ if (this.parentView.collection.models.length == 0 && tagName != "") {
+ this.parentView.$el.parent().next().find('button.ok').removeAttr("disabled");
+ }
}
});
});
\ No newline at end of file
diff --git a/dashboardv2/public/js/views/tag/TagLayoutView.js b/dashboardv2/public/js/views/tag/TagLayoutView.js
index c7a5edb..7381e64 100644
--- a/dashboardv2/public/js/views/tag/TagLayoutView.js
+++ b/dashboardv2/public/js/views/tag/TagLayoutView.js
@@ -209,7 +209,7 @@
var tagParents = '',
tagLists = '';
- if (this.collection && this.collection.fullCollection.length) {
+ if (this.collection && this.collection.fullCollection.length >= 0) {
var sortedCollection = this.collection.fullCollection;
this.tagTreeList = this.getTagTreeList({ collection: sortedCollection });
if (searchString) {