From 21d28d7ffb055050c67031711ed81825d250b7c0 Mon Sep 17 00:00:00 2001 From: Francesco Mangiacrapa Date: Wed, 27 Nov 2013 13:34:43 +0000 Subject: [PATCH] fixed support Ticket #736 git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace-tree-widget@86272 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../user/workspace/client/view/sharing/DialogShareFolder.java | 4 ++-- .../client/view/windows/DialogAddFolderAndSmart.java | 4 ++-- .../user/workspace/client/view/windows/DialogText.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/DialogShareFolder.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/DialogShareFolder.java index 15d31bd..fb189fd 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/DialogShareFolder.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/sharing/DialogShareFolder.java @@ -218,8 +218,8 @@ public class DialogShareFolder extends Dialog { txtName.setAllowBlank(false); txtName.setAutoValidate(true); txtName.setFieldLabel("Folder Name"); - txtName.getMessages().setRegexText(ConstantsExplorer.REGEX_FOLDER_NAME+": .<>\\|?/*%$"); - txtName.setRegex("^[^.<>\\|?/*%$]*$"); + txtName.getMessages().setRegexText(ConstantsExplorer.REGEX_FOLDER_NAME+": .<>\\|?/*%$ or contains / or \\"); + txtName.setRegex("^[^.<>\\|?/*%$]+[^\\/]*$"); textAreaDescription.setFieldLabel(ConstantsExplorer.DIALOG_DESCRIPTION); textAreaDescription.setHeight(heightTextArea); diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogAddFolderAndSmart.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogAddFolderAndSmart.java index e46cc34..7ae7af9 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogAddFolderAndSmart.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogAddFolderAndSmart.java @@ -63,8 +63,8 @@ public class DialogAddFolderAndSmart extends Dialog { // txtName.setRegex("^[a-zA-Z0-9]+[^.<>\\|?/*%$]*$"); txtName.setAutoValidate(true); - txtName.getMessages().setRegexText(ConstantsExplorer.REGEX_FOLDER_NAME+": .<>\\|?/*%$"); - txtName.setRegex("^[^.<>\\|?/*%$]*$"); + txtName.getMessages().setRegexText(ConstantsExplorer.REGEX_FOLDER_NAME+": .<>\\|?/*%$ or contains / or \\"); + txtName.setRegex("^[^.<>\\|?/*%$]+[^\\/]*$"); // txt.setMinLength(2); txtName.setFieldLabel(ConstantsExplorer.DIALOG_NAME); diff --git a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogText.java b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogText.java index b7a2f70..f9bde4b 100644 --- a/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogText.java +++ b/src/main/java/org/gcube/portlets/user/workspace/client/view/windows/DialogText.java @@ -43,8 +43,8 @@ public class DialogText extends Dialog { txt.setValue(msgTxt); // txt.setRegex("^[a-zA-Z0-9]+[ a-zA-Z0-9_()-]*"); // txt.setRegex("^[a-zA-Z0-9]+[^.<>\\|?/*%$]*$"); - txt.getMessages().setRegexText(ConstantsExplorer.REGEX_FOLDER_NAME+": .<>\\|?/*%$"); - txt.setRegex("^[^.<>\\|?/*%$]*$"); + txt.getMessages().setRegexText(ConstantsExplorer.REGEX_FOLDER_NAME+": .<>\\|?/*%$ or contains / or \\"); + txt.setRegex("^[^.<>\\|?/*%$]+[^\\/]*$"); txt.setAutoValidate(true); txt.setAllowBlank(false);