diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-20 22:35:43 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-20 22:35:43 +1300 |
commit | 6801698dfc9c99b34d7ed081ebcfbec4a8853868 (patch) | |
tree | cecc80f811b6c3a594b9da272a7c65d3a9695315 /src/org/traccar/web/client/controller/SettingsController.java | |
parent | 0e766c9024e2457320f64353e29bb5e2d8294b28 (diff) | |
download | trackermap-web-6801698dfc9c99b34d7ed081ebcfbec4a8853868.tar.gz trackermap-web-6801698dfc9c99b34d7ed081ebcfbec4a8853868.tar.bz2 trackermap-web-6801698dfc9c99b34d7ed081ebcfbec4a8853868.zip |
Added account dialog
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(); } |