In my controller I have the following code which will automatically refresh my grid at the specified interval. I would like to add another element to the toolbar that displays: Next refresh in xx:xx , where xx:xx is the time left before the refresh occurs. I have no clue how to code a countdown clock based on the interval. Any help would be much appreciated.
Code:
autoRefreshProd2: function() { var clock2 = this.getProdGrid002().down('#clock2'); var refresh2 = Ext.TaskManager.start({ run: function() { clock2.setText(Ext.Date.format(new Date(), 'g:i:s A')); this.getProdGrid002().show(); this.getStore('ProdGrid002s').load(); }, interval: 300000, //5 minutes scope: this }); },
Comment