Commit d0147981 by kevalbhatt

ATLAS-3697:- [Business Metadata] Incorrect values populated in Entity details >…

ATLAS-3697:- [Business Metadata] Incorrect values populated in Entity details > Business Metatdata attribute values, after encountering an error previously
parent c06221ae
......@@ -100,8 +100,16 @@ label {
font-weight: 600;
}
button:focus {
outline: none !important;
button {
&:focus {
outline: none !important;
}
&[disabled] {
.fa {
opacity: .65;
}
}
}
.btn {
......
......@@ -79,7 +79,10 @@ define(['require',
}
})
};
events["click " + this.ui.refreshGlossary] = 'getGlossary';
events["click " + this.ui.refreshGlossary] = function() {
this.ui.refreshGlossary.attr("disabled", true);
this.getGlossary();
};
events["click " + this.ui.importGlossary] = 'onClickImportGlossary';
events["keyup " + this.ui.searchTerm] = function() {
this.ui.termTree.jstree("search", this.ui.searchTerm.val());
......@@ -113,6 +116,7 @@ define(['require',
this.generateTree();
this.setValues();
this.changeLoaderState(false);
this.ui.refreshGlossary.attr("disabled", false);
}, this);
this.listenTo(this.glossaryCollection, "update:details", function(options) {
var isGlossaryUpdate = options.isGlossaryUpdate;
......
......@@ -113,6 +113,7 @@ define(['require',
},
fetchCollections: function() {
this.changeLoaderState(true);
this.ui.refreshTag.attr("disabled", true);
this.collection.fetch({ reset: true });
this.ui.offLineSearchTag.val("");
},
......@@ -245,6 +246,7 @@ define(['require',
}
this.changeLoaderState(false);
this.ui.refreshTag.attr("disabled", false);
},
getTagTreeList: function(options) {
var that = this,
......
......@@ -107,8 +107,16 @@ label {
font-weight: 600;
}
button:focus {
outline: none !important;
button {
&:focus {
outline: none !important;
}
&[disabled] {
.fa {
opacity: .65;
}
}
}
.btn {
......
......@@ -180,7 +180,7 @@ define(['require',
} else if (typeName.indexOf("date") > -1) {
returnEL = '<' + (isMultiValued ? "textarea" : "input") + ' type="text" data-key="' + key + '" data-businessMetadata="' + businessMetadata + '" data-typename="' + typeName + '"data-multi="' + isMultiValued + '" data-type="date" class="form-control" ' + (isMultiValued === false && !_.isUndefinedNull(val) ? 'value="' + val + '"' : "") + '>' + (isMultiValued === true && !_.isUndefinedNull(val) ? val : "") + (isMultiValued ? "</textarea>" : "");
setTimeout(function() {
var dateObj = { "singleDatePicker": true, autoUpdateInput: isMultiValued ? false : true },
var dateObj = { singleDatePicker: true, showDropdowns: true, autoUpdateInput: isMultiValued ? false : true },
dateEl = that.$el.find('[data-type="date"][data-key="' + key + '"]').daterangepicker(dateObj);
if (isMultiValued) {
dateEl.on("apply.daterangepicker", function(ev, picker) {
......
......@@ -83,7 +83,7 @@ define([
},
updateToActualData: function(options) {
var silent = options && options.silent || false;
this.collection.reset(this.actualCollection.toJSON(), { silent: silent });
this.collection.reset($.extend(true, [], this.actualCollection.toJSON()), { silent: silent });
},
onAddBusinessMetadata: function() {
this.ui.addBusinessMetadata.hide();
......
......@@ -56,6 +56,7 @@ define([
// refresh individual tree
events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true);
that.ui.refreshTree.attr("disabled", true).tooltip("hide");
e.stopPropagation();
that.refresh();
};
......@@ -200,6 +201,7 @@ define([
that.businessMetadataDefCollection.fullCollection.sort({ silent: true });
that.ui.businessMetadataSearchTree.jstree(true).refresh();
that.changeLoaderState(false);
that.ui.refreshTree.attr("disabled", false);
}
});
},
......
......@@ -66,6 +66,7 @@ define([
that = this;
events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true);
that.ui.refreshTree.attr("disabled", true).tooltip("hide");
var type = $(e.currentTarget).data("type");
e.stopPropagation();
that.refresh({ type: type });
......@@ -380,6 +381,7 @@ define([
that.classificationTreeUpdate = true
that.ui.classificationSearchTree.jstree(true).refresh();
that.changeLoaderState(false);
that.ui.refreshTree.attr("disabled", false);
}
};
this.classificationDefCollection.fetch({
......
......@@ -57,6 +57,7 @@ define([
that = this;
events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true);
that.ui.refreshTree.attr("disabled", true).tooltip("hide");
var type = $(e.currentTarget).data("type");
e.stopPropagation();
that.refreshCustomFilterTree();
......@@ -190,6 +191,7 @@ define([
that.saveSearchBaiscCollection.fullCollection.reset(_.where(data, { searchType: "BASIC" }));
that.saveSearchAdvanceCollection.fullCollection.reset(_.where(data, { searchType: "ADVANCED" }));
that.changeLoaderState(false);
that.ui.refreshTree.attr("disabled", false);
},
silent: true
});
......
......@@ -55,6 +55,7 @@ define([
that = this;
events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true);
this.ui.refreshTree.attr("disabled", true).tooltip("hide");
var type = $(e.currentTarget).data("type");
e.stopPropagation();
that.ui[type + "SearchTree"].jstree(true).destroy();
......@@ -525,6 +526,7 @@ define([
if (apiCount === 0) {
that.renderEntityTree();
that.changeLoaderState(false);
that.ui.refreshTree.attr("disabled", false);
}
};
this.entityDefCollection.fetch({
......
......@@ -53,10 +53,10 @@ define([
that = this;
events["click " + this.ui.refreshTree] = function(e) {
that.changeLoaderState(true);
that.ui.refreshTree.attr("disabled", true).tooltip("hide");
var type = $(e.currentTarget).data("type");
e.stopPropagation();
that.refresh({ type: type });
};
events["click " + this.ui.createGlossary] = function(e) {
......@@ -98,6 +98,7 @@ define([
this.renderGlossaryTree();
}
that.changeLoaderState();
that.ui.refreshTree.attr("disabled", false);
},
this
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment