Merge branch 'release-0.15' into debian-release-0.15
[pithos-web-client] / src / gr / grnet / pithos / web / client / SessionExpiredDialog.java
index 4ae6763..46f6928 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2011 GRNET S.A. All rights reserved.
+ * Copyright 2011-2013 GRNET S.A. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
@@ -55,25 +55,32 @@ public class SessionExpiredDialog extends DialogBox {
         app = _app;
                // Set the dialog's caption.
                setText("Session Expired");
-               setAnimationEnabled(true);
+               setGlassEnabled(true);
+               setStyleName("pithos-DialogBox");
+
                VerticalPanel outer = new VerticalPanel();
 
+               VerticalPanel inner = new VerticalPanel();
+               inner.addStyleName("inner");
+
                // Create the text and set a style name so we can style it with CSS.
                HTML text = new HTML("<p>Your session has expired. You will have to reauthenticate with your Identity Provider.</p> ");
                text.setStyleName("pithos-sessionExpired");
-               outer.add(text);
+               inner.add(text);
 
                // Create the 'OK' button, along with a listener that hides the dialog
                // when the button is clicked.
                Button confirm = new Button("Proceed", new ClickHandler() {
                        @Override
-                       public void onClick(@SuppressWarnings("unused") ClickEvent event) {
+                       public void onClick(ClickEvent event) {
                                app.authenticateUser();
                                hide();
                        }
                });
-               outer.add(confirm);
-               outer.setCellHorizontalAlignment(confirm, HasHorizontalAlignment.ALIGN_CENTER);
+               confirm.addStyleName("button");
+               inner.add(confirm);
+               outer.add(inner);
+               outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);
                outer.setSpacing(8);
                setWidget(outer);
        }
@@ -91,12 +98,6 @@ public class SessionExpiredDialog extends DialogBox {
                                        app.authenticateUser();
                                        hide();
                                        break;
-                               case KeyCodes.KEY_ESCAPE:
-                                       hide();
-                                       break;
                        }
        }
-
-
-
 }