Commit e3c3cc0e7b515eafe3651867b7351ab7784fafc2

Authored by Amrita Vishnoi
2 parents 89a3c155 3f0d1415

Merge branch 'Bug#23119_1' of http://52.6.196.163/ADAM/AIAHTML5 into Develop

# Conflicts:
#	400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
#	400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -35,7 +35,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
35 35 $scope.transNumber = 100;
36 36  
37 37 $rootScope.modestyCanvasZindex = 12100;
38   - $rootScope.isModestyCanvasVisible = false;
  38 + $rootScope.isTBoxModestyVisible = false;
39 39 //for transarency scale
40 40 $scope.TBDrawStartX;
41 41 $scope.TBDrawStartY;
... ... @@ -3252,7 +3252,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
3252 3252 if (parseInt(termNumber) != parseInt(figLeafTermNo)) {
3253 3253 $scope.TermNumber = termNumber;
3254 3254 for (var j = 0; j <= $rootScope.lexiconLanguageArray.length - 1; j++) {
3255   - if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined) {
  3255 + if ($rootScope.TermNumberData != null || $rootScope.TermNumberData != undefined)
  3256 + {
3256 3257 $scope.matchedTermNoData = new jinqJs()
3257 3258 .from($rootScope.TermNumberData.TermData.Term)
3258 3259 .where('_TermNumber == ' + termNumber)
... ... @@ -3279,8 +3280,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3279 3280 }
3280 3281 }
3281 3282 else {
3282   - $rootScope.loadSearchData();
3283   - $scope.GetAnnotationText(termNumber);
  3283 + var currentBodyViewId = $rootScope.voId;
  3284 + var termJsonPath = '~/../content/data/json/da/body-views/' + currentBodyViewId + '/da_dat_tm_sg_' + currentBodyViewId + '.json';
  3285 + DataService.getAnotherJson(termJsonPath)
  3286 + .then(
  3287 + function (result) {
  3288 + $rootScope.TermNumberData = result;
  3289 + $scope.GetAnnotationText(termNumber);
  3290 + })
3284 3291 }
3285 3292 }
3286 3293 }
... ... @@ -3650,7 +3657,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3650 3657 // we decide the size of speech bubble
3651 3658 //2.
3652 3659  
3653   - if (event.ctrlKey) {
  3660 + if (event.ctrlKey) {
3654 3661 console.log('ctrl pressed');
3655 3662 $scope.multiAnnotationIsON = true;
3656 3663 //2.1 create unique speech bubbles
... ... @@ -3769,12 +3776,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3769 3776 });
3770 3777 }
3771 3778 }
  3779 +
3772 3780 if (document.getElementById("btnStrutureBox").name == "showAnnotationStructure") {
3773 3781 $scope.showAnnotation()
3774 3782 }
3775 3783 else {
3776 3784 $scope.hideAnnotation()
3777 3785 }
  3786 +
