|
|
|
@ -32,8 +32,6 @@ import com.google.gwt.user.client.ui.VerticalPanel;
|
|
|
|
|
*/
|
|
|
|
|
public class NotificationSettingsDialog extends Modal {
|
|
|
|
|
|
|
|
|
|
private VerticalPanel mainPanel = new VerticalPanel();
|
|
|
|
|
|
|
|
|
|
public static final String loading = GWT.getModuleBaseURL() + "../images/feeds-loader.gif";
|
|
|
|
|
public static final String mailSentOK = GWT.getModuleBaseURL() + "../images/yes.png";
|
|
|
|
|
public static final String mailSentNOK = GWT.getModuleBaseURL() + "../images/warning_blue.png";
|
|
|
|
@ -96,20 +94,16 @@ public class NotificationSettingsDialog extends Modal {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void showDeliveryResult(boolean success) {
|
|
|
|
|
mainPanel.clear();
|
|
|
|
|
mainPanel.setWidth("890px");
|
|
|
|
|
mainPanel.setHeight("500px");
|
|
|
|
|
mainPanel.setHorizontalAlignment(HasAlignment.ALIGN_CENTER);
|
|
|
|
|
mainPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
|
|
|
|
|
clear();
|
|
|
|
|
if (success) {
|
|
|
|
|
setTitle("Notifications Settings Saved");
|
|
|
|
|
mainPanel.add(new HTML("<span style=\"font-size: 24px;\">Notifications Settings correctly saved.</span>"));
|
|
|
|
|
mainPanel.add(new Image(mailSentOK));
|
|
|
|
|
add(new HTML("<span style=\"font-size: 24px;\">Notifications Settings correctly saved.</span>"));
|
|
|
|
|
add(new Image(mailSentOK));
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
setTitle("Notifications Settings Saving Error");
|
|
|
|
|
mainPanel.add(new Image(mailSentNOK));
|
|
|
|
|
mainPanel.add(new HTML("There were problems contacting the server, please try again in a short while."));
|
|
|
|
|
add(new Image(mailSentNOK));
|
|
|
|
|
add(new HTML("There were problems contacting the server, please try again in a short while."));
|
|
|
|
|
Button close = new Button("Close");
|
|
|
|
|
close.addClickHandler(new ClickHandler() {
|
|
|
|
|
@Override
|
|
|
|
@ -119,15 +113,16 @@ public class NotificationSettingsDialog extends Modal {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
Button close = new Button("Close");
|
|
|
|
|
close.setSize("150px", "40px");
|
|
|
|
|
close.getElement().getStyle().setFontSize(16, Unit.PX);
|
|
|
|
|
close.addClickHandler(new ClickHandler() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(ClickEvent event) {
|
|
|
|
|
hide();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
mainPanel.add(close);
|
|
|
|
|
ModalFooter footer = new ModalFooter();
|
|
|
|
|
footer.add(close);
|
|
|
|
|
add(footer);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|