Commit c3f1b1f4d15bbc02880f6100368ae74bf8492533
Merge branch 'LayerChangeArrowIEIssue' into Develop
Showing
4 changed files
with
92 additions
and
2 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -2589,7 +2589,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2589 | 2589 | } |
2590 | 2590 | |
2591 | 2591 | $scope.LayerChangeOnMouseUpDown = function (e) { |
2592 | + //'x' button is displaying inside the input box in IE browser. | |
2593 | + | |
2594 | + if (e.currentTarget.id == "incrmntVal") { | |
2595 | + | |
2596 | + var layerInputVal = $("#txtlayerNumber").val(); | |
2597 | + if (layerInputVal != $rootScope.totalLayers) { | |
2598 | + var layerInputValInc = parseInt(layerInputVal) + 1; | |
2599 | + $scope.layerNumber = parseInt(layerInputValInc); | |
2600 | + $("#txtlayerNumber").val($scope.layerNumber); | |
2601 | + } | |
2602 | + | |
2603 | + } | |
2604 | + else { | |
2592 | 2605 | |
2606 | + var layerInputVal = $("#txtlayerNumber").val(); | |
2607 | + if (layerInputVal > 0) { | |
2608 | + var layerInputValDec = parseInt(layerInputVal) - 1; | |
2609 | + $scope.layerNumber = parseInt(layerInputValDec); | |
2610 | + $("#txtlayerNumber").val($scope.layerNumber); | |
2611 | + } | |
2612 | + | |
2613 | + | |
2614 | + } | |
2593 | 2615 | $scope.LayerChange(); |
2594 | 2616 | |
2595 | 2617 | } |
... | ... | @@ -7959,6 +7981,31 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
7959 | 7981 | $scope.LayerChange(); |
7960 | 7982 | } |
7961 | 7983 | |
7984 | + // 'x' button is displaying inside the input box in IE browser. | |
7985 | + if (e.which == 38) { | |
7986 | + | |
7987 | + | |
7988 | + var layerInputVal = $("#txtlayerNumber").val(); | |
7989 | + if (layerInputVal != $rootScope.totalLayers) { | |
7990 | + var layerInputValInc = parseInt(layerInputVal) + 1; | |
7991 | + $scope.layerNumber = parseInt(layerInputValInc); | |
7992 | + $("#txtlayerNumber").val($scope.layerNumber); | |
7993 | + } | |
7994 | + | |
7995 | + | |
7996 | + } | |
7997 | + | |
7998 | + // 'x' button is displaying inside the input box in IE browser. | |
7999 | + if (e.which == 40) { | |
8000 | + var layerInputVal = $("#txtlayerNumber").val(); | |
8001 | + if (layerInputVal > 0) { | |
8002 | + var layerInputValDec = parseInt(layerInputVal) - 1; | |
8003 | + $scope.layerNumber = parseInt(layerInputValDec); | |
8004 | + $("#txtlayerNumber").val($scope.layerNumber); | |
8005 | + } | |
8006 | + } | |
8007 | + | |
8008 | + | |
7962 | 8009 | } |
7963 | 8010 | |
7964 | 8011 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -248,9 +248,33 @@ |
248 | 248 | |
249 | 249 | </div> |
250 | 250 | <div class=""> |
251 | - <p> | |
251 | + | |
252 | + | |
253 | + <!--'x' button is displaying inside the input box in IE browser.--> | |
254 | + <div style="width:80px;margin:10px 0 0 15px;display:inline-block;"> | |
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;"> | |
257 | + </div> | |
258 | + <div style="width: 22px; float: left;"> | |
259 | + <div style="width: 100%; float: left; height: 16px;"> | |
260 | + <button type="button" id="incrmntVal" ng-click="LayerChangeOnMouseUpDown($event)" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;"> | |
261 | + | |
262 | + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-up.png" /> | |
263 | + </button> | |
264 | + </div> | |
265 | + <div style="width: 100%; float: left; height: 16px;"> | |
266 | + <button type="button" id="deccrmntVal" ng-click="LayerChangeOnMouseUpDown($event)" class="btn btn-default" style="padding:0 5px;border-radius:0;font-size: 10px;vertical-align:top;"> | |
267 | + <img style="width:10px;height:10px;" src="~/../content/images/DA/angle-down.png" /> | |
268 | + </button> | |
269 | + </div> | |
270 | + </div> | |
271 | + | |
272 | + </div> | |
273 | + | |
274 | + | |
275 | + <!--<p> | |
252 | 276 | <input class="item" type="number" id="txtlayerNumber" value="0" step="1" min="0" style="width:80px; margin:10px 0 0 15px;" ng-model="layerNumber" ng-keydown="LayerChangeBasedOnKeyPressed($event)" ng-click="LayerChangeOnMouseUpDown($event)" /> |
253 | - </p> | |
277 | + </p>--> | |
254 | 278 | <div id="layerChangeSlider" style="height:140px;" class="vert_slider " ng-model="layerNumber"></div> |
255 | 279 | </div> |
256 | 280 | </div> |
... | ... | @@ -391,6 +415,25 @@ |
391 | 415 | });</script> |
392 | 416 | <script> |
393 | 417 | $(function () { |
418 | + | |
419 | + | |
420 | + var regExp = /[0-9\.\,]/; | |
421 | + $('#txtlayerNumber').on('keydown keyup', function (e) { | |
422 | + var value = String.fromCharCode(e.which) || e.key; | |
423 | + // Only numbers, dots and commas | |
424 | + if (!regExp.test(value) | |
425 | + && e.which != 188 // , | |
426 | + && e.which != 190 // . | |
427 | + && e.which != 8 // backspace | |
428 | + && e.which != 46 // delete | |
429 | + && (e.which < 37 // arrow keys | |
430 | + || e.which > 40)) { | |
431 | + e.preventDefault(); | |
432 | + return false; | |
433 | + } | |
434 | + }); | |
435 | + | |
436 | + | |
394 | 437 | $("#layerChangeSlider").slider({ |
395 | 438 | orientation: "vertical", |
396 | 439 | range: "max", // <--- needed... | ... | ... |
400-SOURCECODE/AIAHTML5.Web/content/images/DA/angle-down.png
0 → 100644
210 Bytes
400-SOURCECODE/AIAHTML5.Web/content/images/DA/angle-up.png
0 → 100644
313 Bytes