aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/client/controller/DeviceController.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-04-20 16:37:12 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2014-04-20 16:37:12 +1200
commit426f54497ef28aec3e6feabba7d7f9a8ea15990c (patch)
treefb91f9fb4523f14361565358962c77e9be70ef85 /src/org/traccar/web/client/controller/DeviceController.java
parentc5940e28ce389e3c738291a1eaae3cf4872b0808 (diff)
downloadtrackermap-web-426f54497ef28aec3e6feabba7d7f9a8ea15990c.tar.gz
trackermap-web-426f54497ef28aec3e6feabba7d7f9a8ea15990c.tar.bz2
trackermap-web-426f54497ef28aec3e6feabba7d7f9a8ea15990c.zip
Update GXT to 3.1.0 beta
Diffstat (limited to 'src/org/traccar/web/client/controller/DeviceController.java')
-rw-r--r--src/org/traccar/web/client/controller/DeviceController.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/org/traccar/web/client/controller/DeviceController.java b/src/org/traccar/web/client/controller/DeviceController.java
index e9940aa2..69edfeec 100644
--- a/src/org/traccar/web/client/controller/DeviceController.java
+++ b/src/org/traccar/web/client/controller/DeviceController.java
@@ -23,6 +23,7 @@ import org.traccar.web.client.model.DeviceProperties;
import org.traccar.web.client.view.DeviceDialog;
import org.traccar.web.client.view.DeviceView;
import org.traccar.web.shared.model.Device;
+import org.traccar.web.shared.model.User;
import com.google.gwt.core.client.GWT;
import com.sencha.gxt.data.shared.ListStore;
@@ -30,6 +31,7 @@ import com.sencha.gxt.widget.core.client.ContentPanel;
import com.sencha.gxt.widget.core.client.Dialog.PredefinedButton;
import com.sencha.gxt.widget.core.client.box.AlertMessageBox;
import com.sencha.gxt.widget.core.client.box.ConfirmMessageBox;
+import com.sencha.gxt.widget.core.client.event.DialogHideEvent;
import com.sencha.gxt.widget.core.client.event.HideEvent;
public class DeviceController implements ContentController, DeviceView.DeviceHandler {
@@ -116,19 +118,19 @@ public class DeviceController implements ContentController, DeviceView.DeviceHan
@Override
public void onRemove(final Device device) {
final ConfirmMessageBox dialog = new ConfirmMessageBox("Confirm", "Are you sure you want remove device?");
- dialog.addHideHandler(new HideEvent.HideHandler() {
- @Override
- public void onHide(HideEvent event) {
- if (dialog.getHideButton() == dialog.getButtonById(PredefinedButton.YES.name())) {
+ dialog.addDialogHideHandler(new DialogHideEvent.DialogHideHandler() {
+ @Override
+ public void onDialogHide(DialogHideEvent event) {
+ if (event.getHideButton() == PredefinedButton.YES) {
Application.getDataService().removeDevice(device, new BaseAsyncCallback<Device>() {
@Override
public void onSuccess(Device result) {
deviceStore.remove(device);
}
});
- }
- }
- });
+ }
+ }
+ });
dialog.show();
}