Closed
Merge Request #960 · created by Pankaj Tiwary


Aia shashi


From AIA_Shashi into Develop

Closed by Pankaj Tiwary

Changes were not merged into target branch

1 participants


400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -1067,7 +1067,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$
1067 1067 else if ($rootScope.voId == 12) {
1068 1068 $rootScope.viewOrientationId = 6;
1069 1069 }
1070   -
  1070 +
1071 1071 $scope.CalculateImageCordinates($rootScope.viewOrientationId);
1072 1072  
1073 1073  
... ... @@ -4613,11 +4613,21 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$
4613 4613 $scope.TransparencyBoxEndY = TransparencyBoxEndY;
4614 4614  
4615 4615 if ($scope.TransparencyBoxStartX == $scope.TransparencyEndX && $scope.TransparencyBoxStartY == $scope.TransparencyBoxEndY) {
4616   - // $('#transparencyScale').css('visibility', 'hidden');
  4616 +
  4617 + //TFS#Bug 26464
  4618 + $timeout(function () {
  4619 + angular.element(document.activeElement).blur();
  4620 + });
  4621 +
4617 4622 } else {
4618 4623  
4619 4624 if (previewRectangleWidth == 0 && previewRectangleHeight == 0) {
4620 4625  
  4626 + //TFS#Bug 26464
  4627 + $timeout(function () {
  4628 + angular.element(document.activeElement).blur();
  4629 + });
  4630 +
4621 4631 }
4622 4632 else {
4623 4633  
... ... @@ -8948,16 +8958,18 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$
8948 8958 $scope.IsSearchVisible = true;
8949 8959 console.log("primary language: " + $rootScope.vocabTermDataArray[primaryLexiconIndx].language);
8950 8960  
8951   -
8952   - $rootScope.a = primaryLexiconIndx;
8953   - var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:130px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:60001;"><li ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| filter:{ _TermText: searchFilter}">' +
8954   - '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
8955   - ' </li></ul>').appendTo('#searchListDiv')
8956   - $compile($e2)($scope);
8957   -
  8961 + $timeout(function () {
  8962 + $rootScope.a = primaryLexiconIndx;
  8963 + var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu" style="height:130px;width:100%;overflow-y:scroll;position:absolute;display:none;z-index:60001;"><li ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| filter:{ _TermText: searchFilter}">' +
  8964 + '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
  8965 + ' </li></ul>').appendTo('#searchListDiv');
  8966 + $compile($e2)($scope);
  8967 + document.getElementById("termlistfilter").style.display = "block";
  8968 + console.log('termlistfilter is complied');
  8969 + }, 150);//Bug#39757
8958 8970 console.log('termlistfilter is created and complied');
8959 8971  
8960   - document.getElementById("termlistfilter").style.display = "block";
  8972 +
8961 8973 $timeout(function () {
8962 8974 $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) {
8963 8975 if ($(this).find("a").html() == document.getElementById("typedTermName").value) {
... ... @@ -9810,11 +9822,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$filter&quot;,&quot;$
9810 9822 $('#searchListDiv').empty();
9811 9823 }
9812 9824 $rootScope.a = $scope.primaryLexiconInd;
  9825 + $timeout(function () {
9813 9826 var $e2 = $('<ul id="termlistfilter" class="form-control dropdown-menu ng-scope" style="height:132px;width:100%;overflow-y:scroll;position:absolute;display:block;z-index:60001;"><li class="ng-scope" ng-repeat="item in vocabTermDataArray[a].vocabTermTxt| startsWithLetter:{ _TermText: searchFilter}| limitTo : 10">' +
9814 9827 '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' +
9815 9828 ' </li></ul>').appendTo('#searchListDiv')
9816   - $compile($e2)($scope);
9817   - document.getElementById("termlistfilter").style.display = "block";
  9829 + $compile($e2)($scope);
  9830 + console.log('showFilteredTerms is compiled');
  9831 + document.getElementById("termlistfilter").style.display = "block";
  9832 + }, 50);//Bug#39757
9818 9833 $timeout(function () {
9819 9834 $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) {
9820 9835 if ($(this).find("a").html() == document.getElementById("typedTermName").value) {
... ... @@ -9908,10 +9923,13 @@ function enableShowHideStructureBox() {
9908 9923  
9909 9924 function OnSearch() {
9910 9925 console.log('Show Search is called outside ');
9911   - var scope = angular.element(document.getElementById("daView")).scope();
9912   - scope.$apply(function () {
9913   - scope.ShowSearch();
9914   - });
  9926 + setTimeout(function () {
  9927 + var scope = angular.element(document.getElementById("daView")).scope();
  9928 + scope.$evalAsync(function () {
  9929 + scope.ShowSearch();
  9930 + });
  9931 + }, 10);//Bug#39757
  9932 +
9915 9933 }
9916 9934 function selectTerm(event) {
9917 9935 console.log('selectTerm is called outside ');
... ...