Commit 55551f19fe972cb1dbe4d6f686258c8a1a347ca7
Merge branch 'Develop' of http://52.6.196.163/ADAM/AIAHTML5 into Brushsize
Showing
4 changed files
with
54 additions
and
29 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -360,7 +360,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, pages, B |
360 | 360 | |
361 | 361 | $rootScope.openViews.push( |
362 | 362 | { |
363 | - "module": $rootScope.currentActiveModuleTitle, "body-views": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
363 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
364 | 364 | "slug": $rootScope.currentSlug |
365 | 365 | }); |
366 | 366 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... | ... | @@ -426,7 +426,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
426 | 426 | |
427 | 427 | $rootScope.openViews.push( |
428 | 428 | { |
429 | - "module": $rootScope.currentActiveModuleTitle, "body-views": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
429 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
430 | 430 | "slug": $rootScope.currentSlug |
431 | 431 | }); |
432 | 432 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -441,7 +441,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
441 | 441 | if (openViews != null && openViews != undefined) { |
442 | 442 | angular.forEach(openViews, function (value, key) { |
443 | 443 | |
444 | - if (value.body - views == tittle) { | |
444 | + if (value.bodyView == tittle) { | |
445 | 445 | tittle = localStorage.getItem("currentViewTitleFromJson") + counter++; |
446 | 446 | $rootScope.currentActiveViewTitle = tittle; |
447 | 447 | localStorage.setItem("currentViewTitle", tittle); |
... | ... | @@ -480,7 +480,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
480 | 480 | //0.2 |
481 | 481 | $rootScope.openViews.push( |
482 | 482 | { |
483 | - "module": $rootScope.currentActiveModuleTitle, "body-views": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
483 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": tittle, "state": 'max', "BodyViewId": $rootScope.currentBodyViewId, | |
484 | 484 | "slug": $rootScope.currentSlug |
485 | 485 | } |
486 | 486 | ); |
... | ... | @@ -1459,10 +1459,6 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1459 | 1459 | { |
1460 | 1460 | if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { |
1461 | 1461 | |
1462 | - $rootScope.isLoading = false; | |
1463 | - $('#spinner').css('visibility', 'hidden'); | |
1464 | - | |
1465 | - | |
1466 | 1462 | $rootScope.isLoading = true; |
1467 | 1463 | $('#spinner').css('visibility', 'visible'); |
1468 | 1464 | //$timeout(function () { |
... | ... | @@ -1785,13 +1781,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1785 | 1781 | |
1786 | 1782 | if ($rootScope.isHighLight == true || ($rootScope.isListManagerSelected == true) || (($rootScope.isGenderChnage == true) && ($rootScope.isHighLight == true)) || (($rootScope.isViewChange == true) && ($rootScope.isHighLight == true))) { |
1787 | 1783 | |
1788 | - $rootScope.isLoading = false; | |
1789 | - $('#spinner').css('visibility', 'hidden'); | |
1790 | - | |
1791 | 1784 | |
1792 | 1785 | $rootScope.isLoading = true; |
1793 | 1786 | $('#spinner').css('visibility', 'visible'); |
1794 | - //$timeout(function () { | |
1787 | + | |
1795 | 1788 | console.log('inside start of non flipped. $scope.ColoredImageSRC.length= ' + $scope.ColoredImageSRC.length) |
1796 | 1789 | $rootScope.isHighLight = true; |
1797 | 1790 | |
... | ... | @@ -1800,7 +1793,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1800 | 1793 | $scope.highLightBody(); |
1801 | 1794 | |
1802 | 1795 | console.log('just after highLightBody call'); |
1803 | - //}, 500); | |
1796 | + | |
1804 | 1797 | } |
1805 | 1798 | } |
1806 | 1799 | } |
... | ... | @@ -2059,6 +2052,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2059 | 2052 | // $rootScope.updatedGrayDataList = null; |
2060 | 2053 | // $rootScope.updatedGrayDataList = []; |
2061 | 2054 | //} |
2055 | + $rootScope.isLoading = true; | |
2056 | + $('#spinner').css('visibility', 'visible'); | |
2057 | + | |
2062 | 2058 | |
2063 | 2059 | if ($rootScope.isHighLight == true) { |
2064 | 2060 | false; |
... | ... | @@ -5033,6 +5029,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5033 | 5029 | |
5034 | 5030 | $scope.highLightBody = function () { |
5035 | 5031 | |
5032 | + $rootScope.isLoading = true; | |
5033 | + $('#spinner').css('visibility', 'visible'); | |
5034 | + | |
5036 | 5035 | $scope.Normal = ""; |
5037 | 5036 | $scope.Extract = ""; |
5038 | 5037 | $scope.Highlight = "LeftButtonsDefaultState"; |
... | ... | @@ -5216,6 +5215,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5216 | 5215 | // console.log('$scope.grayedBR.length is ' + $scope.grayedBR.length); |
5217 | 5216 | $timeout(function () { |
5218 | 5217 | |
5218 | + $scope.isLoading = true; | |
5219 | + $('#spinner').css('visibility', 'visible'); | |
5220 | + | |
5219 | 5221 | $scope.HighlightBodyByTermList($scope.AllTerms) |
5220 | 5222 | }, 800); |
5221 | 5223 | |
... | ... | @@ -5554,7 +5556,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5554 | 5556 | |
5555 | 5557 | $rootScope.openViews.push( |
5556 | 5558 | { |
5557 | - "module": $rootScope.currentActiveModuleTitle, "body-views": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": currentBodyViewId, | |
5559 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": currentBodyViewId, | |
5558 | 5560 | "slug": $rootScope.currentSlug |
5559 | 5561 | } |
5560 | 5562 | ); |
... | ... | @@ -5730,7 +5732,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
5730 | 5732 | |
5731 | 5733 | $rootScope.openViews.push( |
5732 | 5734 | { |
5733 | - "module": $rootScope.currentActiveModuleTitle, "body-views": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId, | |
5735 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": localStorage.getItem("currentViewTitle"), "state": 'max', "BodyViewId": $rootScope.voId, | |
5734 | 5736 | "slug": $rootScope.currentSlug |
5735 | 5737 | } |
5736 | 5738 | ); |
... | ... | @@ -7170,7 +7172,9 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7170 | 7172 | |
7171 | 7173 | $scope.jumpToTerm = function (event) { |
7172 | 7174 | |
7173 | - | |
7175 | + $rootScope.isLoading = true; | |
7176 | + | |
7177 | + $('#spinner').css('visibility', 'visible'); | |
7174 | 7178 | //1. |
7175 | 7179 | $scope.searchFilter = event.currentTarget.innerHTML; |
7176 | 7180 | |
... | ... | @@ -7248,7 +7252,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7248 | 7252 | |
7249 | 7253 | |
7250 | 7254 | |
7251 | - | |
7255 | + $('#viewName').empty(); | |
7252 | 7256 | var currentView = localStorage.getItem("currentViewTitle"); |
7253 | 7257 | var viewNmeHtml = '<option>' + currentView + '</option>' |
7254 | 7258 | $('#viewName').append(viewNmeHtml); |
... | ... | @@ -7318,6 +7322,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7318 | 7322 | for (var j = 0; j < $scope.VocabTermTxt.length; j++) { |
7319 | 7323 | var $el = $('<option ng-click=HighlightBodyOnListManagerSelection($event) id=' + $scope.VocabTermTxt[j]._ActualTermNumber + '>' + $scope.VocabTermTxt[j]._TermText + '</option>').appendTo('#termList') |
7320 | 7324 | $compile($el)($scope); |
7325 | + | |
7321 | 7326 | $rootScope.isLoading = false; |
7322 | 7327 | $('#spinner').css('visibility', 'hidden'); |
7323 | 7328 | } |
... | ... | @@ -7512,6 +7517,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7512 | 7517 | } |
7513 | 7518 | } |
7514 | 7519 | |
7520 | + | |
7515 | 7521 | $scope.aligneCanvasWithTerm = function () { |
7516 | 7522 | console.log('aligneCanvasWithTerm') |
7517 | 7523 | var newX = parseInt($scope.scaleValue($scope.termCoordinate.x, $scope.zoomInOut, DA[0].ZOOM_TERM_DATA)); |
... | ... | @@ -7519,30 +7525,45 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7519 | 7525 | |
7520 | 7526 | var canvasX = parseInt($('#canvasDiv').css('left')); |
7521 | 7527 | var canvasY = parseInt($('#canvasDiv').css('top')); |
7522 | - var canvasWidth = parseInt($('#canvasDiv').css('width')); | |
7523 | - var canvasHeight = parseInt($('#canvasDiv').css('height')); | |
7528 | + var canvasHeight = $('#canvasDiv').height(); | |
7529 | + var canvasWidth = $('#canvasDiv').width(); | |
7530 | + | |
7524 | 7531 | var canvasBottom = canvasY + canvasHeight; |
7525 | 7532 | var canvasRight = canvasX + canvasWidth |
7526 | 7533 | |
7527 | - | |
7528 | - if (newX >= canvasX && newX <= canvasRight && newY >= canvasY && newY <= canvasBottom) { | |
7529 | - | |
7530 | - } | |
7531 | - else { | |
7534 | + if (newX < canvasX || newX > canvasRight || newY < canvasY || newY > canvasBottom) { | |
7535 | + | |
7532 | 7536 | newX = newX - canvasWidth / 2; |
7533 | 7537 | newY = newY - canvasHeight / 2; |
7534 | 7538 | |
7535 | - } | |
7539 | + var maxVScrollPos = $('#canvasDiv')[0].scrollHeight; | |
7540 | + var maxHScrollPos = $('#canvasDiv')[0].scrollWidth; | |
7536 | 7541 | |
7542 | + if (newY < maxVScrollPos) { | |
7543 | + newY = newY; | |
7544 | + } | |
7545 | + else { | |
7546 | + newY = maxVScrollPos; | |
7547 | + } | |
7548 | + | |
7549 | + if (newX < maxHScrollPos) { | |
7550 | + newX = newX; | |
7551 | + } | |
7552 | + else { | |
7553 | + newX = maxHScrollPos; | |
7554 | + } | |
7537 | 7555 | |
7556 | + $('#canvasDiv').scrollLeft(newX); | |
7557 | + $('#canvasDiv').scrollTop(newY); | |
7538 | 7558 | |
7539 | - console.log('newX =' + newX + ',newY= ' + newY) | |
7540 | - $rootScope.xOnSearch= $('#canvasDiv').scrollLeft(newX); | |
7541 | - $rootScope.yOnSearch = $('#canvasDiv').scrollTop(newY); | |
7559 | + } | |
7542 | 7560 | |
7543 | 7561 | |
7562 | + $scope.isLoading = false; | |
7563 | + $('#spinner').css('visibility', 'hidden'); | |
7544 | 7564 | } |
7545 | 7565 | |
7566 | + | |
7546 | 7567 | $scope.scaleValue = function (nValue, nNewZoom, nExistingZoom) { |
7547 | 7568 | |
7548 | 7569 | var iReturnValue = nValue * nNewZoom; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -77,7 +77,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
77 | 77 | |
78 | 78 | $rootScope.openViews.push( |
79 | 79 | { |
80 | - "module": $rootScope.currentActiveModuleTitle, "body-views": title, "state": state, "BodyViewId": $rootScope.currentBodyViewId, | |
80 | + "module": $rootScope.currentActiveModuleTitle, "bodyView": title, "state": state, "BodyViewId": $rootScope.currentBodyViewId, | |
81 | 81 | "slug": $rootScope.currentSlug |
82 | 82 | } |
83 | 83 | ); |
... | ... | @@ -441,6 +441,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
441 | 441 | //$rootScope.isListManagerSelected = false; |
442 | 442 | $('#listManager').css('display', 'none'); |
443 | 443 | $("#listManager").css("visibility", "hidden"); |
444 | + | |
445 | + $rootScope.isLoading = false; | |
446 | + $('#spinner').css('visibility', 'hidden'); | |
447 | + //$('#spinner').css('display', 'none'); | |
444 | 448 | // $rootScope.isAnnotationWindowClose = true; |
445 | 449 | // if('#termList') |
446 | 450 | if ($('#termList option').length > 0) { | ... | ... |