[Kimchi-devel] [PATCH] [Kimchi] Fixed issue #1062 Disk path not taking input properly

rajgupta at linux.vnet.ibm.com rajgupta at linux.vnet.ibm.com
Fri Nov 11 11:04:39 UTC 2016


From: Rajat Gupta <rajat.triumph at gmail.com>

        Removed add jquery method.
        separated event registration for size and path text box

Signed-off-by: Rajat Gupta <rajat.triumph at gmail.com>
---
 ui/js/src/kimchi.guest_storage_add.main.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/ui/js/src/kimchi.guest_storage_add.main.js b/ui/js/src/kimchi.guest_storage_add.main.js
index b8e088e..adf4a03 100644
--- a/ui/js/src/kimchi.guest_storage_add.main.js
+++ b/ui/js/src/kimchi.guest_storage_add.main.js
@@ -595,7 +595,15 @@ kimchi.guest_storage_add_main = function() {
 
 
     if(kimchi.hostarch === s390xArch){
-        $(capacityTextbox).add(directorypathTextbox).on('change input propertychange', function(event){
+        $(capacityTextbox).on('change input propertychange', function(event){
+            if(sourcenewTextbox.val() === 'path'){
+                $(submitButton).prop('disabled', $(capacityTextbox).val() === '' || $(directorypathTextbox).val() === '');
+            }else{
+                $(submitButton).prop('disabled', $(capacityTextbox).val() === '');
+            }
+        });
+
+        $(directorypathTextbox).on('change input propertychange', function(event){
             if(sourcenewTextbox.val() === 'path'){
                 $(submitButton).prop('disabled', $(capacityTextbox).val() === '' || $(directorypathTextbox).val() === '');
             }else{
-- 
2.1.0




More information about the Kimchi-devel mailing list