Revision 5ec7b091 src/gr/grnet/pithos/web/client/FolderPermissionsDialog.java
b/src/gr/grnet/pithos/web/client/FolderPermissionsDialog.java | ||
---|---|---|
34 | 34 |
*/ |
35 | 35 |
package gr.grnet.pithos.web.client; |
36 | 36 |
|
37 |
import gr.grnet.pithos.web.client.commands.CreateGroupCommand; |
|
37 | 38 |
import gr.grnet.pithos.web.client.foldertree.File; |
38 | 39 |
import gr.grnet.pithos.web.client.foldertree.Folder; |
39 | 40 |
import gr.grnet.pithos.web.client.foldertree.Resource; |
... | ... | |
137 | 138 |
Button add = new Button("Add Group", new ClickHandler() { |
138 | 139 |
@Override |
139 | 140 |
public void onClick(ClickEvent event) { |
140 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false); |
|
141 |
dlg.center(); |
|
141 |
if (app.getAccount().getGroups().isEmpty()) { |
|
142 |
new GroupCreateDialog(app, new Command() { |
|
143 |
|
|
144 |
@Override |
|
145 |
public void execute() { |
|
146 |
if (app.getAccount().getGroups().isEmpty()) |
|
147 |
return; |
|
148 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false); |
|
149 |
dlg.center(); |
|
150 |
} |
|
151 |
}).center(); |
|
152 |
} |
|
153 |
else { |
|
154 |
PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false); |
|
155 |
dlg.center(); |
|
156 |
} |
|
142 | 157 |
} |
143 | 158 |
}); |
144 | 159 |
add.addStyleName("button"); |
Also available in: Unified diff