improve sonia.repository reset function

This commit is contained in:
Sebastian Sdorra
2010-11-28 11:08:20 +01:00
parent 166932d19b
commit 083aec850b

View File

@@ -393,6 +393,18 @@ Sonia.repository.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
alert( 'failure' );
}
});
},
reset: function(){
if ( debug ){
console.debug( 'reset form' );
}
this.getForm().reset();
if ( this.item != null ){
this.permissionStore.loadData( this.item );
} else {
this.permissionStore.removeAll();
}
}
});