diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 7e96544..ec91638 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2651,7 +2651,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var layerInputValInc = parseInt(layerInputVal); $scope.layerNumber = parseInt(layerInputValInc); $("#txtlayerNumber").val($scope.layerNumber); - $rootScope.PreviouslayerNumbr = $scope.layerNumber; + // $rootScope.PreviouslayerNumbr = $scope.layerNumber; } else { @@ -2674,7 +2674,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var layerInputValDec = parseInt(layerInputVal); $scope.layerNumber = parseInt(layerInputValDec); $("#txtlayerNumber").val($scope.layerNumber); - $rootScope.PreviouslayerNumbr = $scope.layerNumber; + // $rootScope.PreviouslayerNumbr = $scope.layerNumber; } else @@ -8360,14 +8360,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.LayerChangeBasedOnKeyPressed = function (e) { // Dissectible Anatomy > Should not display blank page if no layer is selected. + + if (e.keyCode == 13) { + if ($("#txtlayerNumber").val() == '') { - + $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr); } else { + $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val(); $scope.LayerChange(); } @@ -8400,11 +8404,38 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } - } - + $scope.LayerValueChangeBasedOnKeyUp = function (e) { + + var keyUplayerNumber = parseInt($("#txtlayerNumber").val()); + + if (isNaN(keyUplayerNumber)) + { + + } + else { + + if (keyUplayerNumber > $rootScope.totalLayers) { + + $("#txtlayerNumber").val($rootScope.totalLayers); + $scope.layerNumber = parseInt($rootScope.totalLayers); + + } + else { + + $("#txtlayerNumber").val(keyUplayerNumber); + $scope.layerNumber = parseInt(keyUplayerNumber); + + + } + + } + + + } + }] 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 1488834..4a2c408 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html @@ -253,7 +253,7 @@
- +