Commit 760bf8356788a2be17573a09afa18c561adc072d

Authored by Mukul Rajput
1 parent 0e8fbc40

this is for the bug 12596

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -84,8 +84,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -84,8 +84,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
84 $rootScope.userModules; 84 $rootScope.userModules;
85 $rootScope.errorMesaage; 85 $rootScope.errorMesaage;
86 $rootScope.isVisibleLogin; 86 $rootScope.isVisibleLogin;
87 -  
88 - 87 + var isfilloptionChecked = "";
  88 + var isOutlineOptionChecked = "";
89 $rootScope.initializeAIA = function () { 89 $rootScope.initializeAIA = function () {
90 90
91 $rootScope.isLoading = false; 91 $rootScope.isLoading = false;
@@ -905,6 +905,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -905,6 +905,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
905 905
906 $rootScope.isShapeSyleOkBtnClicked = false; 906 $rootScope.isShapeSyleOkBtnClicked = false;
907 $rootScope.setPropertiesForShapes = function (id) { 907 $rootScope.setPropertiesForShapes = function (id) {
  908 + isfilloptionChecked = document.getElementById('fill-option').checked;
  909 + isOutlineOptionChecked = document.getElementById('Outline-Option').checked;
908 $rootScope.isShapeSyleOkBtnClicked = true; 910 $rootScope.isShapeSyleOkBtnClicked = true;
909 if ($("#annotationpaintbrushsize").hasClass('activebtncolor')) { 911 if ($("#annotationpaintbrushsize").hasClass('activebtncolor')) {
910 $("#annotationpaintbrushsize").removeClass('activebtncolor') 912 $("#annotationpaintbrushsize").removeClass('activebtncolor')
@@ -997,10 +999,63 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -997,10 +999,63 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
997 $('.marginTopBtm10 div.outlinediv').css("border-width", 1); 999 $('.marginTopBtm10 div.outlinediv').css("border-width", 1);
998 $("#imgOpacity").css("opacity", 1); 1000 $("#imgOpacity").css("opacity", 1);
999 $(".marginTopBtm10 div.outlinediv").css("opacity", 1); 1001 $(".marginTopBtm10 div.outlinediv").css("opacity", 1);
  1002 + document.getElementById("editStyleForm").reset();
  1003 + isOutlineOptionChecked = document.getElementById('Outline-Option').checked;
  1004 + isfilloptionChecked = document.getElementById('fill-option').checked;
  1005 + if (isOutlineOptionChecked == true) {
  1006 + $(".setEnableDisableForEditShapeStyle").css({ "opacity": "1" });
  1007 + $("#borderWidthCanvasElement").css({ "pointer-events": "auto" });
  1008 + $("#outlineColor").css({ "pointer-events": "auto" });
  1009 + }
  1010 + else {
  1011 + $(".setEnableDisableForEditShapeStyle").css({ "opacity": ".5" });
  1012 + $("#borderWidthCanvasElement").css({ "pointer-events": "none" });
  1013 + $("#outlineColor").css({ "pointer-events": "none" });
  1014 + }
  1015 + if (isfilloptionChecked == true) {
  1016 + $(".enableDisableOpacity label").css({ "cursor": "pointer" });
  1017 + $(".enableDisableOpacity").css({ "opacity": "1" });
  1018 + $("#edit-slider-3").css({ "pointer-events": "auto" });
  1019 + $("#edit-slider-4").css({ "pointer-events": "auto" });
  1020 + $("#editstylebackgroundcolor").css({ "pointer-events": "auto" });
  1021 + }
  1022 + else {
  1023 + $(".enableDisableOpacity label").css({ "cursor": "pointer" });
  1024 + $(".enableDisableOpacity").css({ "opacity": ".5" });
  1025 + $("#edit-slider-3").css({ "pointer-events": "none" });
  1026 + $("#edit-slider-4").css({ "pointer-events": "none" });
  1027 + $("#editstylebackgroundcolor").css({ "pointer-events": "none" });
  1028 + }
1000 //$("#borderWidthCanvasElement").change(function () { 1029 //$("#borderWidthCanvasElement").change(function () {
1001 // $(".marginTopBtm10 div.outlinediv").css("border-color", x); 1030 // $(".marginTopBtm10 div.outlinediv").css("border-color", x);
1002 //}); 1031 //});
1003 } else { 1032 } else {
  1033 + document.getElementById('fill-option').checked = isfilloptionChecked;
  1034 + document.getElementById('Outline-Option').checked = isOutlineOptionChecked;
  1035 + if (isfilloptionChecked == true) {
  1036 + $(".enableDisableOpacity label").css({ "cursor": "pointer" });
  1037 + $(".enableDisableOpacity").css({ "opacity": "1" });
  1038 + $("#edit-slider-3").css({ "pointer-events": "auto" });
  1039 + $("#edit-slider-4").css({ "pointer-events": "auto" });
  1040 + $("#editstylebackgroundcolor").css({ "pointer-events": "auto" });
  1041 + }
  1042 + else {
  1043 + $(".enableDisableOpacity label").css({ "cursor": "pointer" });
  1044 + $(".enableDisableOpacity").css({ "opacity": ".5" });
  1045 + $("#edit-slider-3").css({ "pointer-events": "none" });
  1046 + $("#edit-slider-4").css({ "pointer-events": "none" });
  1047 + $("#editstylebackgroundcolor").css({ "pointer-events": "none" });
  1048 + }
  1049 + if (isOutlineOptionChecked == true) {
  1050 + $(".setEnableDisableForEditShapeStyle").css({ "opacity": "1" });
  1051 + $("#borderWidthCanvasElement").css({ "pointer-events": "auto" });
  1052 + $("#outlineColor").css({ "pointer-events": "auto" });
  1053 + }
  1054 + else {
  1055 + $(".setEnableDisableForEditShapeStyle").css({ "opacity": ".5" });
  1056 + $("#borderWidthCanvasElement").css({ "pointer-events": "none" });
  1057 + $("#outlineColor").css({ "pointer-events": "none" });
  1058 + }
1004 var previewBgColor = $("#shapeStyleDiv").css('background-color'); 1059 var previewBgColor = $("#shapeStyleDiv").css('background-color');
1005 var previewBorderColor = $('#previewBorder').css('border-color'); 1060 var previewBorderColor = $('#previewBorder').css('border-color');
1006 var previewBorderWidth = $('#previewBorder').css('border-width'); 1061 var previewBorderWidth = $('#previewBorder').css('border-width');
@@ -1018,10 +1073,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic @@ -1018,10 +1073,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1018 document.getElementById('modeleditstyle').style.display = "none"; 1073 document.getElementById('modeleditstyle').style.display = "none";
1019 //Edit Shape Style popup should open at it's default position 1074 //Edit Shape Style popup should open at it's default position
1020 $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); 1075 $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" });
1021 -  
1022 } 1076 }
1023 -  
1024 -  
1025 //--Common code of Annotation Toolbar for CI and DA------- 1077 //--Common code of Annotation Toolbar for CI and DA-------
1026 $rootScope.DrawLineOnModuleItem = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { 1078 $rootScope.DrawLineOnModuleItem = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) {
1027 if ($rootScope.isLinePreviewCompleted == true) { 1079 if ($rootScope.isLinePreviewCompleted == true) {
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -899,123 +899,125 @@ @@ -899,123 +899,125 @@
899 <div class="modal-header annotation-modal-header"> 899 <div class="modal-header annotation-modal-header">
900 <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4> 900 <h4 class="modal-title" id="myModalLabel33">Edit Shape Style</h4>
901 </div> 901 </div>
902 - <div class="modal-body">  
903 - <div class="marginTopBtm10">  
904 - <div class="well well-sm no-margin-btm">  
905 - <div class="row">  
906 - <div class="col-sm-12">  
907 - <div class="checkbox no-margin">  
908 - <label>  
909 - <input id="fill-option" type="checkbox" checked onclick="enableDisableFillOption()"> Fill Option  
910 - </label>  
911 - </div>  
912 - </div>  
913 - <div class="col-sm-6 enableDisableOpacity">  
914 - <!--<div class="radio"> 902 + <form id="editStyleForm">
  903 + <div class="modal-body">
  904 + <div class="marginTopBtm10">
  905 + <div class="well well-sm no-margin-btm">
  906 + <div class="row">
  907 + <div class="col-sm-12">
  908 + <div class="checkbox no-margin">
915 <label> 909 <label>
916 - <input type="radio" name="filloption" id="filloption1" value="filloption1">  
917 - <span class="">Texture</span>  
918 - <img id="editstyleTexture" src="~/../content/images/common/annotation-tool-bar/pattern-picker.png" alt="" class="pattern-picker" data-toggle="modal" data-target="#pattern"> 910 + <input id="fill-option" type="checkbox" checked onclick="enableDisableFillOption()"> Fill Option
919 </label> 911 </label>
920 - </div>-->  
921 - <div class="radio">  
922 - <label>  
923 - <input type="radio" name="filloption" id="filloption2" value="filloption2" checked style="margin-top:8px;"> 912 + </div>
  913 + </div>
  914 + <div class="col-sm-6 enableDisableOpacity">
  915 + <!--<div class="radio">
  916 + <label>
  917 + <input type="radio" name="filloption" id="filloption1" value="filloption1">
  918 + <span class="">Texture</span>
  919 + <img id="editstyleTexture" src="~/../content/images/common/annotation-tool-bar/pattern-picker.png" alt="" class="pattern-picker" data-toggle="modal" data-target="#pattern">
  920 + </label>
  921 + </div>-->
  922 + <div class="radio">
  923 + <label>
  924 + <input type="radio" name="filloption" id="filloption2" value="filloption2" checked style="margin-top:8px;">
924 925
925 926
926 - <div id="editstylebackgroundcolor" class="form-group" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;float:left;">  
927 - <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span>  
928 - <input type="text" class="form-control outerBackgroundColor" data-control="saturation" style="display:none;" value="#0088cc">  
929 - </div> 927 + <div id="editstylebackgroundcolor" class="form-group" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;float:left;">
  928 + <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span>
  929 + <input type="text" class="form-control outerBackgroundColor" data-control="saturation" style="display:none;" value="#0088cc">
  930 + </div>
930 931
931 932
932 - </label>  
933 - </div>  
934 - </div>  
935 - <div class="col-sm-6 no-padding marginTop10 enableDisableOpacity">  
936 - <div class="row">  
937 - <label class="pull-left" style="font-weight:normal;">Scale</label>  
938 - <div id="edit-slider-3" class="pull-left" style="width:62%; margin-left:3%; margin-top:2%;">  
939 - <div id="slider-range-min-3"></div> 933 + </label>
940 </div> 934 </div>
941 </div> 935 </div>
  936 + <div class="col-sm-6 no-padding marginTop10 enableDisableOpacity">
  937 + <div class="row">
  938 + <label class="pull-left" style="font-weight:normal;">Scale</label>
  939 + <div id="edit-slider-3" class="pull-left" style="width:62%; margin-left:3%; margin-top:2%;">
  940 + <div id="slider-range-min-3"></div>
  941 + </div>
  942 + </div>
942 943
943 - <div class="row">  
944 - <label class="pull-left" style="font-weight:normal;">Opacity</label>  
945 - <div id="edit-slider-4" class="pull-left" style="width:53%; margin-left:3%; margin-top:2%;">  
946 - <div id="slider-range-min-4"></div> 944 + <div class="row">
  945 + <label class="pull-left" style="font-weight:normal;">Opacity</label>
  946 + <div id="edit-slider-4" class="pull-left" style="width:53%; margin-left:3%; margin-top:2%;">
  947 + <div id="slider-range-min-4"></div>
  948 + </div>
947 </div> 949 </div>
948 - </div>  
949 950
950 - <div class="clearfix"></div> 951 + <div class="clearfix"></div>
951 952
952 953
  954 + </div>
953 </div> 955 </div>
954 - </div>  
955 956
  957 + </div>
956 </div> 958 </div>
957 - </div>  
958 - <div class="marginTopBtm10">  
959 - <div class="well well-sm no-margin-btm">  
960 - <div class="row">  
961 - <div class="col-sm-12">  
962 - <div class="checkbox no-margin">  
963 - <label>  
964 - <input id="Outline-Option" onclick="enableDisableOutline()" type="checkbox" checked> Outline Option  
965 - </label> 959 + <div class="marginTopBtm10">
  960 + <div class="well well-sm no-margin-btm">
  961 + <div class="row">
  962 + <div class="col-sm-12">
  963 + <div class="checkbox no-margin">
  964 + <label>
  965 + <input id="Outline-Option" onclick="enableDisableOutline()" type="checkbox" checked> Outline Option
  966 + </label>
  967 + </div>
966 </div> 968 </div>
967 - </div>  
968 - <div class="col-sm-6 setEnableDisableForEditShapeStyle">  
969 - <label class="marginTop5">  
970 - <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span>  
971 - <div class="form-group" id="outlineColor" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;float:left;"> 969 + <div class="col-sm-6 setEnableDisableForEditShapeStyle">
  970 + <label class="marginTop5">
  971 + <span style="font-weight: normal; float: left; padding-top: 5px; padding-right: 5px;">Color</span>
  972 + <div class="form-group" id="outlineColor" style="display:inline-flex;vertical-align:top;cursor:pointer;margin-right:36px;float:left;">
972 973
973 - <input type="text" class="form-control borderColorCanvasPreview" data-control="saturation" style="display:none;" value="#0088cc">  
974 - </div> 974 + <input type="text" class="form-control borderColorCanvasPreview" data-control="saturation" style="display:none;" value="#0088cc">
  975 + </div>
975 976
976 977
977 - </label>  
978 - </div> 978 + </label>
  979 + </div>
979 980
980 - <div class="col-sm-6 setEnableDisableForEditShapeStyle">  
981 - <div class="form-horizontal">  
982 - <div class="form-group">  
983 - <label class="col-sm-3 control-label" style=" font-weight:normal; padding-top:9px;">Size</label>  
984 - <div class="col-sm-9 marginTop5">  
985 - <select id="borderWidthCanvasElement" class="form-control input-sm">  
986 - <option value="1">1</option>  
987 - <option value="2">2</option>  
988 - <option value="3">3</option>  
989 - <option value="4">4</option>  
990 - <option value="5">5</option>  
991 - </select> 981 + <div class="col-sm-6 setEnableDisableForEditShapeStyle">
  982 + <div class="form-horizontal">
  983 + <div class="form-group">
  984 + <label class="col-sm-3 control-label" style=" font-weight:normal; padding-top:9px;">Size</label>
  985 + <div class="col-sm-9 marginTop5">
  986 + <select id="borderWidthCanvasElement" class="form-control input-sm">
  987 + <option value="1">1</option>
  988 + <option value="2">2</option>
  989 + <option value="3">3</option>
  990 + <option value="4">4</option>
  991 + <option value="5">5</option>
  992 + </select>
  993 + </div>
992 </div> 994 </div>
993 </div> 995 </div>
994 </div> 996 </div>
995 - </div>  
996 997
  998 + </div>
997 </div> 999 </div>
998 </div> 1000 </div>
999 - </div>  
1000 1001
1001 - <div class="marginTopBtm10"> 1002 + <div class="marginTopBtm10">
1002 1003
1003 - <div class="well well-sm no-margin-btm blankshapediv">  
1004 - <div class="outlinediv" id="outlinedivId" style="border: 1px solid #000000;">  
1005 - <div id="imgOpacity" style="background-color: #ffffff" class="fullcolordiv imgopacity"> 1004 + <div class="well well-sm no-margin-btm blankshapediv">
  1005 + <div class="outlinediv" id="outlinedivId" style="border: 1px solid #000000;">
  1006 + <div id="imgOpacity" style="background-color: #ffffff" class="fullcolordiv imgopacity">
  1007 + </div>
1006 </div> 1008 </div>
1007 </div> 1009 </div>
1008 - </div>  
1009 1010
  1011 + </div>
1010 </div> 1012 </div>
1011 - </div>  
1012 - <div class="modal-footer">  
1013 - <button id="btnShapeStyle" type="button" class="btn btn-primary btn-sm" ng-click="setPropertiesForShapes('imgOpacity')">  
1014 - OK  
1015 - </button>  
1016 - <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button>  
1017 - </div>  
1018 - </div> 1013 + <div class="modal-footer">
  1014 + <button id="btnShapeStyle" type="button" class="btn btn-primary btn-sm" ng-click="setPropertiesForShapes('imgOpacity')">
  1015 + OK
  1016 + </button>
  1017 + <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button>
  1018 + </div>
  1019 + </form>
  1020 +</div>
1019 </div> 1021 </div>
1020 1022
1021 <!--Export Image Modal--> 1023 <!--Export Image Modal-->