This is an automated email from the git hooks/post-receive script. New commit to branch feature/882-angular in repository chorem. See http://git.chorem.org/chorem.git commit 9c120d28bcce1ed8e31ec74b5e868b5aac560283 Author: kootox <jean.couteau@gmail.com> Date: Wed Mar 4 14:50:48 2015 +0100 refs #882 : filter case insensitive --- chorem-webmotion/src/main/webapp/WEB-INF/jsp/crm/angularTest.html | 2 +- chorem-webmotion/src/main/webapp/js/crm.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chorem-webmotion/src/main/webapp/WEB-INF/jsp/crm/angularTest.html b/chorem-webmotion/src/main/webapp/WEB-INF/jsp/crm/angularTest.html index 47f07bc..4901e75 100644 --- a/chorem-webmotion/src/main/webapp/WEB-INF/jsp/crm/angularTest.html +++ b/chorem-webmotion/src/main/webapp/WEB-INF/jsp/crm/angularTest.html @@ -26,7 +26,7 @@ <div class="col-xs-9"> <div class="form-group"> <input type="text" class="form-control" placeholder="Search Companies..." - ng-model="search" ng-change="filter()"> + ng-model="searchTerm" ng-change="filter()"> <i class="fa fa-search"></i> </div> </div> diff --git a/chorem-webmotion/src/main/webapp/js/crm.js b/chorem-webmotion/src/main/webapp/js/crm.js index 1a3cc17..e172a06 100644 --- a/chorem-webmotion/src/main/webapp/js/crm.js +++ b/chorem-webmotion/src/main/webapp/js/crm.js @@ -53,7 +53,8 @@ crmTest.controller('CompanyListController', function ($scope, $http, $location, $scope.filteredItems=[]; for (var index in $scope.items) { var company = $scope.items[index]; - if (company.name.indexOf($scope.searchTerm)>-1){ + var regexp = new RegExp($scope.searchTerm,"i"); + if (company.name.match(regexp)){ $scope.filteredItems.push(company); } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.