[Kimchi-devel] [PATCHv3 1/2] issue#382 :Change false default value

Sheldon shaohef at linux.vnet.ibm.com
Thu Jun 26 13:29:41 UTC 2014


Reviewed-by: ShaoHe Feng <shaohef at linux.vnet.ibm.com>

On 06/26/2014 02:47 PM, lvroyce at linux.vnet.ibm.com wrote:
> 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);
>           }
>       });


-- 
Thanks and best regards!

Sheldon Feng(冯少合)<shaohef at linux.vnet.ibm.com>
IBM Linux Technology Center




More information about the Kimchi-devel mailing list