Skip to content

Commit a475577

Browse files
committed
Added read only option.
1 parent abe1ff3 commit a475577

File tree

13 files changed

+18
-12
lines changed

13 files changed

+18
-12
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ interface ITouchSpinOptions {
100100
decimalsDelimiter?: string;
101101
stepInterval?: number;
102102
forceStepDivisibility?: string; // none | floor | round | ceil
103+
inputReadOnly?: boolean;
103104
stepIntervalDelay?: number;
104105
verticalButtons?: boolean;
105106
verticalUpClass?: string;

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-touchspin",
3-
"version": "1.6.1",
3+
"version": "1.7.0",
44
"authors": [
55
"Niko Kovacic <[email protected]>"
66
],

dev/controllers/main.controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class MainController {
3838
decimals: 2,
3939
max: 100,
4040
min: 1,
41+
inputReadOnly: true,
4142
step: 0.1,
4243
prefix: '$',
4344
postfix: '%',

dev/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@
8080
</div>
8181
</form>
8282
</div>
83-
<script src="http://localhost:8080/webpack-dev-server.js"></script>
83+
<script src="http://localhost:8088/webpack-dev-server.js"></script>
8484
</body>
8585
</html>

dist/angular-touchspin.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* angular-touchspin JavaScript Library v1.6.1
2+
* angular-touchspin JavaScript Library v1.7.0
33
*
44
* @license MIT
55
*

dist/angular-touchspin.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* angular-touchspin JavaScript Library v1.6.1
2+
* angular-touchspin JavaScript Library v1.7.0
33
*
44
* @license MIT
55
*
@@ -80,7 +80,7 @@ return /******/ (function(modules) { // webpackBootstrap
8080
/* 3 */
8181
/***/ function(module, exports) {
8282

83-
module.exports = "<div class=\"input-group bootstrap-touchspin\" ng-class=\"{ 'bootstrap-touchspin-disabled': vm.disabled }\">\r\n <span class=\"input-group-btn\" ng-if=\"!vm.touchSpinOptions.verticalButtons && vm.touchSpinOptions.buttonDownShow\">\r\n <button ng-class=\"vm.touchSpinOptions.buttonDownClass\" type=\"button\" ng-disabled=\"vm.disabled\" \r\n ng-mousedown=\"vm.mouseDown($event, false)\" ng-mouseup=\"vm.mouseUp($event)\" ng-mouseenter=\"vm.mouseEnter($event)\" ng-mouseleave=\"vm.mouseLeave($event)\"\r\n nk-touchstart=\"vm.buttonTouchStart($event, false)\" nk-touchend=\"vm.buttonTouchEnd($event)\">\r\n -\r\n </button>\r\n </span>\r\n <span class=\"input-group-addon\" ng-if=\"vm.touchSpinOptions.prefix\" ng-bind=\"vm.touchSpinOptions.prefix\">\r\n </span>\r\n <input type=\"text\" ng-model=\"vm.val\" class=\"form-control\" ng-disabled=\"vm.disabled\" ng-blur=\"vm.checkValue()\" ng-focus=\"vm.focus()\" ng-keyup=\"vm.keyUp($event)\" ng-keydown=\"vm.keyDown($event)\" />\r\n <span class=\"input-group-addon\" ng-class=\"vm.touchSpinOptions.postfixExtraClass\" ng-if=\"vm.touchSpinOptions.postfix\" ng-bind=\"vm.touchSpinOptions.postfix\">\r\n </span>\r\n <span class=\"input-group-btn\" ng-if=\"!vm.touchSpinOptions.verticalButtons && vm.touchSpinOptions.buttonUpShow\">\r\n <button class=\"btn btn-default\" ng-class=\"vm.touchSpinOptions.buttonUpClass\" type=\"button\" ng-disabled=\"vm.disabled\" \r\n ng-mousedown=\"vm.mouseDown($event, true)\" ng-mouseup=\"vm.mouseUp($event)\" ng-mouseenter=\"vm.mouseEnter($event)\" ng-mouseleave=\"vm.mouseLeave($event)\"\r\n nk-touchstart=\"vm.buttonTouchStart($event, false)\" nk-touchend=\"vm.buttonTouchEnd($event)\">\r\n +\r\n </button>\r\n </span>\r\n <span class=\"input-group-btn-vertical\" ng-if=\"vm.touchSpinOptions.verticalButtons && (vm.touchSpinOptions.buttonDownShow || vm.touchSpinOptions.buttonUpShow)\">\r\n <button class=\"bootstrap-touchspin-up\" ng-class=\"vm.touchSpinOptions.buttonUpClass\" type=\"button\" ng-disabled=\"vm.disabled\" ng-show=\"vm.touchSpinOptions.buttonUpShow\"\r\n ng-mousedown=\"vm.mouseDown($event, false)\" ng-mouseup=\"vm.mouseUp($event)\" ng-mouseenter=\"vm.mouseEnter($event)\" \r\n ng-mouseleave=\"vm.mouseLeave($event)\" nk-touchstart=\"vm.buttonTouchStart($event, false)\" nk-touchend=\"vm.buttonTouchEnd($event)\">\r\n <i ng-class=\"vm.touchSpinOptions.verticalUpClass\"></i>\r\n </button>\r\n <button class=\"bootstrap-touchspin-down\" ng-class=\"vm.touchSpinOptions.buttonUpClass\" type=\"button\" ng-disabled=\"vm.disabled\" ng-show=\"vm.touchSpinOptions.buttonDownShow\"\r\n ng-mousedown=\"vm.mouseDown($event, true)\" ng-mouseup=\"vm.mouseUp($event)\" ng-mouseenter=\"vm.mouseEnter($event)\" \r\n ng-mouseleave=\"vm.mouseLeave($event)\" nk-touchstart=\"vm.buttonTouchStart($event, true)\" nk-touchend=\"vm.buttonTouchEnd($event)\">\r\n <i ng-class=\"vm.touchSpinOptions.verticalDownClass\"></i>\r\n </button>\r\n </span>\r\n</div>\r\n";
83+
module.exports = "<div class=\"input-group bootstrap-touchspin\" ng-class=\"{ 'bootstrap-touchspin-disabled': vm.disabled }\">\r\n <span class=\"input-group-btn\" ng-if=\"!vm.touchSpinOptions.verticalButtons && vm.touchSpinOptions.buttonDownShow\">\r\n <button ng-class=\"vm.touchSpinOptions.buttonDownClass\" type=\"button\" ng-disabled=\"vm.disabled\" \r\n ng-mousedown=\"vm.mouseDown($event, false)\" ng-mouseup=\"vm.mouseUp($event)\" ng-mouseenter=\"vm.mouseEnter($event)\" ng-mouseleave=\"vm.mouseLeave($event)\"\r\n nk-touchstart=\"vm.buttonTouchStart($event, false)\" nk-touchend=\"vm.buttonTouchEnd($event)\">\r\n -\r\n </button>\r\n </span>\r\n <span class=\"input-group-addon\" ng-if=\"vm.touchSpinOptions.prefix\" ng-bind=\"vm.touchSpinOptions.prefix\">\r\n </span>\r\n <input type=\"text\" ng-model=\"vm.val\" class=\"form-control\" ng-disabled=\"vm.disabled\" ng-blur=\"vm.checkValue()\" ng-focus=\"vm.focus()\" ng-keyup=\"vm.keyUp($event)\" \r\n ng-keydown=\"vm.keyDown($event)\" ng-readonly=\"vm.touchSpinOptions.inputReadOnly\" />\r\n <span class=\"input-group-addon\" ng-class=\"vm.touchSpinOptions.postfixExtraClass\" ng-if=\"vm.touchSpinOptions.postfix\" ng-bind=\"vm.touchSpinOptions.postfix\">\r\n </span>\r\n <span class=\"input-group-btn\" ng-if=\"!vm.touchSpinOptions.verticalButtons && vm.touchSpinOptions.buttonUpShow\">\r\n <button class=\"btn btn-default\" ng-class=\"vm.touchSpinOptions.buttonUpClass\" type=\"button\" ng-disabled=\"vm.disabled\" \r\n ng-mousedown=\"vm.mouseDown($event, true)\" ng-mouseup=\"vm.mouseUp($event)\" ng-mouseenter=\"vm.mouseEnter($event)\" ng-mouseleave=\"vm.mouseLeave($event)\"\r\n nk-touchstart=\"vm.buttonTouchStart($event, false)\" nk-touchend=\"vm.buttonTouchEnd($event)\">\r\n +\r\n </button>\r\n </span>\r\n <span class=\"input-group-btn-vertical\" ng-if=\"vm.touchSpinOptions.verticalButtons && (vm.touchSpinOptions.buttonDownShow || vm.touchSpinOptions.buttonUpShow)\">\r\n <button class=\"bootstrap-touchspin-up\" ng-class=\"vm.touchSpinOptions.buttonUpClass\" type=\"button\" ng-disabled=\"vm.disabled\" ng-show=\"vm.touchSpinOptions.buttonUpShow\"\r\n ng-mousedown=\"vm.mouseDown($event, false)\" ng-mouseup=\"vm.mouseUp($event)\" ng-mouseenter=\"vm.mouseEnter($event)\" \r\n ng-mouseleave=\"vm.mouseLeave($event)\" nk-touchstart=\"vm.buttonTouchStart($event, false)\" nk-touchend=\"vm.buttonTouchEnd($event)\">\r\n <i ng-class=\"vm.touchSpinOptions.verticalUpClass\"></i>\r\n </button>\r\n <button class=\"bootstrap-touchspin-down\" ng-class=\"vm.touchSpinOptions.buttonUpClass\" type=\"button\" ng-disabled=\"vm.disabled\" ng-show=\"vm.touchSpinOptions.buttonDownShow\"\r\n ng-mousedown=\"vm.mouseDown($event, true)\" ng-mouseup=\"vm.mouseUp($event)\" ng-mouseenter=\"vm.mouseEnter($event)\" \r\n ng-mouseleave=\"vm.mouseLeave($event)\" nk-touchstart=\"vm.buttonTouchStart($event, true)\" nk-touchend=\"vm.buttonTouchEnd($event)\">\r\n <i ng-class=\"vm.touchSpinOptions.verticalDownClass\"></i>\r\n </button>\r\n </span>\r\n</div>\r\n";
8484

8585
/***/ },
8686
/* 4 */
@@ -492,6 +492,7 @@ return /******/ (function(modules) { // webpackBootstrap
492492
decimalsDelimiter: '.',
493493
max: 100,
494494
min: 0,
495+
inputReadOnly: false,
495496
step: 1,
496497
mousewheel: true,
497498
prefix: '',

dist/angular-touchspin.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)