Commit e26f5798c0fcd6c1aa20e61537e7dd08792d463d
1 parent
255e98f2
Commit changes for the issue Ref:
#7914:Annotation should be disable when List Manager is open.
Showing
3 changed files
with
54 additions
and
9 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -7251,7 +7251,33 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7251 | 7251 | |
7252 | 7252 | //list manager |
7253 | 7253 | $scope.$on('listManagerEvent', function (event, data) { |
7254 | - | |
7254 | + | |
7255 | + if ($rootScope.disableAnnotationtoolOnListManager == true) | |
7256 | + { | |
7257 | + $('#AnnotaionPopupDiv').find('input, textarea, button, select').attr('disabled', 'disabled'); | |
7258 | + $('#slider-range-min-2').slider('disable'); | |
7259 | + if ($rootScope.setListManagerZindex == true) | |
7260 | + { | |
7261 | + var canvasPaintZindex = $('#canvasPaint').css("z-index"); //x | |
7262 | + | |
7263 | + var canvasZindex = $('#canvas').css("z-index"); //y | |
7264 | + var listManagerZindex = $('#listManager').css("z-index"); //z | |
7265 | + if (canvasPaintZindex > canvasZindex) { | |
7266 | + //y = parseInt(canvasPaintZindex) + 1; | |
7267 | + //if (listManagerZindex <= canvasPaintZindex) { | |
7268 | + // listManagerZindex = parseInt(canvasPaintZindex) + 1; | |
7269 | + // $('#listManager').css("z-index", z); | |
7270 | + //} | |
7271 | + //else { | |
7272 | + $('#listManager').css("z-index", canvasPaintZindex); | |
7273 | + // } | |
7274 | + } else { | |
7275 | + //y = parseInt(y) + 1; | |
7276 | + $('#listManager').css("z-index", canvasZindex); | |
7277 | + } | |
7278 | + | |
7279 | + } | |
7280 | + } | |
7255 | 7281 | $('#spinner').css('visibility', 'visible'); |
7256 | 7282 | console.log('listManagerEvent') |
7257 | 7283 | if ($rootScope.islistManagerEventAlredayDispachted == true) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -26,6 +26,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
26 | 26 | $rootScope.clickDrag = new Array(); |
27 | 27 | $rootScope.isLineDrawSelecyed = false; |
28 | 28 | $rootScope.isAnnotationWindowClose = false; |
29 | + $rootScope.setListManagerZindex = false; | |
29 | 30 | $rootScope.lastX; |
30 | 31 | $rootScope.lastY; |
31 | 32 | $rootScope.CommonData; |
... | ... | @@ -158,11 +159,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
158 | 159 | |
159 | 160 | |
160 | 161 | //----Annotation Toolbar: Jcanvas----- |
161 | - | |
162 | + | |
162 | 163 | $rootScope.DrawLine = function (e) { |
164 | + $rootScope.setListManagerZindex = true; | |
163 | 165 | $rootScope.switchCanvas(); |
164 | 166 | $rootScope.shapeType = "Line"; |
165 | - | |
167 | + | |
166 | 168 | |
167 | 169 | $('.btnCursor').removeClass('activebtncolor'); |
168 | 170 | $(".btn-annotation").removeClass("activebtncolor"); |
... | ... | @@ -174,6 +176,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
174 | 176 | |
175 | 177 | $rootScope.DrawPin = function (e) { |
176 | 178 | $rootScope.switchCanvas(); |
179 | + $rootScope.setListManagerZindex = true; | |
177 | 180 | $rootScope.shapeType = "Pin"; |
178 | 181 | |
179 | 182 | $('.btnCursor').removeClass('activebtncolor'); |
... | ... | @@ -190,7 +193,9 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
190 | 193 | $('.btnCursor').addClass('activebtncolor'); |
191 | 194 | } |
192 | 195 | |
196 | + | |
193 | 197 | $rootScope.DrawRectangle = function (e) { |
198 | + $rootScope.setListManagerZindex = true; | |
194 | 199 | $("#canvasPaint").css("display", "block"); |
195 | 200 | $("#canvas").css("display", "block"); |
196 | 201 | $rootScope.switchCanvas(); |
... | ... | @@ -202,6 +207,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
202 | 207 | $rootScope.paintBrush = function () { |
203 | 208 | // debugger; |
204 | 209 | // $('.btnCursor').addClass('activebtncolor'); |
210 | + $rootScope.setListManagerZindex = true; | |
205 | 211 | $("#canvasPaint").css("display", "block"); |
206 | 212 | $("#canvas").css("display", "block"); |
207 | 213 | $rootScope.switchCanvasToPaintCanvas(); |
... | ... | @@ -237,6 +243,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
237 | 243 | } |
238 | 244 | |
239 | 245 | $rootScope.DrawCircle = function (e) { |
246 | + $rootScope.setListManagerZindex = true; | |
240 | 247 | $("#canvasPaint").css("display", "block"); |
241 | 248 | $("#canvas").css("display", "block"); |
242 | 249 | $rootScope.switchCanvas(); |
... | ... | @@ -247,6 +254,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
247 | 254 | } |
248 | 255 | |
249 | 256 | $rootScope.DrawArrow = function (e) { |
257 | + $rootScope.setListManagerZindex = true; | |
250 | 258 | $("#canvasPaint").css("display", "block"); |
251 | 259 | $("#canvas").css("display", "block"); |
252 | 260 | $rootScope.switchCanvas(); |
... | ... | @@ -256,6 +264,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
256 | 264 | $(".btn-annotation-arrow").addClass("activebtncolor"); |
257 | 265 | } |
258 | 266 | $rootScope.DrawText = function () { |
267 | + $rootScope.setListManagerZindex = true; | |
259 | 268 | $("#canvasPaint").css("display", "block"); |
260 | 269 | $("#canvas").css("display", "block"); |
261 | 270 | $rootScope.switchCanvas(); |
... | ... | @@ -269,6 +278,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
269 | 278 | } |
270 | 279 | |
271 | 280 | $rootScope.DrawPolygon = function () { |
281 | + $rootScope.setListManagerZindex = true; | |
272 | 282 | $("#canvasPaint").css("display", "block"); |
273 | 283 | $("#canvas").css("display", "block"); |
274 | 284 | $rootScope.shapeType = "DrawPolygon"; |
... | ... | @@ -434,9 +444,11 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
434 | 444 | //list manager function |
435 | 445 | |
436 | 446 | //list manager function |
437 | - | |
447 | + | |
448 | + $rootScope.disableAnnotationtoolOnListManager = false; | |
438 | 449 | $rootScope.ShowListManager = function () { |
439 | 450 | console.log('ShowListManager') |
451 | + $rootScope.disableAnnotationtoolOnListManager = true; | |
440 | 452 | |
441 | 453 | $rootScope.isLoading = true; |
442 | 454 | $('#spinner').css('visibility', 'visible'); |
... | ... | @@ -453,6 +465,12 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location", |
453 | 465 | |
454 | 466 | $rootScope.CloseListManager = function () { |
455 | 467 | console.log('close') |
468 | + | |
469 | + $rootScope.disableAnnotationtoolOnListManager = false; | |
470 | + if ($rootScope.disableAnnotationtoolOnListManager == false) { | |
471 | + $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled'); | |
472 | + $('#slider-range-min-2').slider('enable'); | |
473 | + } | |
456 | 474 | //$rootScope.isListManagerSelected = false; |
457 | 475 | $('#listManager').css('display', 'none'); |
458 | 476 | $("#listManager").css("visibility", "hidden"); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -408,18 +408,18 @@ |
408 | 408 | <button type="button" class="close" aria-label="Close" ng-click="CloseAnnotationTool()"><span aria-hidden="true">×</span></button> |
409 | 409 | <h4 class="modal-title" id="myModalLabel">Annotation</h4> |
410 | 410 | </div> |
411 | - <div class="modal-body"> | |
411 | + <div class="modal-body" id="AnnotaionPopupDiv" > | |
412 | 412 | <div class="row"> |
413 | 413 | <div class="col-sm-12"> |
414 | 414 | <h5>Mode</h5> |
415 | 415 | |
416 | 416 | <div class="btn-group btn-group-justified" role="group" aria-label="..."> |
417 | 417 | <div class="btn-group" role="group" tooltip> |
418 | - <div id="identify-block" style="display: none; font-size:13px;">Identify Mode</div> | |
419 | - <button id="OnIdentify" type="button" class="btn btn-sm btn-success" ng-click="OnIdentifyClick()">Identify</button> | |
418 | + <div id="identify-block" style="display: none; font-size:13px;">Identify Mode</div> | |
419 | + <button id="OnIdentify" type="button" class="btn btn-sm btn-success" ng-click="OnIdentifyClick()">Identify</button> | |
420 | 420 | </div> |
421 | 421 | <div class="btn-group" role="group"> |
422 | - <div id="draw-block" style="display: none; font-size: 13px;">Draw Mode</div> | |
422 | + <div id="draw-block" style="display: none; font-size: 13px;">Draw Mode</div> | |
423 | 423 | <button id="DrawMode" type="button" ng-click="DrawingMode()" class="btn btn-sm btn-success">Draw</button> |
424 | 424 | </div> |
425 | 425 | </div> |
... | ... | @@ -444,7 +444,7 @@ |
444 | 444 | </div> |
445 | 445 | </div> |
446 | 446 | <div class="well-popup well"> |
447 | - <img src="content/images/blank-shape.jpg" alt="..." class="img-rounded img-responsive" ng-click="enableAnnotationToolBar()"> | |
447 | + <img src="content/images/blank-shape.jpg" alt="..." class="img-rounded img-responsive" ng-click="disableAnnotationtoolOnListManager||enableAnnotationToolBar()"> | |
448 | 448 | </div> |
449 | 449 | <div class="well well-popup"> |
450 | 450 | <div class="" role="group" aria-label="..."> |
... | ... | @@ -1373,6 +1373,7 @@ |
1373 | 1373 | }); |
1374 | 1374 | </script> |
1375 | 1375 | |
1376 | + | |
1376 | 1377 | |
1377 | 1378 | |
1378 | 1379 | </body> | ... | ... |