Revision 5ec7b091 src/gr/grnet/pithos/web/client/FilePermissionsDialog.java
b/src/gr/grnet/pithos/web/client/FilePermissionsDialog.java | ||
---|---|---|
173 | 173 |
Button add = new Button("Add Group", new ClickHandler() { |
174 | 174 |
@Override |
175 | 175 |
public void onClick(ClickEvent event) { |
176 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false); |
|
177 |
dlg.center(); |
|
178 |
permList.updatePermissionTable(); |
|
176 |
if (app.getAccount().getGroups().isEmpty()) { |
|
177 |
new GroupCreateDialog(app, new Command() { |
|
178 |
|
|
179 |
@Override |
|
180 |
public void execute() { |
|
181 |
if (app.getAccount().getGroups().isEmpty()) |
|
182 |
return; |
|
183 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false); |
|
184 |
dlg.center(); |
|
185 |
permList.updatePermissionTable(); |
|
186 |
} |
|
187 |
}).center(); |
|
188 |
} |
|
189 |
else { |
|
190 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false); |
|
191 |
dlg.center(); |
|
192 |
permList.updatePermissionTable(); |
|
193 |
} |
|
179 | 194 |
} |
180 | 195 |
}); |
181 | 196 |
add.addStyleName("button"); |
Also available in: Unified diff