Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Commit

Permalink
fix: remove search total badge and controller support for
Browse files Browse the repository at this point in the history
Was bugged to always total to zero.
Removing the feature "fixes the bug"
reduces bulk of code to maintain and
is no less clear a user experience.
  • Loading branch information
apetro committed Mar 20, 2018
1 parent 98aa1d0 commit e848612
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
17 changes: 0 additions & 17 deletions web/src/main/webapp/my-app/search/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ define([
$scope.googleSearchEnabled = false;
$scope.googleResultsEstimatedCount = 0;
$scope.googleEmptyResults = false;
$scope.totalCount = 0;
$scope.searchResultLimit = 20;
$scope.showAll = $rootScope.GuestMode || false;
base.setupSearchTerm();
Expand All @@ -166,22 +165,6 @@ define([
}).catch(function() {
$log.warn('Could not getPortlets');
});
$scope.$watchGroup([
'googleResultsEstimatedCount',
'myuwFilteredResults.length',
'wiscDirectoryResultCount'],
function() {
$scope.totalCount = 0;
if ($scope.googleResultsEstimatedCount) {
$scope.totalCount+= parseInt($scope.googleResultsEstimatedCount);
}
if ($scope.myuwFilteredResults) {
$scope.totalCount+= parseInt($scope.myuwFilteredResults.length);
}
if ($scope.wiscDirectoryResultCount) {
$scope.totalCount+= parseInt($scope.wiscDirectoryResultCount);
}
});
};
init();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<!-- ALL RESULTS -->
<md-tab>
<md-tab-label>
All&nbsp;&nbsp;<span class="badge">{{ totalCount }}</span>
All</span>
</md-tab-label>
<md-tab-body>
<md-content>
Expand Down

0 comments on commit e848612

Please sign in to comment.