Commit d552090b5cb281d0cc09a1acd454966f970c0582

Authored by unknown
1 parent bb3714dd

Commit Changes

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -7674,22 +7674,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7674 7674  
7675 7675  
7676 7676 $scope.HideSearch = function () {
7677   - if ($("#backdrop").is(":hover") || $("#termlistfilter").is(":hover") || $("#typedtermname").is(":focus")) {
7678   - $scope.IsSearchVisible = true;
7679   - document.getElementById("termlistfilter").style.display = "block";
7680   - }
7681   - else {
7682   - //1. persist term in DAsearch but hide ul/li
7683   - if ($("#btnDATermSearch").is(":hover")) {
7684   - $scope.IsSearchVisible = false;
7685   - }
7686   - else {
7687   - //2.hide ul/li and clear DA search
7688   - $scope.IsSearchVisible = false;
7689   - document.getElementById("termlistfilter").style.display = "none";
7690   - $scope.searchFilter = "";
7691   - }
7692   - }
  7677 +
  7678 + $timeout(function () {
  7679 +
  7680 + $("#termlistfilter").css("display", "none");
  7681 +
  7682 +
  7683 + }, 1000);
7693 7684  
7694 7685 }
7695 7686  
... ... @@ -8417,7 +8408,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8417 8408 $("#btnNormalMode").removeClass("btn-primary");
8418 8409 }
8419 8410  
8420   - $('#typedtermname').val($scope.searchFilter);
  8411 + $('#TypedTermName').val($scope.searchFilter);
8421 8412  
8422 8413 }
8423 8414 else {
... ... @@ -8442,17 +8433,17 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8442 8433  
8443 8434 for (var i = 0; i <= $rootScope.searchListArray.length - 1; i++)
8444 8435 {
8445   - var searchFieldVal = $("#typedtermname").val();
  8436 + var searchFieldVal = $("#TypedTermName").val();
8446 8437 if (searchFieldVal.length > 0) {
8447   - var flag = true;
  8438 + var isValueMatchedWithTerm = true;
8448 8439 for (var j = 0; j <= searchFieldVal.length - 1; j++) {
8449 8440  
8450 8441 if (searchFieldVal[j].toUpperCase() != $rootScope.searchListArray[i].name[j].toUpperCase()) {
8451   - flag = false;
  8442 + isValueMatchedWithTerm = false;
8452 8443 break;
8453 8444 }
8454 8445 }
8455   - if (flag == true) {
  8446 + if (isValueMatchedWithTerm == true) {
8456 8447 $rootScope.ModifiedsearchListArray.push({ "name": $rootScope.searchListArray[i].name, "id": $rootScope.searchListArray[i].id});
8457 8448 console.log($rootScope.ModifiedsearchListArray);
8458 8449 }
... ... @@ -8462,7 +8453,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8462 8453  
8463 8454 var termListFilterHtml = '';
8464 8455 termListFilterHtml += '<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;z-index:60001;">';
8465   - if ($("#typedtermname").val().length > 0) {
  8456 + if ($("#TypedTermName").val().length > 0) {
8466 8457  
8467 8458 for (var i = 0; i <= $rootScope.ModifiedsearchListArray.length - 1; i++) {
8468 8459  
... ... @@ -8483,39 +8474,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
8483 8474 $('#searchListDiv').append(termListFilterHtml);
8484 8475  
8485 8476 }
8486   -
8487   -
8488   - //$timeout(function () {
8489   -
8490   -
8491   - // var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;z-index:60001;"><li ng-repeat="item in VocabTermTxt| filter:{ _TermText: searchFilter}">' +
8492   - // '<a href="#"></a>' +
8493   - // ' </li></ul>').appendTo('#searchListDiv');
8494   -
8495   -
8496   - // //var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:90px;width:100%;overflow-y:scroll;position:absolute;z-index:60001;"><li ng-repeat="item in VocabTermTxt| filter:{ _TermText: searchFilter}">' +
8497   - // // '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
8498   - // // ' </li></ul>').appendTo('#searchListDiv');
8499   -
8500   - // $compile($e2)($scope);
8501   -
8502   - //}, 500);
8503   -
8504   -
8505 8477 }
8506   -
8507   - $rootScope.blurSearch = function () {
8508   -
8509   - $timeout(function () {
8510   -
8511   - $("#termlistfilter").css("display", "none");
8512   -
8513   -
8514   - }, 1000);
8515   -
8516   - }
8517   -
8518   -
  8478 +
8519 8479 }]
8520 8480  
8521 8481 );
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -269,7 +269,7 @@
269 269 <div class="">
270 270 <div class="input-group col-sm-8 col-xs-7 col-md-10 pull-left">
271 271  
272   - <input type="text" class="form-control input-sm pull-left" id="typedtermname" onclick="OnSearch()" ondblclick="OnSearch()" ng-model="searchFilter" ng-change="resetSearchListView()" ng-blur="blurSearch()" placeholder=" search...">
  272 + <input type="text" class="form-control input-sm pull-left" id="TypedTermName" onclick="OnSearch()" ondblclick="OnSearch()" ng-model="searchFilter" ng-change="resetSearchListView()" ng-blur="HideSearch()" placeholder=" search...">
273 273  
274 274 <div id="backdrop" ng-show="IsSearchVisible">
275 275 <div id="searchListDiv" class="col-sm-12 col-xs-12 col-md-12 col-lg-12 pull-left">
... ...