Commit e0e9a263141ae9c319203e0a1d72690c2c80b807
Merge branch 'Bug#8567A' into Develop
Showing
2 changed files
with
29 additions
and
17 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -2427,7 +2427,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2427 | 2427 | console.log('$scope.highlightedBR.length= ' + $scope.highlightedBR.length) |
2428 | 2428 | |
2429 | 2429 | if ($scope.highlightedBR != null || $scope.highlightedBR != undefined) { |
2430 | - | |
2430 | + | |
2431 | 2431 | if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.highlightedBR.length == 9)) { |
2432 | 2432 | $scope.doAligneCanvasWithTerm = true; |
2433 | 2433 | } |
... | ... | @@ -2440,7 +2440,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2440 | 2440 | else if ((($rootScope.viewOrientationId == '6')) && ($scope.highlightedBR.length == 1)) { |
2441 | 2441 | $scope.doAligneCanvasWithTerm = true; |
2442 | 2442 | } |
2443 | - | |
2444 | 2443 | if ($scope.doAligneCanvasWithTerm == true) { |
2445 | 2444 | |
2446 | 2445 | if ($rootScope.isListManagerSelected == true) |
... | ... | @@ -6811,7 +6810,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6811 | 6810 | $scope.searchFilter = event.currentTarget.innerHTML; |
6812 | 6811 | |
6813 | 6812 | //2. |
6814 | - $scope.HighlightBodyOnListManagerSelection(event); | |
6813 | + $scope.HighlightBodyOnListManagerSelection(event.currentTarget.id); | |
6815 | 6814 | |
6816 | 6815 | $scope.IsSearchVisible = false; |
6817 | 6816 | $rootScope.isNormalMode = false; |
... | ... | @@ -6983,7 +6982,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
6983 | 6982 | |
6984 | 6983 | |
6985 | 6984 | for (var j = 0; j < $scope.VocabTermTxt.length; j++) { |
6986 | - var $el = $('<option title ="'+ $scope.VocabTermTxt[j]._TermText+ '" ng-click=HighlightBodyOnListManagerSelection($event) id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList') | |
6985 | + var $el = $('<option title ="' + $scope.VocabTermTxt[j]._TermText + '" id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList') | |
6987 | 6986 | $compile($el)($scope); |
6988 | 6987 | |
6989 | 6988 | } |
... | ... | @@ -7001,9 +7000,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7001 | 7000 | } |
7002 | 7001 | |
7003 | 7002 | |
7004 | - $scope.HighlightBodyOnListManagerSelection = function (event) { | |
7003 | + $scope.HighlightBodyOnListManagerSelection = function (actualTermNumber) { | |
7004 | + | |
7005 | + console.log('inside HighlightBodyOnListManagerSelection actualTermNumber= ' + actualTermNumber) | |
7005 | 7006 | // Terms search in the Search list should be disable in the List Manager and Vice-Versa. |
7006 | - if ($rootScope.prevId == event.currentTarget.id) { | |
7007 | + if ($rootScope.prevId == actualTermNumber) { | |
7007 | 7008 | |
7008 | 7009 | $rootScope.isLoading = false; |
7009 | 7010 | $('#spinner').css('visibility', 'hidden'); |
... | ... | @@ -7015,12 +7016,12 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7015 | 7016 | $('#spinner').css('visibility', 'visible'); |
7016 | 7017 | |
7017 | 7018 | |
7018 | - $rootScope.prevId = event.currentTarget.id; | |
7019 | + $rootScope.prevId = actualTermNumber; | |
7019 | 7020 | $("#termList").find("option").attr('selected', false); |
7020 | 7021 | $("#termList").find("option").css({ "background-color": "#ffffff", "color": "#000000" }); |
7021 | - $("#termList").find("option[id=" + event.currentTarget.id + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
7022 | + $("#termList").find("option[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
7022 | 7023 | $("div#backdrop #termlistfilter li").find("a").css({ "background-color": "#ffffff", "color": "#000000" }); |
7023 | - $("div#backdrop #termlistfilter li").find("a[id=" + event.currentTarget.id + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
7024 | + $("div#backdrop #termlistfilter li").find("a[id=" + actualTermNumber + "]").css({ "background-color": "#3399FF", "color": "#ffffff" }); | |
7024 | 7025 | $scope.terminateCurrentlyRunningWPs(); |
7025 | 7026 | //debugger |
7026 | 7027 | $rootScope.isListManagerSelected = true; |
... | ... | @@ -7041,7 +7042,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7041 | 7042 | $rootScope.isHighlightBodyByBodySystem = false; |
7042 | 7043 | |
7043 | 7044 | //1. |
7044 | - $rootScope.actualTermNumber = event.currentTarget.id;//attributes[0].value; | |
7045 | + $rootScope.actualTermNumber = actualTermNumber;//attributes[0].value; | |
7045 | 7046 | console.log(' $scope.actualTermNumber insde HighlightBodyOnListManagerSelection= ' + $rootScope.actualTermNumber) |
7046 | 7047 | |
7047 | 7048 | //2. |
... | ... | @@ -7237,11 +7238,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7237 | 7238 | |
7238 | 7239 | $scope.aligneCanvasWithTerm = function () { |
7239 | 7240 | console.log('aligneCanvasWithTerm') |
7241 | + // debugger | |
7242 | + | |
7240 | 7243 | var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); |
7241 | 7244 | var newY = parseInt($scope.scaleValue($scope.termCoordinate.y, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); |
7242 | - | |
7243 | - var canvasX = parseInt($('#canvasDiv').css('left')); | |
7244 | - var canvasY = parseInt($('#canvasDiv').css('top')); | |
7245 | + | |
7246 | + var canvasX = parseInt(document.getElementById('canvasDiv').offsetLeft); | |
7247 | + var canvasY = parseInt(document.getElementById('canvasDiv').offsetTop); | |
7245 | 7248 | var canvasHeight = $('#canvasDiv').height(); |
7246 | 7249 | var canvasWidth = $('#canvasDiv').width(); |
7247 | 7250 | |
... | ... | @@ -7269,7 +7272,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7269 | 7272 | else { |
7270 | 7273 | newX = maxHScrollPos; |
7271 | 7274 | } |
7272 | - | |
7275 | + //alert('newX= ' + newX + ',newY= ' + newY) | |
7273 | 7276 | $('#canvasDiv').scrollLeft(newX); |
7274 | 7277 | $('#canvasDiv').scrollTop(newY); |
7275 | 7278 | $scope.isLoading = false; |
... | ... | @@ -7375,7 +7378,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7375 | 7378 | |
7376 | 7379 | |
7377 | 7380 | for (var j = 0; j < $scope.VocabTermTxt.length; j++) { |
7378 | - var $el = $('<option ng-click=HighlightBodyOnListManagerSelection($event) id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList') | |
7381 | + var $el = $('<option id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList') | |
7379 | 7382 | $compile($el)($scope); |
7380 | 7383 | } |
7381 | 7384 | |
... | ... | @@ -7622,4 +7625,13 @@ function OnZoom() |
7622 | 7625 | scope.$apply(function () { |
7623 | 7626 | scope.enableZoom(); |
7624 | 7627 | }); |
7628 | +} | |
7629 | + | |
7630 | +function onListManagerTermSelection(id) { | |
7631 | + | |
7632 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
7633 | + scope.$apply(function () { | |
7634 | + scope.HighlightBodyOnListManagerSelection(id); | |
7635 | + }); | |
7636 | + | |
7625 | 7637 | } |
7626 | 7638 | \ No newline at end of file | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -735,7 +735,7 @@ |
735 | 735 | <select class="form-control" disabled> |
736 | 736 | <option value="1" selected="">Entire View</option> |
737 | 737 | </select> |
738 | - </div> | |
738 | + </div> | |
739 | 739 | </div> |
740 | 740 | </div> |
741 | 741 | </div> |
... | ... | @@ -746,7 +746,7 @@ |
746 | 746 | |
747 | 747 | <!--DA > List Manager > Multiple structure selection should not be available.--> |
748 | 748 | <div class="form-group"> |
749 | - <select id="termList" class="form-control" size="10"></select> | |
749 | + <select id="termList" class="form-control" size="10" onclick="if (typeof (this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id)"></select> | |
750 | 750 | </div> |
751 | 751 | |
752 | 752 | </div> | ... | ... |