Commit 283670729405602d920854aeb42af5948d2655b3
Merge branch 'TransparencyLevelDefect' into Develop
Showing
2 changed files
with
92 additions
and
20 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -2639,30 +2639,55 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2639 | 2639 | |
2640 | 2640 | $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); |
2641 | 2641 | } |
2642 | - | |
2642 | + $rootScope.PreviouslayerNumbr = 0; | |
2643 | 2643 | $scope.LayerChangeOnMouseUpDown = function (e) { |
2644 | 2644 | //'x' button is displaying inside the input box in IE browser. |
2645 | 2645 | |
2646 | 2646 | if (e.currentTarget.id == "incrmntVal") { |
2647 | + //Dissectible Anatomy > Inappropriate Text in Layer Input box. | |
2648 | + if ($("#txtlayerNumber").val() == '') { | |
2649 | + var layerInputVal = 0; | |
2650 | + | |
2651 | + var layerInputValInc = parseInt(layerInputVal); | |
2652 | + $scope.layerNumber = parseInt(layerInputValInc); | |
2653 | + $("#txtlayerNumber").val($scope.layerNumber); | |
2654 | + // $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
2655 | + | |
2656 | + } | |
2657 | + else { | |
2658 | + var layerInputVal = $("#txtlayerNumber").val(); | |
2659 | + if (layerInputVal != $rootScope.totalLayers) { | |
2660 | + var layerInputValInc = parseInt(layerInputVal) + 1; | |
2661 | + $scope.layerNumber = parseInt(layerInputValInc); | |
2662 | + $("#txtlayerNumber").val($scope.layerNumber); | |
2663 | + $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
2664 | + } | |
2647 | 2665 | |
2648 | - var layerInputVal = $("#txtlayerNumber").val(); | |
2649 | - if (layerInputVal != $rootScope.totalLayers) { | |
2650 | - var layerInputValInc = parseInt(layerInputVal) + 1; | |
2651 | - $scope.layerNumber = parseInt(layerInputValInc); | |
2652 | - $("#txtlayerNumber").val($scope.layerNumber); | |
2653 | 2666 | } |
2654 | 2667 | |
2655 | 2668 | } |
2656 | 2669 | else { |
2657 | 2670 | |
2658 | - var layerInputVal = $("#txtlayerNumber").val(); | |
2659 | - if (layerInputVal > 0) { | |
2660 | - var layerInputValDec = parseInt(layerInputVal) - 1; | |
2671 | + //Dissectible Anatomy > Inappropriate Text in Layer Input box. | |
2672 | + if ($("#txtlayerNumber").val() == '') { | |
2673 | + var layerInputVal = 0; | |
2674 | + var layerInputValDec = parseInt(layerInputVal); | |
2661 | 2675 | $scope.layerNumber = parseInt(layerInputValDec); |
2662 | 2676 | $("#txtlayerNumber").val($scope.layerNumber); |
2663 | - } | |
2664 | - | |
2677 | + // $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
2665 | 2678 | |
2679 | + } | |
2680 | + else | |
2681 | + { | |
2682 | + var layerInputVal = $("#txtlayerNumber").val(); | |
2683 | + if (layerInputVal > 0) { | |
2684 | + var layerInputValDec = parseInt(layerInputVal) - 1; | |
2685 | + $scope.layerNumber = parseInt(layerInputValDec); | |
2686 | + $("#txtlayerNumber").val($scope.layerNumber); | |
2687 | + $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
2688 | + } | |
2689 | + } | |
2690 | + | |
2666 | 2691 | } |
2667 | 2692 | $scope.LayerChange(); |
2668 | 2693 | |
... | ... | @@ -8332,15 +8357,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
8332 | 8357 | }); |
8333 | 8358 | |
8334 | 8359 | } |
8335 | - | |
8360 | + | |
8336 | 8361 | $scope.LayerChangeBasedOnKeyPressed = function (e) { |
8337 | - | |
8362 | + // Dissectible Anatomy > Should not display blank page if no layer is selected. | |
8363 | + | |
8364 | + | |
8338 | 8365 | if (e.keyCode == 13) { |
8339 | - $scope.LayerChange(); | |
8366 | + | |
8367 | + if ($("#txtlayerNumber").val() == '') | |
8368 | + { | |
8369 | + | |
8370 | + $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr); | |
8371 | + } | |
8372 | + else | |
8373 | + { | |
8374 | + $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val(); | |
8375 | + $scope.LayerChange(); | |
8376 | + } | |
8377 | + | |
8378 | + | |
8340 | 8379 | } |
8341 | 8380 | |
8342 | 8381 | // 'x' button is displaying inside the input box in IE browser. |
8343 | - if (e.which == 38) { | |
8382 | + if (e.keyCode == 38) { | |
8344 | 8383 | |
8345 | 8384 | |
8346 | 8385 | var layerInputVal = $("#txtlayerNumber").val(); |
... | ... | @@ -8348,26 +8387,55 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
8348 | 8387 | var layerInputValInc = parseInt(layerInputVal) + 1; |
8349 | 8388 | $scope.layerNumber = parseInt(layerInputValInc); |
8350 | 8389 | $("#txtlayerNumber").val($scope.layerNumber); |
8390 | + $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
8351 | 8391 | } |
8352 | 8392 | |
8353 | 8393 | |
8354 | 8394 | } |
8355 | 8395 | |
8356 | 8396 | // 'x' button is displaying inside the input box in IE browser. |
8357 | - if (e.which == 40) { | |
8397 | + if (e.keyCode == 40) { | |
8358 | 8398 | var layerInputVal = $("#txtlayerNumber").val(); |
8359 | 8399 | if (layerInputVal > 0) { |
8360 | 8400 | var layerInputValDec = parseInt(layerInputVal) - 1; |
8361 | 8401 | $scope.layerNumber = parseInt(layerInputValDec); |
8362 | 8402 | $("#txtlayerNumber").val($scope.layerNumber); |
8403 | + $rootScope.PreviouslayerNumbr = $scope.layerNumber; | |
8363 | 8404 | } |
8364 | 8405 | } |
8365 | 8406 | |
8366 | - | |
8367 | 8407 | } |
8368 | 8408 | |
8369 | 8409 | |
8370 | - | |
8410 | + $scope.LayerValueChangeBasedOnKeyUp = function (e) { | |
8411 | + | |
8412 | + var keyUplayerNumber = parseInt($("#txtlayerNumber").val()); | |
8413 | + | |
8414 | + if (isNaN(keyUplayerNumber)) | |
8415 | + { | |
8416 | + | |
8417 | + } | |
8418 | + else { | |
8419 | + | |
8420 | + if (keyUplayerNumber > $rootScope.totalLayers) { | |
8421 | + | |
8422 | + $("#txtlayerNumber").val($rootScope.totalLayers); | |
8423 | + $scope.layerNumber = parseInt($rootScope.totalLayers); | |
8424 | + | |
8425 | + } | |
8426 | + else { | |
8427 | + | |
8428 | + $("#txtlayerNumber").val(keyUplayerNumber); | |
8429 | + $scope.layerNumber = parseInt(keyUplayerNumber); | |
8430 | + | |
8431 | + | |
8432 | + } | |
8433 | + | |
8434 | + } | |
8435 | + | |
8436 | + | |
8437 | + } | |
8438 | + | |
8371 | 8439 | |
8372 | 8440 | |
8373 | 8441 | }] | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -253,7 +253,7 @@ |
253 | 253 | <!--'x' button is displaying inside the input box in IE browser.--> |
254 | 254 | <div style="width:80px;margin:10px 0 0 15px;display:inline-block;"> |
255 | 255 | <div style="width: 58px; float: left;"> |
256 | - <input type="text" class="form-control item" id="txtlayerNumber" value="0" ng-model="layerNumber" ng-keydown="LayerChangeBasedOnKeyPressed($event)" style="height:32px;border-radius:0;"> | |
256 | + <input type="text" class="form-control item" id="txtlayerNumber" value="0" ng-model="layerNumber" ng-keyup="LayerValueChangeBasedOnKeyUp($event)" ng-keydown="LayerChangeBasedOnKeyPressed($event)" style="height:32px;border-radius:0;"> | |
257 | 257 | </div> |
258 | 258 | <div style="width: 22px; float: left;"> |
259 | 259 | <div style="width: 100%; float: left; height: 16px;"> |
... | ... | @@ -427,7 +427,11 @@ |
427 | 427 | && e.which != 8 // backspace |
428 | 428 | && e.which != 46 // delete |
429 | 429 | && (e.which < 37 // arrow keys |
430 | - || e.which > 40)) { | |
430 | + || e.which > 40) | |
431 | + && (e.keyCode < 96 // Dissectible Anatomy > Num Lock is not working for enter the layer. | |
432 | + || e.keyCode > 105)) | |
433 | + | |
434 | + { | |
431 | 435 | e.preventDefault(); |
432 | 436 | return false; |
433 | 437 | } | ... | ... |