diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 3d389c0c9f..10881833d2 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -989,3 +989,4 @@ validation_string_length={0} must be between {1} and {2} characters in length. validation_regex={0} is invalid. validation_regex_not_match={0} is invalid. validation_numeric_range={0} must be between {1} and {2}. +validation_invalid_character=is an invalid character. \ No newline at end of file diff --git a/config/alfresco/web-client-config-wizards.xml b/config/alfresco/web-client-config-wizards.xml index 9ed29af5da..679300baba 100644 --- a/config/alfresco/web-client-config-wizards.xml +++ b/config/alfresco/web-client-config-wizards.xml @@ -96,6 +96,36 @@ instruction-id="create_rule_finish_instruction" /> + + + + + + + + + + + + + + + + diff --git a/source/java/org/alfresco/web/bean/ForumsBean.java b/source/java/org/alfresco/web/bean/ForumsBean.java index fcd420c5eb..8f22646c80 100644 --- a/source/java/org/alfresco/web/bean/ForumsBean.java +++ b/source/java/org/alfresco/web/bean/ForumsBean.java @@ -930,7 +930,7 @@ public class ForumsBean implements IContextListener StringBuilder name = new StringBuilder("posted-"); // add a timestamp - SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy-hh:mm:ss"); + SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy-HH-mm-ss"); name.append(dateFormat.format(new Date())); // add the HTML file extension diff --git a/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java b/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java index d91cb04a10..4b9cdadcf2 100644 --- a/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java +++ b/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java @@ -622,7 +622,7 @@ public abstract class BaseContentWizard extends AbstractWizardBean /** * Performs any processing sub classes may wish to do before commit is called */ - protected void performCustomProcessing() + protected void performCustomProcessing() throws Exception { // used by subclasses if necessary } diff --git a/source/java/org/alfresco/web/bean/wizard/NewPostWizard.java b/source/java/org/alfresco/web/bean/wizard/NewPostWizard.java index 17d1a5db03..8733d49aae 100644 --- a/source/java/org/alfresco/web/bean/wizard/NewPostWizard.java +++ b/source/java/org/alfresco/web/bean/wizard/NewPostWizard.java @@ -24,6 +24,7 @@ import org.alfresco.model.ContentModel; import org.alfresco.model.ForumModel; import org.alfresco.service.cmr.repository.ContentReader; import org.alfresco.service.cmr.repository.ContentWriter; +import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.web.app.AlfrescoNavigationHandler; import org.alfresco.web.bean.ForumsBean; import org.alfresco.web.bean.repository.Node; @@ -127,14 +128,25 @@ public class NewPostWizard extends CreateContentWizard * @see org.alfresco.web.bean.wizard.BaseContentWizard#performCustomProcessing() */ @Override - protected void performCustomProcessing() + protected void performCustomProcessing() throws Exception { if (this.editMode) { // update the content - Node currentDocument = this.browseBean.getDocument(); + NodeRef postNode = this.browseBean.getDocument().getNodeRef(); - ContentWriter writer = this.contentService.getWriter(currentDocument.getNodeRef(), + // check that the name of this post does not contain the : + // character (used in previous versions), if it does rename + // the post. + String name = (String)this.nodeService.getProperty( + postNode, ContentModel.PROP_NAME); + if (name.indexOf(":") != -1) + { + String newName = name.replace(':', '-'); + this.fileFolderService.rename(postNode, newName); + } + + ContentWriter writer = this.contentService.getWriter(postNode, ContentModel.PROP_CONTENT, true); if (writer != null) { diff --git a/source/web/WEB-INF/faces-config-navigation.xml b/source/web/WEB-INF/faces-config-navigation.xml index 4ba20bbf82..9048446658 100644 --- a/source/web/WEB-INF/faces-config-navigation.xml +++ b/source/web/WEB-INF/faces-config-navigation.xml @@ -383,14 +383,6 @@ /jsp/dialog/rules.jsp - - createRule - /jsp/wizard/new-rule/details.jsp - - - editRule - /jsp/wizard/new-rule/details.jsp - deleteRule /jsp/dialog/delete-rule.jsp @@ -666,19 +658,6 @@ - - - /jsp/dialog/new-space.jsp - - cancel - /jsp/browse/browse.jsp - - - finish - /jsp/browse/browse.jsp - - - /jsp/wizard/* @@ -692,35 +671,6 @@ - - - /jsp/wizard/new-space/* - - create-from - /jsp/wizard/new-space/create-from.jsp - - - from-scratch - /jsp/wizard/new-space/from-scratch.jsp - - - from-existing - /jsp/wizard/new-space/from-existing.jsp - - - from-template - /jsp/wizard/new-space/from-template.jsp - - - details - /jsp/wizard/new-space/details.jsp - - - summary - /jsp/wizard/new-space/summary.jsp - - - /jsp/wizard/create-content/* @@ -762,197 +712,6 @@ /jsp/wizard/add-content/summary.jsp - - - - /jsp/wizard/new-rule/* - - cancel - /jsp/dialog/rules.jsp - - - finish - /jsp/dialog/rules.jsp - - - details - /jsp/wizard/new-rule/details.jsp - - - condition - /jsp/wizard/new-rule/condition.jsp - - - in-category - /jsp/wizard/new-rule/condition-in-category.jsp - - - is-subtype - /jsp/wizard/new-rule/condition-is-subtype.jsp - - - compare-mime-type - /jsp/wizard/new-rule/condition-has-mimetype.jsp - - - has-aspect - /jsp/wizard/new-rule/condition-has-aspect.jsp - - - compare-property-value - /jsp/wizard/new-rule/condition-contains-text.jsp - - - action - /jsp/wizard/new-rule/action.jsp - - - simple-workflow - /jsp/wizard/new-rule/action-simple-workflow.jsp - - - link-category - /jsp/wizard/new-rule/action-link-category.jsp - - - add-features - /jsp/wizard/new-rule/action-add-features.jsp - - - remove-features - /jsp/wizard/new-rule/action-remove-features.jsp - - - copy - /jsp/wizard/new-rule/action-copy.jsp - - - move - /jsp/wizard/new-rule/action-move.jsp - - - transform - /jsp/wizard/new-rule/action-transform.jsp - - - transform-image - /jsp/wizard/new-rule/action-transform-image.jsp - - - mail - /jsp/wizard/new-rule/action-email.jsp - - - check-in - /jsp/wizard/new-rule/action-check-in.jsp - - - check-out - /jsp/wizard/new-rule/action-check-out.jsp - - - import - /jsp/wizard/new-rule/action-import.jsp - - - specialise-type - /jsp/wizard/new-rule/action-specialise-type.jsp - - - summary - /jsp/wizard/new-rule/summary.jsp - - - - - /jsp/wizard/new-rule/condition.jsp - - no-condition - /jsp/wizard/new-rule/action.jsp - - - - - /jsp/wizard/new-rule/action.jsp - - no-condition - /jsp/wizard/new-rule/condition.jsp - - - - - - /jsp/wizard/create-action/* - - cancel - /jsp/dialog/document-details.jsp - - - finish - /jsp/dialog/document-details.jsp - - - action - /jsp/wizard/create-action/action.jsp - - - simple-workflow - /jsp/wizard/create-action/action-simple-workflow.jsp - - - link-category - /jsp/wizard/create-action/action-link-category.jsp - - - add-features - /jsp/wizard/create-action/action-add-features.jsp - - - remove-features - /jsp/wizard/create-action/action-remove-features.jsp - - - copy - /jsp/wizard/create-action/action-copy.jsp - - - move - /jsp/wizard/create-action/action-move.jsp - - - transform - /jsp/wizard/create-action/action-transform.jsp - - - transform-image - /jsp/wizard/create-action/action-transform-image.jsp - - - mail - /jsp/wizard/create-action/action-email.jsp - - - check-in - /jsp/wizard/create-action/action-check-in.jsp - - - check-out - /jsp/wizard/create-action/action-check-out.jsp - - - import - /jsp/wizard/create-action/action-import.jsp - - - specialise-type - /jsp/wizard/create-action/action-specialise-type.jsp - - - summary - /jsp/wizard/create-action/summary.jsp - - - diff --git a/source/web/jsp/forums/create-discussion.jsp b/source/web/jsp/forums/create-discussion.jsp index b629d1f206..ae21c97c35 100644 --- a/source/web/jsp/forums/create-discussion.jsp +++ b/source/web/jsp/forums/create-discussion.jsp @@ -26,28 +26,14 @@ - + <%-- load a bundle of properties with I18N strings --%> - + <%-- Main outer table --%> @@ -161,7 +147,8 @@ @@ -193,7 +180,36 @@ diff --git a/source/web/jsp/forums/create-forum.jsp b/source/web/jsp/forums/create-forum.jsp index 65d5006e82..f5b38efc3e 100644 --- a/source/web/jsp/forums/create-forum.jsp +++ b/source/web/jsp/forums/create-forum.jsp @@ -26,36 +26,14 @@ - + <%-- load a bundle of properties with I18N strings --%> - + <%-- Main outer table --%>
+ styleClass="wizardButton" disabled="true" + onclick="finishButtonPressed = true" />
@@ -168,7 +146,8 @@ @@ -199,6 +178,39 @@ + + \ No newline at end of file diff --git a/source/web/jsp/forums/create-forums.jsp b/source/web/jsp/forums/create-forums.jsp index ecc0060740..499ba7cc16 100644 --- a/source/web/jsp/forums/create-forums.jsp +++ b/source/web/jsp/forums/create-forums.jsp @@ -26,36 +26,14 @@ - + <%-- load a bundle of properties with I18N strings --%> - + <%-- Main outer table --%>
+ styleClass="wizardButton" disabled="true" + onclick="finishButtonPressed = true" />
@@ -168,7 +146,8 @@ @@ -199,6 +178,38 @@ + + \ No newline at end of file diff --git a/source/web/jsp/forums/create-topic.jsp b/source/web/jsp/forums/create-topic.jsp index ff275c25c2..7f95b3b253 100644 --- a/source/web/jsp/forums/create-topic.jsp +++ b/source/web/jsp/forums/create-topic.jsp @@ -26,28 +26,14 @@ - + <%-- load a bundle of properties with I18N strings --%> - + <%-- Main outer table --%>
+ styleClass="wizardButton" disabled="true" + onclick="finishButtonPressed = true" />
@@ -161,7 +147,8 @@ @@ -193,7 +180,36 @@ diff --git a/source/web/jsp/forums/edit-forum.jsp b/source/web/jsp/forums/edit-forum.jsp index 52c52db394..759fa9d5e4 100644 --- a/source/web/jsp/forums/edit-forum.jsp +++ b/source/web/jsp/forums/edit-forum.jsp @@ -26,26 +26,14 @@ - + <%-- load a bundle of properties with I18N strings --%> - + <%-- Main outer table --%>
+ styleClass="wizardButton" disabled="true" + onclick="finishButtonPressed = true" />
@@ -153,7 +141,8 @@
@@ -184,6 +173,37 @@ + + \ No newline at end of file diff --git a/source/web/jsp/forums/edit-forums.jsp b/source/web/jsp/forums/edit-forums.jsp index 7ef095630a..92325a2157 100644 --- a/source/web/jsp/forums/edit-forums.jsp +++ b/source/web/jsp/forums/edit-forums.jsp @@ -26,26 +26,14 @@ - + <%-- load a bundle of properties with I18N strings --%> - + <%-- Main outer table --%>
- +
@@ -153,7 +141,8 @@
@@ -184,6 +173,37 @@ + + \ No newline at end of file diff --git a/source/web/jsp/forums/edit-topic.jsp b/source/web/jsp/forums/edit-topic.jsp index 78d27509e2..66a4d3d966 100644 --- a/source/web/jsp/forums/edit-topic.jsp +++ b/source/web/jsp/forums/edit-topic.jsp @@ -26,26 +26,14 @@ - + <%-- load a bundle of properties with I18N strings --%> - + <%-- Main outer table --%>
- +
@@ -147,7 +135,8 @@
@@ -178,6 +167,37 @@ + + \ No newline at end of file diff --git a/source/web/jsp/forums/forum-details.jsp b/source/web/jsp/forums/forum-details.jsp index 4e24b500c2..df495f904a 100644 --- a/source/web/jsp/forums/forum-details.jsp +++ b/source/web/jsp/forums/forum-details.jsp @@ -104,6 +104,26 @@
- +
+ + + + + + + +
+ + + + + +
+
+ +
+ <%-- wrapper comment used by the panel to add additional component facets --%> diff --git a/source/web/jsp/forums/forums-details.jsp b/source/web/jsp/forums/forums-details.jsp index f2a64f3325..ab10ae0a8a 100644 --- a/source/web/jsp/forums/forums-details.jsp +++ b/source/web/jsp/forums/forums-details.jsp @@ -104,6 +104,26 @@
+ + + + + + + +
+ + + + + +
+
+ +
+ <%-- wrapper comment used by the panel to add additional component facets --%> diff --git a/source/web/jsp/forums/topic-details.jsp b/source/web/jsp/forums/topic-details.jsp index 58de0f95be..969b7c9863 100644 --- a/source/web/jsp/forums/topic-details.jsp +++ b/source/web/jsp/forums/topic-details.jsp @@ -105,6 +105,26 @@
+ + + + + + + +
+ + + + + +
+
+ +
+ <%-- wrapper comment used by the panel to add additional component facets --%> diff --git a/source/web/jsp/spaces/create-space-dialog.jsp b/source/web/jsp/spaces/create-space-dialog.jsp index a4229d133c..727cfc71c0 100644 --- a/source/web/jsp/spaces/create-space-dialog.jsp +++ b/source/web/jsp/spaces/create-space-dialog.jsp @@ -20,13 +20,18 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - + + <%-- Create Space Dialog Fragment --%> diff --git a/source/web/jsp/spaces/create-space-wizard/details.jsp b/source/web/jsp/spaces/create-space-wizard/details.jsp index 73b5b2fd86..32cc2740fb 100644 --- a/source/web/jsp/spaces/create-space-wizard/details.jsp +++ b/source/web/jsp/spaces/create-space-wizard/details.jsp @@ -22,15 +22,20 @@ <%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %> <%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> + + + + + + diff --git a/source/web/scripts/validation.js b/source/web/scripts/validation.js index e08aee6837..4d3ba46b73 100644 --- a/source/web/scripts/validation.js +++ b/source/web/scripts/validation.js @@ -102,3 +102,23 @@ function validateRegex(control, expression, requiresMatch, matchMessage, noMatch return result; } +/** + * Ensures the value of the 'control' does not contain any illegal characters. + * + * @return true if the file name is valid + */ +function validateName(control, message, showMessage) +{ + var result = true; + var pattern = /[\"\*\\\>\<\?\/\:\|\%\&\+\;\xA3\xAC]+/; + + var idx = control.value.search(pattern); + if (idx != -1) + { + informUser(control, control.value.charAt(idx) + " " + message, showMessage); + result = false; + } + + return result; +} +