diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 04cce01..3f581b2 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -9000,47 +9000,47 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } $scope.jumpToTerm = function (event) { - - $rootScope.searchSelectedText = $('#' + event.currentTarget.id).text(); - $('#termList option[selected="selected"]').prop("selected", false); - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); - $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); - $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); + if ($rootScope.searchSelectedText != $('#' + event.currentTarget.id).text()) { + $rootScope.searchSelectedText = $('#' + event.currentTarget.id).text(); + $('#termList option[selected="selected"]').prop("selected", false); + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').prop("selected", true); + $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); + $('#termList option[value="' + $rootScope.searchSelectedText + '"]').css({ "background-color": "#3399FF", "color": "#ffffff" }); - $rootScope.isLoading = true; + $rootScope.isLoading = true; - $('#spinner').css('visibility', 'visible'); - //1. - $scope.searchFilter = event.currentTarget.innerHTML; + $('#spinner').css('visibility', 'visible'); + //1. + $scope.searchFilter = event.currentTarget.innerHTML; - //2. - $scope.HighlightBodyOnListManagerSelection(event.currentTarget.id); + //2. + $scope.HighlightBodyOnListManagerSelection(event.currentTarget.id); - $scope.IsSearchVisible = false; - $rootScope.isNormalMode = false; + $scope.IsSearchVisible = false; + $rootScope.isNormalMode = false; - //Highlight only Highlight button + //Highlight only Highlight button - $("#btnHighLight").addClass("btn-primary"); - $("#btnHighLight").removeClass("btn-black"); + $("#btnHighLight").addClass("btn-primary"); + $("#btnHighLight").removeClass("btn-black"); - if (!$("#btnNormalMode").hasClass("btn-black")) { - $("#btnNormalMode").addClass("btn-black"); - } + if (!$("#btnNormalMode").hasClass("btn-black")) { + $("#btnNormalMode").addClass("btn-black"); + } - if (!$("#btnExtract").hasClass("btn-black")) { - $("#btnExtract").addClass("btn-black"); - } + if (!$("#btnExtract").hasClass("btn-black")) { + $("#btnExtract").addClass("btn-black"); + } - if ($("#btnExtract").hasClass("btn-primary")) { - $("#btnExtract").removeClass("btn-primary"); - } + if ($("#btnExtract").hasClass("btn-primary")) { + $("#btnExtract").removeClass("btn-primary"); + } - if ($("#btnNormalMode").hasClass("btn-primary")) { - $("#btnNormalMode").removeClass("btn-primary"); + if ($("#btnNormalMode").hasClass("btn-primary")) { + $("#btnNormalMode").removeClass("btn-primary"); + } } - } //Function to set the vertical and horizontal scroll position of CanvasDiv as per the Navigator @@ -9801,9 +9801,61 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.resetSearchListView = function () { - $scope.ShowSearch(); + // $scope.ShowSearch(); + $scope.showFilteredTerms() + } + $scope.showFilteredTerms = function () { + + if ($('#searchListDiv').html() != "") { + $('#searchListDiv').empty(); + } + $rootScope.a = $scope.primaryLexiconInd; + var $e2 = $('
').appendTo('#searchListDiv') + $compile($e2)($scope); + document.getElementById("termlistfilter").style.display = "block"; + $timeout(function () { + $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) { + if ($(this).find("a").html() == document.getElementById("typedTermName").value) { + $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" }); + $(this).find("a").css({ "background-color": "#3399FF", "color": "#ffffff" }); + } + }); + }, 100); + }; + + $scope.ApplySearch = function () { + $rootScope.isLoading = false; + $('#spinner').css('visibility', 'hidden'); + + $('#searchedTermListPopUp').css('display', 'block'); + $("#searchedTermListPopUp").css("visibility", "visible"); + + $('#searchedTermListPopUp').draggable(); + + $scope.FillSearchList(); } + $scope.FillSearchList = function () { + if ($('#searchTermListUl').html() != "") { + $('#searchTermListUl').empty(); + } + $rootScope.a = $scope.primaryLexiconInd; + $scope.sFilter = $("#typedTermName").val(); + var $e2 = $('