From eb5fd6b27c3e7de5ad8b2a1d8d1968f8960ef198 Mon Sep 17 00:00:00 2001 From: amrita.vishnoi Date: Thu, 1 Sep 2016 11:12:44 +0530 Subject: [PATCH] commit after taking file from DisableATBarOnPopUp branch --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js | 50 ++++++++++++++++++++------------------------------ 400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html | 17 +++++++++++------ 2 files changed, 31 insertions(+), 36 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index 787e920..ab7204e 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -72,7 +72,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", if (alreadyOpenThisView != null) { for (var i = 0; i < $rootScope.openViews.length; i++) { k++; - if ($rootScope.openViews[i].body-views == title) { + if ($rootScope.openViews[i].body - views == title) { $rootScope.openViews.splice((k - 1), 1); $rootScope.openViews.push( @@ -175,8 +175,6 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $(".btn-annotation-rectangle").addClass("activebtncolor"); } $rootScope.paintBrush = function () { - - $('.btnCursor').addClass('activebtncolor'); $rootScope.switchCanvasToPaintCanvas(); $rootScope.shapeType = "FreeStylePaint"; @@ -245,14 +243,14 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", } $rootScope.EraseDrawing = function () { $rootScope.switchCanvasToPaintCanvas(); - // $('#canvasPaint').sketch({ defaultColor: "yellow", defaultSize: 1 }); + // $('#canvasPaint').sketch({ defaultColor: "yellow", defaultSize: 1 }); var sktch = $('#canvasPaint').sketch(); - $('#canvasPaint').sketch().actions = []; // this line empties the actions. + $('#canvasPaint').sketch().actions = []; // this line empties the actions. var myCanvas = document.getElementById("canvasPaint"); var ctx = myCanvas.getContext('2d'); - ctx.clearRect(0, 0, myCanvas.width, myCanvas.height); - $rootScope.switchCanvas(); - + ctx.clearRect(0, 0, myCanvas.width, myCanvas.height); + $rootScope.switchCanvas(); + } //opacity code @@ -260,36 +258,28 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", $rootScope.shapestyleFillColor = "#fff"; $rootScope.shapestyleFillBorderColor = "black"; $rootScope.shapestyleborderWidth = 2; - $rootScope.shapestyleborderStyles = "solid"; - $rootScope.shapestyle = function (id) { - document.getElementById('modelbackground').style.display = "none"; + $rootScope.shapestyle = function (id) { $rootScope.shapestyleOpacity = $("#" + id).css('opacity'); $rootScope.shapestyleFillColor = $("#" + id).parent().css('background-color'); - $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color"); - $rootScope.shapestyleborderWidthSeparatingPixel = $("#" + id).parent().css("border-top-width"); - var pixelSeparation = $rootScope.shapestyleborderWidthSeparatingPixel; - var intPart = pixelSeparation.split("p"); - - $rootScope.shapestyleborderWidth = intPart[0]; - $rootScope.shapestyleborderStyles = "solid"; - - $('#editshapestyle').modal('hide'); - } + $rootScope.shapestyleFillBorderColor = $("#" + id).parent().css('border'); + var a = $rootScope.shapestyleFillBorderColor; + var b = a.split("px"); + // alert(b); + $rootScope.shapestyleborderWidth = b[0]; - $rootScope.enableAnnotationToolBar = function () { + // alert(b[0]); + //alert(b[1]); + var c = b[1].split("solid"); + // alert(c[1]); + $rootScope.shapestyleborderColor = c[1]; - document.getElementById('modelbackground').style.display = "block"; - $("#editshapestyle").modal('show'); + // alert($rootScope.shapestyleFillColor); + $('#editshapestyle').modal('hide'); } - $rootScope.disableAnnotationToolBar = function () { - - document.getElementById('modelbackground').style.display = "none"; - - } //----End------------- @@ -570,7 +560,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", var openViewLen = $rootScope.openViews.length; var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId; $rootScope.isSettingEventAlredayDispachted = true; - $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId },true); + $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }); } else { $rootScope.$broadcast('reloadDAControllerEvent', true); diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html index dd6c5e7..2fc5a18 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -31,7 +31,12 @@ - +