/*\r
- * Copyright 2011 GRNET S.A. All rights reserved.\r
+ * Copyright 2011-2012 GRNET S.A. All rights reserved.\r
*\r
* Redistribution and use in source and binary forms, with or\r
* without modification, are permitted provided that the following\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.CheckBox;\r
-import com.google.gwt.user.client.ui.DecoratedTabPanel;\r
import com.google.gwt.user.client.ui.FocusPanel;\r
import com.google.gwt.user.client.ui.HasHorizontalAlignment;\r
import com.google.gwt.user.client.ui.HorizontalPanel;\r
close.addClickHandler(new ClickHandler() {\r
\r
@Override\r
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {\r
+ public void onClick(ClickEvent event) {\r
hide();\r
}\r
});\r
// when the button is clicked.\r
final Button ok = new Button("OK", new ClickHandler() {\r
@Override\r
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {\r
+ public void onClick(ClickEvent event) {\r
accept();\r
closeDialog();\r
}\r
private VerticalPanel createSharingPanel() {\r
VerticalPanel permPanel = new VerticalPanel();\r
\r
- permList = new PermissionsList(images, file.getPermissions(), file.getOwner(), file.getInheritedPermissionsFrom() != null);\r
+ permList = new PermissionsList(images, file.getPermissions(), file.getOwner(), false);\r
permPanel.add(permList);\r
\r
- if (file.getInheritedPermissionsFrom() == null) {\r
- HorizontalPanel permButtons = new HorizontalPanel();\r
- Button add = new Button("Add Group", new ClickHandler() {\r
- @Override\r
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {\r
- PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false);\r
- dlg.center();\r
- permList.updatePermissionTable();\r
- }\r
- });\r
- add.addStyleName("button");\r
- permButtons.add(add);\r
- permButtons.setCellHorizontalAlignment(add, HasHorizontalAlignment.ALIGN_CENTER);\r
+ HorizontalPanel permButtons = new HorizontalPanel();\r
+ Button add = new Button("Add Group", new ClickHandler() {\r
+ @Override\r
+ public void onClick(ClickEvent event) {\r
+ PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false);\r
+ dlg.center();\r
+ permList.updatePermissionTable();\r
+ }\r
+ });\r
+ add.addStyleName("button");\r
+ permButtons.add(add);\r
+ permButtons.setCellHorizontalAlignment(add, HasHorizontalAlignment.ALIGN_CENTER);\r
\r
- final Button addUser = new Button("Add User", new ClickHandler() {\r
- @Override\r
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {\r
- PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, true);\r
- dlg.center();\r
- permList.updatePermissionTable();\r
- }\r
- });\r
- addUser.addStyleName("button");\r
- permButtons.add(addUser);\r
- permButtons.setCellHorizontalAlignment(addUser, HasHorizontalAlignment.ALIGN_CENTER);\r
+ final Button addUser = new Button("Add User", new ClickHandler() {\r
+ @Override\r
+ public void onClick(ClickEvent event) {\r
+ PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, true);\r
+ dlg.center();\r
+ permList.updatePermissionTable();\r
+ }\r
+ });\r
+ addUser.addStyleName("button");\r
+ permButtons.add(addUser);\r
+ permButtons.setCellHorizontalAlignment(addUser, HasHorizontalAlignment.ALIGN_CENTER);\r
\r
- permButtons.setSpacing(8);\r
- permButtons.addStyleName("pithos-TabPanelBottom");\r
- permPanel.add(permButtons);\r
- }\r
+ permButtons.setSpacing(8);\r
+ permButtons.addStyleName("pithos-TabPanelBottom");\r
+ permPanel.add(permButtons);\r
\r
final Label readForAllNote = new Label("When this option is enabled, the file will be readable" +\r
" by everyone. By checking this option, you are certifying that you have the right to " +\r
readForAll.setValue(file.isPublished());\r
readForAll.addClickHandler(new ClickHandler() {\r
@Override\r
- public void onClick(@SuppressWarnings("unused") ClickEvent event) {\r
+ public void onClick(ClickEvent event) {\r
readForAllNote.setVisible(readForAll.getValue());\r
}\r
});\r
if (published != null || newPermissions != null) {\r
PostRequest updateFile = new PostRequest(api, owner, path) {\r
@Override\r
- public void onSuccess(@SuppressWarnings("unused") Resource result) {\r
+ public void onSuccess(Resource result) {\r
app.updateFolder(file.getParent(), true, new Command() {\r
\r
@Override\r
}\r
\r
@Override\r
- protected void onUnauthorized(@SuppressWarnings("unused") Response response) {\r
+ protected void onUnauthorized(Response response) {\r
app.sessionExpired();\r
}\r
};\r