Commit 5a443e17 by gutkaBinit Committed by kevalbhatt

ATLAS-3330 UI : Some default search page elements do not appear under a certain condition.

Signed-off-by: 's avatarkevalbhatt <kbhatt@apache.org>
parent 47d4d588
......@@ -226,4 +226,14 @@ hr.hr-filter {
margin-bottom: 7px;
border: 0;
border-top: 1px solid #bdc3c7;
}
.searchTable{
&.noData{
.labelShowRecord,.inline[data-id="colManager"],.row.searach-result-pagination,table thead{
display: none !important;
}
}
}
\ No newline at end of file
......@@ -75,7 +75,7 @@
</div>
{{/if}}
</div>
<div class="row pagination-box" style="display: none">
<div class="row pagination-box searach-result-pagination" style="display: none">
<div class="col-sm-offset-4 col-sm-8">
<div class="inline-content-fr">
<div class="backgrid-paginator inline">
......
......@@ -70,8 +70,7 @@ define(['require',
showPage: "[data-id='showPage']",
gotoPage: "[data-id='gotoPage']",
gotoPagebtn: "[data-id='gotoPagebtn']",
activePage: "[data-id='activePage']",
rowData: ".row"
activePage: "[data-id='activePage']"
},
templateHelpers: function() {
return {
......@@ -474,7 +473,9 @@ define(['require',
that.ui.activePage.attr('title', "Page " + that.activePage);
that.ui.activePage.text(that.activePage);
that.renderTableLayoutView();
if(dataLength>0){
that.$('.searchTable').removeClass('noData')
}
if (Utils.getUrlState.isSearchTab() && value && !value.profileDBView) {
var searchString = 'Results for: <span class="filterQuery">' + CommonViewFunction.generateQueryOfFilter(that.value) + "</span>";
if (Globals.entityCreate && Globals.entityTypeConfList && Utils.getUrlState.isSearchTab()) {
......@@ -531,6 +532,7 @@ define(['require',
Globals.searchApiCallRef = this.searchCollection.fetch(apiObj);
}
}
},
renderSearchQueryView: function() {
var that = this;
......@@ -564,8 +566,7 @@ define(['require',
columns: columns
}));
if (table.collection.length === 0) {
this.hideIrreleventElements();
return;
that.$(".searchTable").addClass('noData');
}
if (!that.REntityTableLayoutView) {
return;
......@@ -826,10 +827,6 @@ define(['require',
}
});
},
hideIrreleventElements: function() {
this.ui.rowData.siblings('.well').hide();
this.ui.rowData.siblings('.no-data').show();
},
getDaynamicColumns: function(valueObj) {
var that = this,
col = {};
......@@ -1116,6 +1113,7 @@ define(['require',
}
_.extend(this.searchCollection.queryParams, { limit: this.limit, offset: this.offset });
this.fetchCollection();
},
changePageLimit: function(e, obj) {
if (!obj || (obj && !obj.skipViewChange)) {
......
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