diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 9e69540..0a76dec 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -8958,16 +8958,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ $scope.IsSearchVisible = true; console.log("primary language: " + $rootScope.vocabTermDataArray[primaryLexiconIndx].language); - - $rootScope.a = primaryLexiconIndx; - var $e2 = $('
').appendTo('#searchListDiv') - $compile($e2)($scope); - + $timeout(function () { + $rootScope.a = primaryLexiconIndx; + var $e2 = $(' ').appendTo('#searchListDiv'); + $compile($e2)($scope); + document.getElementById("termlistfilter").style.display = "block"; + console.log('termlistfilter is complied'); + }, 150);//Bug#39757 console.log('termlistfilter is created and complied'); - 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) { @@ -9820,11 +9822,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ $('#searchListDiv').empty(); } $rootScope.a = $scope.primaryLexiconInd; + $timeout(function () { var $e2 = $(' ').appendTo('#searchListDiv') - $compile($e2)($scope); - document.getElementById("termlistfilter").style.display = "block"; + $compile($e2)($scope); + console.log('showFilteredTerms is compiled'); + document.getElementById("termlistfilter").style.display = "block"; + }, 50);//Bug#39757 $timeout(function () { $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) { if ($(this).find("a").html() == document.getElementById("typedTermName").value) { @@ -9918,10 +9923,13 @@ function enableShowHideStructureBox() { function OnSearch() { console.log('Show Search is called outside '); - var scope = angular.element(document.getElementById("daView")).scope(); - scope.$apply(function () { - scope.ShowSearch(); - }); + setTimeout(function () { + var scope = angular.element(document.getElementById("daView")).scope(); + scope.$evalAsync(function () { + scope.ShowSearch(); + }); + }, 10);//Bug#39757 + } function selectTerm(event) { console.log('selectTerm is called outside ');