Revision 4ded5310
b/src/gr/grnet/pithos/web/client/PermissionsAddDialog.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.ListBox; |
53 |
import com.google.gwt.user.client.ui.RadioButton; |
|
53 | 54 |
import com.google.gwt.user.client.ui.TextBox; |
54 | 55 |
import com.google.gwt.user.client.ui.VerticalPanel; |
55 | 56 |
|
... | ... | |
59 | 60 |
|
60 | 61 |
private ListBox groupBox = new ListBox(); |
61 | 62 |
|
62 |
private CheckBox read = new CheckBox();
|
|
63 |
private RadioButton read = new RadioButton("permissions");
|
|
63 | 64 |
|
64 |
private CheckBox write = new CheckBox();
|
|
65 |
private RadioButton write = new RadioButton("permissions");
|
|
65 | 66 |
|
66 | 67 |
private PermissionsList permList; |
67 | 68 |
|
... | ... | |
94 | 95 |
|
95 | 96 |
final FlexTable permTable = new FlexTable(); |
96 | 97 |
permTable.setText(0, 0, "Users/Groups"); |
97 |
permTable.setText(0, 1, "Read"); |
|
98 |
permTable.setText(0, 2, "Write"); |
|
98 |
permTable.setText(0, 1, "Read Only");
|
|
99 |
permTable.setText(0, 2, "Read/Write");
|
|
99 | 100 |
permTable.getFlexCellFormatter().setStyleName(0, 0, "props-toplabels"); |
100 | 101 |
permTable.getFlexCellFormatter().setStyleName(0, 1, "props-toplabels"); |
101 | 102 |
permTable.getFlexCellFormatter().setStyleName(0, 2, "props-toplabels"); |
... | ... | |
108 | 109 |
groupBox.addItem(group.getName(), group.getName()); |
109 | 110 |
permTable.setWidget(1, 0, groupBox); |
110 | 111 |
} |
111 |
|
|
112 |
|
|
113 |
read.setValue(true); |
|
112 | 114 |
permTable.setWidget(1, 1, read); |
113 | 115 |
permTable.setWidget(1, 2, write); |
114 | 116 |
|
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