Commit 05a3d833daf27028219b60e5421d541e835c88a7
Merge branch 'DisableTBOrExtract' into Develop
Showing
1 changed file
with
84 additions
and
56 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -11,7 +11,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -11,7 +11,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
11 | $scope.imagePath = ""; | 11 | $scope.imagePath = ""; |
12 | $rootScope.BodyRegionData; | 12 | $rootScope.BodyRegionData; |
13 | $rootScope.BodyRegionCordinatesData; | 13 | $rootScope.BodyRegionCordinatesData; |
14 | - $scope.isTransparencyActivated; | 14 | + $scope.isTransparencyActivated = false; |
15 | $rootScope.BodyLayerData; | 15 | $rootScope.BodyLayerData; |
16 | $rootScope.VocabTermData; | 16 | $rootScope.VocabTermData; |
17 | 17 | ||
@@ -3422,31 +3422,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -3422,31 +3422,41 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
3422 | 3422 | ||
3423 | $scope.createTransparencyBox = function () { | 3423 | $scope.createTransparencyBox = function () { |
3424 | 3424 | ||
3425 | + $scope.isTransparencyActivated = true; | ||
3425 | 3426 | ||
3426 | - //if listanager is visisble then close it | ||
3427 | - | ||
3428 | - $rootScope.isListManagerSelected = false; | ||
3429 | - $rootScope.CloseListManager(); | 3427 | + //do not create TBOX if in extarct mode otherwise create |
3428 | + if ($rootScope.isExtract == false) { | ||
3430 | 3429 | ||
3430 | + $("#btnExtract").addClass("disabled"); | ||
3431 | 3431 | ||
3432 | - $scope.isTransparencyActivated = true; | ||
3433 | - // alert('transparencyClicked' + $scope.isTransparencyActivated) | ||
3434 | - $('#btnTranparency').addClass('tButtonActive'); | ||
3435 | - $('#btnIdentity').removeClass(' btn-primary'); | ||
3436 | - $('#btnIdentity').addClass('btn-black'); | 3432 | + //if listanager is visisble then close it |
3433 | + $rootScope.isListManagerSelected = false; | ||
3434 | + $rootScope.CloseListManager(); | ||
3437 | 3435 | ||
3438 | - var canvasDiv = document.getElementById('canvasDiv'); | ||
3439 | - $scope.verticalScrollPosition = canvasDiv.scrollTop; | ||
3440 | - $scope.horizontlScrollPosition = canvasDiv.scrollLeft; | ||
3441 | 3436 | ||
3442 | - var canvasDiv = document.getElementById('canvasDiv'); | ||
3443 | - canvasDiv.addEventListener("mousedown", mouseDownListener); | 3437 | + |
3438 | + // alert('transparencyClicked' + $scope.isTransparencyActivated) | ||
3439 | + $('#btnTranparency').addClass('tButtonActive'); | ||
3440 | + $('#btnIdentity').removeClass(' btn-primary'); | ||
3441 | + $('#btnIdentity').addClass('btn-black'); | ||
3444 | 3442 | ||
3445 | - canvasDiv.addEventListener("mousemove", mouseMoveListener); | 3443 | + var canvasDiv = document.getElementById('canvasDiv'); |
3444 | + $scope.verticalScrollPosition = canvasDiv.scrollTop; | ||
3445 | + $scope.horizontlScrollPosition = canvasDiv.scrollLeft; | ||
3446 | 3446 | ||
3447 | - canvasDiv.addEventListener("mouseup", mouseUpListener) | 3447 | + var canvasDiv = document.getElementById('canvasDiv'); |
3448 | + canvasDiv.addEventListener("mousedown", mouseDownListener); | ||
3448 | 3449 | ||
3449 | - | 3450 | + canvasDiv.addEventListener("mousemove", mouseMoveListener); |
3451 | + | ||
3452 | + canvasDiv.addEventListener("mouseup", mouseUpListener) | ||
3453 | + | ||
3454 | + } | ||
3455 | + else { | ||
3456 | + | ||
3457 | + // console.log("extract button is active"); | ||
3458 | + | ||
3459 | + } | ||
3450 | } | 3460 | } |
3451 | 3461 | ||
3452 | function mouseDownListener(e) { | 3462 | function mouseDownListener(e) { |
@@ -4522,6 +4532,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4522,6 +4532,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4522 | 4532 | ||
4523 | $scope.CloseTransparencyBox = function () { | 4533 | $scope.CloseTransparencyBox = function () { |
4524 | 4534 | ||
4535 | + //To enable extract button | ||
4536 | + $scope.isTransparencyActivated = false; | ||
4537 | + $("#btnExtract").removeClass("disabled"); | ||
4538 | + | ||
4525 | $('.com_anno').css('display', 'none'); | 4539 | $('.com_anno').css('display', 'none'); |
4526 | 4540 | ||
4527 | $('#sppeachBubble_annotation').css('display', 'none'); | 4541 | $('#sppeachBubble_annotation').css('display', 'none'); |
@@ -4954,64 +4968,78 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -4954,64 +4968,78 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
4954 | $rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop(); | 4968 | $rootScope.CanvasDivTopPosition = $("#canvasDiv").scrollTop(); |
4955 | 4969 | ||
4956 | $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft(); | 4970 | $rootScope.CanvasDivLeftPosition = $("#canvasDiv").scrollLeft(); |
4957 | - //if listanager is visisble then close it | 4971 | + |
4958 | 4972 | ||
4959 | - // $rootScope.isListManagerSelected = false; | ||
4960 | - $rootScope.CloseListManager(); | ||
4961 | - //1. | ||
4962 | - $rootScope.isLoading = true; | ||
4963 | - $('#spinner').css('visibility', 'visible'); | ||
4964 | 4973 | ||
4965 | - //2. | ||
4966 | - $scope.terminateCurrentlyRunningWPs(); | 4974 | + if ($scope.isTransparencyActivated == true) { |
4967 | 4975 | ||
4968 | - //3. | ||
4969 | - if ($rootScope.isExtract == true) { | 4976 | + $("#btnExtract").addClass("disabled"); |
4970 | 4977 | ||
4971 | } | 4978 | } |
4979 | + | ||
4980 | + | ||
4972 | else { | 4981 | else { |
4973 | - $rootScope.isExtract = true; | ||
4974 | 4982 | ||
4983 | + | ||
4984 | + $rootScope.CloseListManager(); | ||
4985 | + //1. | ||
4986 | + $rootScope.isLoading = true; | ||
4987 | + $('#spinner').css('visibility', 'visible'); | ||
4975 | 4988 | ||
4976 | - if ($rootScope.isNormalMode == true) { | 4989 | + //2. |
4990 | + $scope.terminateCurrentlyRunningWPs(); | ||
4991 | + | ||
4992 | + //3. | ||
4993 | + if ($rootScope.isExtract == true) { | ||
4977 | 4994 | ||
4978 | - $rootScope.isHighLight = false; | ||
4979 | - $rootScope.isNormalMode = false; | ||
4980 | } | 4995 | } |
4981 | else { | 4996 | else { |
4982 | - $rootScope.isNormalMode = false; | ||
4983 | - $rootScope.isHighLight = false; | ||
4984 | - } | 4997 | + $rootScope.isExtract = true; |
4998 | + //disable transparency button | ||
4999 | + | ||
5000 | + $("#btnTranparency").addClass("disabled"); | ||
4985 | 5001 | ||
4986 | - //4. | ||
4987 | - console.log('highLightBody from enableExtract') | ||
4988 | - $scope.highLightBody(); | ||
4989 | 5002 | ||
5003 | + if ($rootScope.isNormalMode == true) { | ||
4990 | 5004 | ||
4991 | - } | 5005 | + $rootScope.isHighLight = false; |
5006 | + $rootScope.isNormalMode = false; | ||
5007 | + } | ||
5008 | + else { | ||
5009 | + $rootScope.isNormalMode = false; | ||
5010 | + $rootScope.isHighLight = false; | ||
5011 | + } | ||
4992 | 5012 | ||
4993 | - //5. unhighlight other | ||
4994 | - //$scope.Normal = ""; | ||
4995 | - //$scope.Extract = "LeftButtonsDefaultState"; | ||
4996 | - //$scope.Highlight = ""; | 5013 | + //4. |
5014 | + console.log('highLightBody from enableExtract') | ||
5015 | + $scope.highLightBody(); | ||
4997 | 5016 | ||
4998 | - $("#btnExtract").addClass("btn-primary"); | ||
4999 | - $("#btnExtract").removeClass("btn-black"); | ||
5000 | 5017 | ||
5001 | - if (!$("#btnNormalMode").hasClass("btn-black")) { | ||
5002 | - $("#btnNormalMode").addClass("btn-black"); | ||
5003 | - } | 5018 | + } |
5004 | 5019 | ||
5005 | - if (!$("#btnHighLight").hasClass("btn-black")) { | ||
5006 | - $("#btnHighLight").addClass("btn-black"); | ||
5007 | - } | 5020 | + //5. unhighlight other |
5021 | + //$scope.Normal = ""; | ||
5022 | + //$scope.Extract = "LeftButtonsDefaultState"; | ||
5023 | + //$scope.Highlight = ""; | ||
5008 | 5024 | ||
5009 | - if ($("#btnNormalMode").hasClass("btn-primary")) { | ||
5010 | - $("#btnNormalMode").removeClass("btn-primary"); | ||
5011 | - } | 5025 | + $("#btnExtract").addClass("btn-primary"); |
5026 | + $("#btnExtract").removeClass("btn-black"); | ||
5012 | 5027 | ||
5013 | - if ($("#btnHighLight").hasClass("btn-primary")) { | ||
5014 | - $("#btnHighLight").removeClass("btn-primary"); | 5028 | + if (!$("#btnNormalMode").hasClass("btn-black")) { |
5029 | + $("#btnNormalMode").addClass("btn-black"); | ||
5030 | + } | ||
5031 | + | ||
5032 | + if (!$("#btnHighLight").hasClass("btn-black")) { | ||
5033 | + $("#btnHighLight").addClass("btn-black"); | ||
5034 | + } | ||
5035 | + | ||
5036 | + if ($("#btnNormalMode").hasClass("btn-primary")) { | ||
5037 | + $("#btnNormalMode").removeClass("btn-primary"); | ||
5038 | + } | ||
5039 | + | ||
5040 | + if ($("#btnHighLight").hasClass("btn-primary")) { | ||
5041 | + $("#btnHighLight").removeClass("btn-primary"); | ||
5042 | + } | ||
5015 | } | 5043 | } |
5016 | } | 5044 | } |
5017 | 5045 |