diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 8c77396..9d20132 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -7404,9 +7404,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo document.getElementById("termlistfilter").style.display = "block"; } else { - $scope.IsSearchVisible = false; - document.getElementById("termlistfilter").style.display = "none"; - $scope.searchFilter = ""; + //1. persist term in DAsearch but hide ul/li + if ($("#btnDATermSearch").is(":hover")) { + $scope.IsSearchVisible = false; + } + else { + //2.hide ul/li and clear DA search + $scope.IsSearchVisible = false; + document.getElementById("termlistfilter").style.display = "none"; + $scope.searchFilter = ""; + } } } @@ -8112,6 +8119,55 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } + $scope.OnSearchBtnClick = function (e) { + + if (typeof ($scope.searchFilter) !== "undefined" && ($scope.searchFilter !== null && $scope.searchFilter !== "")) { + var EnteredDASearchTerm = []; + EnteredDASearchTerm = new jinqJs() + .from($scope.VocabTermTxt) + .where('_TermText == ' + $scope.searchFilter) + .select('_ActualTermNumber', '_TermText', '_cdId'); + + if (EnteredDASearchTerm.length > 0) { + $scope.HighlightBodyOnListManagerSelection(EnteredDASearchTerm[0]._ActualTermNumber); + + $scope.IsSearchVisible = false; + $rootScope.isNormalMode = false; + + //Highlight only Highlight button + + $("#btnHighLight").addClass("btn-primary"); + $("#btnHighLight").removeClass("btn-black"); + + if (!$("#btnNormalMode").hasClass("btn-black")) { + $("#btnNormalMode").addClass("btn-black"); + } + + if (!$("#btnExtract").hasClass("btn-black")) { + $("#btnExtract").addClass("btn-black"); + } + + if ($("#btnExtract").hasClass("btn-primary")) { + $("#btnExtract").removeClass("btn-primary"); + } + + if ($("#btnNormalMode").hasClass("btn-primary")) { + $("#btnNormalMode").removeClass("btn-primary"); + } + + $('#typedtermname').val($scope.searchFilter); + + } + else { + // clear the text + $scope.ShowSearch(); + } + + } + else { + $scope.ShowSearch(); + } + } }] diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html index 799be52..06957e8 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -297,14 +297,17 @@