From: Rajat Gupta <rajat.triumph(a)gmail.com>
Added on change event and size validation
Signed-off-by: Rajat Gupta <rajat.triumph(a)gmail.com>
---
ui/js/src/kimchi.storagepool_resize_volume_main.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.storagepool_resize_volume_main.js
b/ui/js/src/kimchi.storagepool_resize_volume_main.js
index 791cc1d..1f5b4db 100644
--- a/ui/js/src/kimchi.storagepool_resize_volume_main.js
+++ b/ui/js/src/kimchi.storagepool_resize_volume_main.js
@@ -23,8 +23,8 @@ kimchi.sp_resize_volume_main = function() {
var form = $('form#form-sp-resize-volume');
$(addButton).prop('disabled',true);
- $(size).on('keyup', function(){
- if($(this).val().length !==0) {
+ $(size).on('keyup change', function(){
+ if($(this).val() > 0) {
addButton.prop('disabled', false);
} else{
addButton.prop('disabled',true);
--
2.1.0