[pve-devel] r5993 - pve-manager/pve2/www/new/grid

svn-commits at proxmox.com svn-commits at proxmox.com
Wed May 18 08:22:39 CEST 2011


Author: dietmar
Date: 2011-05-18 08:22:39 +0200 (Wed, 18 May 2011)
New Revision: 5993

Modified:
   pve-manager/pve2/www/new/grid/ObjectGrid.js
Log:
better feedback


Modified: pve-manager/pve2/www/new/grid/ObjectGrid.js
===================================================================
--- pve-manager/pve2/www/new/grid/ObjectGrid.js	2011-05-18 05:44:23 UTC (rev 5992)
+++ pve-manager/pve2/www/new/grid/ObjectGrid.js	2011-05-18 06:22:39 UTC (rev 5993)
@@ -76,13 +76,17 @@
 	    }
 	}));
 
+	var load_count = 0;
+
 	me.mon(rstore, 'load', function(s, records, success) {
 
+	    load_count++;
+
+	    me.setLoading(false);
+
 	    if (!success) {
 		me.setLoading("Data load error");
 		return;
-	    } else {
-		me.setLoading(false);
 	    }	    
 	});
 
@@ -106,6 +110,11 @@
 	    ]
 	});
 
+	me.on('afterlayout', function() {
+	    if (!load_count)
+		me.setLoading(true);
+	});
+
 	me.callParent();
    }
 });




More information about the pve-devel mailing list