Commit 21e0be34680c7df3079e69569526dcdc9caf1f6f

Authored by unknown
1 parent d5ffa0b1

#6062-Extract view is not disabled in transparency mode.

#7552- Click is disabled within the image area if open annotation toolbar and and closing without doing anything
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -3400,35 +3400,44 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
3400 3400  
3401 3401 };
3402 3402  
3403   -
  3403 + $rootScope.isTransparencyBoxActivated = false;
3404 3404 $scope.createTransparencyBox = function () {
  3405 +
  3406 + $rootScope.isTransparencyBoxActivated = true;
  3407 +
  3408 + if ($rootScope.isExtractButtonActive == false) {
3405 3409  
3406   -
3407   - //if listanager is visisble then close it
3408   -
  3410 + //if listanager is visisble then close it
  3411 + $("#btnExtract").addClass("disabled");
3409 3412 $rootScope.isListManagerSelected = false;
3410 3413 $rootScope.CloseListManager();
3411 3414  
3412 3415  
3413   - $scope.isTransparencyActivated = true;
3414   - // alert('transparencyClicked' + $scope.isTransparencyActivated)
3415   - $('#btnTranparency').addClass('tButtonActive');
3416   - $('#btnIdentity').removeClass(' btn-primary');
3417   - $('#btnIdentity').addClass('btn-black');
  3416 + $scope.isTransparencyActivated = true;
  3417 +
  3418 + $('#btnTranparency').addClass('tButtonActive');
  3419 + $('#btnIdentity').removeClass(' btn-primary');
  3420 + $('#btnIdentity').addClass('btn-black');
3418 3421  
3419   - var canvasDiv = document.getElementById('canvasDiv');
3420   - $scope.verticalScrollPosition = canvasDiv.scrollTop;
3421   - $scope.horizontlScrollPosition = canvasDiv.scrollLeft;
  3422 + var canvasDiv = document.getElementById('canvasDiv');
  3423 + $scope.verticalScrollPosition = canvasDiv.scrollTop;
  3424 + $scope.horizontlScrollPosition = canvasDiv.scrollLeft;
3422 3425  
3423   - var canvasDiv = document.getElementById('canvasDiv');
3424   - canvasDiv.addEventListener("mousedown", mouseDownListener);
  3426 + var canvasDiv = document.getElementById('canvasDiv');
  3427 + canvasDiv.addEventListener("mousedown", mouseDownListener);
3425 3428  
3426   - canvasDiv.addEventListener("mousemove", mouseMoveListener);
  3429 + canvasDiv.addEventListener("mousemove", mouseMoveListener);
3427 3430  
3428   - canvasDiv.addEventListener("mouseup", mouseUpListener)
  3431 + canvasDiv.addEventListener("mouseup", mouseUpListener)
3429 3432  
3430   - }
  3433 + }
  3434 + else
  3435 + {
3431 3436  
  3437 + console.log("extract button is active");
  3438 +
  3439 + }
  3440 + }
3432 3441 function mouseDownListener(e) {
3433 3442 //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
3434 3443 var tCanvas = document.getElementById('transparencyCanvas');
... ... @@ -4496,7 +4505,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4496 4505 }
4497 4506  
4498 4507 $scope.CloseTransparencyBox = function () {
4499   -
  4508 + $rootScope.isTransparencyBoxActivated = false;
  4509 + $("#btnExtract").removeClass("disabled");
4500 4510 $('.com_anno').css('display', 'none');
4501 4511  
4502 4512 $('#sppeachBubble_annotation').css('display', 'none');
... ... @@ -4860,7 +4870,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4860 4870 }
4861 4871  
4862 4872 $scope.enableNormalMode = function () {
4863   -
  4873 +
  4874 +
  4875 +
  4876 + $rootScope.isExtractButtonActive = false;
  4877 + $("#btnTranparency").removeClass("disabled");
4864 4878 console.log('enableNormalMode is called');
4865 4879  
4866 4880  
... ... @@ -4921,70 +4935,82 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
4921 4935 $("#btnHighLight").removeClass("btn-primary");
4922 4936 }
4923 4937 }
4924   -
  4938 + $rootScope.isExtractButtonActive = false;
