[pve-devel] [PATCH manager v2 2/3] ui: ObjectPendingGrid: slightly refactor renderValue

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Sep 1 11:31:53 CEST 2017


On Thu, Aug 31, 2017 at 02:26:00PM +0200, Thomas Lamprecht wrote:
> ---
> 
> new in v2
> 
>  www/manager6/grid/PendingObjectGrid.js | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/www/manager6/grid/PendingObjectGrid.js b/www/manager6/grid/PendingObjectGrid.js
> index d5702f2e..43889456 100644
> --- a/www/manager6/grid/PendingObjectGrid.js
> +++ b/www/manager6/grid/PendingObjectGrid.js
> @@ -52,7 +52,7 @@ Ext.define('PVE.grid.PendingObjectGrid', {
>  		pending = renderer(record.data.pending, metaData, record, rowIndex, colIndex, store, true);
>  	    }
>  	    if (pending == current) {
> -		pending = undefined;
> +		pending = '';
>  	    }
>  	} else {
>  	    current = value || '';
> @@ -64,10 +64,9 @@ Ext.define('PVE.grid.PendingObjectGrid', {
>  	}
>  
>  	if (pending || pendingdelete) {
> -	    return current + '<div style="color:red">' + (pending || '') + pendingdelete + '</div>';
> -	} else {
> -	    return current;
> +	    current += '<div style="color:red">' + pending + pendingdelete + '</div>';

this leads to

old value
undefined (orange)
old value (orange, strikethrough)

needs further discussion on how and where to handle that pesky undefined
;)

>  	}
> +	return current;
>      },
>  
>      initComponent : function() {
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list