Commit 5fc7c2b4608f4c1695545e3d31c17da910610f96

Authored by Amrita Vishnoi
2 parents 1e788ec3 36460961

Merged EditShape_Modal_Changes branch and modified after code review

400-SOURCECODE/AIAHTML5.Web/Web.config
... ... @@ -18,7 +18,7 @@
18 18 <httpRuntime targetFramework="4.5" />
19 19 </system.web>
20 20 <system.webServer>
21   - <rewrite>
  21 + <!--<rewrite>
22 22 <rules>
23 23 <rule name="AngularJS Routes" stopProcessing="true">
24 24 <match url=".*" />
... ... @@ -30,7 +30,7 @@
30 30 <action type="Rewrite" url="/AIA/" />
31 31 </rule>
32 32 </rules>
33   - </rewrite>
  33 + </rewrite>-->
34 34 <staticContent>
35 35 <remove fileExtension=".mp3" />
36 36 <clientCache cacheControlMode="DisableCache" />
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -96,7 +96,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
96 96 $scope.dragdivtop = 0;
97 97  
98 98 $scope.IsSearchVisible = false;
99   -
  99 + $scope.shapesize = 1;
100 100 $scope.dragdivposition = {
101 101 "left": $scope.dragdivleft,
102 102 "top": $scope.dragdivtop
... ... @@ -5648,7 +5648,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5648 5648 var canvasElement = document.getElementById("canvas");
5649 5649 var ctx = canvasElement.getContext("2d");
5650 5650  
5651   -
  5651 + var canvasElement1 = document.getElementById("canvasPaint");
  5652 + var ctx1 = canvasElement1.getContext("2d");
5652 5653  
5653 5654 /* if ($rootScope.shapeType == "FreeStylePaint") {
5654 5655 var canvasPaint_zIndex = $('#canvasPaint').css("z-index");
... ... @@ -5669,6 +5670,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5669 5670 case "cursor":
5670 5671 // ctx.clearRect(0, 0, 2277, 3248);
5671 5672 ctx.beginPath();
  5673 + ctx1.beginPath();
5672 5674  
5673 5675  
5674 5676 break;
... ... @@ -5812,7 +5814,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
5812 5814 break;
5813 5815  
5814 5816 case "Circle":
5815   - // alert($rootScope.shapestyleFillColor);
  5817 + // alert($rootScope.shapestyleborderWidth);
5816 5818 $rootScope.resetCircle = $rootScope.ObjectIndex++;
5817 5819 $('#canvas').addLayer({
5818 5820 layer: true,
... ... @@ -6308,7 +6310,28 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6308 6310  
6309 6311 }
6310 6312 $scope.OnPaintBrushCanvasMouseDown = function (event) {
  6313 + switch ($rootScope.shapeType) {
  6314 +
  6315 + case "FreeStylePaint":
  6316 +
  6317 + debugger;
  6318 + $('#canvasPaint').sketch({ defaultSize: 1 });
  6319 + //if ($("#amount-2").val() == '') {
  6320 + // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
  6321 + //}
  6322 + //else {
  6323 +
  6324 + // var a = $("#amount-2").val();
  6325 + // $scope.shapesize = parseInt(a);
  6326 + // // alert(JSON.stringify({ defaultSize: $scope.shapesize }));
  6327 + // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
6311 6328  
  6329 + //}
  6330 +
  6331 +
  6332 + break;
  6333 +
  6334 + }
6312 6335 }
6313 6336 $scope.OnPaintBrushCanvasMouseUp = function (event) {
6314 6337  
... ... @@ -6316,19 +6339,36 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6316 6339 // var canvasElement1 = document.getElementById("canvasPaint");
6317 6340 // var ctx1 = canvasElement1.getContext("2d");
6318 6341  
6319   - switch($rootScope.shapeType)
6320   - {
6321   - case "FreeStylePaint":
6322   -
6323   - $('#canvasPaint').sketch({ defaultSize: 1 });
  6342 + //switch($rootScope.shapeType)
  6343 + //{
  6344 +
  6345 + // case "FreeStylePaint":
  6346 +
  6347 + // debugger;
  6348 +
  6349 + // if ($("#amount-2").val() == '')
  6350 + // {
  6351 + // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
  6352 + // }
  6353 + // else
  6354 + // {
  6355 +
  6356 + // var a = $("#amount-2").val();
  6357 + // $scope.shapesize = parseInt(a);
  6358 + // alert(JSON.stringify({ defaultSize: $scope.shapesize }));
  6359 + // $('#canvasPaint').sketch({ defaultSize: $scope.shapesize });
  6360 +
  6361 + // }
  6362 +
6324 6363  
6325   - break;
  6364 + // break;
6326 6365  
6327   -
6328   - }
  6366 + //}
6329 6367  
6330 6368 }
6331 6369  
  6370 +
  6371 +
6332 6372 $(document).keydown(function (event) {
6333 6373  
6334 6374  
... ... @@ -6900,12 +6940,11 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
6900 6940 //8.remove current layer canavses
6901 6941 $scope.flushCanvas();
6902 6942  
  6943 +
6903 6944  
6904 6945 //9.
6905 6946 $timeout(function () {
6906 6947 $rootScope.isHighLight = false;
6907   -
6908   - //removing speechbubble
6909 6948 $('#sppeachBubble').css('display', 'none');
6910 6949 $("#dot").css("display", "none");
6911 6950  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -175,6 +175,8 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
175 175 $(".btn-annotation-rectangle").addClass("activebtncolor");
176 176 }
177 177 $rootScope.paintBrush = function () {
  178 +
  179 + $('.btnCursor').addClass('activebtncolor');
178 180 $rootScope.switchCanvasToPaintCanvas();
179 181  
180 182 $rootScope.shapeType = "FreeStylePaint";
... ... @@ -261,19 +263,33 @@ AIA.controller(&quot;HomeController&quot;, [&quot;$rootScope&quot;, &quot;Modules&quot;, &quot;$log&quot;, &quot;$location&quot;,
261 263 $rootScope.shapestyleborderStyles = "solid";
262 264 $rootScope.shapestyle = function (id) {
263 265  
  266 + document.getElementById('modelbackground').style.display = "none";
  267 +
264 268 $rootScope.shapestyleOpacity = $("#" + id).css('opacity');
265 269 $rootScope.shapestyleFillColor = $("#" + id).parent().css('background-color');
266 270 $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color");
267 271 $rootScope.shapestyleborderWidthSeparatingPixel = $("#" + id).parent().css("border-top-width");
268 272 var pixelSeparation = $rootScope.shapestyleborderWidthSeparatingPixel;
269 273 var intPart = pixelSeparation.split("p");
270   -
  274 +
271 275 $rootScope.shapestyleborderWidth = intPart[0];
272   - $rootScope.shapestyleborderStyles = "solid";
  276 + $rootScope.shapestyleborderStyles = "solid";
  277 +
  278 + $('#editshapestyle').modal('hide');
  279 + }
  280 +
  281 + $rootScope.enableAnnotationToolBar = function () {
  282 +
  283 + document.getElementById('modelbackground').style.display = "block";
  284 + $("#editshapestyle").modal('show');
273 285  
274   - $('#editshapestyle').modal('hide');
275 286 }
276 287  
  288 + $rootScope.disableAnnotationToolBar = function () {
  289 +
  290 + document.getElementById('modelbackground').style.display = "none";
  291 +
  292 + }
277 293  
278 294  
279 295 //----End-------------
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js.orig deleted
1   -๏ปฟ'use strict';
2   -
3   -AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", "$timeout",
4   - function ($rootScope, Modules, $log, $location, $timeout) {
5   -
6   - //$scope.pageToOpen = {
7   - // name: 'MainMenu'
8   - //};
9   - $rootScope.pageToOpen = 'app/widget/MainMenu.html';
10   - $rootScope.currentBodyViewId;
11   - $rootScope.currentActiveModuleTitle = 'Welcome to A.D.A.M. Interactive Anatomy';//Modules[0].Name;
12   - $rootScope.currentActiveViewTitle;
13   - $rootScope.cuurentActiveModuleId;
14   - $rootScope.openModules = [];
15   - $rootScope.openViews = [];
16   - $rootScope.currentSlug;
17   - $rootScope.jsPanelTitle;
18   - $rootScope.ViewTitle;
19   - $rootScope.isLoading = false;
20   - $rootScope.isAnnotationWindowOpen = false;
21   - $rootScope.isDrawingToolSelected = false;
22   - $rootScope.isIdetifyClicked = true;
23   - $rootScope.paint = false;
24   - $rootScope.clickX = new Array();
25   - $rootScope.clickY = new Array();
26   - $rootScope.clickDrag = new Array();
27   - $rootScope.isLineDrawSelecyed = false;
28   - $rootScope.isAnnotationWindowClose = false;
29   - $rootScope.lastX;
30   - $rootScope.lastY;
31   - $rootScope.CommonData;
32   - $rootScope.shapeType;
33   - $rootScope.globalSetting = {
34   - ethnicity: 'W',
35   - modesty: 'Y',
36   - };
37   - $rootScope.formsetting = {
38   - ethnicity: null,
39   - modesty: null
40   - };
41   -
42   - $rootScope.isModestyOn;
43   - $rootScope.isModestyOff;
44   - $rootScope.SetSettingActiveTab;
45   -
46   - //jspanel functionality..
47   -
48   - $rootScope.openParent = function (slug) {
49   - // debugger;
50   - var openViews = $rootScope.openViews;
51   - if (openViews.length > 0) {
52   - $rootScope.openViews.splice(openViews.length - 1);
53   - }
54   - if (openViews.length > 0) {
55   - var lastOpenMoudle = $rootScope.openViews[openViews.length - 1];
56   - }
57   - $('#daImagePanel').remove();
58   - $location.url('/' + slug);
59   -
60   - $rootScope.$broadcast('jsPanelCloseEvent', true);
61   - }
62   -
63   - //called on jsanel minimize
64   - $rootScope.setState = function (state, title) {
65   -
66   -
67   - var alreadyOpenThisView = new jinqJs()
68   - .from($rootScope.openViews)
69   - .where("body-views == " + title)
70   - .select();
71   - var k = 0;
72   - if (alreadyOpenThisView != null) {
73   - for (var i = 0; i < $rootScope.openViews.length; i++) {
74   - k++;
75   - if ($rootScope.openViews[i].body-views == title) {
76   - $rootScope.openViews.splice((k - 1), 1);
77   -
78   - $rootScope.openViews.push(
79   - {
80   - "module": $rootScope.currentActiveModuleTitle, "body-views": title, "state": state, "BodyViewId": $rootScope.currentBodyViewId,
81   - "slug": $rootScope.currentSlug
82   - }
83   - );
84   - }
85   - }
86   - }
87   - if (state == 'max') {
88   - $('#daBodyview').css('width', '100%')
89   - }
90   - }
91   -
92   - $rootScope.DrawLine = function () {
93   - //$rootScope.isIdetifyClicked = false;
94   - //$rootScope.isDrawingToolSelected = true;
95   - //$rootScope.isLineDrawSelecyed = true;
96   - $rootScope.shapeType = "Line";
97   - // alert($rootScope.shapeType);
98   -
99   -
100   - }
101   -
102   - $rootScope.ClearIframe = function () {
103   - if ($('#daImagePanel') != null)
104   - $('#daImagePanel').remove();
105   -
106   - $rootScope.hideScrollbar();
107   - }
108   -
109   - //ends
110   -
111   - $rootScope.hideScrollbar = function () {
112   - $(".sidebar").mCustomScrollbar({
113   - autoHideScrollbar: true,
114   - //theme:"rounded"
115   - });
116   - }
117   -
118   - //annotation tool custom events
119   - $rootScope.ShowAnnotationWindow = function () {
120   - $rootScope.isAnnotationWindowOpen = true;
121   - $(".annotationTollbar").css("display", "block");
122   - $rootScope.$broadcast('annotationToolEvent', true);
123   -
124   - }
125   -
126   - $rootScope.CloseAnnotationTool = function () {
127   - console.log('close')
128   - $(".annotationTollbar").css("display", "none");
129   - $rootScope.isAnnotationWindowClose = true;
130   - }
131   -
132   - $rootScope.OnIdentifyClick = function () {
133   - $rootScope.isIdetifyClicked = true;
134   - $rootScope.isDrawingToolSelected = false;
135   - }
136   -
137   - //----Annotation Toolbar: Jcanvas-----
138   -
139   - $rootScope.DrawLine = function (e) {
140   - $rootScope.switchCanvas();
141   - $rootScope.shapeType = "Line";
142   -<<<<<<< HEAD
143   -
144   -
145   - $('.btnCursor').removeClass('activebtncolor');
146   - $(".btn-annotation").removeClass("activebtncolor");
147   - $(".btn-annotation-line").addClass("activebtncolor");
148   -
149   -
150   -=======
151   -
152   -
153   - $('.btnCursor').removeClass('activebtncolor');
154   - $(".btn-annotation").removeClass("activebtncolor");
155   - $(".btn-annotation-line").addClass("activebtncolor");
156   -
157   -
158   ->>>>>>> 914a4ac836533cab3ea430e240a2036b112c6482
159   - }
160   -
161   -
162   - $rootScope.DrawPin = function (e) {
163   - $rootScope.switchCanvas();
164   - $rootScope.shapeType = "Pin";
165   -<<<<<<< HEAD
166   -
167   -=======
168   -
169   ->>>>>>> 914a4ac836533cab3ea430e240a2036b112c6482
170   - $('.btnCursor').removeClass('activebtncolor');
171   - $(".btn-annotation").removeClass("activebtncolor");
172   - $(".btn-annotation-pin").addClass("activebtncolor");
173   - }
174   -
175   - $rootScope.Cursor = function () {
176   - $rootScope.switchCanvas();
177   - $rootScope.shapeType = "cursor";
178   -
179   - $(".btn-annotation").removeClass("activebtncolor");
180   - // $("#" + e.currentTarget.id).removeClass("activebtncolor");
181   - $('.btnCursor').addClass('activebtncolor');
182   - }
183   -
184   - $rootScope.DrawRectangle = function (e) {
185   - $rootScope.switchCanvas();
186   - $rootScope.shapeType = "Rectangle";
187   - $('.btnCursor').removeClass('activebtncolor');
188   - $(".btn-annotation").removeClass("activebtncolor");
189   - $(".btn-annotation-rectangle").addClass("activebtncolor");
190   - }
191   - $rootScope.paintBrush = function () {
192   - $rootScope.switchCanvas();
193   - $rootScope.shapeType = "brush";
194   -
195   - }
196   -
197   - $rootScope.DrawCircle = function (e) {
198   - $rootScope.switchCanvas();
199   - $rootScope.shapeType = "Circle";
200   - $('.btnCursor').removeClass('activebtncolor');
201   - $(".btn-annotation").removeClass("activebtncolor");
202   - $(".btn-annotation-circle").addClass("activebtncolor");
203   - }
204   -
205   - $rootScope.DrawArrow = function (e) {
206   - $rootScope.switchCanvas();
207   - $rootScope.shapeType = "Arrow";
208   - $('.btnCursor').removeClass('activebtncolor');
209   - $(".btn-annotation").removeClass("activebtncolor");
210   - $(".btn-annotation-arrow").addClass("activebtncolor");
211   - }
212   - $rootScope.DrawText = function () {
213   -<<<<<<< HEAD
214   - $rootScope.switchCanvas();
215   -
216   - $rootScope.shapeType = "TextArea";
217   - $('.btnCursor').removeClass('activebtncolor');
218   - $(".btn-annotation").removeClass("activebtncolor");
219   - $(".btn-annotation-Text").addClass("activebtncolor");
220   -=======
221   -
222   - $("#myModal").modal("toggle");
223   - $rootScope.shapeType = "TextArea";
224   - // $('.btnCursor').removeClass('activebtncolor');
225   - // $(".btn-annotation").removeClass("activebtncolor");
226   - // $(".btn-annotation-Text").addClass("activebtncolor");
227   ->>>>>>> 914a4ac836533cab3ea430e240a2036b112c6482
228   - //$('.btnCursor').removeClass('activebtncolor');
229   - //$(".btn-annotation").removeClass("activebtncolor");
230   - //$("#" + e.currentTarget.id).addClass("activebtncolor");
231   - }
232   -
233   - $rootScope.DrawPolygon = function () {
234   - $rootScope.shapeType = "DrawPolygon";
235   -
236   - }
237   -
238   -
239   - $rootScope.OpacityModal = function () {
240   -
241   -
242   - }
243   - $rootScope.switchCanvas = function () {
244   - var x = $('#canvasPaint').css("z-index");
245   -
246   - var y = $('#canvas').css("z-index");
247   - if (x > y) {
248   - y = parseInt(x) + 1;
249   - } else {
250   - y = parseInt(y) + 1;
251   - }
252   - $('#canvas').css("z-index", y);
253   - }
254   - $rootScope.EraseDrawing = function () {
255   - document.getElementById('paintCanvas').getContext('2d').setTransform(1, 0, 0, 1, 0, 0);
256   - document.getElementById('paintCanvas').getContext('2d').clearRect(0, 0, document.getElementById('paintCanvas').getContext('2d').canvas.width, document.getElementById('paintCanvas').getContext('2d').canvas.height);
257   -
258   - }
259   - //----End-------------
260   -
261   - $rootScope.AddClick=function (x, y, dragging) {
262   - $rootScope.clickX.push(x);
263   - $rootScope.clickY.push(y);
264   - $rootScope.clickDrag.push(dragging);
265   - }
266   -
267   - $rootScope.Redraw = function () {
268   - var context = document.getElementById('paintCanvas').getContext('2d');
269   -
270   - context.clearRect(0, 0, context.canvas.width, context.canvas.height); // Clears the canvas
271   -
272   - context.strokeStyle = "#FFFFFF";
273   - context.lineJoin = "round";
274   - context.lineWidth = 5;
275   -
276   -
277   - for (var i = 0; i < $rootScope.clickX.length; i++) {
278   - context.beginPath();
279   - if ($rootScope.clickDrag[i] && i) {
280   - context.moveTo($rootScope.clickX[i - 1], $rootScope.clickY[i - 1]);
281   - } else {
282   - context.moveTo($rootScope.clickX[i] - 1, $rootScope.clickY[i]);
283   - }
284   - context.lineTo($rootScope.clickX[i], $rootScope.clickY[i]);
285   - context.closePath();
286   - context.stroke();
287   - }
288   - }
289   -
290   - $rootScope.PaintCanvasMousedownListener = function (canvasContext,x,y) {
291   - if ($rootScope.isLineDrawSelecyed == true) {
292   -
293   - canvasContext.lineWidth = 0.1;
294   - //$scope.paintCanvasContext.lineJoin = 'round';
295   - //$scope.paintCanvasContext.lineCap = 'round';
296   - canvasContext.strokeStyle = 'red';
297   -
298   -
299   - canvasContext.beginPath();
300   -
301   - //var canvasOffset = $("#myCanvas").offset();
302   - //var offsetX = canvasOffset.left;
303   - //var offsetY = canvasOffset.top;
304   - canvasContext.moveTo(x, y);
305   - }
306   -
307   - }
308   -
309   - $rootScope.PaintCanvasMouseupListener = function (canvasContext) {
310   - if ($scope.isLineDrawSelecyed == true) {
311   -
312   - }
313   - }
314   -
315   - $rootScope.PaintCanvasMousemoveListener = function (canvasContext,x,y) {
316   - if ($rootScope.isLineDrawSelecyed == true) {
317   - console.log('hm moving')
318   - canvasContext.lineTo(x, y);
319   - canvasContext.stroke();
320   - }
321   - }
322   -
323   - $rootScope.Draw = function (x, y, isDown,context) {
324   - if (isDown) {
325   - context.beginPath();
326   - context.strokeStyle = '#000000';
327   - context.lineWidth = 1//$('#selWidth').val();
328   - context.lineJoin = "round";
329   - context.moveTo($rootScope.lastX, $rootScope.lastY);
330   - context.lineTo(x, y);
331   - context.closePath();
332   - context.stroke();
333   - }
334   - $rootScope.lastX = x; $rootScope.lastY = y;
335   - }
336   -
337   -
338   -
339   -
340   - //list manager function
341   -
342   - //list manager function
343   -
344   - $rootScope.ShowListManager = function () {
345   - console.log('ShowListManager')
346   -
347   - $rootScope.isLoading = true;
348   - $('#spinner').css('visibility', 'visible');
349   -
350   - $('#listManager').css('display', 'block');
351   - $("#listManager").css("visibility", "visible");
352   - $('#listManager').draggable();
353   -
354   -
355   - $rootScope.islistManagerEventAlredayDispachted = true;
356   -
357   - $rootScope.$broadcast('listManagerEvent', true);
358   - }
359   -
360   - $rootScope.CloseListManager = function () {
361   - console.log('close')
362   - $rootScope.isListManagerSelected = false;
363   - $('#listManager').css('display', 'none');
364   - $("#listManager").css("visibility", "hidden");
365   - // $rootScope.isAnnotationWindowClose = true;
366   - // if('#termList')
367   - if ($('#termList option').length > 0) {
368   - //$('#termList option') = null;
369   - //$('#termList').innerHTML='';
370   - $('#termList')
371   - .find('option')
372   - .remove()
373   - .end()
374   - if ($('#termList option').length > 0) {
375   -
376   - }
377   - }
378   -
379   -
380   - }
381   -
382   - function fillListManagerTerms() {
383   -
384   - var len = $rootScope.openModules.length;
385   - var openViewLen = $rootScope.openViews.length;
386   -
387   - var currentOpenModuleId = $rootScope.openModules[len - 1].ModuleId;
388   - var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId;
389   - if (currentOpenModuleId == 1) {
390   -
391   - }
392   -
393   - }
394   -
395   - //setrtings
396   - $rootScope.SetSettingActiveTab = function (tabToSet) {
397   - $rootScope.SettingsTab = tabToSet;
398   - };
399   -
400   - $rootScope.loadsettings = function () {
401   -
402   - //1. For now we are by default opening DA settings tab
403   - $rootScope.SettingsTab = 3;
404   -
405   - //2.
406   - var curentEthnicity = localStorage.getItem("globalEthnicity");
407   - if (typeof (curentEthnicity) !== "undefined" && curentEthnicity !== null) {
408   - $rootScope.globalSetting.ethnicity = curentEthnicity;
409   - }
410   - else {
411   - localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity);
412   - }
413   -
414   - var curentmodesty = localStorage.getItem("globalmodesty");
415   - if (typeof (curentmodesty) !== "undefined" && curentmodesty !== null) {
416   - $rootScope.globalSetting.modesty = curentmodesty
417   - }
418   - else {
419   - localStorage.setItem("globalmodesty", $rootScope.globalSetting.modesty);
420   - }
421   -
422   - //3.
423   - $rootScope.setModestySettings($rootScope.globalSetting.modesty);
424   -
425   - //4.
426   - $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity);
427   -
428   -
429   - };
430   -
431   - $rootScope.setModestySettings = function (currentmodsetting) {
432   -
433   - if (currentmodsetting == 'Y') {
434   - $rootScope.isModestyOn = true;
435   - $rootScope.isModestyOff = false;
436   - }
437   - else {
438   - $rootScope.isModestyOn = false;
439   - $rootScope.isModestyOff = true;
440   - }
441   - }
442   -
443   - $rootScope.setEthncitySettings = function (currentEthncitysetting) {
444   -
445   - // this code is used for maintaing the currently selected Ethencity.
446   - if (currentEthncitysetting == 'L') {
447   - $("#btnEthnicA").addClass("skindefault");
448   - if ($("#btnEthnicB").hasClass("skindefault")) { $("#btnEthnicB").removeClass("skindefault"); }
449   - if ($("#btnEthnicL").hasClass("skindefault")) { $("#btnEthnicL").removeClass("skindefault"); }
450   - if ($("#btnEthnicW").hasClass("skindefault")) { $("#btnEthnicW").removeClass("skindefault"); }
451   - }
452   - if (currentEthncitysetting == 'B') {
453   - $("#btnEthnicB").addClass("skindefault");
454   - if ($("#btnEthnicL").hasClass("skindefault")) { $("#btnEthnicL").removeClass("skindefault"); }
455   - if ($("#btnEthnicW").hasClass("skindefault")) { $("#btnEthnicW").removeClass("skindefault"); }
456   - if ($("#btnEthnicA").hasClass("skindefault")) { $("#btnEthnicA").removeClass("skindefault"); }
457   - }
458   - if (currentEthncitysetting == 'A') {
459   - $("#btnEthnicL").addClass("skindefault");
460   - if ($("#btnEthnicB").hasClass("skindefault")) { $("#btnEthnicB").removeClass("skindefault"); }
461   - if ($("#btnEthnicW").hasClass("skindefault")) { $("#btnEthnicW").removeClass("skindefault"); }
462   - if ($("#btnEthnicA").hasClass("skindefault")) { $("#btnEthnicA").removeClass("skindefault"); }
463   - }
464   - if (currentEthncitysetting == 'W') {
465   - $("#btnEthnicW").addClass("skindefault");
466   - if ($("#btnEthnicB").hasClass("skindefault")) { $("#btnEthnicB").removeClass("skindefault"); }
467   - if ($("#btnEthnicL").hasClass("skindefault")) { $("#btnEthnicL").removeClass("skindefault"); }
468   - if ($("#btnEthnicA").hasClass("skindefault")) { $("#btnEthnicA").removeClass("skindefault"); }
469   - }
470   - }
471   -
472   - $rootScope.ChangeEthnicity = function (formsetting, skintone) {
473   - formsetting.ethnicity = skintone;
474   - $rootScope.setEthncitySettings(formsetting.ethnicity);
475   -
476   - }
477   -
478   - $rootScope.ChangeModesty = function (formsetting, modestyValue) {
479   - formsetting.modesty = modestyValue;
480   - $rootScope.setModestySettings(formsetting.modesty);
481   -
482   - }
483   -
484   - $rootScope.CloseSetting = function () {
485   -
486   - $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity);
487   - $rootScope.setModestySettings($rootScope.globalSetting.modesty);
488   - $('#modal-settings').modal('hide');
489   - }
490   -
491   - $rootScope.UpdateAndCloseSetting = function (setting) {
492   -
493   - $rootScope.UpdateSetting(setting);
494   - $('#modal-settings').modal('hide');
495   -
496   - };
497   -
498   - $rootScope.UpdateSetting = function (setting) {
499   -
500   - //1.
501   - if (typeof (setting.ethnicity) !== "undefined" && setting.ethnicity !== null) {
502   - $rootScope.globalSetting.ethnicity = setting.ethnicity;
503   - $rootScope.setEthncitySettings($rootScope.globalSetting.ethnicity);
504   - }
505   - if (typeof (setting.modesty) !== "undefined" && setting.modesty !== null) {
506   - $rootScope.globalSetting.modesty = setting.modesty;
507   - $rootScope.setModestySettings($rootScope.globalSetting.modesty);
508   - }
509   -
510   - //2.
511   - localStorage.setItem("globalEthnicity", $rootScope.globalSetting.ethnicity);
512   -
513   - //3.
514   - localStorage.setItem("globalmodesty", $rootScope.globalSetting.modesty);
515   -
516   - //4.
517   - $rootScope.reloadChildController();
518   -
519   - };
520   -
521   - $rootScope.reloadChildController = function () {
522   -
523   - var len = $rootScope.openModules.length;
524   -
525   - var currentOpenModuleId = $rootScope.openModules[len - 1].ModuleId;
526   -
527   - //checking is DA module is opend.
528   - if (currentOpenModuleId == 1) {
529   -
530   - //Check that what current bodyview is open
531   - if ($rootScope.openViews.length > 0) {
532   - var openViewLen = $rootScope.openViews.length;
533   - var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId;
534   - $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId });
535   - }
536   - else {
537   - $rootScope.$broadcast('reloadDAControllerEvent', true);
538   -
539   - }
540   - }
541   - };
542   -
543   -
544   - }]
545   -);
546 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -423,7 +423,7 @@
423 423 </div>
424 424 </div>
425 425 <div class="well-popup well">
426   - <img src="content/images/blank-shape.jpg" alt="..." class="img-rounded img-responsive" data-toggle="modal" data-target="#editshapestyle">
  426 + <img src="content/images/blank-shape.jpg" alt="..." class="img-rounded img-responsive" ng-click="enableAnnotationToolBar()">
427 427 </div>
428 428 <div class="well well-popup">
429 429 <div class="" role="group" aria-label="...">
... ... @@ -656,7 +656,9 @@
656 656 </div>
657 657 </div>
658 658  
659   -
  659 + <!--background disable div-->
  660 +
  661 + <div id="modelbackground"></div>
660 662  
661 663  
662 664 <!--Edit Shape Modal-->
... ... @@ -783,7 +785,7 @@
783 785 <button type="button" class="btn btn-primary btn-sm" ng-click="shapestyle('imgOpacity')">
784 786 OK
785 787 </button>
786   - <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal">Cancel</button>
  788 + <button type="button" class="btn btn-primary btn-sm" data-dismiss="modal" ng-click="disableAnnotationToolBar()">Cancel</button>
787 789 </div>
788 790 </div>
789 791 </div>
... ... @@ -791,9 +793,6 @@
791 793  
792 794  
793 795  
794   -
795   -
796   -
797 796 <script>
798 797 function mytoggle() {
799 798 var div = document.getElementById("divSection");
... ... @@ -806,11 +805,6 @@
806 805 </script>
807 806  
808 807  
809   -
810   -
811   -
812   -
813   -
814 808 <script>
815 809 function mytoggle() {
816 810 var div = document.getElementById("divSection");
... ... @@ -880,9 +874,26 @@
880 874 max: 60,
881 875 value: 10,
882 876 slide: function (event, ui) {
  877 +
883 878 $("#amount-2").val(ui.value);
884   - }
  879 +
  880 +
  881 +
  882 + },
  883 +
  884 +
  885 + });
  886 + $("#slider-range-min-2").on("slidestart", function (event, ui) {
  887 +
  888 + $('.btnCursor').trigger('click');
  889 + $(".btn-annotation").removeClass("activebtncolor");
  890 + $('.btnCursor').addClass('activebtncolor');
  891 + // ctx.clearRect(0, 0, canvasPaint.width, canvasPaint.height);
  892 +
  893 +
885 894 });
  895 + // $("#slider-range-min-2").on("slidechange", function (event, ui) { alert("ssasa"); });
  896 +
886 897 $("#amount-2").val($("#slider-vertical-2").slider("value"));
887 898  
888 899 $(function () {
... ... @@ -1009,15 +1020,17 @@
1009 1020 <script>
1010 1021 $(document).ready(function () {
1011 1022 var borderWidth = 1;
1012   - var borderColor;
  1023 + var borderColor = "#000";
1013 1024 $("#borderWidthCanvasElement").change(function () {
1014 1025  
1015 1026 borderWidth = $(this).val();
1016   -
  1027 +
1017 1028 if (borderColor != null) {
  1029 +
1018 1030 $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
1019 1031 } else {
1020   - $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid");
  1032 +
  1033 + $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid");
1021 1034 }
1022 1035 });
1023 1036  
... ... @@ -1039,13 +1052,11 @@
1039 1052 if (opacity) value += ', ' + opacity;
1040 1053 if (typeof console === 'object') {
1041 1054 console.log(value);
1042   - console.log(borderWidth);
1043   - // alert(borderWidth);
1044   -
  1055 +
1045 1056 borderColor = value;
1046   - $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + value);
1047   -
1048   - // alert($("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + value));
  1057 + $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
  1058 +
  1059 +
1049 1060 }
1050 1061 },
1051 1062 theme: 'bootstrap'
... ...
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... ... @@ -825,3 +825,21 @@ cursor:pointer;
825 825 color: #ffffff;
826 826 }
827 827  
  828 +/*disable background css*/
  829 +
  830 +#modelbackground
  831 + {
  832 + background-color: black;
  833 + bottom: 0;
  834 + left: 0;
  835 + position: fixed;
  836 + right: 0;
  837 + top: 0;
  838 + z-index: 12000000;
  839 + opacity: 0.5;
  840 + display:none;
  841 + width:100%;
  842 + height:100%;
  843 +
  844 + filter: Alpha(opacity=50); / IE8 and earlier /
  845 +}
828 846 \ No newline at end of file
... ...