3778 3787 if ($rootScope.isTBCompleted == true) {
3779 3788 $('#sppeachBubble').remove();
3780 3789 $('#dot').remove();
... ... @@ -4044,7 +4053,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4044 4053 }
4045 4054 }
4046 4055 $scope.createSpeechBubbleBasedOnTransparencyWithoutCtrl = function (x, y) {
4047   -
  4056 + $("#bord_annotation").remove();
  4057 + $("#sppeachBubble_annotation").remove();
  4058 + $("#dot_annotation").remove();
4048 4059 var sppechBubbleDotHTML_annotation = '<div id="dot_annotation" style="position:absolute;height:15px;width:35px;display:none;z-index:59000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>'
4049 4060 + '<div id="sppeachBubble_annotation" style="height:auto!important;z-index:60000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;position:absolute;color:#fff;text-align:left;font-size:12px;background-color:#19100e;font-weight:bold;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;-o-border-radius:5px;-ms-border-radius:5px;font-weight:bold;">'
4050 4061 + '<span style="position:absolute;right:-3px;top:-4px;color:#ffffff;cursor:pointer;">'
... ... @@ -4633,7 +4644,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4633 4644 $("#annotationpaintbrushsize").removeClass("activebtncolor");
4634 4645 $("#annotationpainteraser").removeClass("activebtncolor");
4635 4646 if ($("#DrawMode").hasClass("annotationtoolbartab")) {
4636   - if ($rootScope.isModestyCanvasVisible == true) {
  4647 + if ($rootScope.isTBoxModestyVisible == true) {
4637 4648  
4638 4649 $rootScope.switchCanvas();
4639 4650  
... ... @@ -4868,7 +4879,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4868 4879 }
4869 4880  
4870 4881 if (document.getElementById(modestyTransCanvasId) == null || document.getElementById(modestyTransCanvasId) == undefined) {
4871   - $rootScope.isModestyCanvasVisible = true;
  4882 + $rootScope.isTBoxModestyVisible = true;
4872 4883 var canvasModesty = document.createElement('canvas');
4873 4884 canvasModesty.id = modestyTransCanvasId;
4874 4885 canvasModesty.height = Height;
... ... @@ -4877,7 +4888,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4877 4888 canvasModesty.style.left = X + 'px';
4878 4889 canvasModesty.style.top = Y + 'px';
4879 4890 canvasModesty.style.visibility = 'visible';
4880   - canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex;
  4891 + if($rootScope.currentBodyViewId=="11"){
  4892 +
  4893 + canvasModesty.style.zIndex = 11000;
  4894 + }
  4895 + else
  4896 + canvasModesty.style.zIndex = $rootScope.modestyCanvasZindex;
4881 4897 canvasModesty.addEventListener('click', OnClickModestyTransCanvas);
4882 4898  
4883 4899 document.getElementById('canvasDiv').appendChild(canvasModesty);
... ... @@ -5508,11 +5524,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5508 5524 var bodyRegionRight = parseInt(value.X) + parseInt(value.Width);
5509 5525 var bodyRegionBottom = parseInt(value.Y) + parseInt(value.Height);
5510 5526 if ($rootScope.Xaxis <= bodyRegionRight && $rootScope.Yaxis <= bodyRegionBottom && value.X <= $rootScope.Xaxis && value.Y <= $rootScope.Yaxis) {
5511   - $rootScope.BRId = value.bodyRegionId;
5512   - $rootScope.BodyRegionXAxis = value.X;
5513   - $rootScope.BodyRegionYAxis = value.Y;
5514   - $rootScope.isMirrorBodyRegion = value.IsMirror;
5515   - return false;
  5527 + if ($rootScope.currentBodyViewId == "11" || $rootScope.currentBodyViewId == "9") {
  5528 + if (value.bodyRegionId == "6") {
  5529 + $rootScope.BRId = value.bodyRegionId;
  5530 + $rootScope.BodyRegionXAxis = value.X;
  5531 + $rootScope.BodyRegionYAxis = value.Y;
  5532 + $rootScope.isMirrorBodyRegion = value.IsMirror;
  5533 + return false;
  5534 + }
  5535 + }
  5536 + else {
  5537 + $rootScope.BRId = value.bodyRegionId;
  5538 + $rootScope.BodyRegionXAxis = value.X;
  5539 + $rootScope.BodyRegionYAxis = value.Y;
  5540 + $rootScope.isMirrorBodyRegion = value.IsMirror;
  5541 + return false;
  5542 + }
  5543 +
5516 5544 }
5517 5545 });
5518 5546 }
... ... @@ -6284,7 +6312,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6284 6312 }
6285 6313  
6286 6314 $scope.CloseTransparencyBox = function () {
6287   - $rootScope.isModestyCanvasVisible = false;
  6315 + $rootScope.isTBoxModestyVisible = false;
6288 6316 //for enabling annoataions.
6289 6317 //Now everything si done on canavases uswed in annotation toolbar.
6290 6318  
... ... @@ -6980,7 +7008,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6980 7008  
6981 7009 $scope.enableShowHideStructureBox = function () {
6982 7010  
6983   -
  7011 +
6984 7012 //if listanager is visisble then close it
6985 7013  
6986 7014  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -1104,8 +1104,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1104 1104 }
1105 1105  
1106 1106 $rootScope.switchToTransparencycanvas = function () {
1107   -
1108   - if ($rootScope.isModestyCanvasVisible == true) {
  1107 +
  1108 + if ($rootScope.isTBoxModestyVisible == true) {
1109 1109 var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
1110 1110 if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
1111 1111 for (var j = 0; j < modestyTransCanvases.length; j++) {
... ... @@ -1114,15 +1114,21 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1114 1114 if (ctx.style.visibility == "visible") {
1115 1115  
1116 1116 if ($("#OnIdentify").hasClass("annotationtoolbartab")) {
1117   -
  1117 +
1118 1118 var drawCanvasZindex = $("#canvas").css("z-index");
1119 1119 var paintCanvasZindex = $("#canvasPaint").css("z-index");
1120 1120 var TransCanvasZindex = ctx.style.zIndex;
1121 1121 var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
1122 1122 MaxZindexVal = MaxZindexVal + 1;
1123 1123 $("#canvas").css("z-index", MaxZindexVal);
1124   - $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
  1124 + if ($rootScope.currentBodyViewId == "11") {
  1125 + $(".ui-wrapper").css("z-index", MaxZindexVal + 1);
  1126 + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
1125 1127  
  1128 + }
  1129 + else {
  1130 + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
  1131 + }
1126 1132 }
1127 1133 else {
1128 1134 var drawCanvasZindex = $("#canvas").css("z-index");
... ... @@ -1132,11 +1138,19 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1132 1138 MaxZindexVal = parseInt(MaxZindexVal + 1);
1133 1139  
1134 1140 if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
1135   -
1136 1141 $("#canvasPaint").css("z-index", MaxZindexVal);
1137 1142 }
1138 1143 else {
  1144 +
1139 1145 $("#canvas").css("z-index", MaxZindexVal);
  1146 + if ($rootScope.currentBodyViewId == "11") {
  1147 + $(".ui-wrapper").css("z-index", MaxZindexVal);
  1148 + }
  1149 + else
  1150 + {
  1151 + $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
  1152 + }
  1153 +
1140 1154 }
1141 1155  
1142 1156 }
... ... @@ -1404,7 +1418,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1404 1418 }
1405 1419  
1406 1420 $rootScope.switchCanvasToPaintCanvas = function (e) {
1407   - if ($rootScope.isModestyCanvasVisible == true) {
  1421 + if ($rootScope.isTBoxModestyVisible == true) {
1408 1422 var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
1409 1423 if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
1410 1424 for (var j = 0; j < modestyTransCanvases.length; j++) {
... ... @@ -1549,8 +1563,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1549 1563  
1550 1564  
1551 1565 $rootScope.switchCanvas = function () {
1552   -
1553   - if ($rootScope.isModestyCanvasVisible == true) {
  1566 +
  1567 + if ($rootScope.isTBoxModestyVisible == true) {
1554 1568 var modestyTransCanvases = $("canvas[id*='modestyTransCanavs']");
1555 1569 if (modestyTransCanvases != null || modestyTransCanvases != undefined && modestyTransCanvases.length > 0) {
1556 1570 for (var j = 0; j < modestyTransCanvases.length; j++) {
... ... @@ -1574,11 +1588,17 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1574 1588 else {
1575 1589  
1576 1590 if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
1577   -
1578   - $("#canvasPaint").css("z-index", MaxZindexVal);
  1591 + if ($rootScope.currentBodyViewId == "11") { $("#canvasPaint").css("z-index", MaxZindexVal + 1); }
  1592 + else{ $("#canvasPaint").css("z-index", MaxZindexVal);}
1579 1593 }
1580 1594 else {
1581   - $("#canvas").css("z-index", MaxZindexVal);
  1595 + if ($rootScope.currentBodyViewId == "11") {
  1596 + $("#canvas").css("z-index", MaxZindexVal + 1);
  1597 + }
  1598 + else
  1599 + {
  1600 + $("#canvas").css("z-index", MaxZindexVal);
  1601 + }
1582 1602 }
1583 1603  
1584 1604 }
... ... @@ -3760,7 +3780,6 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3760 3780 }
3761 3781  
3762 3782 $rootScope.CloseListManager = function () {
3763   -
3764 3783 $("#btnTranparency").removeAttr('disabled', 'disabled');
3765 3784 $("#optionsListManagerTab").removeClass("active");
3766 3785 $rootScope.isListManagerMenuSelected = false;
... ... @@ -3776,7 +3795,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3776 3795 $("#annotationpainteraser").removeAttr('disabled', 'disabled');
3777 3796 $("#annotationpaintbrushsize").css('pointer-events', 'auto');
3778 3797 $("#annotationpainteraser").css('pointer-events', 'auto');
3779   - $rootScope.switchCanvasToPaintCanvas();
  3798 + if ($(".annotationTollbar").css("display") == "block") {
  3799 + $rootScope.switchCanvasToPaintCanvas();
  3800 + }
3780 3801 }
3781 3802 }
3782 3803 if ($location.path() == "/module-item-view") {
... ...