Merge branch 'packaging' into debian
[pithos-web-client] / src / gr / grnet / pithos / web / client / FeedbackDialog.java
index 4dd3d56..ab13e35 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2011 GRNET S.A. All rights reserved.
+ * Copyright 2011-2012 GRNET S.A. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or
  * without modification, are permitted provided that the following
@@ -44,6 +44,7 @@ import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.event.dom.client.KeyCodes;
 import com.google.gwt.http.client.Response;
+import com.google.gwt.i18n.client.Dictionary;
 import com.google.gwt.user.client.Event.NativePreviewEvent;
 import com.google.gwt.user.client.ui.Anchor;
 import com.google.gwt.user.client.ui.Button;
@@ -51,9 +52,7 @@ import com.google.gwt.user.client.ui.DialogBox;
 import com.google.gwt.user.client.ui.FlexTable;
 import com.google.gwt.user.client.ui.HTML;
 import com.google.gwt.user.client.ui.HasHorizontalAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
 import com.google.gwt.user.client.ui.TextArea;
-import com.google.gwt.user.client.ui.TextBox;
 import com.google.gwt.user.client.ui.VerticalPanel;
 
 
@@ -62,15 +61,14 @@ import com.google.gwt.user.client.ui.VerticalPanel;
  */
 public class FeedbackDialog extends DialogBox {
 
-       private final String WIDTH_FIELD = "35em";
-       private final String WIDTH_TEXT = "42em";
-
+       Dictionary otherProperties = Dictionary.getDictionary("otherProperties");
+       
        /**
         * The widget constructor.
         */
-       public FeedbackDialog(final Pithos app) {
+       public FeedbackDialog(final Pithos app, final String appData) {
                // Set the dialog's caption.
-               Anchor close = new Anchor();
+               Anchor close = new Anchor("close");
                close.addStyleName("close");
                close.addClickHandler(new ClickHandler() {
                        
@@ -82,14 +80,16 @@ public class FeedbackDialog extends DialogBox {
                setText("Send feedback");
                setAnimationEnabled(true);
                setGlassEnabled(true);
+               
                setStyleName("pithos-DialogBox");
+
                VerticalPanel outer = new VerticalPanel();
                outer.add(close);
                
                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("Pithos is currently in alpha test and we would appreciate any<br>" + "kind of feedback. We welcome any suggestions, questions and<br>" + " bug reports you may have.");
+               HTML text = new HTML("Pithos+ is currently in alpha test and we would appreciate any<br>" + "kind of feedback. We welcome any suggestions, questions and<br>" + " bug reports you may have.");
                text.setStyleName("pithos-credentialsText");
                inner.add(text);
                FlexTable table = new FlexTable();
@@ -108,7 +108,7 @@ public class FeedbackDialog extends DialogBox {
                Button confirm = new Button("Submit feedback", new ClickHandler() {
                        @Override
                        public void onClick(ClickEvent event) {
-                               PostRequest sendFeedback = new PostRequest("/tools/", "", "feedback", "feedback-msg=" + msg.getText()) {
+                               PostRequest sendFeedback = new PostRequest("", "", otherProperties.get("feedbackUrl"), "feedback-msg=" + msg.getText() + "&feedback-data=" + appData) {
                                        
                                        @Override
                                        protected void onUnauthorized(Response response) {