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
\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
* @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