Commit 572147349f9ea666689a835c6db1a419b192916c

Authored by Nikita Kulshreshtha
2 parents 3df3c248 b5e0633f

Merge branch 'Bugv6Merge1' into Develop

400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
@@ -372,7 +372,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -372,7 +372,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
372 372
373 $scope.openView = function ($event) { 373 $scope.openView = function ($event) {
374 $rootScope.disableAnnotationTBFn(); 374 $rootScope.disableAnnotationTBFn();
375 - 375 + $rootScope.MenuModuleName = "CA";
  376 + //alert($rootScope.MenuModuleName);
376 $rootScope.currentBodyViewId = $event.currentTarget.id; 377 $rootScope.currentBodyViewId = $event.currentTarget.id;
377 if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") { 378 if ($event.currentTarget.textContent !== null && typeof ($event.currentTarget.textContent) !== "undefined") {
378 var CITitle = []; 379 var CITitle = [];
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -266,6 +266,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -266,6 +266,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
266 266
267 $scope.openView = function ($event) { 267 $scope.openView = function ($event) {
268 $rootScope.disableAnnotationTB = false; 268 $rootScope.disableAnnotationTB = false;
  269 + $rootScope.MenuModuleName = "DA";
  270 + //alert($rootScope.MenuModuleName);
269 $rootScope.isLoading = true; 271 $rootScope.isLoading = true;
270 $('#spinner').css('visibility', 'visible'); 272 $('#spinner').css('visibility', 'visible');
271 273
@@ -6860,11 +6862,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -6860,11 +6862,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6860 6862
6861 //list manager 6863 //list manager
6862 $scope.$on('listManagerEvent', function (event, data) { 6864 $scope.$on('listManagerEvent', function (event, data) {
6863 -  
6864 - if ($rootScope.disableAnnotationtoolOnListManager == true)  
6865 - {  
6866 - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');  
6867 - $('#slider-range-min-2').slider('disable'); 6865 +
  6866 + //if ($rootScope.MenuModuleName == "DA") {
  6867 + // if ($rootScope.disableAnnotationtoolOnListManager == true) {
  6868 + // $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
  6869 + // $('#slider-range-min-2').slider('disable');
  6870 + // }
  6871 + //}
6868 if ($rootScope.setListManagerZindex == true) 6872 if ($rootScope.setListManagerZindex == true)
6869 { 6873 {
6870 var canvasPaintZindex = $('#canvasPaint').css("z-index"); //x 6874 var canvasPaintZindex = $('#canvasPaint').css("z-index"); //x
@@ -6886,7 +6890,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo @@ -6886,7 +6890,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6886 } 6890 }
6887 6891
6888 } 6892 }
6889 - } 6893 +
6890 6894
6891 6895
6892 6896
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -80,14 +80,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -80,14 +80,13 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
80 $rootScope.CloseListManager(); 80 $rootScope.CloseListManager();
81 angular.element('#modal-settings').modal('hide'); 81 angular.element('#modal-settings').modal('hide');
82 if ($location.url() == "/lab-exercises") { 82 if ($location.url() == "/lab-exercises") {
83 - 83 +
84 $rootScope.menuLabExer = 0; 84 $rootScope.menuLabExer = 0;
85 } 85 }
86 - if($rootScope.menuLabExer==1)  
87 - { 86 + if ($rootScope.menuLabExer == 1) {
88 $rootScope.disableMenuoption = " "; 87 $rootScope.disableMenuoption = " ";
89 } 88 }
90 - 89 +
91 } 90 }
92 91
93 }); 92 });
@@ -140,15 +139,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -140,15 +139,15 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
140 } 139 }
141 } 140 }
142 141
143 - // $rootScope.DrawLine = function () {  
144 - //$rootScope.isIdetifyClicked = false;  
145 - //$rootScope.isDrawingToolSelected = true;  
146 - //$rootScope.isLineDrawSelecyed = true;  
147 - // $rootScope.shapeType = "Line";  
148 - // alert($rootScope.shapeType); 142 + // $rootScope.DrawLine = function () {
  143 + //$rootScope.isIdetifyClicked = false;
  144 + //$rootScope.isDrawingToolSelected = true;
  145 + //$rootScope.isLineDrawSelecyed = true;
  146 + // $rootScope.shapeType = "Line";
  147 + // alert($rootScope.shapeType);
