Revision 4ded5310 src/gr/grnet/pithos/web/client/PermissionsList.java
b/src/gr/grnet/pithos/web/client/PermissionsList.java | ||
---|---|---|
50 | 50 |
import com.google.gwt.user.client.ui.FlexTable; |
51 | 51 |
import com.google.gwt.user.client.ui.HasHorizontalAlignment; |
52 | 52 |
import com.google.gwt.user.client.ui.PushButton; |
53 |
import com.google.gwt.user.client.ui.RadioButton; |
|
53 | 54 |
import com.google.gwt.user.client.ui.VerticalPanel; |
54 | 55 |
|
55 | 56 |
|
... | ... | |
77 | 78 |
owner = theOwner; |
78 | 79 |
permissions = new HashMap<String, Boolean[]>(thePermissions); |
79 | 80 |
permTable.setText(0, 0, "Users/Groups"); |
80 |
permTable.setText(0, 1, "Read"); |
|
81 |
permTable.setText(0, 2, "Write"); |
|
81 |
permTable.setText(0, 1, "Read Only");
|
|
82 |
permTable.setText(0, 2, "Read/Write");
|
|
82 | 83 |
permTable.setText(0, 3, ""); |
83 | 84 |
permTable.getFlexCellFormatter().setStyleName(0, 0, "props-toplabels"); |
84 | 85 |
permTable.getFlexCellFormatter().setStyleName(0, 1, "props-toplabels"); |
... | ... | |
130 | 131 |
Boolean readP = userPerms[0]; |
131 | 132 |
Boolean writeP = userPerms[1]; |
132 | 133 |
|
133 |
CheckBox read = new CheckBox();
|
|
134 |
RadioButton read = new RadioButton("permissions" + i);
|
|
134 | 135 |
read.setValue(readP != null ? readP : false); |
135 | 136 |
permTable.setWidget(i, 1, read); |
136 | 137 |
permTable.getFlexCellFormatter().setHorizontalAlignment(i, 1, HasHorizontalAlignment.ALIGN_CENTER); |
137 | 138 |
|
138 |
CheckBox write = new CheckBox();
|
|
139 |
RadioButton write = new RadioButton("permissions" + i);
|
|
139 | 140 |
write.setValue(writeP != null ? writeP : false); |
140 | 141 |
permTable.setWidget(i, 2, write); |
141 | 142 |
permTable.getFlexCellFormatter().setHorizontalAlignment(i, 2, HasHorizontalAlignment.ALIGN_CENTER); |
... | ... | |
146 | 147 |
public void onValueChange(ValueChangeEvent<Boolean> booleanValueChangeEvent) { |
147 | 148 |
Boolean[] ps = permissions.get(user); |
148 | 149 |
ps[0] = booleanValueChangeEvent.getValue(); |
150 |
ps[1] = !booleanValueChangeEvent.getValue(); |
|
149 | 151 |
hasChanges = true; |
150 | 152 |
if (changePermissionsCallback != null) |
151 | 153 |
changePermissionsCallback.execute(); |
... | ... | |
155 | 157 |
@Override |
156 | 158 |
public void onValueChange(ValueChangeEvent<Boolean> booleanValueChangeEvent) { |
157 | 159 |
Boolean[] ps = permissions.get(user); |
160 |
ps[0] = !booleanValueChangeEvent.getValue(); |
|
158 | 161 |
ps[1] = booleanValueChangeEvent.getValue(); |
159 | 162 |
hasChanges = true; |
160 | 163 |
if (changePermissionsCallback != null) |
Also available in: Unified diff