Commit cee03d598fad53728a9a04f200d45a42d49c80ee

Authored by Nikita Kulshreshtha
2 parents e16a659d c8290476

merged Bugs_v15

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -490,34 +490,38 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -490,34 +490,38 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
490 $rootScope.shapestyleborderWidth = 2; 490 $rootScope.shapestyleborderWidth = 2;
491 $rootScope.shapestyleborderStyles = "solid"; 491 $rootScope.shapestyleborderStyles = "solid";
492 $rootScope.shapestyle = function (id) { 492 $rootScope.shapestyle = function (id) {
493 - // debugger;  
494 - document.getElementById('modelbackground').style.display = "none";  
495 - document.getElementById('modeleditstyle').style.display = "none";  
496 -  
497 - $rootScope.shapestyleOpacity = $("#" + id).css('opacity');  
498 - $("#shapeStyleDiv").parent().css("opacity", $rootScope.shapestyleOpacity);  
499 - $rootScope.shapestyleFillColor = $("#" + id).css('background-color');  
500 - $("#shapeStyleDiv").css("background-color", $rootScope.shapestyleFillColor);  
501 - $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color");  
502 - $("#shapeStyleDiv").parent().css("border-color", $rootScope.shapestyleborderColor);  
503 - $rootScope.shapestyleborderWidthSeparatingPixel = $("#" + id).parent().css("border-top-width");  
504 - $("#shapeStyleDiv").parent().css("border-width", $rootScope.shapestyleborderWidthSeparatingPixel);  
505 - var pixelSeparation = $rootScope.shapestyleborderWidthSeparatingPixel;  
506 - var intPart = pixelSeparation.split("p"); 493 +
  494 + if ((document.getElementById('fill-option').checked == false) && (document.getElementById('Outline-Option').checked == false)) {
  495 + // $('#btnShapeStyle').attr('disabled', 'disabled');
  496 + } else {
  497 + //$('#btnShapeStyle').removeAttr('disabled', 'disabled');
  498 + document.getElementById('modelbackground').style.display = "none";
  499 + document.getElementById('modeleditstyle').style.display = "none";
507 500
508 - $rootScope.shapestyleborderWidth = intPart[0];  
509 - $rootScope.shapestyleborderStyles = "solid"; 501 + $rootScope.shapestyleOpacity = $("#" + id).css('opacity');
  502 + $("#shapeStyleDiv").parent().css("opacity", $rootScope.shapestyleOpacity);
  503 + $rootScope.shapestyleFillColor = $("#" + id).css('background-color');
  504 + $("#shapeStyleDiv").css("background-color", $rootScope.shapestyleFillColor);
  505 + $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color");
  506 + $("#shapeStyleDiv").parent().css("border-color", $rootScope.shapestyleborderColor);
  507 + $rootScope.shapestyleborderWidthSeparatingPixel = $("#" + id).parent().css("border-top-width");
  508 + $("#shapeStyleDiv").parent().css("border-width", $rootScope.shapestyleborderWidthSeparatingPixel);
  509 + var pixelSeparation = $rootScope.shapestyleborderWidthSeparatingPixel;
  510 + var intPart = pixelSeparation.split("p");
510 511
  512 + $rootScope.shapestyleborderWidth = intPart[0];
  513 + $rootScope.shapestyleborderStyles = "solid";
511 514
512 - $('#editshapestyle').modal('hide');  
513 - // name: 'Circle_' + $rootScope.resetCircle,  
514 515
  516 + $('#editshapestyle').modal('hide');
  517 + // name: 'Circle_' + $rootScope.resetCircle,
515 518
516 - // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();  
517 519
518 - //Edit Shape Style popup should open at it's default position  
519 - $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); 520 + // $("#canvas").removeLayer("TextRect_" + $rootScope.resetTextRect).drawLayers();
520 521
  522 + //Edit Shape Style popup should open at it's default position
  523 + $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" });
  524 + }
521 } 525 }
522 526
523 $rootScope.enableAnnotationToolBar = function () { 527 $rootScope.enableAnnotationToolBar = function () {
@@ -1927,7 +1931,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", @@ -1927,7 +1931,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
1927 $rootScope.switchCanvas(); 1931 $rootScope.switchCanvas();
1928 $("#annotationpaintbrushsize").attr("href", "#"); 1932 $("#annotationpaintbrushsize").attr("href", "#");
1929 console.log('ShowListManager') 1933 console.log('ShowListManager')
1930 -  
1931 $rootScope.disableAnnotationtoolOnListManager = true; 1934 $rootScope.disableAnnotationtoolOnListManager = true;
1932 $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled'); 1935 $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled');
1933 $('#slider-range-min-2').slider('disable'); 1936 $('#slider-range-min-2').slider('disable');
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -787,13 +787,13 @@ @@ -787,13 +787,13 @@
787 </div> 787 </div>
788 </div> 788 </div>
789 <div class="col-sm-6 enableDisableOpacity"> 789 <div class="col-sm-6 enableDisableOpacity">
790 - <div class="radio"> 790 + <!--<div class="radio">
791 <label> 791 <label>
792 <input type="radio" name="filloption" id="filloption1" value="filloption1"> 792 <input type="radio" name="filloption" id="filloption1" value="filloption1">
793 <span class="">Texture</span> 793 <span class="">Texture</span>
794 <img id="editstyleTexture" src="~/../content/images/common/annotation-tool-bar/pattern-picker.png" alt="" class="pattern-picker" data-toggle="modal" data-target="#pattern"> 794 <img id="editstyleTexture" src="~/../content/images/common/annotation-tool-bar/pattern-picker.png" alt="" class="pattern-picker" data-toggle="modal" data-target="#pattern">
795 </label> 795 </label>
796 - </div> 796 + </div>-->
797 <div class="radio"> 797 <div class="radio">
798 <label> 798 <label>
799 <input type="radio" name="filloption" id="filloption2" value="filloption2" checked style="margin-top:8px;"> 799 <input type="radio" name="filloption" id="filloption2" value="filloption2" checked style="margin-top:8px;">
@@ -886,7 +886,7 @@ @@ -886,7 +886,7 @@
886 </div> 886 </div>
887 </div> 887 </div>
888 <div class="modal-footer"> 888 <div class="modal-footer">
889 - <button type="button" class="btn btn-primary btn-sm" ng-click="shapestyle('imgOpacity')"> 889 + <button id="btnShapeStyle" type="button" class="btn btn-primary btn-sm" ng-click="shapestyle('imgOpacity')">
890 OK 890 OK
891 </button> 891 </button>
892 <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button> 892 <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button>
@@ -1018,12 +1018,17 @@ @@ -1018,12 +1018,17 @@
1018 </div>--> 1018 </div>-->
1019 1019
1020 <script> 1020 <script>
  1021 +
1021 function enableDisableFillOption() { 1022 function enableDisableFillOption() {
1022 - 1023 + //debugger;
1023 if (document.getElementById('fill-option').checked) { 1024 if (document.getElementById('fill-option').checked) {
1024 - 1025 + // $('#imgOpacity').attr("background-color");
  1026 + //$('#imgOpacity').css({"background-color"})
1025 //$("#filloption1").css({ "pointer-events": "auto" }); 1027 //$("#filloption1").css({ "pointer-events": "auto" });
1026 //$("#filloption12").css({ "pointer-events": "auto" }); 1028 //$("#filloption12").css({ "pointer-events": "auto" });
  1029 +
  1030 + var x = $("#editstylebackgroundcolor span.minicolors-swatch-color").css('background-color');
  1031 + $("#imgOpacity").css("background-color", x);
1027 $("#edit-slider-3").css({ "pointer-events": "auto" }); 1032 $("#edit-slider-3").css({ "pointer-events": "auto" });
1028 $("#edit-slider-4").css({ "pointer-events": "auto" }); 1033 $("#edit-slider-4").css({ "pointer-events": "auto" });
1029 $("#editstylebackgroundcolor").css({ "pointer-events": "auto" }); 1034 $("#editstylebackgroundcolor").css({ "pointer-events": "auto" });
@@ -1039,7 +1044,7 @@ @@ -1039,7 +1044,7 @@
1039 1044
1040 } 1045 }
1041 else { 1046 else {
1042 - 1047 + $('#imgOpacity').css("background-color","transparent");
1043 //$("#filloption1").css({ "pointer-events": "none" }); 1048 //$("#filloption1").css({ "pointer-events": "none" });
1044 //$("#filloption2").css({ "pointer-events": "none" }); 1049 //$("#filloption2").css({ "pointer-events": "none" });
1045 $("#edit-slider-3").css({ "pointer-events": "none" }); 1050 $("#edit-slider-3").css({ "pointer-events": "none" });
@@ -1061,12 +1066,17 @@ @@ -1061,12 +1066,17 @@
1061 function enableDisableOutline() { 1066 function enableDisableOutline() {
1062 1067
1063 if (document.getElementById('Outline-Option').checked) { 1068 if (document.getElementById('Outline-Option').checked) {
  1069 + var x = $("#outlineColor span.minicolors-swatch-color").css('background-color');
  1070 + $(".marginTopBtm10 div.outlinediv").css("border-color", x);
  1071 + // var borderWidth = $("#outlineColor span.minicolors-swatch-color").css('border-width');
  1072 + // $("#imgOpacity").css("border-width", borderWidth);
1064 1073
1065 $("#borderWidthCanvasElement").css({ "pointer-events": "auto" }); 1074 $("#borderWidthCanvasElement").css({ "pointer-events": "auto" });
1066 $("#outlineColor").css({ "pointer-events": "auto" }); 1075 $("#outlineColor").css({ "pointer-events": "auto" });
1067 $(".setEnableDisableForEditShapeStyle").css({ "opacity": "1" }) 1076 $(".setEnableDisableForEditShapeStyle").css({ "opacity": "1" })
1068 } 1077 }
1069 else { 1078 else {
  1079 + $('.marginTopBtm10 div.outlinediv').css("border-color", "transparent");
1070 $("#borderWidthCanvasElement").css({ "pointer-events": "none" }); 1080 $("#borderWidthCanvasElement").css({ "pointer-events": "none" });
1071 $("#outlineColor").css({ "pointer-events": "none" }); 1081 $("#outlineColor").css({ "pointer-events": "none" });
1072 $(".setEnableDisableForEditShapeStyle").css({ "opacity": ".5" }) 1082 $(".setEnableDisableForEditShapeStyle").css({ "opacity": ".5" })