149 148
150 149
151 - // } 150 + // }
152 151
153 $rootScope.ClearIframe = function () { 152 $rootScope.ClearIframe = function () {
154 if ($('#daImagePanel') != null) 153 if ($('#daImagePanel') != null)
@@ -169,7 +168,20 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -169,7 +168,20 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
169 //annotation tool custom events 168 //annotation tool custom events
170 $rootScope.ShowAnnotationWindow = function () { 169 $rootScope.ShowAnnotationWindow = function () {
171 //7904 170 //7904
  171 + if ($rootScope.MenuModuleName == "DA") {
  172 + if ($rootScope.disableAnnotationtoolOnListManager == true) {
  173 + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
  174 + $('#slider-range-min-2').slider('disable');
  175 +
  176 + // $rootScope.disableAnnotationTB = false;
  177 + } else {
  178 + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
  179 + $('#slider-range-min-2').slider('enable');
  180 + }
  181 + // document.getElementById('modelbackground').style.display = "block";
  182 + // document.getElementById('modeleditstyle').style.display = "block";
172 183
  184 + }
173 $("#OnIdentify").addClass("annotationtoolbartab"); 185 $("#OnIdentify").addClass("annotationtoolbartab");
174 $("#annotationToolBarOptions").addClass("active"); 186 $("#annotationToolBarOptions").addClass("active");
175 $("#annotationButton").addClass("active"); 187 $("#annotationButton").addClass("active");
@@ -179,7 +191,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -179,7 +191,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
179 $rootScope.$broadcast('annotationToolEvent', true); 191 $rootScope.$broadcast('annotationToolEvent', true);
180 $("#canvasPaint").css("display", "none"); 192 $("#canvasPaint").css("display", "none");
181 $("#canvas").css("display", "none"); 193 $("#canvas").css("display", "none");
182 - 194 +
183 var FontFamilyJson = '~/../content/data/json/settings/fontstyle.json'; 195 var FontFamilyJson = '~/../content/data/json/settings/fontstyle.json';
184 if ($rootScope.isFontFamilyLoaded == false) { 196 if ($rootScope.isFontFamilyLoaded == false) {
185 197
@@ -193,8 +205,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -193,8 +205,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
193 205
194 for (var i = 0; i <= $rootScope.AnnotationFontFamily.FontFamily.length - 1; i++) { 206 for (var i = 0; i <= $rootScope.AnnotationFontFamily.FontFamily.length - 1; i++) {
195 207
196 - $("#selected-font-family").append("<option>" + $rootScope.AnnotationFontFamily.FontFamily[i].FontName + "</option>");  
197 - 208 + $("#selected-font-family").append("<option value=" + $rootScope.AnnotationFontFamily.FontFamily[i].FontName + ">" + $rootScope.AnnotationFontFamily.FontFamily[i].FontName + "</option>");
  209 +
198 } 210 }
199 $rootScope.isFontFamilyLoaded = true; 211 $rootScope.isFontFamilyLoaded = true;
200 212
@@ -231,7 +243,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -231,7 +243,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
231 $("#DrawMode").removeClass("annotationtoolbartab"); 243 $("#DrawMode").removeClass("annotationtoolbartab");
232 // $rootScope.isIdetifyClicked = true; 244 // $rootScope.isIdetifyClicked = true;
233 // $rootScope.isDrawingToolSelected = false; 245 // $rootScope.isDrawingToolSelected = false;
234 - // debugger; 246 + // debugger;
235 if ($rootScope.CIAnotationIdentifyModeOff == true) { 247 if ($rootScope.CIAnotationIdentifyModeOff == true) {
236 $('.btnCursor').removeClass('activebtncolor'); 248 $('.btnCursor').removeClass('activebtncolor');
237 249
@@ -273,19 +285,19 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -273,19 +285,19 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
273 285
274 286
275 //----Annotation Toolbar: Jcanvas----- 287 //----Annotation Toolbar: Jcanvas-----
276 - 288 +
277 $rootScope.DrLine = function (e) { 289 $rootScope.DrLine = function (e) {
278 $rootScope.setListManagerZindex = true; 290 $rootScope.setListManagerZindex = true;
279 $("#canvasPaint").css("display", "block"); 291 $("#canvasPaint").css("display", "block");
280 $("#canvas").css("display", "block"); 292 $("#canvas").css("display", "block");
281 - 293 +
282 $rootScope.switchCanvas(); 294 $rootScope.switchCanvas();
283 $rootScope.shapeType = "Line"; 295 $rootScope.shapeType = "Line";
284 - 296 +
285 297
286 $('.btnCursor').removeClass('activebtncolor'); 298 $('.btnCursor').removeClass('activebtncolor');
287 - $(".btn-annotation").removeClass("activebtncolor");  
288 - $(".btn-annotation-line").addClass("activebtncolor"); 299 + $(".btn-annotation").removeClass("activebtncolor");
  300 + $(".btn-annotation-line").addClass("activebtncolor");
289 301
290 302
291 } 303 }
@@ -314,7 +326,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -314,7 +326,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
314 $('.btnCursor').addClass('activebtncolor'); 326 $('.btnCursor').addClass('activebtncolor');
315 } 327 }
316 328
317 - 329 +
318 $rootScope.DrawRectangle = function (e) { 330 $rootScope.DrawRectangle = function (e) {
319 $rootScope.setListManagerZindex = true; 331 $rootScope.setListManagerZindex = true;
320 $("#canvasPaint").css("display", "block"); 332 $("#canvasPaint").css("display", "block");
@@ -385,7 +397,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -385,7 +397,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
385 $(".btn-annotation-arrow").addClass("activebtncolor"); 397 $(".btn-annotation-arrow").addClass("activebtncolor");
386 } 398 }
387 $rootScope.DrawText = function () { 399 $rootScope.DrawText = function () {
388 - 400 +
389 $rootScope.setListManagerZindex = true; 401 $rootScope.setListManagerZindex = true;
390 $("#canvasPaint").css("display", "block"); 402 $("#canvasPaint").css("display", "block");
391 $("#canvas").css("display", "block"); 403 $("#canvas").css("display", "block");
@@ -442,7 +454,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -442,7 +454,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
442 $rootScope.shapestyleborderWidth = 2; 454 $rootScope.shapestyleborderWidth = 2;
443 $rootScope.shapestyleborderStyles = "solid"; 455 $rootScope.shapestyleborderStyles = "solid";
444 $rootScope.shapestyle = function (id) { 456 $rootScope.shapestyle = function (id) {
445 - // debugger; 457 + // debugger;
446 document.getElementById('modelbackground').style.display = "none"; 458 document.getElementById('modelbackground').style.display = "none";
447 document.getElementById('modeleditstyle').style.display = "none"; 459 document.getElementById('modeleditstyle').style.display = "none";
448 460
@@ -468,7 +480,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -468,7 +480,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
468 // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); 480 // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
469 481
470 //Edit Shape Style popup should open at it's default position 482 //Edit Shape Style popup should open at it's default position
471 - $("#modeleditstyle").css({ "left": "40%", "right": "0", "top":"70px"}); 483 + $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" });
472 484
473 } 485 }
474 486
@@ -513,7 +525,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -513,7 +525,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
513 document.getElementById('modelbackground').style.display = "none"; 525 document.getElementById('modelbackground').style.display = "none";
514 document.getElementById('modeleditstyle').style.display = "none"; 526 document.getElementById('modeleditstyle').style.display = "none";
515 //Edit Shape Style popup should open at it's default position 527 //Edit Shape Style popup should open at it's default position
516 - $("#modeleditstyle").css({"left":"40%", "right":"0", "top":"70px"}); 528 + $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" });
517 529
518 530
519 } 531 }
@@ -522,8 +534,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -522,8 +534,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
522 //----End------------- 534 //----End-------------
523 535
524 //--Common code of Annotation Toolbar for CI and DA------- 536 //--Common code of Annotation Toolbar for CI and DA-------
525 - $rootScope.LineFn = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y)  
526 - { 537 + $rootScope.LineFn = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) {
527 $(canvasId).addLayer({ 538 $(canvasId).addLayer({
528 name: 'Line_' + LineNumber, 539 name: 'Line_' + LineNumber,
529 layer: true, 540 layer: true,
@@ -532,8 +543,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -532,8 +543,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
532 strokeStyle: shapestyleborderColor, 543 strokeStyle: shapestyleborderColor,
533 strokeWidth: shapestyleborderWidth, 544 strokeWidth: shapestyleborderWidth,
534 rounded: true, 545 rounded: true,
535 - x1: offsetX1, y1:offsetY1,  
536 - x2: x, y2:y, 546 + x1: offsetX1, y1: offsetY1,
  547 + x2: x, y2: y,
537 548
538 click: function (layer) { 549 click: function (layer) {
539 $rootScope.canvasLayerNameCollection = []; 550 $rootScope.canvasLayerNameCollection = [];
@@ -586,7 +597,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -586,7 +597,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
586 $('.btnCursor').addClass('activebtncolor'); 597 $('.btnCursor').addClass('activebtncolor');
587 } 598 }
588 599
589 - $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x,y) { 600 + $rootScope.RectangleFn = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) {
590 $(canvasId).addLayer({ 601 $(canvasId).addLayer({
591 layer: true, 602 layer: true,
592 name: 'Rect_' + RectNumber, 603 name: 'Rect_' + RectNumber,
@@ -673,7 +684,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -673,7 +684,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
673 strokeStyle: shapestyleborderColor, 684 strokeStyle: shapestyleborderColor,
674 strokeWidth: shapestyleborderWidth, 685 strokeWidth: shapestyleborderWidth,
675 fillStyle: shapestyleFillColor, 686 fillStyle: shapestyleFillColor,
676 - x: offsetX1, y:offsetY1, 687 + x: offsetX1, y: offsetY1,
677 width: (x - offsetX1) * 2, height: (y - offsetY1) * 2, 688 width: (x - offsetX1) * 2, height: (y - offsetY1) * 2,
678 // Place a handle at each side and each corner 689 // Place a handle at each side and each corner
679 handlePlacement: 'both', 690 handlePlacement: 'both',
@@ -908,11 +919,11 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -908,11 +919,11 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
908 $('.btnCursor').addClass('activebtncolor'); 919 $('.btnCursor').addClass('activebtncolor');
909 } 920 }
910 921
911 - $rootScope.TextAreaFn = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor,x,y) { 922 + $rootScope.TextAreaFn = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) {
912 923
913 924
914 -  
915 - 925 + debugger;
  926 +
916 $('#canvas').drawText({ 927 $('#canvas').drawText({
917 layer: true, 928 layer: true,
918 draggable: true, 929 draggable: true,
@@ -971,7 +982,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -971,7 +982,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
971 982
972 }, 983 },
973 dblclick: function (layer) { 984 dblclick: function (layer) {
974 - 985 +
975 $rootScope.IsTextAlreadySave = false; 986 $rootScope.IsTextAlreadySave = false;
976 var RectNameArray = (layer.name).split("_"); 987 var RectNameArray = (layer.name).split("_");
977 988
@@ -986,10 +997,13 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -986,10 +997,13 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
986 $("#annotationTextModal").modal("toggle"); 997 $("#annotationTextModal").modal("toggle");
987 998
988 $("#text_area").val(''); 999 $("#text_area").val('');
989 - $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); 1000 + $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
990 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); 1001 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
991 // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); 1002 // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
992 1003
  1004 + $("#selected-font-family option:eq(0)").prop('selected', true);
  1005 + $("#selected-font-size option:eq(0)").prop('selected', true);
  1006 +
993 $("#text-italic").removeClass("ActiveFormattingButtonClass"); 1007 $("#text-italic").removeClass("ActiveFormattingButtonClass");
994 1008
995 $("#text-bold").removeClass("ActiveFormattingButtonClass"); 1009 $("#text-bold").removeClass("ActiveFormattingButtonClass");
@@ -1033,9 +1047,9 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1033,9 +1047,9 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1033 1047
1034 } 1048 }
1035 }); 1049 });
1036 - // Annotation: Edit Text option is missing.  
1037 - // alert($rootScope.CurrentWidth);  
1038 - // alert($rootScope.CurrentHeight); 1050 + // Annotation: Edit Text option is missing.
  1051 + // alert($rootScope.CurrentWidth);
  1052 + // alert($rootScope.CurrentHeight);
1039 $("#annotationTextModal").css("padding-right", "0px"); 1053 $("#annotationTextModal").css("padding-right", "0px");
1040 if (($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight > 0) || ($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight <= 0) || ($rootScope.CurrentWidth <= 0 && $rootScope.CurrentHeight > 0)) { 1054 if (($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight > 0) || ($rootScope.CurrentWidth > 0 && $rootScope.CurrentHeight <= 0) || ($rootScope.CurrentWidth <= 0 && $rootScope.CurrentHeight > 0)) {
1041 $("#annotationTextModal").modal("toggle"); 1055 $("#annotationTextModal").modal("toggle");
@@ -1046,7 +1060,12 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1046,7 +1060,12 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1046 1060
1047 $("#text_area").val(''); 1061 $("#text_area").val('');
1048 1062
1049 - $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); 1063 + $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
  1064 +
  1065 + $("#selected-font-family option:eq(0)").prop('selected', true);
  1066 + $("#selected-font-size option:eq(0)").prop('selected', true);
  1067 +
  1068 + // $("#text_area").css({ " font-family": 'Verdana, sans-serif', "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
1050 1069
1051 $("#text-italic").removeClass("ActiveFormattingButtonClass"); 1070 $("#text-italic").removeClass("ActiveFormattingButtonClass");
1052 1071
@@ -1065,7 +1084,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1065,7 +1084,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1065 $('.btnCursor').addClass('activebtncolor'); 1084 $('.btnCursor').addClass('activebtncolor');
1066 1085
1067 1086
1068 - 1087 +
1069 } 1088 }
1070 1089
1071 1090
@@ -1093,7 +1112,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1093,7 +1112,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1093 ctx.clearRect(0, 0, 2277, 3248); 1112 ctx.clearRect(0, 0, 2277, 3248);
1094 $rootScope.clicked = true; 1113 $rootScope.clicked = true;
1095 1114
1096 - // alert("x:"+$rootScope.offsetX1 + " y:" + $rootScope.offsetY1); 1115 + // alert("x:"+$rootScope.offsetX1 + " y:" + $rootScope.offsetY1);
1097 } 1116 }
1098 1117
1099 $rootScope.rectNumber = 0; 1118 $rootScope.rectNumber = 0;
@@ -1175,7 +1194,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1175,7 +1194,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1175 1194
1176 break; 1195 break;
1177 case "TextArea": 1196 case "TextArea":
1178 - 1197 +
1179 $rootScope.IsTextAlreadySave = false; 1198 $rootScope.IsTextAlreadySave = false;
1180 $("#text_area").val(''); 1199 $("#text_area").val('');
1181 // Draw text 1200 // Draw text
@@ -1194,13 +1213,14 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1194,13 +1213,14 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1194 } 1213 }
1195 1214
1196 1215
1197 - 1216 +
1198 1217
1199 1218
1200 1219
1201 ///----- 1220 ///-----
1202 1221
1203 $rootScope.saveText = function () { 1222 $rootScope.saveText = function () {
  1223 + debugger;
1204 document.getElementById('modelbackground').style.display = "none"; 1224 document.getElementById('modelbackground').style.display = "none";
1205 // this part will work first time when save button will be clicked 1225 // this part will work first time when save button will be clicked
1206 if ($rootScope.IsTextAlreadySave == false) { 1226 if ($rootScope.IsTextAlreadySave == false) {
@@ -1282,7 +1302,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1282,7 +1302,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1282 }).drawLayers(); 1302 }).drawLayers();
1283 }, 1303 },
1284 dblclick: function (layer) { 1304 dblclick: function (layer) {
1285 - 1305 +
1286 $rootScope.isTextAreaClosedButtonActive = false; 1306 $rootScope.isTextAreaClosedButtonActive = false;
1287 $rootScope.IsTextAlreadySave = true; 1307 $rootScope.IsTextAlreadySave = true;
1288 1308
@@ -1333,7 +1353,15 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1333,7 +1353,15 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1333 $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration); 1353 $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration);
1334 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[i].FontColor }); 1354 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[i].FontColor });
1335 1355
  1356 + var CurrentFontFamily = $rootScope.TextPropertyArray[i].FontFamily;
  1357 + // alert(CurrentFontFamily);
  1358 + // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
  1359 + var CurrentFontSize = parseInt($rootScope.TextPropertyArray[i].FontSize);
  1360 + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
  1361 + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
