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 490 $rootScope.shapestyleborderWidth = 2;
491 491 $rootScope.shapestyleborderStyles = "solid";
492 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 527 $rootScope.enableAnnotationToolBar = function () {
... ... @@ -1927,7 +1931,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
1927 1931 $rootScope.switchCanvas();
1928 1932 $("#annotationpaintbrushsize").attr("href", "#");
1929 1933 console.log('ShowListManager')
1930   -
1931 1934 $rootScope.disableAnnotationtoolOnListManager = true;
1932 1935 $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled');
1933 1936 $('#slider-range-min-2').slider('disable');
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -787,13 +787,13 @@
787 787 </div>
788 788 </div>
789 789 <div class="col-sm-6 enableDisableOpacity">
790   - <div class="radio">
  790 + <!--<div class="radio">
791 791 <label>
792 792 <input type="radio" name="filloption" id="filloption1" value="filloption1">
793 793 <span class="">Texture</span>
794 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 795 </label>
796   - </div>
  796 + </div>-->
797 797 <div class="radio">
798 798 <label>
799 799 <input type="radio" name="filloption" id="filloption2" value="filloption2" checked style="margin-top:8px;">
... ... @@ -886,7 +886,7 @@
886 886 </div>
887 887 </div>
888 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 890 OK
891 891 </button>
892 892 <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button>
... ... @@ -1018,12 +1018,17 @@
1018 1018 </div>-->
1019 1019  
1020 1020 <script>
  1021 +
1021 1022 function enableDisableFillOption() {
1022   -
  1023 + //debugger;
1023 1024 if (document.getElementById('fill-option').checked) {
1024   -
  1025 + // $('#imgOpacity').attr("background-color");
  1026 + //$('#imgOpacity').css({"background-color"})
1025 1027 //$("#filloption1").css({ "pointer-events": "auto" });
1026 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 1032 $("#edit-slider-3").css({ "pointer-events": "auto" });
1028 1033 $("#edit-slider-4").css({ "pointer-events": "auto" });
1029 1034 $("#editstylebackgroundcolor").css({ "pointer-events": "auto" });
... ... @@ -1039,7 +1044,7 @@
1039 1044  
1040 1045 }
1041 1046 else {
1042   -
  1047 + $('#imgOpacity').css("background-color","transparent");
1043 1048 //$("#filloption1").css({ "pointer-events": "none" });
1044 1049 //$("#filloption2").css({ "pointer-events": "none" });
1045 1050 $("#edit-slider-3").css({ "pointer-events": "none" });
... ... @@ -1061,12 +1066,17 @@
1061 1066 function enableDisableOutline() {
1062 1067  
1063 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 1074 $("#borderWidthCanvasElement").css({ "pointer-events": "auto" });
1066 1075 $("#outlineColor").css({ "pointer-events": "auto" });
1067 1076 $(".setEnableDisableForEditShapeStyle").css({ "opacity": "1" })
1068 1077 }
1069 1078 else {
  1079 + $('.marginTopBtm10 div.outlinediv').css("border-color", "transparent");
1070 1080 $("#borderWidthCanvasElement").css({ "pointer-events": "none" });
1071 1081 $("#outlineColor").css({ "pointer-events": "none" });
1072 1082 $(".setEnableDisableForEditShapeStyle").css({ "opacity": ".5" })
... ...