Commit 6af76ba36181af45e2c9b2bbb3ffb5f11c121730
1 parent
732c3a64
Bug #25431 is fixed
Showing
1 changed file
with
14 additions
and
25 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -9525,35 +9525,22 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -9525,35 +9525,22 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
9525 | } | 9525 | } |
9526 | 9526 | ||
9527 | $scope.LayerChangeBasedOnKeyPressed = function (e) { | 9527 | $scope.LayerChangeBasedOnKeyPressed = function (e) { |
9528 | - // Dissectible Anatomy > Should not display blank page if no layer is selected. | ||
9529 | - | ||
9530 | - // alert('key down') | ||
9531 | - //if (e.keyCode == 13) { | ||
9532 | - | ||
9533 | - // if ($("#txtlayerNumber").val() == '') { | ||
9534 | - | ||
9535 | - // $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr); | ||
9536 | - // } | ||
9537 | - // else { | ||
9538 | - // $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val(); | ||
9539 | - // $scope.LayerChange(); | ||
9540 | - | ||
9541 | - // } | ||
9542 | - | ||
9543 | - | ||
9544 | - //} | ||
9545 | 9528 | ||
9546 | // 'x' button is displaying inside the input box in IE browser. | 9529 | // 'x' button is displaying inside the input box in IE browser. |
9547 | if (e.keyCode == 38) { | 9530 | if (e.keyCode == 38) { |
9548 | 9531 | ||
9549 | var layerInputVal = $("#txtlayerNumber").val(); | 9532 | var layerInputVal = $("#txtlayerNumber").val(); |
9533 | + | ||
9550 | if (layerInputVal < $rootScope.totalLayers) { | 9534 | if (layerInputVal < $rootScope.totalLayers) { |
9535 | + | ||
9551 | var layerInputValInc = parseInt(layerInputVal) + 1; | 9536 | var layerInputValInc = parseInt(layerInputVal) + 1; |
9552 | $scope.layerNumber = parseInt(layerInputValInc); | 9537 | $scope.layerNumber = parseInt(layerInputValInc); |
9553 | $("#txtlayerNumber").val($scope.layerNumber); | 9538 | $("#txtlayerNumber").val($scope.layerNumber); |
9554 | $rootScope.PreviouslayerNumbr = $scope.layerNumber; | 9539 | $rootScope.PreviouslayerNumbr = $scope.layerNumber; |
9540 | + | ||
9555 | } | 9541 | } |
9556 | else { | 9542 | else { |
9543 | + | ||
9557 | $("#txtlayerNumber").val($rootScope.totalLayers); | 9544 | $("#txtlayerNumber").val($rootScope.totalLayers); |
9558 | } | 9545 | } |
9559 | 9546 | ||
@@ -9562,12 +9549,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -9562,12 +9549,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
9562 | 9549 | ||
9563 | // 'x' button is displaying inside the input box in IE browser. | 9550 | // 'x' button is displaying inside the input box in IE browser. |
9564 | if (e.keyCode == 40) { | 9551 | if (e.keyCode == 40) { |
9552 | + | ||
9565 | var layerInputVal = $("#txtlayerNumber").val(); | 9553 | var layerInputVal = $("#txtlayerNumber").val(); |
9566 | if (layerInputVal > 0) { | 9554 | if (layerInputVal > 0) { |
9567 | var layerInputValDec = parseInt(layerInputVal) - 1; | 9555 | var layerInputValDec = parseInt(layerInputVal) - 1; |
9568 | $scope.layerNumber = parseInt(layerInputValDec); | 9556 | $scope.layerNumber = parseInt(layerInputValDec); |
9569 | $("#txtlayerNumber").val($scope.layerNumber); | 9557 | $("#txtlayerNumber").val($scope.layerNumber); |
9570 | $rootScope.PreviouslayerNumbr = $scope.layerNumber; | 9558 | $rootScope.PreviouslayerNumbr = $scope.layerNumber; |
9559 | + | ||
9571 | } | 9560 | } |
9572 | } | 9561 | } |
9573 | 9562 | ||
@@ -9576,7 +9565,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -9576,7 +9565,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
9576 | 9565 | ||
9577 | $scope.LayerValueChangeBasedOnKeyUp = function (e) { | 9566 | $scope.LayerValueChangeBasedOnKeyUp = function (e) { |
9578 | 9567 | ||
9579 | - // alert('key up') | 9568 | + |
9580 | if (e.keyCode == 13) { | 9569 | if (e.keyCode == 13) { |
9581 | 9570 | ||
9582 | if ($("#txtlayerNumber").val() == '') { | 9571 | if ($("#txtlayerNumber").val() == '') { |
@@ -9584,9 +9573,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -9584,9 +9573,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
9584 | $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr); | 9573 | $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr); |
9585 | } | 9574 | } |
9586 | else { | 9575 | else { |
9587 | - $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val(); | ||
9588 | - | ||
9589 | 9576 | ||
9577 | + $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val(); | ||
9590 | 9578 | ||
9591 | var keyUplayerNumber = parseInt($("#txtlayerNumber").val()); | 9579 | var keyUplayerNumber = parseInt($("#txtlayerNumber").val()); |
9592 | 9580 | ||
@@ -9596,7 +9584,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -9596,7 +9584,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
9596 | else { | 9584 | else { |
9597 | 9585 | ||
9598 | if (keyUplayerNumber > $rootScope.totalLayers) { | 9586 | if (keyUplayerNumber > $rootScope.totalLayers) { |
9599 | - | 9587 | + |
9600 | $("#txtlayerNumber").val($rootScope.totalLayers); | 9588 | $("#txtlayerNumber").val($rootScope.totalLayers); |
9601 | $scope.layerNumber = parseInt($rootScope.totalLayers); | 9589 | $scope.layerNumber = parseInt($rootScope.totalLayers); |
9602 | 9590 | ||
@@ -9614,13 +9602,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | @@ -9614,13 +9602,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l | ||
9614 | } | 9602 | } |
9615 | else { | 9603 | else { |
9616 | var layerInputVal = $("#txtlayerNumber").val(); | 9604 | var layerInputVal = $("#txtlayerNumber").val(); |
9617 | - if (layerInputVal < $rootScope.totalLayers) { | ||
9618 | - //var layerInputValInc = parseInt(layerInputVal) + 1; | ||
9619 | - //$scope.layerNumber = parseInt(layerInputValInc); | 9605 | + |
9606 | + if (layerInputVal <= $rootScope.totalLayers) { | ||
9607 | + | ||
9620 | $("#txtlayerNumber").val(layerInputVal); | 9608 | $("#txtlayerNumber").val(layerInputVal); |
9621 | - //$rootScope.PreviouslayerNumbr = $scope.layerNumber; | 9609 | + |
9622 | } | 9610 | } |
9623 | else { | 9611 | else { |
9612 | + | ||
9624 | $("#txtlayerNumber").val($rootScope.totalLayers); | 9613 | $("#txtlayerNumber").val($rootScope.totalLayers); |
9625 | } | 9614 | } |
9626 | } | 9615 | } |