Commit 54e1c49e7e928f81501e70535d4db62fd1d398e1

Authored by unknown
1 parent 9eeccea8

commit changes for Bug #12596:DA > Annotation Toolbar > If Fill Option and Outli…

…ne option are unchecked and user click on Cancel button. Changes should be discard.
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -461,9 +461,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -461,9 +461,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
461 //$rootScope.switchCanvasToPaintCanvas(); 461 //$rootScope.switchCanvasToPaintCanvas();
462 } 462 }
463 463
464 - 464 + $rootScope.isShapeSyleOkBtnClicked = false;
465 $rootScope.setPropertiesForShapes = function (id) { 465 $rootScope.setPropertiesForShapes = function (id) {
466 - 466 + $rootScope.isShapeSyleOkBtnClicked = true;
467 467
468 if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) { 468 if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) {
469 // $('#btnShapeStyle').attr('disabled', 'disabled'); 469 // $('#btnShapeStyle').attr('disabled', 'disabled');
@@ -532,9 +532,34 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -532,9 +532,34 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
532 532
533 533
534 $rootScope.disableAnnotationToolBar = function () { 534 $rootScope.disableAnnotationToolBar = function () {
535 -  
536 - $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)");  
537 - $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)"); 535 + if ($rootScope.isShapeSyleOkBtnClicked == false) {
  536 + $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)");
  537 + $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)");
  538 + var previewBorderColor = $("#outlineColor span.minicolors-swatch-color").css('background-color');
  539 + $(".marginTopBtm10 div.outlinediv").css("border-color", previewBorderColor);
  540 + var previewBgColor = $("#editstylebackgroundcolor span.minicolors-swatch-color").css('background-color');
  541 + $("#imgOpacity").css("background-color", previewBgColor);
  542 + $('#borderWidthCanvasElement').val(1);
  543 + $('.marginTopBtm10 div.outlinediv').css("border-width", 1);
  544 + $("#imgOpacity").css("opacity", 1);
  545 + $(".marginTopBtm10 div.outlinediv").css("opacity", 1);
  546 + //$("#borderWidthCanvasElement").change(function () {
  547 + // $(".marginTopBtm10 div.outlinediv").css("border-color", x);
  548 + //});
  549 + } else {
  550 + var previewBgColor = $("#shapeStyleDiv").css('background-color');
  551 + var previewBorderColor = $('#previewBorder').css('border-color');
  552 + var previewBorderWidth = $('#previewBorder').css('border-width');
  553 + var previewOpacity = $('#previewBorder').css('opacity');
  554 + $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", previewBgColor);
  555 + $("#imgOpacity").css("background-color", previewBgColor);
  556 + $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", previewBorderColor);
  557 + $(".marginTopBtm10 div.outlinediv").css("border-color", previewBorderColor);
  558 + $('.marginTopBtm10 div.outlinediv').css("border-width", previewBorderWidth);
  559 + $('#borderWidthCanvasElement').val(previewBorderWidth.split("px"));
  560 + $("#imgOpacity").css("opacity", previewOpacity);
  561 + $(".marginTopBtm10 div.outlinediv").css("opacity", previewOpacity);
  562 + }
538 document.getElementById('modelbackground').style.display = "none"; 563 document.getElementById('modelbackground').style.display = "none";
539 document.getElementById('modeleditstyle').style.display = "none"; 564 document.getElementById('modeleditstyle').style.display = "none";
540 //Edit Shape Style popup should open at it's default position 565 //Edit Shape Style popup should open at it's default position
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -524,7 +524,7 @@ @@ -524,7 +524,7 @@
524 <!--#7931--> 524 <!--#7931-->
525 525
526 <div id="edit-block" style="display: none; font-size: 13px;">Edit Shape Style</div> 526 <div id="edit-block" style="display: none; font-size: 13px;">Edit Shape Style</div>
527 - <div class="outlinediv" ng-mouseover="mouseMoveToolTip(170, 170, 120, 'Edit Style')" ng-mouseleave="mouseOutToolTip()"> 527 + <div id="previewBorder" class="outlinediv" ng-mouseover="mouseMoveToolTip(170, 170, 120, 'Edit Style')" ng-mouseleave="mouseOutToolTip()">
528 <div id="shapeStyleDiv" class="fullcolordiv" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()"> 528 <div id="shapeStyleDiv" class="fullcolordiv" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()">
529 529
530 </div> 530 </div>
@@ -1436,9 +1436,9 @@ @@ -1436,9 +1436,9 @@
1436 var borderWidth = 1; 1436 var borderWidth = 1;
1437 var borderColor = "#000"; 1437 var borderColor = "#000";
1438 $("#borderWidthCanvasElement").change(function () { 1438 $("#borderWidthCanvasElement").change(function () {
1439 -  
1440 borderWidth = $(this).val(); 1439 borderWidth = $(this).val();
1441 - 1440 + borderColor = $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color");
  1441 +
1442 if (borderColor != null) { 1442 if (borderColor != null) {
1443 document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor; 1443 document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
1444 //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor); 1444 //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);