Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/main/javascript/base/SearchRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@ window.cat.SearchRequest = function (searchUrlParams) {
}

var _encodeSort = function () {
return (!!_sort.property ? 'sort=' + _sort.property + ':' + ((_sort.isDesc === true || _sort.isDesc === 'true') ? 'desc' : 'asc') : '');
if(!!_sort.property) {
var properties = _sort.property.split(';');
var result = 'sort=';
for(var i = 0; i< properties.length; i++) {
result += properties[i] + ':' + ((_sort.isDesc === true || _sort.isDesc === 'true') ? 'desc' : 'asc') + ';';
}
return result.slice(0, -1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the last ; really an issue?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am actually not sure, I would have to test it. Previously there was no ; before so i did not want to add one now. I will test this as soon as I have the time.

} else {
return '';
}
};

var _encodePagination = function () {
Expand Down
11 changes: 10 additions & 1 deletion src/main/javascript/service/cat-search-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@ angular.module('cat.service.search', [])
.service('catSearchService', function ($location, catUrlEncodingService) {

var _encodeSort = function (_sort) {
return (!!_sort.property ? 'sort=' + _sort.property + ':' + ((_sort.isDesc === true || _sort.isDesc === 'true') ? 'desc' : 'asc') : '');
if(!!_sort.property) {
var properties = _sort.property.split(';');
var result = 'sort=';
for(var i = 0; i< properties.length; i++) {
result += properties[i] + ':' + ((_sort.isDesc === true || _sort.isDesc === 'true') ? 'desc' : 'asc') + ';';
}
return result.slice(0, -1);
} else {
return '';
}
};

var _encodePagination = function (_pagination) {
Expand Down