Skip to content

Commit

Permalink
Added read only option.
Browse files Browse the repository at this point in the history
  • Loading branch information
nkovacic committed Dec 1, 2017
1 parent abe1ff3 commit a475577
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 12 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ interface ITouchSpinOptions {
decimalsDelimiter?: string;
stepInterval?: number;
forceStepDivisibility?: string; // none | floor | round | ceil
inputReadOnly?: boolean;
stepIntervalDelay?: number;
verticalButtons?: boolean;
verticalUpClass?: string;
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-touchspin",
"version": "1.6.1",
"version": "1.7.0",
"authors": [
"Niko Kovacic <niko.kovacic2@gmail.com>"
],
Expand Down
1 change: 1 addition & 0 deletions dev/controllers/main.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class MainController {
decimals: 2,
max: 100,
min: 1,
inputReadOnly: true,
step: 0.1,
prefix: '$',
postfix: '%',
Expand Down
2 changes: 1 addition & 1 deletion dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,6 @@
</div>
</form>
</div>
<script src="http://localhost:8080/webpack-dev-server.js"></script>
<script src="http://localhost:8088/webpack-dev-server.js"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion dist/angular-touchspin.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* angular-touchspin JavaScript Library v1.6.1
* angular-touchspin JavaScript Library v1.7.0
*
* @license MIT
*
Expand Down
5 changes: 3 additions & 2 deletions dist/angular-touchspin.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* angular-touchspin JavaScript Library v1.6.1
* angular-touchspin JavaScript Library v1.7.0
*
* @license MIT
*
Expand Down Expand Up @@ -80,7 +80,7 @@ return /******/ (function(modules) { // webpackBootstrap
/* 3 */
/***/ function(module, exports) {

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";
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";

/***/ },
/* 4 */
Expand Down Expand Up @@ -492,6 +492,7 @@ return /******/ (function(modules) { // webpackBootstrap
decimalsDelimiter: '.',
max: 100,
min: 0,
inputReadOnly: false,
step: 1,
mousewheel: true,
prefix: '',
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-touchspin.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit a475577

Please # to comment.