Skip to content
Snippets Groups Projects
Commit 496bf42f authored by juanf's avatar juanf
Browse files

SSDM-3026 : Advanced search show score only using global search.

SVN: 35917
parent 5fc44d86
No related branches found
No related tags found
No related merge requests found
......@@ -348,11 +348,12 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
}
this.renderResults = function(results) {
var dataGridController = this._getGridForResults(results);
var isGlobalSearch = this._advancedSearchModel.criteria.entityKind === "ALL";
var dataGridController = this._getGridForResults(results, isGlobalSearch);
dataGridController.init(this._$dataGridContainer);
}
this._getGridForResults = function(results) {
this._getGridForResults = function(results, isGlobalSearch) {
var columns = [ {
label : 'Entity Kind',
property : 'entityKind',
......@@ -371,19 +372,21 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
sortable : true
}];
columns.push({
label : 'Matched',
property : 'matched',
isExportable: false,
sortable : true
});
columns.push({
label : 'Score',
property : 'score',
isExportable: false,
sortable : true
});
if(isGlobalSearch) {
columns.push({
label : 'Matched',
property : 'matched',
isExportable: false,
sortable : true
});
columns.push({
label : 'Score',
property : 'score',
isExportable: false,
sortable : true
});
}
columns.push({
label : '---------------',
......@@ -450,7 +453,7 @@ function AdvancedSearchView(advancedSearchController, advancedSearchModel) {
var rowData = {};
if(entity["@type"] === "as.dto.global.GlobalSearchObject") {
if(isGlobalSearch) {
rowData.matched = entity.match;
rowData.score = entity.score;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment