[pve-devel] r6023 - pve-manager/pve2/www/new/node

svn-commits at proxmox.com svn-commits at proxmox.com
Thu May 26 12:05:13 CEST 2011


Author: dietmar
Date: 2011-05-26 12:05:12 +0200 (Thu, 26 May 2011)
New Revision: 6023

Modified:
   pve-manager/pve2/www/new/node/Tasks.js
Log:
use infinite scroll 


Modified: pve-manager/pve2/www/new/node/Tasks.js
===================================================================
--- pve-manager/pve2/www/new/node/Tasks.js	2011-05-26 06:47:18 UTC (rev 6022)
+++ pve-manager/pve2/www/new/node/Tasks.js	2011-05-26 10:05:12 UTC (rev 6023)
@@ -12,7 +12,9 @@
 
 	var store = Ext.create('Ext.data.Store', {
 	    pageSize: 500,
- 	    model: Ext.define('pve-tasks', {
+ 	    buffered: true,
+	    remoteFilter: true,
+	    model: Ext.define('pve-tasks', {
 		extend: 'Ext.data.Model',
 		fields:  [ 
 		    { name: 'starttime', type : 'date', dateFormat: 'timestamp' }, 
@@ -29,21 +31,13 @@
 
                 url: "/api2/json/nodes/" + nodename + "/tasks"
 	    },
-	   // sorters: [{
-	//	property: 'starttime',
-	//	direction: 'DESC'
-          //  }]
 	});
 
-	var ptbar = new Ext.PagingToolbar({
-	    store: store,       // grid and PagingToolbar using same store
-	    displayInfo: true
-	});
-
-
 	var userfilter = '';
 	var filter_errors = 0;
 
+	// fixme: scroller update fails 
+	// http://www.sencha.com/forum/showthread.php?133677-scroller-does-not-adjust-to-the-filtered-grid-data&p=602887
 	var reload_task = new Ext.util.DelayedTask(function() {
 	    var params = {
 		errors: filter_errors
@@ -52,7 +46,7 @@
 		params.userfilter = userfilter;
 
 	    store.proxy.extraParams = params;
-	    ptbar.doRefresh();
+	    store.filter();
 	});
 
 	var run_task_viewer = function() {
@@ -77,7 +71,9 @@
 	Ext.apply(me, {
 	    store: store,
 	    stateful: false,
-	    bbar: ptbar,
+	    verticalScrollerType: 'paginggridscroller',
+	    loadMask: true,
+	    invalidateScrollerOnRefresh: false,
 	    viewConfig: {
 		trackOver: false,
 		stripeRows: false, // does not work with getRowClass()




More information about the pve-devel mailing list