From: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
Signed-off-by: Yu Xin Huo <huoyuxin(a)linux.vnet.ibm.com>
---
ui/js/src/kimchi.template_add_main.js | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ui/js/src/kimchi.template_add_main.js
b/ui/js/src/kimchi.template_add_main.js
index 2d60888..6223c96 100644
--- a/ui/js/src/kimchi.template_add_main.js
+++ b/ui/js/src/kimchi.template_add_main.js
@@ -338,10 +338,12 @@ kimchi.template_add_main = function() {
$('#vm-image-local-box-back').click(function(){
kimchi.switchPage('vm-image-local-box', 'iso-type-box',
'right');
});
- $('input', '#vm-image-local-box').on('keyup', function(){
- var isValid = kimchi.template_check_path($(this).val());
- $(this).toggleClass('invalid-field', !isValid);
- $('button', $('.body',
'#vm-image-local-box')).button(isValid ? "enable" :
"disable");
+ $('input', '#vm-image-local-box').on('keyup cut paste',
function(){
+ setTimeout(function(){
+ var isValid = kimchi.template_check_path($('input',
'#vm-image-local-box').val());
+ $('input',
'#vm-image-local-box').toggleClass('invalid-field', !isValid);
+ $('button', $('.body',
'#vm-image-local-box')).button(isValid ? "enable" :
"disable");
+ }, 0);
});
$('button', $('.body', '#vm-image-local-box')).button({
disabled: true
--
1.7.1
Show replies by date
Applied. Thanks.
Regards,
Aline Manera