package gr.grnet.pithos.web.client;
import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.safehtml.shared.SafeHtml;
+import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
+import com.google.gwt.safehtml.shared.SafeHtmlUtils;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Cookies;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HasVerticalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.MenuBar;
import com.google.gwt.user.client.ui.MenuItem;
@Source("gr/grnet/pithos/resources/pithos2-logo.png")
ImageResource pithosLogo();
+
+ @Source("gr/grnet/pithos/resources/desc.png")
+ ImageResource downArrow();
}
/**
MenuBar username = new MenuBar();
username.setStyleName("pithos-usernameMenu");
+
MenuBar userItemMenu = new MenuBar(true);
- userItemMenu.addItem(new MenuItem("Log off", new Command() {
+ userItemMenu.addItem(new MenuItem("invite friends...", new Command() {
@Override
public void execute() {
- app.logoff();
+ //Somehow get info from the server about invitations sent/left etc and then show the box
+ new InvitationsDialog().center();
+ }
+ }));
+ userItemMenu.addItem(new MenuItem("send feedback...", new Command() {
+
+ @Override
+ public void execute() {
+ new FeedbackDialog().center();
}
}));
userItemMenu.addItem(new MenuItem("API token", new Command() {
new CredentialsDialog(app, images).center();
}
}));
+ userItemMenu.addItem(new MenuItem("Log off", new Command() {
+
+ @Override
+ public void execute() {
+ app.logoff();
+ }
+ }));
+
MenuItem userItem = new MenuItem(_app.getUsername(), userItemMenu);
- userItem.addStyleName("pithos-usernameMenu");
- userItem.setWidth("68px");
+ userItem.addStyleName("pithos-usernameMenuItem");
username.addItem(userItem);
+ username.addSeparator();
+ username.addItem(new MenuItem("en", (Command) null));
outer.add(username);
outer.setCellHorizontalAlignment(username, HasHorizontalAlignment.ALIGN_RIGHT);
-
initWidget(outer);
}
}