fix of tag search type dropdown border and empty tags

This commit is contained in:
John Mitchell
2016-06-01 14:44:30 -04:00
parent 857f873f4d
commit e041fe8316
3 changed files with 3 additions and 2 deletions

View File

@@ -56,6 +56,7 @@
border: 1px solid @d7grey; border: 1px solid @d7grey;
background: white; background: white;
padding: 5px 0; padding: 5px 0;
border-top: 0px;
border-top-left-radius: 0px; border-top-left-radius: 0px;
border-top-right-radius: 0px; border-top-right-radius: 0px;
z-index: 50000; z-index: 50000;

View File

@@ -74,7 +74,7 @@ export default ['$scope', 'Refresh', 'tagSearchService',
.getCurrentTags($scope .getCurrentTags($scope
.currentSearchFilters); .currentSearchFilters);
if (!tagSearchService.isDuplicate(tags, newTag)) { if (!tagSearchService.isDuplicate(tags, newTag) && !!newTag.name) {
tags.push(newTag); tags.push(newTag);
$scope.updateSearch(tags); $scope.updateSearch(tags);
} }

View File

@@ -180,7 +180,7 @@ export default ['Rest', '$q', 'GetBasePath', 'Wait', 'ProcessErrors', '$log', fu
if (tag.type === "text") { if (tag.type === "text") {
tag.url = tag.value + "__icontains=" + textVal; tag.url = tag.value + "__icontains=" + textVal;
tag.name = textVal; tag.name = textVal;
} else if (selectVal.value.indexOf("=") > 0) { } else if (selectVal.value && typeof selectVal.value === 'string' && selectVal.value.indexOf("=") > 0) {
tag.url = selectVal.value; tag.url = selectVal.value;
tag.name = selectVal.label; tag.name = selectVal.label;
} else { } else {