From 4eaa4f9cabb6c81221969899b944e60c1ced880a Mon Sep 17 00:00:00 2001 From: revolunet Date: Tue, 29 Mar 2011 13:40:42 +0200 Subject: [PATCH] metagrid : relay some CRUD events --- extdirect/static/js/Ext.django.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extdirect/static/js/Ext.django.js b/extdirect/static/js/Ext.django.js index 7078874..6f4a869 100644 --- a/extdirect/static/js/Ext.django.js +++ b/extdirect/static/js/Ext.django.js @@ -161,10 +161,16 @@ Ext.django.Grid = Ext.extend(Ext.grid.EditorGridPanel, { if (store.getTotalCount() > this.limit) this.getBottomToolbar().show(); }, this); + // relay some store events + this.relayEvents(this.store, ['destroy', 'save', 'update']); + Ext.django.Grid.superclass.initComponent.apply( this, arguments ); + + this.on('beforeedit', function() { if (!this.editable) return false; }, this); + this.getBottomToolbar().bindStore(this.store); }