1336 1362
  1363 + CurrentFontFamily = '';
  1364 + CurrentFontSize = '';
1337 1365
1338 // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" }); 1366 // $(".ActiveDefaultColorAnnotation").css({ "background-color": $rootScope.TextPropertyArray[_rectLayerOnSaveSplitInt].FontColor + "!important" });
1339 // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); 1367 // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
@@ -1442,7 +1470,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1442,7 +1470,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1442 document.getElementById('modelbackground').style.display = "block"; 1470 document.getElementById('modelbackground').style.display = "block";
1443 $("#annotationTextModal").modal("toggle"); 1471 $("#annotationTextModal").modal("toggle");
1444 1472
1445 - 1473 + // $("#selected-font-family").val(CurrentFontFamily);
  1474 + // $("#selected-font-size").val(CurrentFontSize);
1446 1475
1447 1476
1448 }, 1477 },
@@ -1474,7 +1503,16 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1474,7 +1503,16 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1474 } 1503 }
1475 }); 1504 });
1476 $("#text_area").val(''); 1505 $("#text_area").val('');
1477 - $("#text_area").css({ " font-family": "'Verdana, sans-serif'", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" }); 1506 + $("#text_area").css({ " font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
  1507 +
  1508 + $("#selected-font-family option:eq(0)").prop('selected', true);
  1509 + $("#selected-font-size option:eq(0)").prop('selected', true);
  1510 +
  1511 + // $("#selected-font-family option:eq(0)").prop('selected', true);
  1512 + // $("#selected-font-size option:eq(0)").prop('selected', true);
  1513 +
  1514 + // $("#selected-font-family option[value='Arial']").prop('selected', true);
  1515 + // $("#selected-font-size option[value=14]").prop('selected', true);
1478 1516
1479 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" }); 1517 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
1480 $("#text-italic").removeClass("ActiveFormattingButtonClass"); 1518 $("#text-italic").removeClass("ActiveFormattingButtonClass");
@@ -1568,8 +1606,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1568,8 +1606,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1568 1606
1569 }, 1607 },
1570 dblclick: function (layer) { 1608 dblclick: function (layer) {
1571 -  
1572 - 1609 +
  1610 +
1573 $rootScope.isTextAreaClosedButtonActive = false; 1611 $rootScope.isTextAreaClosedButtonActive = false;
1574 $rootScope.IsTextAlreadySave = true; 1612 $rootScope.IsTextAlreadySave = true;
1575 var _rectLayerOnSave = layer.name; 1613 var _rectLayerOnSave = layer.name;
@@ -1591,9 +1629,19 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1591,9 +1629,19 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1591 $("#text_area").css("font-family", _modifiedFontFamily); 1629 $("#text_area").css("font-family", _modifiedFontFamily);
1592 $("#text_area").css("text-decoration", _modifiedFontDecoration); 1630 $("#text_area").css("text-decoration", _modifiedFontDecoration);
1593 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor }); 1631 $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor });
  1632 +