4925 4939 $scope.enableExtract = function () {
  4940 + if ($rootScope.isTransparencyBoxActivated == true) {
4926 4941  
  4942 + $("#btnExtract").addClass("disabled");
4927 4943  
  4944 + }
  4945 + else
  4946 + {
4928 4947  
4929   - //if listanager is visisble then close it
4930   -
4931   - // $rootScope.isListManagerSelected = false;
4932   - $rootScope.CloseListManager();
4933   - //1.
4934   - $rootScope.isLoading = true;
4935   - $('#spinner').css('visibility', 'visible');
4936   -
4937   - //2.
4938   - $scope.terminateCurrentlyRunningWPs();
  4948 + //disable transparency button
  4949 + $rootScope.isExtractButtonActive = true;
  4950 + $("#btnTranparency").addClass("disabled");
4939 4951  
4940   - //3.
4941   - if ($rootScope.isExtract == true) {
  4952 + //if listanager is visisble then close it
4942 4953  
4943   - }
4944   - else {
4945   - $rootScope.isExtract = true;
  4954 + // $rootScope.isListManagerSelected = false;
  4955 + $rootScope.CloseListManager();
  4956 + //1.
  4957 + $rootScope.isLoading = true;
  4958 + $('#spinner').css('visibility', 'visible');
4946 4959  
  4960 + //2.
  4961 + $scope.terminateCurrentlyRunningWPs();
4947 4962  
4948   - if ($rootScope.isNormalMode == true) {
  4963 + //3.
  4964 + if ($rootScope.isExtract == true) {
4949 4965  
4950   - $rootScope.isHighLight = false;
4951   - $rootScope.isNormalMode = false;
4952 4966 }
4953 4967 else {
4954   - $rootScope.isNormalMode = false;
4955   - $rootScope.isHighLight = false;
4956   - }
  4968 + $rootScope.isExtract = true;
4957 4969  
4958   - //4.
4959   - console.log('highLightBody from enableExtract')
4960   - $scope.highLightBody();
4961 4970  
  4971 + if ($rootScope.isNormalMode == true) {
4962 4972  
4963   - }
  4973 + $rootScope.isHighLight = false;
  4974 + $rootScope.isNormalMode = false;
  4975 + }
  4976 + else {
  4977 + $rootScope.isNormalMode = false;
  4978 + $rootScope.isHighLight = false;
  4979 + }
4964 4980  
4965   - //5. unhighlight other
4966   - //$scope.Normal = "";
4967   - //$scope.Extract = "LeftButtonsDefaultState";
4968   - //$scope.Highlight = "";
  4981 + //4.
  4982 + console.log('highLightBody from enableExtract')
  4983 + $scope.highLightBody();
4969 4984  
4970   - $("#btnExtract").addClass("btn-primary");
4971   - $("#btnExtract").removeClass("btn-black");
4972 4985  
4973   - if (!$("#btnNormalMode").hasClass("btn-black")) {
4974   - $("#btnNormalMode").addClass("btn-black");
4975   - }
  4986 + }
4976 4987  
4977   - if (!$("#btnHighLight").hasClass("btn-black")) {
4978   - $("#btnHighLight").addClass("btn-black");
4979   - }
  4988 + //5. unhighlight other
  4989 + //$scope.Normal = "";
  4990 + //$scope.Extract = "LeftButtonsDefaultState";
  4991 + //$scope.Highlight = "";
4980 4992  
4981   - if ($("#btnNormalMode").hasClass("btn-primary")) {
4982   - $("#btnNormalMode").removeClass("btn-primary");
4983   - }
  4993 + $("#btnExtract").addClass("btn-primary");
  4994 + $("#btnExtract").removeClass("btn-black");
  4995 +
  4996 + if (!$("#btnNormalMode").hasClass("btn-black")) {
  4997 + $("#btnNormalMode").addClass("btn-black");
  4998 + }
  4999 +
  5000 + if (!$("#btnHighLight").hasClass("btn-black")) {
  5001 + $("#btnHighLight").addClass("btn-black");
  5002 + }
  5003 +
  5004 + if ($("#btnNormalMode").hasClass("btn-primary")) {
  5005 + $("#btnNormalMode").removeClass("btn-primary");
  5006 + }
  5007 +
  5008 + if ($("#btnHighLight").hasClass("btn-primary")) {
  5009 + $("#btnHighLight").removeClass("btn-primary");
  5010 + }
4984 5011  
4985   - if ($("#btnHighLight").hasClass("btn-primary")) {
4986   - $("#btnHighLight").removeClass("btn-primary");
4987 5012 }
  5013 +
4988 5014 }
4989 5015  
4990 5016 $scope.enableShowHideStructureBox = function () {
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -127,6 +127,10 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
127 127 console.log('close')
128 128 $(".annotationTollbar").css("display", "none");
129 129 $rootScope.isAnnotationWindowClose = true;
  130 + //Click is disabled within the image area if open annotation toolbar and and closing without doing anything
  131 + $("#canvasPaint").css("display", "none");
  132 + $("#canvas").css("display", "none");
  133 +
130 134 }
131 135  
132 136 $rootScope.OnIdentifyClick = function () {
... ...