diff options
Diffstat (limited to 'src/org/traccar/web/client/controller/SettingsController.java')
-rw-r--r-- | src/org/traccar/web/client/controller/SettingsController.java | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/org/traccar/web/client/controller/SettingsController.java b/src/org/traccar/web/client/controller/SettingsController.java index 75130f2b..c369cbb1 100644 --- a/src/org/traccar/web/client/controller/SettingsController.java +++ b/src/org/traccar/web/client/controller/SettingsController.java @@ -20,14 +20,27 @@ import org.traccar.web.client.ApplicationContext; import org.traccar.web.client.model.BaseAsyncCallback; import org.traccar.web.client.view.ApplicationSettingsDialog; import org.traccar.web.client.view.DeviceView; +import org.traccar.web.client.view.UserDialog; import org.traccar.web.shared.model.ApplicationSettings; +import org.traccar.web.shared.model.User; public class SettingsController implements DeviceView.SettingsHandler { @Override public void onAccountSelected() { - // TODO Auto-generated method stub - + new UserDialog( + ApplicationContext.getInstance().getUser(), + new UserDialog.UserHandler() { + @Override + public void onSave(User user) { + Application.getDataService().updateUser(user, new BaseAsyncCallback<User>() { + @Override + public void onSuccess(User result) { + ApplicationContext.getInstance().setUser(result); + } + }); + } + }).show(); } @Override @@ -55,7 +68,6 @@ public class SettingsController implements DeviceView.SettingsHandler { ApplicationContext.getInstance().setApplicationSettings(result); } }); - } }).show(); } |