Commit ce2ba123 by kevalbhatt

ATLAS-3904: Regression: Glossary term deatils page not able to render the classfication tab #2

parent 38d7b91e
......@@ -381,19 +381,26 @@ define(['require',
this.$('.fontLoader-relative').addClass('show'); // to show tab loader
},
manualRender: function(options) {
if (this.id !== options.id) {
if (options) {
var oldId = this.id;
_.extend(this, _.pick(options, 'value', 'id'));
if (this.id !== oldId) {
this.collection.url = UrlLinks.entitiesApiUrl({ guid: this.id, minExtInfo: true });
this.fetchCollection();
}
this.updateTab();
}
},
onShow: function() {
updateTab: function() {
if (this.value && this.value.tabActive) {
this.$('.nav.nav-tabs').find('[role="' + this.value.tabActive + '"]').addClass('active').siblings().removeClass('active');
this.$('.tab-content').find('[role="' + this.value.tabActive + '"]').addClass('active').siblings().removeClass('active');
$("html, body").animate({ scrollTop: (this.$('.tab-content').offset().top + 1200) }, 1000);
}
},
onShow: function() {
this.updateTab();
},
onDestroy: function() {
if (!Utils.getUrlState.isDetailPage()) {
$('body').removeClass("detail-page");
......
......@@ -385,19 +385,26 @@ define(['require',
this.$('.fontLoader-relative').addClass('show'); // to show tab loader
},
manualRender: function(options) {
if (this.id !== options.id) {
if (options) {
var oldId = this.id;
_.extend(this, _.pick(options, 'value', 'id'));
if (this.id !== oldId) {
this.collection.url = UrlLinks.entitiesApiUrl({ guid: this.id, minExtInfo: true });
this.fetchCollection();
}
this.updateTab();
}
},
onShow: function() {
updateTab: function() {
if (this.value && this.value.tabActive) {
this.$('.nav.nav-tabs').find('[role="' + this.value.tabActive + '"]').addClass('active').siblings().removeClass('active');
this.$('.tab-content').find('[role="' + this.value.tabActive + '"]').addClass('active').siblings().removeClass('active');
$("html, body").animate({ scrollTop: (this.$('.tab-content').offset().top + 1200) }, 1000);
}
},
onShow: function() {
this.updateTab();
},
onDestroy: function() {
if (!Utils.getUrlState.isDetailPage()) {
$('body').removeClass("detail-page");
......
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