import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.user.client.Event.NativePreviewEvent;
import com.google.gwt.user.client.ui.AbstractImagePrototype;
+import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
* @param buttonLabel the label of the confirmation button
*/
public ConfirmationDialog(String message, String buttonLabel) {
+ Anchor close = new Anchor();
+ close.addStyleName("close");
+ close.addClickHandler(new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+ hide();
+ }
+ });
// Set the dialog's caption.
setText("Confirmation");
setAnimationEnabled(true);
+ setGlassEnabled(true);
+ setStyleName("pithos-DialogBox");
// Create a VerticalPanel to contain the label and the buttons.
VerticalPanel outer = new VerticalPanel();
- HorizontalPanel buttons = new HorizontalPanel();
+ outer.add(close);
+
+ VerticalPanel inner = new VerticalPanel();
+ inner.addStyleName("inner");
HTML text = new HTML("<table><tr><td rowspan='2'> " +
AbstractImagePrototype.create(MessagePanel.images.warn()).getHTML() +
"</td><td>" + message + "</td></tr></table>");
text.setStyleName("pithos-warnMessage");
- outer.add(text);
+ inner.add(text);
+ inner.setCellHorizontalAlignment(text, HasHorizontalAlignment.ALIGN_CENTER);
// Create the 'Update' button, along with a listener that hides the
// dialog when the button is clicked and renames the file.
hide();
}
});
- ok.getElement().setId("confirmation.ok");
- buttons.add(ok);
- buttons.setCellHorizontalAlignment(ok, HasHorizontalAlignment.ALIGN_CENTER);
- // Create the 'Cancel' button, along with a listener that hides the
- // dialog when the button is clicked.
- Button cancel = new Button("Cancel", new ClickHandler() {
-
- @Override
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {
- hide();
- cancel();
- }
- });
- cancel.getElement().setId("confirmation.cancel");
- buttons.add(cancel);
- buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);
- buttons.setSpacing(8);
- buttons.setStyleName("pithos-warnMessage");
- outer.setStyleName("pithos-warnMessage");
- outer.add(buttons);
- outer.setCellHorizontalAlignment(text, HasHorizontalAlignment.ALIGN_CENTER);
- outer.setCellHorizontalAlignment(buttons, HasHorizontalAlignment.ALIGN_CENTER);
+ ok.addStyleName("button");
+ inner.add(ok);
+
+ outer.add(inner);
+ outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);
setWidget(outer);
}
import com.google.gwt.user.client.Command;\r
import com.google.gwt.user.client.Event.NativePreviewEvent;\r
import com.google.gwt.user.client.ui.AbstractImagePrototype;\r
+import com.google.gwt.user.client.ui.Anchor;\r
import com.google.gwt.user.client.ui.Button;\r
import com.google.gwt.user.client.ui.DialogBox;\r
import com.google.gwt.user.client.ui.HTML;\r
public DeleteFileDialog(Pithos _app, Images images, List<File> _files) {\r
app = _app;\r
files = _files;\r
+ Anchor close = new Anchor();\r
+ close.addStyleName("close");\r
+ close.addClickHandler(new ClickHandler() {\r
+ \r
+ @Override\r
+ public void onClick(ClickEvent event) {\r
+ hide();\r
+ }\r
+ });\r
// Set the dialog's caption.\r
setText("Confirmation");\r
setAnimationEnabled(true);\r
+ setGlassEnabled(true);\r
+ setStyleName("pithos-DialogBox");\r
// Create a VerticalPanel to contain the label and the buttons.\r
VerticalPanel outer = new VerticalPanel();\r
- HorizontalPanel buttons = new HorizontalPanel();\r
+ outer.add(close);\r
+ \r
+ VerticalPanel inner = new VerticalPanel();\r
+ inner.addStyleName("inner");\r
\r
HTML text;\r
if (files.size() == 1)\r
else\r
text = new HTML("<table><tr><td>" + AbstractImagePrototype.create(images.warn()).getHTML() + "</td><td>" + "Are you sure you want to <b>permanently</b> delete the selected files?</td></tr></table>");\r
text.setStyleName("pithos-warnMessage");\r
- outer.add(text);\r
+ inner.add(text);\r
\r
// Create the 'Delete' button, along with a listener that hides the dialog\r
// when the button is clicked and deletes the file.\r
hide();\r
}\r
});\r
- ok.getElement().setId("confirmation.ok");\r
- buttons.add(ok);\r
- buttons.setCellHorizontalAlignment(ok, HasHorizontalAlignment.ALIGN_CENTER);\r
- // Create the 'Cancel' button, along with a listener that hides the\r
- // dialog when the button is clicked.\r
- Button cancel = new Button("Cancel", new ClickHandler() {\r
- @Override\r
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {\r
- hide();\r
- }\r
- });\r
- cancel.getElement().setId("confirmation.cancel");\r
- buttons.add(cancel);\r
- buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);\r
- buttons.setSpacing(8);\r
- buttons.setStyleName("pithos-warnMessage");\r
- outer.setStyleName("pithos-warnMessage");\r
- outer.add(buttons);\r
- outer.setCellHorizontalAlignment(text, HasHorizontalAlignment.ALIGN_CENTER);\r
- outer.setCellHorizontalAlignment(buttons, HasHorizontalAlignment.ALIGN_CENTER);\r
+ ok.addStyleName("button");\r
+ inner.add(ok);\r
+ inner.setCellHorizontalAlignment(text, HasHorizontalAlignment.ALIGN_CENTER);\r
+ outer.add(inner);\r
+ outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);\r
setWidget(outer);\r
}\r
\r
import com.google.gwt.event.dom.client.KeyCodes;\r
import com.google.gwt.user.client.Event.NativePreviewEvent;\r
import com.google.gwt.user.client.ui.AbstractImagePrototype;\r
+import com.google.gwt.user.client.ui.Anchor;\r
import com.google.gwt.user.client.ui.Button;\r
import com.google.gwt.user.client.ui.DialogBox;\r
import com.google.gwt.user.client.ui.HTML;\r
public DeleteFolderDialog(Pithos _app, Images images, Folder _folder) {\r
this.app = _app;\r
this.folder = _folder;\r
+\r
+ Anchor close = new Anchor();\r
+ close.addStyleName("close");\r
+ close.addClickHandler(new ClickHandler() {\r
+ \r
+ @Override\r
+ public void onClick(ClickEvent event) {\r
+ hide();\r
+ }\r
+ });\r
+\r
// Set the dialog's caption.\r
setText("Confirmation");\r
setAnimationEnabled(true);\r
+ setGlassEnabled(true);\r
+ setStyleName("pithos-DialogBox");\r
// Create a VerticalPanel to contain the HTML label and the buttons.\r
VerticalPanel outer = new VerticalPanel();\r
- HorizontalPanel buttons = new HorizontalPanel();\r
+ outer.add(close);\r
+ \r
+ VerticalPanel inner = new VerticalPanel();\r
+ inner.addStyleName("inner");\r
\r
HTML text = new HTML("<table><tr><td rowspan='2'>" + AbstractImagePrototype.create(images.warn()).getHTML() +\r
"</td><td>" + "Are you sure you want to <b>permanently</b> delete folder '" + folder.getName() +\r
"'?</td></tr></table>");\r
text.setStyleName("pithos-warnMessage");\r
- outer.add(text);\r
+ inner.add(text);\r
+ inner.setCellHorizontalAlignment(text, HasHorizontalAlignment.ALIGN_CENTER);\r
\r
// Create the 'Delete' button, along with a listener that hides the dialog\r
// when the button is clicked and deletes the folder.\r
hide();\r
}\r
});\r
- buttons.add(ok);\r
- buttons.setCellHorizontalAlignment(ok, HasHorizontalAlignment.ALIGN_CENTER);\r
- // Create the 'Cancel' button, along with a listener that hides the\r
- // dialog when the button is clicked.\r
- Button cancel = new Button("Cancel", new ClickHandler() {\r
- @Override\r
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {\r
- hide();\r
- }\r
- });\r
- buttons.add(cancel);\r
- buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);\r
- buttons.setSpacing(8);\r
- buttons.setStyleName("pithos-warnMessage");\r
- outer.setStyleName("pithos-warnMessage");\r
- outer.add(buttons);\r
- outer.setCellHorizontalAlignment(text, HasHorizontalAlignment.ALIGN_CENTER);\r
- outer.setCellHorizontalAlignment(buttons, HasHorizontalAlignment.ALIGN_CENTER);\r
+ ok.addStyleName("button");\r
+ inner.add(ok);\r
+ outer.add(inner);\r
+ outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);\r
setWidget(outer);\r
}\r
\r
super(_app);\r
file = _file;\r
\r
+ Anchor close = new Anchor();\r
+ close.addStyleName("close");\r
+ close.addClickHandler(new ClickHandler() {\r
+ \r
+ @Override\r
+ public void onClick(ClickEvent event) {\r
+ hide();\r
+ }\r
+ });\r
// Set the dialog's caption.\r
setText("File properties");\r
+ setAnimationEnabled(true);\r
+ setGlassEnabled(true);\r
+ setStyleName("pithos-DialogBox");\r
\r
// Outer contains inner and buttons.\r
final VerticalPanel outer = new VerticalPanel();\r
+ outer.add(close);\r
final FocusPanel focusPanel = new FocusPanel(outer);\r
// Inner contains generalPanel and permPanel.\r
inner = new DecoratedTabPanel();\r
inner.setAnimationEnabled(true);\r
+ inner.addStyleName("inner");\r
+ inner.getDeckPanel().addStyleName("pithos-TabPanelBottom");\r
\r
\r
inner.add(createGeneralPanel(), "General");\r
\r
outer.add(inner);\r
\r
- final HorizontalPanel buttons = new HorizontalPanel();\r
// Create the 'OK' button, along with a listener that hides the dialog\r
// when the button is clicked.\r
final Button ok = new Button("OK", new ClickHandler() {\r
closeDialog();\r
}\r
});\r
+ ok.addStyleName("button");\r
\r
- buttons.add(ok);\r
- buttons.setCellHorizontalAlignment(ok, HasHorizontalAlignment.ALIGN_CENTER);\r
- // Create the 'Cancel' button, along with a listener that hides the\r
- // dialog when the button is clicked.\r
- final Button cancel = new Button("Cancel", new ClickHandler() {\r
- @Override\r
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {\r
- closeDialog();\r
- }\r
- });\r
- buttons.add(cancel);\r
- buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);\r
- buttons.setSpacing(8);\r
- buttons.addStyleName("pithos-TabPanelBottom");\r
-\r
- outer.add(buttons);\r
- outer.setCellHorizontalAlignment(buttons, HasHorizontalAlignment.ALIGN_CENTER);\r
- outer.addStyleName("pithos-TabPanelBottom");\r
+ outer.add(ok);\r
+ outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);\r
\r
focusPanel.setFocus(true);\r
setWidget(outer);\r
import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler;
import com.google.gwt.user.client.ui.FormPanel.SubmitEvent;
import com.google.gwt.user.client.ui.FormPanel.SubmitHandler;
+import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Grid;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.Hidden;
* The widget's constructor.
*/
public FileUploadDialog() {
+ Anchor close = new Anchor();
+ close.addStyleName("close");
+ close.addClickHandler(new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+ hide();
+ }
+ });
// Set the dialog's caption.
setText("File upload");
setAnimationEnabled(true);
+ setGlassEnabled(true);
+ setStyleName("pithos-DialogBox");
// Since we're going to add a FileUpload widget, we'll need to set the
// form to use the POST method, and multipart MIME encoding.
form.setEncoding(FormPanel.ENCODING_MULTIPART);
// Create a panel to hold all of the form widgets.
VerticalPanel panel = new VerticalPanel();
+ panel.add(close);
form.setWidget(panel);
+ VerticalPanel inner = new VerticalPanel();
+ inner.addStyleName("inner");
+
final Hidden auth = new Hidden("X-Auth-Token", "");
- panel.add(auth);
+ inner.add(auth);
upload.setName("X-Object-Data");
filenameLabel.setText("");
filenameLabel.setVisible(false);
generalTable.getCellFormatter().setStyleName(1, 1, "props-values");
generalTable.setCellSpacing(4);
- panel.add(generalTable);
-
- // Create a panel to hold the buttons.
- HorizontalPanel buttons = new HorizontalPanel();
+ inner.add(generalTable);
// Create the 'upload' button, along with a listener that submits the
// form.
prepareAndSubmit();
}
});
- buttons.add(submit);
- buttons.setCellHorizontalAlignment(submit, HasHorizontalAlignment.ALIGN_CENTER);
- // Create the 'Cancel' button, along with a listener that hides the
- // dialog when the button is clicked.
- final Button cancel = new Button("Cancel", new ClickHandler() {
- @Override
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {
- hide();
- }
- });
- buttons.add(cancel);
- buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);
- buttons.setSpacing(8);
- panel.add(buttons);
- panel.setCellHorizontalAlignment(buttons, HasHorizontalAlignment.ALIGN_CENTER);
+ submit.addStyleName("button");
+ inner.add(submit);
// Add an event handler to the form.
form.addSubmitHandler(new SubmitHandler() {
}
});
+ panel.add(inner);
+ panel.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);
+
setWidget(form);
}
import com.google.gwt.http.client.Response;\r
import com.google.gwt.i18n.client.DateTimeFormat;\r
import com.google.gwt.user.client.Event.NativePreviewEvent;\r
+import com.google.gwt.user.client.ui.Anchor;\r
import com.google.gwt.user.client.ui.Button;\r
import com.google.gwt.user.client.ui.DecoratedTabPanel;\r
import com.google.gwt.user.client.ui.DialogBox;\r
*/\r
public FolderPropertiesDialog(final Pithos app, boolean _create, Folder selected) {\r
this.app = app;\r
+ Anchor close = new Anchor();\r
+ close.addStyleName("close");\r
+ close.addClickHandler(new ClickHandler() {\r
+ \r
+ @Override\r
+ public void onClick(ClickEvent event) {\r
+ hide();\r
+ }\r
+ });\r
+\r
setAnimationEnabled(true);\r
+ setGlassEnabled(true);\r
+ setStyleName("pithos-DialogBox");\r
\r
// Enable IE selection for the dialog (must disable it upon closing it)\r
Pithos.enableIESelection();\r
\r
// Outer contains inner and buttons\r
VerticalPanel outer = new VerticalPanel();\r
+ outer.add(close);\r
// Inner contains generalPanel and permPanel\r
inner = new DecoratedTabPanel();\r
inner.setAnimationEnabled(true);\r
+ inner.addStyleName("inner");\r
+ inner.getDeckPanel().addStyleName("pithos-TabPanelBottom");\r
\r
VerticalPanel generalPanel = new VerticalPanel();\r
FlexTable generalTable = new FlexTable();\r
\r
outer.add(inner);\r
\r
- HorizontalPanel buttons = new HorizontalPanel();\r
// Create the 'Create/Update' button, along with a listener that hides the dialog\r
// when the button is clicked and quits the application.\r
String okLabel;\r
closeDialog();\r
}\r
});\r
- buttons.add(ok);\r
- buttons.setCellHorizontalAlignment(ok, HasHorizontalAlignment.ALIGN_CENTER);\r
- // Create the 'Cancel' button, along with a listener that hides the\r
- // dialog\r
- // when the button is clicked.\r
- Button cancel = new Button("Cancel", new ClickHandler() {\r
- @Override\r
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {\r
- closeDialog();\r
- }\r
- });\r
- buttons.add(cancel);\r
- buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);\r
- buttons.setSpacing(8);\r
- buttons.addStyleName("pithos-TabPanelBottom");\r
- outer.add(buttons);\r
- outer.setCellHorizontalAlignment(buttons, HasHorizontalAlignment.ALIGN_CENTER);\r
- outer.addStyleName("pithos-TabPanelBottom");\r
+ ok.addStyleName("button");\r
+ outer.add(ok);\r
+ outer.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);\r
\r
setWidget(outer);\r
}\r
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.user.client.Event.NativePreviewEvent;
+import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.CheckBox;
import com.google.gwt.user.client.ui.DialogBox;
userAdd = _userAdd;
permList = _permList;
+ Anchor close = new Anchor();
+ close.addStyleName("close");
+ close.addClickHandler(new ClickHandler() {
+
+ @Override
+ public void onClick(ClickEvent event) {
+ hide();
+ }
+ });
+ setText("Add permission");
+ setStyleName("pithos-DialogBox");
+
final VerticalPanel panel = new VerticalPanel();
+ panel.add(close);
+
+ VerticalPanel inner = new VerticalPanel();
+ inner.addStyleName("inner");
final FlexTable permTable = new FlexTable();
permTable.setText(0, 0, "Users/Groups");
permTable.getFlexCellFormatter().setStyleName(1, 0, "props-labels");
permTable.getFlexCellFormatter().setHorizontalAlignment(1, 1, HasHorizontalAlignment.ALIGN_CENTER);
permTable.getFlexCellFormatter().setHorizontalAlignment(1, 2, HasHorizontalAlignment.ALIGN_CENTER);
- panel.add(permTable);
+ inner.add(permTable);
- final HorizontalPanel buttons = new HorizontalPanel();
final Button ok = new Button("OK", new ClickHandler() {
@Override
public void onClick(@SuppressWarnings("unused") ClickEvent event) {
hide();
}
});
- buttons.add(ok);
- buttons.setCellHorizontalAlignment(ok, HasHorizontalAlignment.ALIGN_CENTER);
- // Create the 'Cancel' button, along with a listener that hides the
- // dialog
- // when the button is clicked.
- final Button cancel = new Button("Cancel", new ClickHandler() {
- @Override
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {
- hide();
- }
- });
- buttons.add(cancel);
- buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);
- buttons.setSpacing(8);
- buttons.addStyleName("pithos-TabPanelBottom");
- panel.add(buttons);
- panel.addStyleName("pithos-TabPanelBottom");
+ ok.addStyleName("button");
+ inner.add(ok);
+ panel.add(inner);
+ panel.setCellHorizontalAlignment(inner, HasHorizontalAlignment.ALIGN_CENTER);
+
setWidget(panel);
}
// 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.
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);
}
MenuBar username = new MenuBar();
username.setStyleName("pithos-usernameMenu");
- username.setAutoOpen(true);
MenuBar userItemMenu = new MenuBar(true);
userItemMenu.addItem(new MenuItem("invite friends...", new Command() {
}
}));
- SafeHtmlBuilder sb = new SafeHtmlBuilder();
- sb.append(SafeHtmlUtils.fromSafeConstant(_app.getUsername()));
- sb.appendHtmlConstant(AbstractImagePrototype.create(images.downArrow()).getHTML());
MenuItem userItem = new MenuItem(_app.getUsername(), userItemMenu);
+ 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);
- Image downArrow = AbstractImagePrototype.create(images.downArrow()).createImage();
- outer.add(downArrow);
- outer.setCellHorizontalAlignment(downArrow, HasHorizontalAlignment.ALIGN_LEFT);
initWidget(outer);
}
}
border-bottom: 5px solid #4085A5;
}
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopLeft {
+ background-position: 0px -55px;
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopRight {
+ background-position: -6px -55px;
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabTopCenter {
+ background: #D0E4F6;
+}
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleLeft,
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleCenter,
+.gwt-DecoratedTabBar .gwt-TabBarItem-selected .tabMiddleRight {
+ background: #D0E4F6;
+ color:#d45500;
+}
+.pithos-TabPanelBottom {
+ border: none;
+}
+
table.pithos-permList {
border-spacing: 3px;
border-collapse: collapse;
.pithos-usernameMenu {
cursor: pointer;
- color: white;
}
.pithos-usernameMenuItem {
- cursor: pointer;
+ background: url(images/down-arrow-light.png) no-repeat scroll right 8px transparent;
+ padding-right: 13px;
+ cursor: pointer;
+ color: white;
+}
+
+.pithos-usernameMenuItem :hover {
+ background: url(images/down-arrow-lighter.png) no-repeat scroll right 8px transparent;
+ background-color: red;
}
.pithos-sessionExpired {
padding-left: 4;
}
-.pithos-TabPanelBottom {
- border-color: darkgrey;
- border-width: 1px 1px 1px;
- overflow: hidden;
- padding: 6px;
-}
-
.pithos-treeHeader {
background-color: #74aec9;
}