[Kimchi-devel] [PATCH] Bug fix: Properly reload grid content

Aline Manera alinefm at linux.vnet.ibm.com
Thu Feb 26 12:05:47 UTC 2015


The grid reload function requires a data argument related to the grid
object. It is passed to the handler in the event.data property each time
an event is trigered.
So, properly get the grid object on event.data property to do the reload.

To test this, you can manually lock YUM/apt on system by running a
system update command and then verify on Kimchi that the packages
update and repositories information was not loaded. Stop the system
update you have manually started and click on "Retry" button. Without
this patch you will get a Javascript error:

'grid' is undefined.

And with that the content will be properly reloaded.

Signed-off-by: Aline Manera <alinefm at linux.vnet.ibm.com>
---
 ui/js/src/kimchi.grid.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/js/src/kimchi.grid.js b/ui/js/src/kimchi.grid.js
index eccac1c..6fed753 100644
--- a/ui/js/src/kimchi.grid.js
+++ b/ui/js/src/kimchi.grid.js
@@ -503,7 +503,7 @@ kimchi.widget.Grid.prototype = (function() {
         $('.retry-button', domNode).on('click', {
             grid: this
         }, function(event) {
-            grid.reload();
+            event.data.grid.reload();
         });
     };
 
-- 
2.1.0




More information about the Kimchi-devel mailing list