Commit e1809a0e853a46811ab9dcbfb0d78b9728eda896

Authored by Amrita Vishnoi
2 parents 438d7c7b 0a8da17f

Merge branch 'erasedFunctionalityIssue' of http://52.6.196.163/ADAM/AIAHTML5 into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -8437,7 +8437,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8437 8437 }
8438 8438  
8439 8439 $scope.resetSearchListView = function () {
8440   -
8441 8440 $("#termlistfilter").css("display", "block");
8442 8441 //Remove the list and then Repopulate it on change of $scope.searchFilter
8443 8442 $('#searchListDiv').empty();
... ... @@ -8449,50 +8448,42 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8449 8448 {
8450 8449 var searchFieldVal = $("#typedTermName").val();
8451 8450 if (searchFieldVal.length > 0) {
8452   -
8453 8451 for (var j = 0; j <= searchFieldVal.length - 1; j++) {
8454   -
8455   - if (searchFieldVal[j].toUpperCase() != $rootScope.searchListArray[i].name[j].toUpperCase()) {
  8452 + if ($rootScope.searchListArray[i].name[j] == undefined) {
  8453 + isValueMatchedWithTerm = false;
  8454 + break;
  8455 + }
  8456 + if (searchFieldVal[j].toLowerCase() != $rootScope.searchListArray[i].name[j].toLowerCase()) {
8456 8457 isValueMatchedWithTerm = false;
8457 8458 break;
8458 8459 }
8459 8460 else {
8460   - isValueMatchedWithTerm = true
  8461 + isValueMatchedWithTerm = true;
8461 8462 }
8462 8463 }
8463 8464 if (isValueMatchedWithTerm == true) {
8464 8465 $rootScope.ModifiedsearchListArray.push({ "name": $rootScope.searchListArray[i].name, "id": $rootScope.searchListArray[i].id});
8465   - console.log($rootScope.ModifiedsearchListArray);
8466 8466 }
8467   -
8468 8467 }
8469 8468 }
8470   -
8471 8469 var termListFilterHtml = '';
8472 8470 termListFilterHtml += '<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;z-index:60001;">';
8473 8471 if ($("#typedTermName").val().length > 0) {
8474   -
8475 8472 for (var i = 0; i <= $rootScope.ModifiedsearchListArray.length - 1; i++) {
8476   -
8477 8473 termListFilterHtml += '<li><a id=' + $rootScope.ModifiedsearchListArray[i].id + ' href="javascript:void(0);" onclick="selectTerm(event)">' + $rootScope.ModifiedsearchListArray[i].name + '</a></li>';
8478 8474 }
8479 8475 termListFilterHtml += '</ul>';
8480 8476 $('#searchListDiv').append(termListFilterHtml);
8481   -
8482 8477 }
8483 8478 else
8484 8479 {
8485   - console.log($rootScope.searchListArray.length);
8486 8480 for (var i = 0; i <= $rootScope.searchListArray.length - 1; i++) {
8487   -
8488 8481 termListFilterHtml += '<li><a id=' + $rootScope.searchListArray[i].id + ' href="javascript:void(0);" onclick="selectTerm(event)">' + $rootScope.searchListArray[i].name + '</a></li>';
8489 8482 }
8490 8483 termListFilterHtml += '</ul>';
8491 8484 $('#searchListDiv').append(termListFilterHtml);
8492   -
8493 8485 }
8494 8486 }
8495   -
8496 8487 }]
8497 8488  
8498 8489 );
... ...