From 8e325000635def4bc3e417b63085a1f3f7ee1387 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 21 Feb 2015 12:47:11 +0530 Subject: [PATCH] fix input with arrows --- source/UI/js/Form/Input.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/UI/js/Form/Input.js b/source/UI/js/Form/Input.js index 409f6991..71c695e9 100644 --- a/source/UI/js/Form/Input.js +++ b/source/UI/js/Form/Input.js @@ -235,7 +235,7 @@ Ox.Input = function(options, self) { .css({float: 'left'}) .on({ click: function() { - clickArrow(0); + clickArrow(-1); } }) .appendTo(that), @@ -247,7 +247,7 @@ Ox.Input = function(options, self) { .css({float: 'right'}) .on({ click: function() { - clickArrow(0); + clickArrow(1); } }) .appendTo(that) @@ -714,7 +714,7 @@ Ox.Input = function(options, self) { function clickArrow(i) { var originalValue = self.options.value; self.options.value = Ox.limit( - parseFloat(self.options.value) + (i == 0 ? -1 : 1) * self.options.arrowStep, + parseFloat(self.options.value) + i * self.options.arrowStep, self.options.min, self.options.max ).toString();