Mercurial > lada > lada-client
changeset 74:5c58c0e8936b
Add function which translates the errorcodes returned from the server.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 05 Jun 2013 18:04:07 +0200 |
parents | 7661f09466cc |
children | 4a82e28dfcc4 |
files | app/view/widgets/LadaForm.js |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/app/view/widgets/LadaForm.js Wed Jun 05 18:03:10 2013 +0200 +++ b/app/view/widgets/LadaForm.js Wed Jun 05 18:04:07 2013 +0200 @@ -86,6 +86,14 @@ onModelLoadFailure: function(record, operation) { this.fireEvent('loadfailure', this, record, operation); + }, + + translateReturnCodes: function(codes) { + var translated = {}; + for (var k in codes) { + translated[k] = Lada.getApplication().bundle.getMsg(codes[k]); + } + return translated; } });