Commit 4ab0c516d37fb64ff4ad5aa5de45659a4b674388
Merge branch 'Develop' into 'QA'
Develop See merge request !965
Showing
2 changed files
with
59 additions
and
29 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -4617,11 +4617,21 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ |
4617 | 4617 | $scope.TransparencyBoxEndY = TransparencyBoxEndY; |
4618 | 4618 | |
4619 | 4619 | if ($scope.TransparencyBoxStartX == $scope.TransparencyEndX && $scope.TransparencyBoxStartY == $scope.TransparencyBoxEndY) { |
4620 | - // $('#transparencyScale').css('visibility', 'hidden'); | |
4620 | + | |
4621 | + //#Bug 26464 | |
4622 | + $timeout(function () { | |
4623 | + angular.element(document.activeElement).blur(); | |
4624 | + }); | |
4625 | + | |
4621 | 4626 | } else { |
4622 | 4627 | |
4623 | 4628 | if (previewRectangleWidth == 0 && previewRectangleHeight == 0) { |
4624 | 4629 | |
4630 | + //#Bug 26464 | |
4631 | + $timeout(function () { | |
4632 | + angular.element(document.activeElement).blur(); | |
4633 | + }); | |
4634 | + | |
4625 | 4635 | } |
4626 | 4636 | else { |
4627 | 4637 | |
... | ... | @@ -6696,14 +6706,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ |
6696 | 6706 | var sliderVal = parseInt($rootScope.totalLayers) - parseInt($rootScope.currentLayerNumber); |
6697 | 6707 | |
6698 | 6708 | console.log('inside mouseDownListener. document.getElementById layerChangeSlider value : ' + document.getElementById('layerChangeSlider') + '$rootScope.totalLayers: ' + $rootScope.totalLayers + ' - $rootScope.currentLayerNumber: ' + $rootScope.currentLayerNumber + ' = set value for layerChangeSlider: ' + sliderVal); |
6699 | - | |
6700 | - $('#layerChangeSlider').slider("option", "value", sliderVal); | |
6701 | - //if ($scope.isGenderChnage || $rootScope.isViewChange) { | |
6702 | - // $("#txtlayerNumber").val(parseInt(0)); | |
6703 | - //} | |
6704 | - //else | |
6705 | - $("#txtlayerNumber").val(parseInt($rootScope.currentLayerNumber)); | |
6706 | - | |
6709 | + | |
6710 | + //START BUG#32146 | |
6711 | + if (($rootScope.isHighlightBodyByBodySystem == true || $scope.isbodySystemHighlight == true) && $rootScope.systemNumber > 0) { | |
6712 | + } | |
6713 | + else { | |
6714 | + $('#layerChangeSlider').slider("option", "value", sliderVal); | |
6715 | + $("#txtlayerNumber").val(parseInt($rootScope.currentLayerNumber)); | |
6716 | + } | |
6717 | + //END BUG#32146 | |
6707 | 6718 | |
6708 | 6719 | if (document.getElementById('tempCanvas') != null) { |
6709 | 6720 | $('#tempCanvas').remove(); |
... | ... | @@ -8521,7 +8532,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ |
8521 | 8532 | |
8522 | 8533 | $('#structureDropdown').html(""); |
8523 | 8534 | var currentBodyViewId = $rootScope.voId; |
8524 | - var systemListHtml = '<li><a href="#" title="Current Structure">Current Structure</a></li> <li role="separator" class="divider"></li>' | |
8535 | + var systemListHtml = '<li><a href="#" title="Current Structure" onclick="OnBodySystemSelection(event)">Current Structure</a></li> <li role="separator" class="divider"></li>' | |
8525 | 8536 | var systemList = $rootScope.CommonData.DACommonData.BodySystems.Item; |
8526 | 8537 | |
8527 | 8538 | angular.forEach(systemList, function (value, key) { |
... | ... | @@ -8687,6 +8698,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ |
8687 | 8698 | grayCanvasContext.putImageData($rootScope.grayImageDataList[parseInt(i)], 0, 0); |
8688 | 8699 | } |
8689 | 8700 | } |
8701 | + | |
8702 | + //Start BUG#38018 | |
8703 | + for (var i = 4; i <= $rootScope.grayImageMRDataList.length; i++) { | |
8704 | + var grayCanvasMRID = 'imageCanvas' + i + '_MR'; | |
8705 | + var grayCanvasMR = document.getElementById(grayCanvasMRID); | |
8706 | + | |
8707 | + if (grayCanvasMR != null) { | |
8708 | + var grayCanvasContextMR = grayCanvasMR.getContext("2d"); | |
8709 | + | |
8710 | + var canvasHeight = grayCanvasMR.height; | |
8711 | + var canvasWidth = grayCanvasMR.width; | |
8712 | + grayCanvasContextMR.clearRect(0, 0, canvasHeight, canvasWidth); | |
8713 | + grayCanvasContextMR.putImageData($rootScope.grayImageMRDataList[parseInt(i)], 0, 0); | |
8714 | + } | |
8715 | + } | |
8716 | + //END BUG#38018 | |
8717 | + | |
8718 | + | |
8690 | 8719 | } |
8691 | 8720 | |
8692 | 8721 | $scope.removeBodySyetemSelectionClass = function (title_highlightbody) { |
... | ... | @@ -8924,7 +8953,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ |
8924 | 8953 | if ($('#searchListDiv').html() != "") |
8925 | 8954 | $('#searchListDiv').empty(); |
8926 | 8955 | //Delay compile of ul li so that the remove of li is completed. |
8927 | - $timeout(function () { | |
8928 | 8956 | |
8929 | 8957 | $scope.isSearchDataLoaded = true; |
8930 | 8958 | |
... | ... | @@ -8948,13 +8976,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ |
8948 | 8976 | } |
8949 | 8977 | } |
8950 | 8978 | |
8951 | - }, 500); | |
8979 | + | |
8952 | 8980 | $scope.IsSearchVisible = true; |
8953 | 8981 | console.log("primary language: " + $rootScope.vocabTermDataArray[primaryLexiconIndx].language); |
8954 | 8982 | |
8955 | 8983 | |
8956 | 8984 | $rootScope.a = primaryLexiconIndx; |
8957 | - 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}">' + | |
8985 | + 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} | limitTo : 10">' + | |
8958 | 8986 | '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' + |
8959 | 8987 | ' </li></ul>').appendTo('#searchListDiv') |
8960 | 8988 | $compile($e2)($scope); |
... | ... | @@ -8962,27 +8990,22 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ |
8962 | 8990 | console.log('termlistfilter is created and complied'); |
8963 | 8991 | |
8964 | 8992 | document.getElementById("termlistfilter").style.display = "block"; |
8965 | - $timeout(function () { | |
8993 | + | |
8966 | 8994 | $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) { |
8967 | 8995 | if ($(this).find("a").html() == document.getElementById("typedTermName").value) { |
8968 | 8996 | $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" }); |
8969 | 8997 | $(this).find("a").css({ "background-color": "#3399FF", "color": "#ffffff" }); |
8970 | 8998 | } |
8971 | 8999 | }); |
8972 | - }, 100); | |
8973 | - $timeout(function () { | |
8974 | 9000 | $rootScope.searchListArray = []; |
8975 | 9001 | $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) { |
8976 | 9002 | $rootScope.searchListArray.push({ "name": $(this).find("a").html(), "id": $(this).find("a").attr("id") }); |
8977 | 9003 | }); |
8978 | - }, 100); | |
9004 | + | |
8979 | 9005 | |
8980 | 9006 | } |
8981 | 9007 | else { |
8982 | 9008 | $rootScope.loadSearchData(); |
8983 | - //if ($rootScope.vocabTermDataArray[primaryLexiconIndx].vocabTermTxt.length > 0) { | |
8984 | - // $scope.ShowSearch(); | |
8985 | - //} | |
8986 | 9009 | } |
8987 | 9010 | }, 500); |
8988 | 9011 | |
... | ... | @@ -9813,13 +9836,15 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$filter","$ |
9813 | 9836 | if ($('#searchListDiv').html() != "") { |
9814 | 9837 | $('#searchListDiv').empty(); |
9815 | 9838 | } |
9839 | + //Bug 39757 | |
9840 | + $timeout(function () { | |
9816 | 9841 | $rootScope.a = $scope.primaryLexiconInd; |
9817 | 9842 | 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">' + |
9818 | 9843 | '<a id="{{item._ActualTermNumber}}" href="" onclick="selectTerm(event)">{{item._TermText}}</a>' + |
9819 | 9844 | ' </li></ul>').appendTo('#searchListDiv') |
9820 | 9845 | $compile($e2)($scope); |
9821 | 9846 | document.getElementById("termlistfilter").style.display = "block"; |
9822 | - $timeout(function () { | |
9847 | + | |
9823 | 9848 | $("#backdrop > #searchListDiv > #termlistfilter > li").each(function (key, value) { |
9824 | 9849 | if ($(this).find("a").html() == document.getElementById("typedTermName").value) { |
9825 | 9850 | $("#termlistfilter li a").css({ "background-color": "#ffffff", "color": "#000000" }); |
... | ... | @@ -9913,7 +9938,8 @@ function enableShowHideStructureBox() { |
9913 | 9938 | function OnSearch() { |
9914 | 9939 | console.log('Show Search is called outside '); |
9915 | 9940 | var scope = angular.element(document.getElementById("daView")).scope(); |
9916 | - scope.$apply(function () { | |
9941 | + //Bug 39757 | |
9942 | + scope.$evalAsync(function () { | |
9917 | 9943 | scope.ShowSearch(); |
9918 | 9944 | }); |
9919 | 9945 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/filters/AIAFilter.js
... | ... | @@ -2,15 +2,19 @@ |
2 | 2 | return function (items, letter) { |
3 | 3 | |
4 | 4 | var filtered = []; |
5 | - var letterMatch = new RegExp("^" + letter._TermText, 'i'); | |
6 | - for (var i = 0; i < items.length; i++) { | |
7 | - var item = items[i]; | |
8 | - //if (letterMatch.test(item._TermText.substring(0, 1))) { | |
9 | - if (letterMatch.test(item._TermText)) { | |
5 | + var letterMatch = new RegExp("^" + letter._TermText, 'i'); | |
6 | + for (var i = 0; i < items.length; i++) { | |
7 | + var item = items[i]; | |
8 | + //Bug 39757 | |
9 | + if (letterMatch.test(item._TermText)) { | |
10 | 10 | |
11 | - filtered.push(item); | |
11 | + filtered.push(item); | |
12 | + } | |
13 | + //Bug 39757 | |
14 | + if (filtered.length > 10) { | |
15 | + break; | |
16 | + } | |
12 | 17 | } |
13 | - } | |
14 | 18 | return filtered; |
15 | 19 | }; |
16 | 20 | }); |
17 | 21 | \ No newline at end of file | ... | ... |