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