1594 // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" }); 1633 // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" });
1595 // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation"); 1634 // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
1596 1635
  1636 + //khushbu
  1637 + var CurrentFontFamily = _modifiedFontFamily;
  1638 + // alert(CurrentFontFamily);
  1639 + // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
  1640 + var CurrentFontSize = parseInt(_modifiedFontSize);
  1641 + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
  1642 + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
  1643 + CurrentFontFamily = '';
  1644 + CurrentFontSize = '';
1597 //adding text text decoration active class in text edit pop-up 1645 //adding text text decoration active class in text edit pop-up
1598 if (_modifiedFontDecoration == "underline") { 1646 if (_modifiedFontDecoration == "underline") {
1599 $("#text-underline").addClass("ActiveFormattingButtonClass"); 1647 $("#text-underline").addClass("ActiveFormattingButtonClass");
@@ -1680,16 +1728,16 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1680,16 +1728,16 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1680 1728
1681 $rootScope.BindCanvasDrawingListners = function (event) { 1729 $rootScope.BindCanvasDrawingListners = function (event) {
1682 1730
1683 - $rootScope.clicked = true;  
1684 - // OnPaintCanvasMouseDown(event); 1731 + $rootScope.clicked = true;
  1732 + // OnPaintCanvasMouseDown(event);
1685 1733
1686 - var annotationCanvas = document.getElementById('canvas');  
1687 - if (annotationCanvas != null || annotationCanvas != undefined) {  
1688 - annotationCanvas.addEventListener('mousedown', $rootScope.OnPaintCanvasMouseDown, false);  
1689 - annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintCanvasMouseUp, false);  
1690 - }  
1691 - // alert("doclick");  
1692 - }; 1734 + var annotationCanvas = document.getElementById('canvas');
  1735 + if (annotationCanvas != null || annotationCanvas != undefined) {
  1736 + annotationCanvas.addEventListener('mousedown', $rootScope.OnPaintCanvasMouseDown, false);
  1737 + annotationCanvas.addEventListener('mouseup', $rootScope.OnPaintCanvasMouseUp, false);
  1738 + }
  1739 + // alert("doclick");
  1740 + };
1693 1741
1694 1742
1695 $(document).keydown(function (event) { 1743 $(document).keydown(function (event) {
@@ -1729,7 +1777,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1729,7 +1777,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1729 $rootScope.closeModal = function () { 1777 $rootScope.closeModal = function () {
1730 1778
1731 document.getElementById('modelbackground').style.display = "none"; 1779 document.getElementById('modelbackground').style.display = "none";
1732 - 1780 +
1733 //if ($rootScope.isTextAreaClosedButtonActive == true) { 1781 //if ($rootScope.isTextAreaClosedButtonActive == true) {
1734 // $("#canvas").removeLayer('TextArea_' + $rootScope.TextNumber).drawLayers(); 1782 // $("#canvas").removeLayer('TextArea_' + $rootScope.TextNumber).drawLayers();
1735 // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers(); 1783 // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
@@ -1817,21 +1865,21 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1817,21 +1865,21 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1817 } 1865 }
1818 1866
1819 $rootScope.disableAnnotationTB = false; 1867 $rootScope.disableAnnotationTB = false;
1820 - $rootScope.disableAnnotationTBFn = function()  
1821 - { 1868 + $rootScope.disableAnnotationTBFn = function () {
1822 $rootScope.disableAnnotationTB = true; 1869 $rootScope.disableAnnotationTB = true;
1823 } 1870 }
1824 1871
1825 //list manager function 1872 //list manager function
1826 1873
1827 //list manager function 1874 //list manager function
1828 - 1875 +
1829 $rootScope.disableAnnotationtoolOnListManager = false; 1876 $rootScope.disableAnnotationtoolOnListManager = false;
1830 $rootScope.ShowListManager = function () { 1877 $rootScope.ShowListManager = function () {
1831 console.log('ShowListManager') 1878 console.log('ShowListManager')
1832 1879
1833 $rootScope.disableAnnotationtoolOnListManager = true; 1880 $rootScope.disableAnnotationtoolOnListManager = true;
1834 - 1881 + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').attr('disabled', 'disabled');
  1882 + $('#slider-range-min-2').slider('disable');
1835 $rootScope.isLoading = true; 1883 $rootScope.isLoading = true;
1836 $('#spinner').css('visibility', 'visible'); 1884 $('#spinner').css('visibility', 'visible');
1837 1885
@@ -1847,13 +1895,14 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -1847,13 +1895,14 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
1847 1895
1848 $rootScope.CloseListManager = function () { 1896 $rootScope.CloseListManager = function () {
1849 console.log('close') 1897 console.log('close')
1850 -  
1851 $rootScope.disableAnnotationtoolOnListManager = false; 1898 $rootScope.disableAnnotationtoolOnListManager = false;
1852 - if ($rootScope.disableAnnotationtoolOnListManager == false) {  
1853 - $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');  
1854 - $('#slider-range-min-2').slider('enable'); 1899 + if ($rootScope.MenuModuleName == "DA") {
  1900 +
  1901 + if ($rootScope.disableAnnotationtoolOnListManager == false) {
  1902 + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
  1903 + $('#slider-range-min-2').slider('enable');
  1904 + }
1855 } 1905 }
1856 - //$rootScope.isListManagerSelected = false;  
1857 $('#listManager').css('display', 'none'); 1906 $('#listManager').css('display', 'none');
1858 $("#listManager").css("visibility", "hidden"); 1907 $("#listManager").css("visibility", "hidden");
1859 1908
@@ -2022,8 +2071,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;, @@ -2022,8 +2071,7 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
2022 if (len > 0) { 2071 if (len > 0) {
2023 $rootScope.reloadChildController(); 2072 $rootScope.reloadChildController();
2024 } 2073 }
2025 - else  
2026 - { 2074 + else {
2027 $('#modal-settings').modal('hide'); 2075 $('#modal-settings').modal('hide');
2028 } 2076 }
2029 2077