[Kimchi-devel] [PATCHv3 1/2] issue#382 :Change false default value
lvroyce at linux.vnet.ibm.com
lvroyce at linux.vnet.ibm.com
Thu Jun 26 06:47:35 UTC 2014
From: Royce Lv <lvroyce at linux.vnet.ibm.com>
Default value for pool and volume were passed when path parameter
is set. Fix this wrong behavior by delete the default values.
Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
---
ui/js/src/kimchi.guest_storage_add.main.js | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/kimchi.guest_storage_add.main.js b/ui/js/src/kimchi.guest_storage_add.main.js
index 6af00cc..80045d3 100644
--- a/ui/js/src/kimchi.guest_storage_add.main.js
+++ b/ui/js/src/kimchi.guest_storage_add.main.js
@@ -50,6 +50,16 @@ kimchi.guest_storage_add_main = function() {
}
});
+ if ($(".path-section").hasClass('hidden')) {
+ $(poolTextbox).val('default');
+ $(poolTextbox).change();
+ $(pathTextbox).val("");
+ }
+ else {
+ $(poolTextbox).val("");
+ $(volTextbox).val("");
+ }
+
$.each(types, function(index, elem){
if (selectType == elem.value) {
var buses = new Array();
@@ -74,8 +84,6 @@ kimchi.guest_storage_add_main = function() {
});
}
});
- $(poolTextbox).val('default');
- $(poolTextbox).change();
kimchi.select('guest-add-storage-pool-list', options);
}
});
--
1.8.3.2
More information about the Kimchi-devel
mailing list