early commit - first attemp, regarding giving a uri and fetching the proper directory
[pithos] / src / gr / ebs / gss / client / PermissionsAddDialog.java
index 53d5e33..4cef442 100644 (file)
@@ -114,6 +114,10 @@ public class PermissionsAddDialog extends DialogBox {
                                                        keyCode == KeyCodes.KEY_LEFT ||
                                                        keyCode == KeyCodes.KEY_RIGHT)
                                                return;
+                                       if (keyCode==KeyCodes.KEY_ESCAPE) {
+                                               suggestBox.hideSuggestionList();
+                                               return;
+                                       }
                                        String text = suggestBox.getText().trim();
                                        // Avoid useless queries for keystrokes that do not modify
                                        // the text.
@@ -159,9 +163,9 @@ public class PermissionsAddDialog extends DialogBox {
                buttons.add(cancel);
                buttons.setCellHorizontalAlignment(cancel, HasHorizontalAlignment.ALIGN_CENTER);
                buttons.setSpacing(8);
-               buttons.addStyleName("gwt-TabPanelBottom");
+               buttons.addStyleName("gss-TabPanelBottom");
                panel.add(buttons);
-               panel.addStyleName("gwt-TabPanelBottom");
+               panel.addStyleName("gss-TabPanelBottom");
        }
 
        private void addPermission() {
@@ -236,18 +240,18 @@ public class PermissionsAddDialog extends DialogBox {
                GWT.log("Searching for " + query, null);
 
                GetCommand<UserSearchResource> eg = new GetCommand<UserSearchResource>(UserSearchResource.class,
-                                       app.getApiPath() + "users/" + URL.encodeComponent(query), false) {
+                                       app.getApiPath() + "users/" + URL.encodeComponent(query), false, null) {
 
                        @Override
                        public void onComplete() {
-                               DisplayHelper.hideSuggestions(suggestBox);
+                               suggestBox.hideSuggestionList();
                                oracle.clear();
                                UserSearchResource s = getResult();
                                for (UserResource user : s.getUsers()) {
                                        GWT.log("Found " + user.getUsername(), null);
                                        oracle.add(user.getUsername());
                                }
-                               DisplayHelper.showSuggestions(suggestBox, selectedUser);
+                               suggestBox.showSuggestionList();
                        }
 
                        @Override