From 760bf8356788a2be17573a09afa18c561adc072d Mon Sep 17 00:00:00 2001 From: Mukul Date: Fri, 3 Mar 2017 12:48:45 +0530 Subject: [PATCH] this is for the bug 12596 --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 400-SOURCECODE/AIAHTML5.Web/index.html | 170 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------ 2 files changed, 143 insertions(+), 89 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 71d4857..c2ff1c1 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -84,8 +84,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $rootScope.userModules; $rootScope.errorMesaage; $rootScope.isVisibleLogin; - - + var isfilloptionChecked = ""; + var isOutlineOptionChecked = ""; $rootScope.initializeAIA = function () { $rootScope.isLoading = false; @@ -905,6 +905,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $rootScope.isShapeSyleOkBtnClicked = false; $rootScope.setPropertiesForShapes = function (id) { + isfilloptionChecked = document.getElementById('fill-option').checked; + isOutlineOptionChecked = document.getElementById('Outline-Option').checked; $rootScope.isShapeSyleOkBtnClicked = true; if ($("#annotationpaintbrushsize").hasClass('activebtncolor')) { $("#annotationpaintbrushsize").removeClass('activebtncolor') @@ -997,10 +999,63 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic $('.marginTopBtm10 div.outlinediv').css("border-width", 1); $("#imgOpacity").css("opacity", 1); $(".marginTopBtm10 div.outlinediv").css("opacity", 1); + document.getElementById("editStyleForm").reset(); + isOutlineOptionChecked = document.getElementById('Outline-Option').checked; + isfilloptionChecked = document.getElementById('fill-option').checked; + if (isOutlineOptionChecked == true) { + $(".setEnableDisableForEditShapeStyle").css({ "opacity": "1" }); + $("#borderWidthCanvasElement").css({ "pointer-events": "auto" }); + $("#outlineColor").css({ "pointer-events": "auto" }); + } + else { + $(".setEnableDisableForEditShapeStyle").css({ "opacity": ".5" }); + $("#borderWidthCanvasElement").css({ "pointer-events": "none" }); + $("#outlineColor").css({ "pointer-events": "none" }); + } + if (isfilloptionChecked == true) { + $(".enableDisableOpacity label").css({ "cursor": "pointer" }); + $(".enableDisableOpacity").css({ "opacity": "1" }); + $("#edit-slider-3").css({ "pointer-events": "auto" }); + $("#edit-slider-4").css({ "pointer-events": "auto" }); + $("#editstylebackgroundcolor").css({ "pointer-events": "auto" }); + } + else { + $(".enableDisableOpacity label").css({ "cursor": "pointer" }); + $(".enableDisableOpacity").css({ "opacity": ".5" }); + $("#edit-slider-3").css({ "pointer-events": "none" }); + $("#edit-slider-4").css({ "pointer-events": "none" }); + $("#editstylebackgroundcolor").css({ "pointer-events": "none" }); + } //$("#borderWidthCanvasElement").change(function () { // $(".marginTopBtm10 div.outlinediv").css("border-color", x); //}); } else { + document.getElementById('fill-option').checked = isfilloptionChecked; + document.getElementById('Outline-Option').checked = isOutlineOptionChecked; + if (isfilloptionChecked == true) { + $(".enableDisableOpacity label").css({ "cursor": "pointer" }); + $(".enableDisableOpacity").css({ "opacity": "1" }); + $("#edit-slider-3").css({ "pointer-events": "auto" }); + $("#edit-slider-4").css({ "pointer-events": "auto" }); + $("#editstylebackgroundcolor").css({ "pointer-events": "auto" }); + } + else { + $(".enableDisableOpacity label").css({ "cursor": "pointer" }); + $(".enableDisableOpacity").css({ "opacity": ".5" }); + $("#edit-slider-3").css({ "pointer-events": "none" }); + $("#edit-slider-4").css({ "pointer-events": "none" }); + $("#editstylebackgroundcolor").css({ "pointer-events": "none" }); + } + if (isOutlineOptionChecked == true) { + $(".setEnableDisableForEditShapeStyle").css({ "opacity": "1" }); + $("#borderWidthCanvasElement").css({ "pointer-events": "auto" }); + $("#outlineColor").css({ "pointer-events": "auto" }); + } + else { + $(".setEnableDisableForEditShapeStyle").css({ "opacity": ".5" }); + $("#borderWidthCanvasElement").css({ "pointer-events": "none" }); + $("#outlineColor").css({ "pointer-events": "none" }); + } var previewBgColor = $("#shapeStyleDiv").css('background-color'); var previewBorderColor = $('#previewBorder').css('border-color'); var previewBorderWidth = $('#previewBorder').css('border-width'); @@ -1018,10 +1073,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic document.getElementById('modeleditstyle').style.display = "none"; //Edit Shape Style popup should open at it's default position $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); - } - - //--Common code of Annotation Toolbar for CI and DA------- $rootScope.DrawLineOnModuleItem = function (canvasId, LineNumber, shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) { if ($rootScope.isLinePreviewCompleted == true) { diff --git a/400-SOURCECODE/AIAHTML5.Web/index.html b/400-SOURCECODE/AIAHTML5.Web/index.html index bcd60d0..042943c 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.html +++ b/400-SOURCECODE/AIAHTML5.Web/index.html @@ -899,123 +899,125 @@ -