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