[Kimchi-devel] [PATCH] [Kimchi] Storagebuttons not behaving properly

Socorro Stoppler socorro at linux.vnet.ibm.com
Wed Aug 31 21:46:38 UTC 2016


Forgot to say what the patch is about... that is in the 2nd one I sent 
out.  The patch is the same otherwise :)


On 08/31/2016 02:40 PM, Socorro Stoppler wrote:
> From: Socorro <socorro at linux.vnet.ibm.com>
>
> Signed-off-by: Socorro <socorro at linux.vnet.ibm.com>
> ---
>   ui/js/src/kimchi.storage_main.js | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
>
> diff --git a/ui/js/src/kimchi.storage_main.js b/ui/js/src/kimchi.storage_main.js
> index 6c99f93..ea58012 100644
> --- a/ui/js/src/kimchi.storage_main.js
> +++ b/ui/js/src/kimchi.storage_main.js
> @@ -310,6 +310,14 @@ kimchi.storageBindClick = function() {
>           $('.pool-delete').on('click', function(event) {
>               event.preventDefault();
>               var $pool = $(this);
> +            var in_use = $pool.data('inuse');
> +            if ('active' === $pool.data('stat') || in_use) {
> +                $pool.parent().addClass('disabled');
> +                return false;
> +            } else {
> +                $pool.parent().removeClass('disabled');
> +            }
> +
>               var settings = {
>                   title : i18n['KCHAPI6001M'],
>                   content : i18n['KCHPOOL6001M'],
> @@ -339,6 +347,15 @@ kimchi.storageBindClick = function() {
>           $('.pool-deactivate').on('click', function(event) {
>               event.preventDefault();
>               var poolName = $(this).data('name');
> +            var $poolDeactivate = $(this);
> +            var in_use = $poolDeactivate.data('inuse');
> +            if (in_use) {
> +                $poolDeactivate.parent().addClass('disabled');
> +                return false;
> +            } else {
> +                $poolDeactivate.parent().removeClass('disabled');
> +            }
> +
>               var settings = {
>                   title : i18n['KCHAPI6001M'],
>                   content : i18n['KCHPOOL6012M'],




More information about the Kimchi-devel mailing list