mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
- fixed illegal character use in forum article names
- fixed navigation issue with editing rules - added links to details pages in forums area - you can no longer create spaces, forums or topics with illegal characters in the name git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2745 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -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.
|
@@ -96,6 +96,36 @@
|
||||
instruction-id="create_rule_finish_instruction" />
|
||||
</step>
|
||||
</wizard>
|
||||
|
||||
<!-- Definition of the edit rule wizard -->
|
||||
<wizard name="editRule" managed-bean="EditRuleWizard"
|
||||
title-id="edit_rule_title" description-id="edit_rule_desc"
|
||||
icon="/images/icons/new_rule_large.gif">
|
||||
<step name="conditions" title-id="conditions" description="">
|
||||
<page path="/jsp/rules/conditions.jsp"
|
||||
title-id="create_rule_step1_title"
|
||||
description=""
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
<step name="actions" title-id="actions" description="">
|
||||
<page path="/jsp/actions/actions.jsp"
|
||||
title-id="create_rule_step2_title"
|
||||
description=""
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
<step name="details" title-id="details" description="">
|
||||
<page path="/jsp/rules/details.jsp"
|
||||
title-id="create_rule_step3_title"
|
||||
description=""
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
<step name="summary" title-id="summary" description-id="summary_desc">
|
||||
<page path="/jsp/wizard/summary.jsp"
|
||||
title-id="summary"
|
||||
description-id="summary_desc"
|
||||
instruction-id="edit_rule_finish_instruction" />
|
||||
</step>
|
||||
</wizard>
|
||||
</wizards>
|
||||
</config>
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
}
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -383,14 +383,6 @@
|
||||
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/dialog/rules.jsp</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>createRule</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/details.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>editRule</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/details.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>deleteRule</from-outcome>
|
||||
<to-view-id>/jsp/dialog/delete-rule.jsp</to-view-id>
|
||||
@@ -666,19 +658,6 @@
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<!-- navigation rule for the new space dialog -->
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/dialog/new-space.jsp</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>cancel</from-outcome>
|
||||
<to-view-id>/jsp/browse/browse.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>finish</from-outcome>
|
||||
<to-view-id>/jsp/browse/browse.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<!-- navigation rule to cancel and finish from any wizard -->
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/wizard/*</from-view-id>
|
||||
@@ -692,35 +671,6 @@
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<!-- navigation rules for the advanced space wizard -->
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/wizard/new-space/*</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>create-from</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-space/create-from.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>from-scratch</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-space/from-scratch.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>from-existing</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-space/from-existing.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>from-template</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-space/from-template.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>details</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-space/details.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>summary</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-space/summary.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<!-- navigation rules for the add in-line content wizard -->
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/wizard/create-content/*</from-view-id>
|
||||
@@ -763,197 +713,6 @@
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<!-- navigation rules for the new rule wizard -->
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/wizard/new-rule/*</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>cancel</from-outcome>
|
||||
<to-view-id>/jsp/dialog/rules.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>finish</from-outcome>
|
||||
<to-view-id>/jsp/dialog/rules.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>details</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/details.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>condition</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/condition.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>in-category</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/condition-in-category.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>is-subtype</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/condition-is-subtype.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>compare-mime-type</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/condition-has-mimetype.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>has-aspect</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/condition-has-aspect.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>compare-property-value</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/condition-contains-text.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>action</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>simple-workflow</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-simple-workflow.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>link-category</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-link-category.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>add-features</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-add-features.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>remove-features</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-remove-features.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>copy</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-copy.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>move</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-move.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>transform</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-transform.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>transform-image</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-transform-image.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>mail</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-email.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>check-in</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-check-in.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>check-out</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-check-out.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>import</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-import.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>specialise-type</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action-specialise-type.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>summary</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/summary.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/wizard/new-rule/condition.jsp</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>no-condition</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/action.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/wizard/new-rule/action.jsp</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>no-condition</from-outcome>
|
||||
<to-view-id>/jsp/wizard/new-rule/condition.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
<!-- navigation rules for the New Action Wizard -->
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/wizard/create-action/*</from-view-id>
|
||||
<navigation-case>
|
||||
<from-outcome>cancel</from-outcome>
|
||||
<to-view-id>/jsp/dialog/document-details.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>finish</from-outcome>
|
||||
<to-view-id>/jsp/dialog/document-details.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>action</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>simple-workflow</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-simple-workflow.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>link-category</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-link-category.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>add-features</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-add-features.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>remove-features</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-remove-features.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>copy</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-copy.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>move</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-move.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>transform</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-transform.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>transform-image</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-transform-image.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>mail</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-email.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>check-in</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-check-in.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>check-out</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-check-out.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>import</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-import.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>specialise-type</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/action-specialise-type.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
<navigation-case>
|
||||
<from-outcome>summary</from-outcome>
|
||||
<to-view-id>/jsp/wizard/create-action/summary.jsp</to-view-id>
|
||||
</navigation-case>
|
||||
</navigation-rule>
|
||||
|
||||
|
||||
<!-- Navigation for Admin Node Browser -->
|
||||
<navigation-rule>
|
||||
<from-view-id>/jsp/admin/*</from-view-id>
|
||||
|
@@ -26,28 +26,14 @@
|
||||
|
||||
<r:page titleId="title_create_discussion">
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("create-discussion:subject").value.length == 0 ||
|
||||
document.getElementById("create-discussion:message").value.length == 0)
|
||||
{
|
||||
document.getElementById("create-discussion:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("create-discussion:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<f:view>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<h:form acceptCharset="UTF-8" id="create-discussion">
|
||||
<h:form acceptCharset="UTF-8" id="create-discussion" onsubmit="return validate();">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
@@ -161,7 +147,8 @@
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="ok-button" value="#{msg.create_topic}" action="#{CreateDiscussionDialog.finish}"
|
||||
styleClass="wizardButton" disabled="true" />
|
||||
styleClass="wizardButton" disabled="true"
|
||||
onclick="finishButtonPressed = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -193,7 +180,36 @@
|
||||
</h:form>
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
var finishButtonPressed = false;
|
||||
document.getElementById("create-discussion:subject").focus();
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("create-discussion:subject").value.length == 0 ||
|
||||
document.getElementById("create-discussion:message").value.length == 0)
|
||||
{
|
||||
document.getElementById("create-discussion:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("create-discussion:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("create-discussion:subject"),
|
||||
'<a:outputText value="#{msg.validation_invalid_character}" />',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</f:view>
|
||||
|
@@ -26,36 +26,14 @@
|
||||
|
||||
<r:page titleId="title_create_forum">
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
document.getElementById("create-forum:name").focus();
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("create-forum:name").value.length == 0 )
|
||||
{
|
||||
document.getElementById("create-forum:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("create-forum:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<f:view>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<h:form acceptCharset="UTF-8" id="create-forum">
|
||||
<h:form acceptCharset="UTF-8" id="create-forum" onsubmit="return validate();">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
@@ -168,7 +146,8 @@
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="ok-button" value="#{msg.create_forum}" action="#{CreateForumDialog.finish}"
|
||||
styleClass="wizardButton" disabled="true" />
|
||||
styleClass="wizardButton" disabled="true"
|
||||
onclick="finishButtonPressed = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -199,6 +178,39 @@
|
||||
|
||||
</h:form>
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
var finishButtonPressed = false;
|
||||
document.getElementById("create-forum:name").focus();
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("create-forum:name").value.length == 0 )
|
||||
{
|
||||
document.getElementById("create-forum:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("create-forum:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("create-forum:name"),
|
||||
'<a:outputText value="#{msg.validation_invalid_character}" />',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
</f:view>
|
||||
|
||||
</r:page>
|
@@ -26,36 +26,14 @@
|
||||
|
||||
<r:page titleId="title_create_forums">
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
document.getElementById("create-forums:name").focus();
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("create-forums:name").value.length == 0 )
|
||||
{
|
||||
document.getElementById("create-forums:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("create-forums:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<f:view>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<h:form acceptCharset="UTF-8" id="create-forums">
|
||||
<h:form acceptCharset="UTF-8" id="create-forums" onsubmit="return validate();">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
@@ -168,7 +146,8 @@
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="ok-button" value="#{msg.create_forums}" action="#{CreateForumsDialog.finish}"
|
||||
styleClass="wizardButton" disabled="true" />
|
||||
styleClass="wizardButton" disabled="true"
|
||||
onclick="finishButtonPressed = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -199,6 +178,38 @@
|
||||
|
||||
</h:form>
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
var finishButtonPressed = false;
|
||||
document.getElementById("create-forums:name").focus();
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("create-forums:name").value.length == 0 )
|
||||
{
|
||||
document.getElementById("create-forums:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("create-forums:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("create-forums:name"),
|
||||
'<a:outputText value="#{msg.validation_invalid_character}" />',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</f:view>
|
||||
|
||||
</r:page>
|
@@ -26,28 +26,14 @@
|
||||
|
||||
<r:page titleId="title_create_topic">
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("create-topic:subject").value.length == 0 ||
|
||||
document.getElementById("create-topic:message").value.length == 0)
|
||||
{
|
||||
document.getElementById("create-topic:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("create-topic:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<f:view>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<h:form acceptCharset="UTF-8" id="create-topic">
|
||||
<h:form acceptCharset="UTF-8" id="create-topic" onsubmit="return validate();">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
@@ -161,7 +147,8 @@
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="ok-button" value="#{msg.create_topic}" action="#{CreateTopicDialog.finish}"
|
||||
styleClass="wizardButton" disabled="true" />
|
||||
styleClass="wizardButton" disabled="true"
|
||||
onclick="finishButtonPressed = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -193,7 +180,36 @@
|
||||
</h:form>
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
var finishButtonPressed = false;
|
||||
document.getElementById("create-topic:subject").focus();
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("create-topic:subject").value.length == 0 ||
|
||||
document.getElementById("create-topic:message").value.length == 0)
|
||||
{
|
||||
document.getElementById("create-topic:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("create-topic:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("create-topic:subject"),
|
||||
'<a:outputText value="#{msg.validation_invalid_character}" />',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</f:view>
|
||||
|
@@ -26,26 +26,14 @@
|
||||
|
||||
<r:page titleId="title_edit_forum">
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("edit-forum:name").value.length == 0)
|
||||
{
|
||||
document.getElementById("edit-forum:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("edit-forum:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<f:view>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<h:form acceptCharset="UTF-8" id="edit-forum">
|
||||
<h:form acceptCharset="UTF-8" id="edit-forum" onsubmit="return validate();">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
@@ -153,7 +141,8 @@
|
||||
<table cellpadding="1" cellspacing="1" border="0">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{EditForumDialog.finish}" styleClass="wizardButton" />
|
||||
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{EditForumDialog.finish}"
|
||||
styleClass="wizardButton" onclick="finishButtonPressed = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -184,6 +173,37 @@
|
||||
|
||||
</h:form>
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
var finishButtonPressed = false;
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("edit-forum:name").value.length == 0)
|
||||
{
|
||||
document.getElementById("edit-forum:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("edit-forum:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("edit-forum:name"),
|
||||
'<a:outputText value="#{msg.validation_invalid_character}" />',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</f:view>
|
||||
|
||||
</r:page>
|
@@ -26,26 +26,14 @@
|
||||
|
||||
<r:page titleId="title_edit_forums">
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("edit-forums:name").value.length == 0)
|
||||
{
|
||||
document.getElementById("edit-forums:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("edit-forums:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<f:view>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<h:form acceptCharset="UTF-8" id="edit-forums">
|
||||
<h:form acceptCharset="UTF-8" id="edit-forums" onsubmit="return validate();">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
@@ -153,7 +141,8 @@
|
||||
<table cellpadding="1" cellspacing="1" border="0">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{EditForumsDialog.finish}" styleClass="wizardButton" />
|
||||
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{EditForumsDialog.finish}"
|
||||
styleClass="wizardButton" onclick="finishButtonPressed = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -184,6 +173,37 @@
|
||||
|
||||
</h:form>
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
var finishButtonPressed = false;
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("edit-forums:name").value.length == 0)
|
||||
{
|
||||
document.getElementById("edit-forums:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("edit-forums:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("edit-forums:name"),
|
||||
'<a:outputText value="#{msg.validation_invalid_character}" />',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</f:view>
|
||||
|
||||
</r:page>
|
@@ -26,26 +26,14 @@
|
||||
|
||||
<r:page titleId="title_edit_topic">
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("edit-topic:name").value.length == 0)
|
||||
{
|
||||
document.getElementById("edit-topic:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("edit-topic:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<f:view>
|
||||
|
||||
<%-- load a bundle of properties with I18N strings --%>
|
||||
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
|
||||
|
||||
<h:form acceptCharset="UTF-8" id="edit-topic">
|
||||
<h:form acceptCharset="UTF-8" id="edit-topic" onsubmit="return validate();">
|
||||
|
||||
<%-- Main outer table --%>
|
||||
<table cellspacing="0" cellpadding="2">
|
||||
@@ -147,7 +135,8 @@
|
||||
<table cellpadding="1" cellspacing="1" border="0">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{EditTopicDialog.finish}" styleClass="wizardButton" />
|
||||
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{EditTopicDialog.finish}"
|
||||
styleClass="wizardButton" onclick="finishButtonPressed = true" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -178,6 +167,37 @@
|
||||
|
||||
</h:form>
|
||||
|
||||
<script language="JavaScript1.2">
|
||||
var finishButtonPressed = false;
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("edit-topic:name").value.length == 0)
|
||||
{
|
||||
document.getElementById("edit-topic:ok-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("edit-topic:ok-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("edit-topic:name"),
|
||||
'<a:outputText value="#{msg.validation_invalid_character}" />',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
</f:view>
|
||||
|
||||
</r:page>
|
@@ -104,6 +104,26 @@
|
||||
<table cellspacing="0" cellpadding="3" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
<a:panel label="#{msg.links}" id="links-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
|
||||
expanded='#{SpaceDetailsBean.panels["links-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
||||
</td>
|
||||
<td>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{SpaceDetailsBean.bookmarkUrl}" id="out1" />' onclick="return false;"><a:outputText value="#{msg.details_page_bookmark}" id="out2" /></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<%-- wrapper comment used by the panel to add additional component facets --%>
|
||||
<h:column id="props-panel-facets">
|
||||
<f:facet name="title">
|
||||
|
@@ -104,6 +104,26 @@
|
||||
<table cellspacing="0" cellpadding="3" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
<a:panel label="#{msg.links}" id="links-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
|
||||
expanded='#{SpaceDetailsBean.panels["links-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
||||
</td>
|
||||
<td>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{SpaceDetailsBean.bookmarkUrl}" id="out1" />' onclick="return false;"><a:outputText value="#{msg.details_page_bookmark}" id="out2" /></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<%-- wrapper comment used by the panel to add additional component facets --%>
|
||||
<h:column id="props-panel-facets">
|
||||
<f:facet name="title">
|
||||
|
@@ -105,6 +105,26 @@
|
||||
<table cellspacing="0" cellpadding="3" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
<a:panel label="#{msg.links}" id="links-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
|
||||
expanded='#{SpaceDetailsBean.panels["links-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
||||
</td>
|
||||
<td>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{SpaceDetailsBean.bookmarkUrl}" id="out1" />' onclick="return false;"><a:outputText value="#{msg.details_page_bookmark}" id="out2" /></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<%-- wrapper comment used by the panel to add additional component facets --%>
|
||||
<h:column id="props-panel-facets">
|
||||
<f:facet name="title">
|
||||
|
@@ -20,13 +20,18 @@
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
<f:verbatim>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
document.getElementById("dialog:dialog-body:name").focus();
|
||||
document.getElementById("dialog").onsubmit = validate;
|
||||
document.getElementById("dialog:finish-button").onclick = function() {finishButtonPressed = true; clear_dialog();}
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
@@ -42,7 +47,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:name"),
|
||||
'</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" /><f:verbatim>',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</f:verbatim>
|
||||
|
||||
<%-- Create Space Dialog Fragment --%>
|
||||
|
||||
|
@@ -22,15 +22,20 @@
|
||||
|
||||
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
|
||||
<%@ page isELIgnored="false" %>
|
||||
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||
|
||||
<f:verbatim>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
document.getElementById("wizard:wizard-body:name").focus();
|
||||
document.getElementById("wizard").onsubmit = validate;
|
||||
document.getElementById("wizard:next-button").onclick = function() {finishButtonPressed = true; clear_wizard();}
|
||||
document.getElementById("wizard:finish-button").onclick = function() {finishButtonPressed = true; clear_wizard();}
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
@@ -64,7 +69,25 @@
|
||||
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("wizard:wizard-body:name"),
|
||||
'</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" /><f:verbatim>',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</f:verbatim>
|
||||
|
||||
<a:errors message="#{msg.error_wizard}" styleClass="errorMessage" />
|
||||
|
||||
<f:verbatim>
|
||||
<table cellpadding="3" cellspacing="2" border="0" width="100%">
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user