Display the full name in the ACL. The full name is displayed once right click and...
[pithos] / src / gr / ebs / gss / client / FolderPropertiesDialog.java
index 479375f..29c6fda 100644 (file)
@@ -206,9 +206,9 @@ public class FolderPropertiesDialog extends DialogBox {
                permButtons.setSpacing(8);\r
                permButtons.addStyleName("gss-TabPanelBottom");\r
 \r
-               final Label readForAllNote = new Label("When this option is enabled, the file will be readable" +\r
+               final Label readForAllNote = new Label("When this option is enabled, the folder will be readable" +\r
                                        " by everyone. By checking this option, you are certifying that you have the right to " +\r
-                                       "distribute this file and that it does not violate the Terms of Use.", true);\r
+                                       "distribute this folder's contents and that it does not violate the Terms of Use.", true);\r
                readForAllNote.setVisible(false);\r
                readForAllNote.setStylePrimaryName("gss-readForAllNote");\r
 \r
@@ -247,7 +247,7 @@ public class FolderPropertiesDialog extends DialogBox {
 \r
                });\r
                path.setText(folder.getUri());\r
-               path.setTitle("Use this link for sharing the file via e-mail, IM, etc. (crtl-C/cmd-C to copy to system clipboard)");\r
+               path.setTitle("Use this link for sharing the folder via e-mail, IM, etc. (crtl-C/cmd-C to copy to system clipboard)");\r
                path.setWidth("100%");\r
                path.setReadOnly(true);\r
                pathPanel.setWidth("100%");\r
@@ -314,8 +314,13 @@ public class FolderPropertiesDialog extends DialogBox {
         * @param _folderName the name of the folder to create\r
         */\r
        private void createFolder() {\r
+               String name = folderName.getText();\r
+               if (!GSS.isValidResourceName(name)) {\r
+                       GSS.get().displayError("The folder name '" + name + "' is invalid");\r
+                       return;\r
+               }\r
                PostCommand ep = new PostCommand(folder.getUri() + "?new=" +\r
-                               URL.encodeComponent(folderName.getText()), "", 201) {\r
+                               URL.encodeComponent(name), "", 201) {\r
 \r
                        @Override\r
                        public void onComplete() {\r