Make it possible to browse for multiple tags simultaneously
Change-Id: I1e8473c4294d12330e6eb3f18a27aacdac093e90
This commit is contained in:
parent
739de718e7
commit
845bdaf719
|
@ -80,7 +80,7 @@ angular.module('sb.search').controller('SearchCriteriaController',
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.type === cItem.type) {
|
if (item.type === cItem.type && item.type !== 'Tags') {
|
||||||
$scope.criteria.splice(i, 1);
|
$scope.criteria.splice(i, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,7 +183,15 @@ angular.module('sb.services').service('Criteria',
|
||||||
|
|
||||||
criteria.forEach(function (item) {
|
criteria.forEach(function (item) {
|
||||||
if (parameterMap.hasOwnProperty(item.type)) {
|
if (parameterMap.hasOwnProperty(item.type)) {
|
||||||
params[parameterMap[item.type]] = item.value;
|
if (parameterMap[item.type] === 'tags') {
|
||||||
|
if (!('tags' in params)) {
|
||||||
|
params.tags = [item.value];
|
||||||
|
} else {
|
||||||
|
params.tags.push(item.value);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
params[parameterMap[item.type]] = item.value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return params;
|
return params;
|
||||||
|
|
Loading…
Reference in New Issue