improve error handling

This commit is contained in:
Sebastian Sdorra
2010-12-19 15:13:45 +01:00
parent 6a469d134e
commit 6103e27cfe
5 changed files with 67 additions and 12 deletions

View File

@@ -207,7 +207,12 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
this.execCallback(this.onUpdate, item);
},
failure: function(){
alert( 'failure' );
Ext.MessageBox.show({
title: 'Error',
msg: 'User update failed',
buttons: Ext.MessageBox.OK,
icon:Ext.MessageBox.ERROR
});
}
});
@@ -233,7 +238,12 @@ Sonia.user.FormPanel = Ext.extend(Sonia.rest.FormPanel,{
this.execCallback(this.onCreate, user);
},
failure: function(){
alert( 'failure' );
Ext.MessageBox.show({
title: 'Error',
msg: 'User creation failed',
buttons: Ext.MessageBox.OK,
icon:Ext.MessageBox.ERROR
});
}
});
},
@@ -343,7 +353,12 @@ Sonia.user.Panel = Ext.extend(Ext.Panel, {
this.resetPanel();
},
failure: function(){
alert( 'failure' );
Ext.MessageBox.show({
title: 'Error',
msg: 'User deletion failed',
buttons: Ext.MessageBox.OK,
icon:Ext.MessageBox.ERROR
});
}
});
}