mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
13371: Fix for ETHREEOH-1371, ETHREEOH-1373, ETHREEOH-1374. Rule comparator now correctly deals with MLTEXT datatype fields such as name/title/description. 13372: Fix for ETHREEOH-1291. Fixes the general issue that "decodeURI()" should not be used to decode javascript encoded strings -unless- you specifically want to ignore certain characters, "unescape()" should be used instead. 13373: Fix for ETHREEOH-1284. Clean up of generated javascript for UIDataPager component - also moved to include file for performance and ease of modification. 13384: Fix for ETHREEOH-1459. Sweep through and clean up of the Edit Online/Offline editing and Checkin/Checkout process as per latest wireframes. A number of minor fixes to JSF action evaluators and related JSPs also. Icons updated as per wires. 13396: Fix for ETHREEOH-1424. Web-framework script connector now generates an Accept-Language header based on current user locale by default for remote calls. 13404: Missing paging controls added to task and workflow dialogs (part of ETHREEOH-1410). git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13596 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -99,6 +99,7 @@ search_description=This view allows you to see the results from your search.
|
||||
checkinfile_description=Check in your working copy for other team members to work with.
|
||||
checkoutfilelink_description=Edit the checked out file, undo the check out or carry on working.
|
||||
checkoutfile_description=Enter information about the check out.
|
||||
doneediting_description=Finish editing your working copy to allow other team members to work it with.
|
||||
documentdetails_description=View the details about the content.
|
||||
linkdetails_description=View the details about the link object.
|
||||
previewdocument_description=Preview the content or space within a Template.
|
||||
@@ -352,9 +353,10 @@ delete=Delete
|
||||
edit=Edit
|
||||
checkin=Check In
|
||||
checkout=Check Out
|
||||
done_editing=Done Editing
|
||||
checkout_document=Check out this document
|
||||
undocheckout=Undo Check Out
|
||||
cancel_editing=Cancel File Editing
|
||||
cancel_editing=Cancel Editing
|
||||
delete_space=Delete Space
|
||||
delete_file=Delete File
|
||||
delete_rule=Delete Rule
|
||||
@@ -707,7 +709,7 @@ undo_checkout_for=Undo Check Out for
|
||||
undo_checkout=Undo Check Out
|
||||
undo_checkout_info=If you undo the check out of a document, the associated working copy will be deleted and all changes to it since the Check Out will be lost.
|
||||
cancel_editing_for=Cancel Editing for
|
||||
cancel_editing_info=If you cancel editing of a document, the associated working copy will be deleted and all changes to it since the Check Out will be lost.
|
||||
cancel_editing_info=Are you sure you want to Cancel Editing? Any changes to the working copy will be lost.
|
||||
complete=complete
|
||||
working_copy_for=Working copy for
|
||||
working_copy_missing_info=The working copy is no longer available. This could be due to an active rule(s) applied to the space you checked-out to.
|
||||
|
@@ -175,7 +175,7 @@
|
||||
<action id="cancelcheckout_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.CancelCheckoutDocEvaluator</evaluator>
|
||||
<label-id>undocheckout</label-id>
|
||||
<image>/images/icons/undo_checkout.gif</image>
|
||||
<image>/images/icons/cancel_checkout.gif</image>
|
||||
<action-listener>#{CCUndoCheckoutFileDialog.setupContentAction}</action-listener>
|
||||
<action>dialog:undoCheckoutFile</action>
|
||||
<params>
|
||||
@@ -198,7 +198,7 @@
|
||||
<!-- Done-editing document -->
|
||||
<action id="done_editing_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.DoneEditingDocEvaluator</evaluator>
|
||||
<label-id>checkin</label-id>
|
||||
<label-id>done_editing</label-id>
|
||||
<image>/images/icons/done_editing.gif</image>
|
||||
<action-listener>#{DoneEditingDialog.handle}</action-listener>
|
||||
<params>
|
||||
@@ -974,59 +974,47 @@
|
||||
<show-link>false</show-link>
|
||||
<style-class>inlineAction</style-class>
|
||||
|
||||
<!-- New style edit online/offline actions -->
|
||||
<action idref="upload_new_version" />
|
||||
<action idref="edit_doc_online_webdav" />
|
||||
<action idref="edit_doc_online_cifs" />
|
||||
<action idref="edit_doc_online_http" />
|
||||
<action idref="edit_doc_offline" />
|
||||
<action idref="edit_doc_offline" />
|
||||
<action idref="done_editing_doc" />
|
||||
<action idref="cancel_editing_doc" />
|
||||
<action idref="download_doc" />
|
||||
|
||||
<!-- Actions previously used for checkin/checkout -->
|
||||
<!-- If old behaviour is required uncomment the -->
|
||||
<!-- actions below and comment out the ones above -->
|
||||
|
||||
<!--
|
||||
|
||||
<!-- Remove these if you don't want old style Checkin/Checkout to appear at all -->
|
||||
<action idref="checkin_doc" />
|
||||
<action idref="cancelcheckout_doc" />
|
||||
|
||||
<!-- Old actions previously used for online/offline editing -->
|
||||
<!-- If old behaviour is required uncomment the actions below and comment out the new ones above -->
|
||||
<!--
|
||||
<action idref="edit_doc_http" />
|
||||
<action idref="edit_doc_webdav" />
|
||||
<action idref="edit_doc_cifs" />
|
||||
<action idref="checkout_doc" />
|
||||
<action idref="checkin_doc" />
|
||||
-->
|
||||
|
||||
<action idref="download_doc" />
|
||||
<action idref="details_doc" />
|
||||
<action idref="delete_doc" />
|
||||
|
||||
<!-- Example action defined in-line rather than by reference
|
||||
<action id="example2_checkout_doc">
|
||||
<permissions>
|
||||
<permission allow="true">CheckOut</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.CheckoutDocEvaluator</evaluator>
|
||||
<label-id>checkout</label-id>
|
||||
<image>/images/icons/CheckOut_icon.gif</image>
|
||||
<action-listener>#{CheckinCheckoutDialog.setupContentAction}</action-listener>
|
||||
<action>checkoutFile</action>
|
||||
</action>-->
|
||||
|
||||
</action-group>
|
||||
|
||||
<!-- Actions Menu for a document in the Browse screen -->
|
||||
<action-group id="document_browse_menu">
|
||||
<action idref="preview_doc" />
|
||||
<action idref="update_doc" />
|
||||
<!-- Old Cancel Checkout action -->
|
||||
<!--
|
||||
<action idref="cancelcheckout_doc" />
|
||||
-->
|
||||
|
||||
<!-- Remove this action if you don't want old style Checkin/Checkout to appear at all -->
|
||||
<action idref="checkout_doc" />
|
||||
|
||||
<action idref="approve_doc" />
|
||||
<action idref="reject_doc" />
|
||||
<action idref="cut_node" />
|
||||
<action idref="copy_node" />
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Action menu for Invite Space user in Manage invite users screen-->
|
||||
<action-group id="invite_user_menu">
|
||||
<action idref="invite_user"/>
|
||||
@@ -1036,7 +1024,7 @@
|
||||
<action-group id="invite_content_user_menu">
|
||||
<action idref="invite_content_user"/>
|
||||
</action-group>
|
||||
|
||||
|
||||
<!-- Actions for a space in the Browse screen -->
|
||||
<action-group id="space_browse">
|
||||
<show-link>false</show-link>
|
||||
@@ -1080,29 +1068,29 @@
|
||||
|
||||
<!-- Actions Menu for Document Details screen -->
|
||||
<action-group id="doc_details_actions">
|
||||
<!-- New style edit online/offline actions -->
|
||||
<action idref="upload_new_version" />
|
||||
<action idref="edit_doc_online_http" />
|
||||
<action idref="edit_doc_online_webdav" />
|
||||
<action idref="edit_doc_online_cifs" />
|
||||
<action idref="edit_doc_offline" />
|
||||
<action idref="checkout_doc" />
|
||||
<action idref="done_editing_doc" />
|
||||
<action idref="download_doc" />
|
||||
<action idref="cancel_editing_doc" />
|
||||
|
||||
<!-- Actions previously used for checkin/checkout -->
|
||||
<!-- If old behaviour is required uncomment the -->
|
||||
<!-- actions below and comment out the ones above -->
|
||||
<!-- Remove these if you don't want old style Checkin/Checkout to appear at all -->
|
||||
<action idref="checkout_doc" />
|
||||
<action idref="checkin_doc" />
|
||||
<action idref="cancelcheckout_doc" />
|
||||
|
||||
<!--
|
||||
<action idref="checkout_doc" />
|
||||
<action idref="checkin_doc" />
|
||||
<action idref="cancelcheckout_doc" />
|
||||
<!-- Old actions previously used for online/offline editing -->
|
||||
<!-- If old behaviour is required uncomment the actions below and comment out the new ones above -->
|
||||
<!--
|
||||
<action idref="edit_doc_http" />
|
||||
<action idref="edit_doc_webdav" />
|
||||
<action idref="edit_doc_cifs" />
|
||||
<action idref="edit_doc_cifs" />
|
||||
-->
|
||||
|
||||
|
||||
<action idref="download_doc" />
|
||||
<action idref="approve_doc_details" />
|
||||
<action idref="reject_doc_details" />
|
||||
<action idref="update_doc" />
|
||||
|
@@ -611,7 +611,7 @@
|
||||
description-id="checkinfile_description" />
|
||||
|
||||
<dialog name="doneEditingFile" page="/jsp/coci/done-editing.jsp" managed-bean="DoneEditingDialog"
|
||||
icon="/images/icons/done_editing_large.gif" description-id="checkinfile_description" />
|
||||
icon="/images/icons/done_editing_large.gif" description-id="doneediting_description" />
|
||||
|
||||
<dialog name="previewSpace" page="/jsp/spaces/preview-space.jsp" managed-bean="SpacePreviewBean"
|
||||
icon="/images/icons/preview_large.gif" title-id="preview_of" description-id="previewdocument_description" show-ok-button="false" />
|
||||
|
@@ -42,7 +42,8 @@ public class CancelCheckoutDocEvaluator extends BaseActionEvaluator
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
return (node.hasPermission(PermissionService.CANCEL_CHECK_OUT) &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY));
|
||||
return (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
|
||||
node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) == null &&
|
||||
node.hasPermission(PermissionService.CANCEL_CHECK_OUT));
|
||||
}
|
||||
}
|
||||
}
|
@@ -30,18 +30,16 @@ import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Cancel editing document.
|
||||
*
|
||||
*/
|
||||
public class CancelEditingDocEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
return (node.hasPermission(PermissionService.CANCEL_CHECK_OUT) &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY));
|
||||
return (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
|
||||
node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) != null &&
|
||||
node.hasPermission(PermissionService.CANCEL_CHECK_OUT));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -42,7 +42,8 @@ public class CheckinDocEvaluator extends BaseActionEvaluator
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
return (node.hasPermission(PermissionService.CHECK_IN) &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == true);
|
||||
return (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
|
||||
node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) == null &&
|
||||
node.hasPermission(PermissionService.CHECK_IN));
|
||||
}
|
||||
}
|
||||
}
|
@@ -30,7 +30,6 @@ import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Done editing document.
|
||||
*
|
||||
*/
|
||||
public class DoneEditingDocEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
@@ -39,7 +38,8 @@ public class DoneEditingDocEvaluator extends BaseActionEvaluator
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
return (node.hasPermission(PermissionService.CHECK_IN) &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == true);
|
||||
return (node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) != null &&
|
||||
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
|
||||
node.hasPermission(PermissionService.CHECK_IN));
|
||||
}
|
||||
}
|
@@ -50,7 +50,8 @@ public class ForumsCheckinDocEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
boolean allow = false;
|
||||
|
||||
if (node.hasAspect(ContentModel.ASPECT_WORKING_COPY))
|
||||
if (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
|
||||
node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE) == null)
|
||||
{
|
||||
if (node.hasAspect(ForumModel.ASPECT_DISCUSSABLE))
|
||||
{
|
||||
|
@@ -24,8 +24,6 @@
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
@@ -51,12 +49,11 @@ public class UpdateDocEvaluator extends BaseActionEvaluator
|
||||
DictionaryService dd = Repository.getServiceRegistry(
|
||||
FacesContext.getCurrentInstance()).getDictionaryService();
|
||||
|
||||
Map<String, Object> props = node.getProperties();
|
||||
|
||||
boolean isOfflineEditing = props.get(ContentModel.PROP_WORKING_COPY_MODE) != null && props.get(ContentModel.PROP_WORKING_COPY_MODE).equals(EditOfflineDialog.OFFLINE_EDITING);
|
||||
boolean isOfflineEditing =
|
||||
(EditOfflineDialog.OFFLINE_EDITING.equals(node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE)));
|
||||
|
||||
return dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT) &&
|
||||
((node.isWorkingCopyOwner() == true && !isOfflineEditing) ||
|
||||
(node.isLocked() == false && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false));
|
||||
((node.isWorkingCopyOwner() && !isOfflineEditing) ||
|
||||
(!node.isLocked() && !node.hasAspect(ContentModel.ASPECT_WORKING_COPY)));
|
||||
}
|
||||
}
|
||||
}
|
@@ -24,8 +24,6 @@
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.web.bean.coci.EditOfflineDialog;
|
||||
@@ -33,20 +31,16 @@ import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Upload new version
|
||||
*
|
||||
*/
|
||||
public class UploadNewVersionEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
Map<String, Object> props = node.getProperties();
|
||||
|
||||
return (node.hasPermission(PermissionService.CHECK_IN) && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == true &&
|
||||
props.get(ContentModel.PROP_WORKING_COPY_MODE) != null && props.get(ContentModel.PROP_WORKING_COPY_MODE).equals(EditOfflineDialog.OFFLINE_EDITING));
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
return (node.hasAspect(ContentModel.ASPECT_WORKING_COPY) &&
|
||||
EditOfflineDialog.OFFLINE_EDITING.equals(node.getProperties().get(ContentModel.PROP_WORKING_COPY_MODE)) &&
|
||||
node.hasPermission(PermissionService.CHECK_IN));
|
||||
}
|
||||
}
|
@@ -35,7 +35,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
|
||||
public class CancelEditingDialog extends CheckinCheckoutDialog
|
||||
{
|
||||
public static final String LBL_CANCEL_EDITING = "cancel_editing";
|
||||
public static final String MSG_CANCEL_EDITING = "cancel_editing";
|
||||
public static final String MSG_CANCEL_EDITING_FOR = "cancel_editing_for";
|
||||
|
||||
private static Log logger = LogFactory.getLog(CheckinCheckoutDialog.class);
|
||||
@@ -62,7 +62,7 @@ public class CancelEditingDialog extends CheckinCheckoutDialog
|
||||
@Override
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), LBL_CANCEL_EDITING);
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CANCEL_EDITING);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -47,13 +47,13 @@ import org.alfresco.web.ui.common.Utils;
|
||||
*/
|
||||
public class DoneEditingDialog extends CheckinCheckoutDialog
|
||||
{
|
||||
|
||||
private final static String MSG_DONE = "done";
|
||||
private static final String MSG_CHECK_IN = "check_in";
|
||||
private final static String MSG_OK = "ok";
|
||||
private static final String MSG_DONE_EDITING = "done_editing";
|
||||
private final static String MSG_MISSING_ORIGINAL_NODE = "missing_original_node";
|
||||
|
||||
private final static String DIALOG_NAME = AlfrescoNavigationHandler.DIALOG_PREFIX + "doneEditingFile";
|
||||
|
||||
|
||||
/**
|
||||
* this flag indicates occurrence when source node isn't versionable, but working copy yet is versionable
|
||||
*/
|
||||
@@ -95,7 +95,7 @@ public class DoneEditingDialog extends CheckinCheckoutDialog
|
||||
/**
|
||||
* @return Returns true if source node for selected working copy founded
|
||||
*/
|
||||
public boolean isSourceFounded()
|
||||
public boolean isSourceFound()
|
||||
{
|
||||
return (sourceNodeRef != null);
|
||||
}
|
||||
@@ -132,28 +132,30 @@ public class DoneEditingDialog extends CheckinCheckoutDialog
|
||||
{
|
||||
sourceNodeRef = getSourceNodeRef(node.getNodeRef());
|
||||
if (sourceNodeRef != null)
|
||||
{
|
||||
sourceVersionable = getNodeService().hasAspect(sourceNodeRef, ContentModel.ASPECT_VERSIONABLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DONE);
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_OK);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFinishButtonDisabled()
|
||||
{
|
||||
return !isSourceFounded();
|
||||
return !isSourceFound();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContainerTitle()
|
||||
{
|
||||
if (isSourceFounded())
|
||||
if (isSourceFound())
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CHECK_IN) + " '" + getNodeService().getProperty(sourceNodeRef, ContentModel.PROP_NAME) + "'";
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DONE_EDITING) + " '" + getNodeService().getProperty(sourceNodeRef, ContentModel.PROP_NAME) + "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -183,7 +185,7 @@ public class DoneEditingDialog extends CheckinCheckoutDialog
|
||||
*/
|
||||
private String getCurrentVersionLabel()
|
||||
{
|
||||
if (isSourceFounded())
|
||||
if (isSourceFound())
|
||||
{
|
||||
Version curVersion = property.getVersionQueryService().getCurrentVersion(sourceNodeRef);
|
||||
return curVersion.getVersionLabel();
|
||||
|
@@ -38,14 +38,12 @@ import javax.faces.event.AbortProcessingException;
|
||||
import javax.faces.event.ActionEvent;
|
||||
import javax.faces.event.FacesEvent;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.data.IDataContainer;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.alfresco.web.ui.common.WebResources;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* @author Kevin Roast
|
||||
@@ -96,6 +94,10 @@ public class UIDataPager extends UICommand
|
||||
return;
|
||||
}
|
||||
|
||||
final String formClientId = Utils.getParentForm(context, this).getClientId(context);
|
||||
final String pageInputId = getPageInputId();
|
||||
final String hiddenFieldName = getHiddenFieldName();
|
||||
|
||||
ResponseWriter out = context.getResponseWriter();
|
||||
ResourceBundle bundle = Application.getBundle(context);
|
||||
StringBuilder buf = new StringBuilder(512);
|
||||
@@ -130,15 +132,15 @@ public class UIDataPager extends UICommand
|
||||
imageVericalAlign = "middle";
|
||||
imageStyle = "margin-top:0px;";
|
||||
inputPageNumber.append("<input type=\"text\" maxlength=\"3\" value=\"").append(currentPage + 1).append("\" style=\"width: 24px; margin-left: 4px;").append(inputStyle).append("\" ");
|
||||
inputPageNumber.append("onkeydown=\"").append(generateIE6InputOnkeydownScript()).append("\" ");
|
||||
inputPageNumber.append("id=\"").append(getPageInputId()).append("\" />");
|
||||
inputPageNumber.append("onkeydown=\"").append(generateIE6InputOnkeydownScript(pageInputId, formClientId, hiddenFieldName)).append("\" ");
|
||||
inputPageNumber.append("id=\"").append(pageInputId).append("\" />");
|
||||
}
|
||||
else
|
||||
{
|
||||
inputPageNumber.append("<input type=\"text\" maxlength=\"3\" value=\"").append(currentPage + 1).append("\" style=\"width: 24px; margin-left: 4px;").append(inputStyle).append("\" ");
|
||||
inputPageNumber.append("onkeyup=\"").append(generateInputOnkeyupScript()).append("\" ");
|
||||
inputPageNumber.append("onkeyup=\"").append(generateInputOnkeyupScript(pageInputId, formClientId, hiddenFieldName)).append("\" ");
|
||||
inputPageNumber.append("onkeydown=\"").append(generateInputOnkeydownScript()).append("\" ");
|
||||
inputPageNumber.append("id=\"").append(getPageInputId()).append("\" />");
|
||||
inputPageNumber.append("id=\"").append(pageInputId).append("\" />");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +172,7 @@ public class UIDataPager extends UICommand
|
||||
if (currentPage != 0)
|
||||
{
|
||||
buf.append("<a href='#' onclick=\"");
|
||||
buf.append(generateEventScript(0));
|
||||
buf.append(generateEventScript(0, hiddenFieldName));
|
||||
buf.append("\">");
|
||||
buf.append(Utils.buildImageTag(context, WebResources.IMAGE_FIRSTPAGE, 16, 16, bundle.getString(FIRST_PAGE), null, imageVericalAlign, imageStyle));
|
||||
buf.append("</a>");
|
||||
@@ -186,7 +188,7 @@ public class UIDataPager extends UICommand
|
||||
if (currentPage != 0)
|
||||
{
|
||||
buf.append("<a href='#' onclick=\"");
|
||||
buf.append(generateEventScript(currentPage - 1));
|
||||
buf.append(generateEventScript(currentPage - 1, hiddenFieldName));
|
||||
buf.append("\">");
|
||||
buf.append(Utils.buildImageTag(context, WebResources.IMAGE_PREVIOUSPAGE, 16, 16, bundle.getString(PREVIOUS_PAGE), null, imageVericalAlign, imageStyle));
|
||||
buf.append("</a>");
|
||||
@@ -232,7 +234,7 @@ public class UIDataPager extends UICommand
|
||||
if ((dataContainer.getCurrentPage() < dataContainer.getPageCount() - 1) == true)
|
||||
{
|
||||
buf.append("<a href='#' onclick=\"");
|
||||
buf.append(generateEventScript(currentPage + 1));
|
||||
buf.append(generateEventScript(currentPage + 1, hiddenFieldName));
|
||||
buf.append("\">");
|
||||
buf.append(Utils.buildImageTag(context, WebResources.IMAGE_NEXTPAGE, 16, 16, bundle.getString(NEXT_PAGE), null, imageVericalAlign, imageStyle));
|
||||
buf.append("</a>");
|
||||
@@ -248,7 +250,7 @@ public class UIDataPager extends UICommand
|
||||
if ((dataContainer.getCurrentPage() < dataContainer.getPageCount() - 1) == true)
|
||||
{
|
||||
buf.append("<a href='#' onclick=\"");
|
||||
buf.append(generateEventScript(dataContainer.getPageCount() - 1));
|
||||
buf.append(generateEventScript(dataContainer.getPageCount() - 1, hiddenFieldName));
|
||||
buf.append("\">");
|
||||
buf.append(Utils.buildImageTag(context, WebResources.IMAGE_LASTPAGE, 16, 16, bundle.getString(LAST_PAGE), null, imageVericalAlign, imageStyle));
|
||||
buf.append("</a>");
|
||||
@@ -266,17 +268,17 @@ public class UIDataPager extends UICommand
|
||||
private void createClicableDigitForPage(int num, StringBuilder buf)
|
||||
{
|
||||
buf.append("<a href='#' onclick=\"")
|
||||
.append(generateEventScript(num))
|
||||
.append("\">")
|
||||
.append(num + 1)
|
||||
.append("</a> ");
|
||||
.append(generateEventScript(num, getHiddenFieldName()))
|
||||
.append("\">")
|
||||
.append(num + 1)
|
||||
.append("</a> ");
|
||||
}
|
||||
|
||||
private void createDigitForPage(int num, StringBuilder buf)
|
||||
{
|
||||
buf.append("<b>")
|
||||
.append(num + 1)
|
||||
.append("</b> ");
|
||||
.append(num + 1)
|
||||
.append("</b> ");
|
||||
}
|
||||
|
||||
private void encodeType0(StringBuilder buf, int currentPage, int pageCount)
|
||||
@@ -555,9 +557,9 @@ public class UIDataPager extends UICommand
|
||||
*
|
||||
* @param page page index to generate script to jump too
|
||||
*/
|
||||
private String generateEventScript(int page)
|
||||
private String generateEventScript(int page, String hiddenFieldName)
|
||||
{
|
||||
return Utils.generateFormSubmit(getFacesContext(), this, getHiddenFieldName(), Integer.toString(page));
|
||||
return Utils.generateFormSubmit(getFacesContext(), this, hiddenFieldName, Integer.toString(page));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -579,31 +581,16 @@ public class UIDataPager extends UICommand
|
||||
*
|
||||
* @return JavaScript code
|
||||
*/
|
||||
private String generateInputOnkeyupScript()
|
||||
private String generateInputOnkeyupScript(String pageInputId, String formClientId, String hiddenFieldName)
|
||||
{
|
||||
final String formClientId = Utils.getParentForm(getFacesContext(), this).getClientId(getFacesContext());
|
||||
final StringBuilder script = new StringBuilder(128);
|
||||
script.append("function validateAndSubmit(e)");
|
||||
script.append("{");
|
||||
script.append(" var keycode;");
|
||||
script.append(" if (window.event) keycode = window.event.keyCode;");
|
||||
script.append(" else if (e) keycode = e.which;");
|
||||
script.append(" if (keycode == 13)");
|
||||
script.append(" {");
|
||||
script.append(" var inputControl = $('").append(getPageInputId()).append("');");
|
||||
script.append(" var dialogForm = $('dialog');");
|
||||
script.append(" if (dialogForm) {dialogForm.removeProperty('onsubmit');}");
|
||||
script.append(" var val = parseInt(inputControl.value);");
|
||||
script.append(" if (val == 'NaN' || document.forms['").append(formClientId).append("']['").append(getHiddenFieldName()).append("']==undefined)");
|
||||
script.append(" { inputControl.value = 1; return false; }");
|
||||
script.append(" else");
|
||||
script.append(" { val = (val-1)>=0 ? val-1 : 0; ");
|
||||
script.append(" document.forms['").append(formClientId).append("']['").append(getHiddenFieldName()).append("'].value=val;");
|
||||
script.append(" document.forms['").append(formClientId).append("'].submit(); return false;");
|
||||
script.append(" }");
|
||||
script.append(" }");
|
||||
script.append(" return true;");
|
||||
script.append("}; return validateAndSubmit(event);");
|
||||
script.append("return validateAndSubmit(event,'")
|
||||
.append(getPageInputId())
|
||||
.append("','")
|
||||
.append(formClientId)
|
||||
.append("','")
|
||||
.append(hiddenFieldName)
|
||||
.append("');");
|
||||
return script.toString();
|
||||
}
|
||||
|
||||
@@ -614,21 +601,7 @@ public class UIDataPager extends UICommand
|
||||
*/
|
||||
private String generateInputOnkeydownScript()
|
||||
{
|
||||
final StringBuilder script = new StringBuilder(128);
|
||||
script.append("function onlyDigits(e)");
|
||||
script.append("{");
|
||||
script.append(" var keycode;");
|
||||
script.append(" if (window.event) keycode = window.event.keyCode;");
|
||||
script.append(" else if (e) keycode = e.which;");
|
||||
script.append(" var keychar = String.fromCharCode(keycode);");
|
||||
script.append(" var numcheck = /\\d/;");
|
||||
script.append(" var dialogForm = $('dialog');");
|
||||
script.append(" if (dialogForm && keycode==13) { ");
|
||||
script.append(" dialogForm.setProperty('onsubmit','return false;')");
|
||||
script.append(" }");
|
||||
script.append(" return keycode==13 || keycode==8 || keycode==37 || keycode==39 || keycode==46 || (keycode>=96 && keycode<=105) || numcheck.test(keychar);");
|
||||
script.append("}; return onlyDigits(event);");
|
||||
return script.toString();
|
||||
return "return onlyDigits(event);";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -636,31 +609,16 @@ public class UIDataPager extends UICommand
|
||||
* It handles only digits and some 'useful' keys.
|
||||
* @return JavaScript code
|
||||
*/
|
||||
private String generateIE6InputOnkeydownScript()
|
||||
private String generateIE6InputOnkeydownScript(String pageInputId, String formClientId, String hiddenFieldName)
|
||||
{
|
||||
final String formClientId = Utils.getParentForm(getFacesContext(), this).getClientId(getFacesContext());
|
||||
final StringBuilder script = new StringBuilder(128);
|
||||
script.append("function onlyDigits(e)");
|
||||
script.append("{");
|
||||
script.append(" var keycode;");
|
||||
script.append(" if (window.event) keycode = window.event.keyCode;");
|
||||
script.append(" else if (e) keycode = e.which;");
|
||||
script.append(" var keychar = String.fromCharCode(keycode);");
|
||||
script.append(" var numcheck = /\\d/;");
|
||||
script.append(" if (keycode == 13)");
|
||||
script.append(" {");
|
||||
script.append(" var inputControl = $('").append(getPageInputId()).append("');");
|
||||
script.append(" var val = parseInt(inputControl.value);");
|
||||
script.append(" if (val == 'NaN' || document.forms['").append(formClientId).append("']['").append(getHiddenFieldName()).append("']==undefined)");
|
||||
script.append(" { inputControl.value = 1; return false; }");
|
||||
script.append(" else");
|
||||
script.append(" { val = (val-1)>=0 ? val-1 : 0; ");
|
||||
script.append(" document.forms['").append(formClientId).append("']['").append(getHiddenFieldName()).append("'].value=val;");
|
||||
script.append(" document.forms['").append(formClientId).append("'].submit(); return false;");
|
||||
script.append(" }");
|
||||
script.append(" }");
|
||||
script.append(" return keycode==13 || keycode==8 || keycode==37 || keycode==39 || keycode==46 || (keycode>=96 && keycode<=105) || numcheck.test(keychar);");
|
||||
script.append("}; return onlyDigits(event);");
|
||||
script.append("return onlyDigitsIE6(event,'")
|
||||
.append(getPageInputId())
|
||||
.append("','")
|
||||
.append(formClientId)
|
||||
.append("','")
|
||||
.append(hiddenFieldName)
|
||||
.append("');");
|
||||
return script.toString();
|
||||
}
|
||||
|
||||
|
@@ -61,8 +61,6 @@ public class PageTag extends TagSupport
|
||||
"/scripts/menu.js",
|
||||
// webdav javascript
|
||||
"/scripts/webdav.js",
|
||||
// functionality for window.onload
|
||||
"/scripts/onload.js",
|
||||
// base yahoo file
|
||||
"/scripts/ajax/yahoo/yahoo/yahoo-min.js",
|
||||
// io handling (AJAX)
|
||||
|
BIN
source/web/images/icons/cancel_checkout.gif
Normal file
BIN
source/web/images/icons/cancel_checkout.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -49,12 +49,12 @@
|
||||
|
||||
if (inputField.value == "no-condition")
|
||||
{
|
||||
document.getElementById("wizard:wizard-body:set-add-button").value = decodeURI(short_label);
|
||||
document.getElementById("wizard:wizard-body:set-add-button").value = unescape(short_label);
|
||||
document.getElementById("wizard:wizard-body:instruction-text").innerHTML = short_text;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("wizard:wizard-body:set-add-button").value = decodeURI(long_label);
|
||||
document.getElementById("wizard:wizard-body:set-add-button").value = unescape(long_label);
|
||||
document.getElementById("wizard:wizard-body:instruction-text").innerHTML = long_text;
|
||||
}
|
||||
}
|
||||
|
@@ -65,7 +65,7 @@
|
||||
<tr>
|
||||
<td style="padding:6px">
|
||||
<%-- downloadable file link generated by CheckinCheckoutDialog --%>
|
||||
</f:verbatim><a:actionLink styleClass="title" image="#{CCProperties.workingDocument.properties.fileType32}" value="#{CCProperties.workingDocument.name}" href="#{CCProperties.workingDocument.properties.url}" /><f:verbatim>
|
||||
</f:verbatim><a:actionLink styleClass="title" style="vertical-align:8px;padding-left:4px" image="#{CCProperties.workingDocument.properties.fileType32}" value="#{CCProperties.workingDocument.name}" href="#{CCProperties.workingDocument.properties.url}" /><f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@@ -31,7 +31,7 @@
|
||||
|
||||
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8"%>
|
||||
|
||||
<a:booleanEvaluator value="#{DialogManager.bean.sourceFounded}">
|
||||
<a:booleanEvaluator value="#{DialogManager.bean.sourceFound}">
|
||||
<f:verbatim>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
|
@@ -204,7 +204,7 @@ if (fileUploaded)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:file-name"),
|
||||
decodeURI('</f:verbatim><a:outputText id="text11" value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'), true);
|
||||
unescape('</f:verbatim><a:outputText id="text11" value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -62,7 +62,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("wizard:wizard-body:file-name"),
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
true);
|
||||
}
|
||||
else
|
||||
|
@@ -60,108 +60,30 @@ if (fileUploaded)
|
||||
}
|
||||
%>
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
</f:verbatim>
|
||||
<a:booleanEvaluator value="#{empty DialogManager.bean.fileName}" ><f:verbatim>
|
||||
<tr>
|
||||
<td class="wizardSectionHeading"></f:verbatim><h:outputText value="#{msg.local_copy_location}" /><f:verbatim></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td></f:verbatim>
|
||||
<h:panelGrid id="upload_panel" columns="2" cellpadding="2" cellspacing="2" border="0" width="100%" columnClasses="panelGridLabelColumn,panelGridValueColumn" >
|
||||
</f:verbatim>
|
||||
<a:booleanEvaluator value="#{empty DialogManager.bean.fileName}">
|
||||
<f:verbatim>
|
||||
<tr>
|
||||
<td class="wizardSectionHeading"></f:verbatim><h:outputText value="#{msg.local_copy_location}" /><f:verbatim></td>
|
||||
</tr>
|
||||
|
||||
<h:outputText value="#{msg.locate_content_upload}" style="padding-left:8px"/>
|
||||
<f:verbatim> <br/> </f:verbatim>
|
||||
|
||||
<h:outputText id="out_schema" value="#{msg.file_location}:" style="padding-left:8px" />
|
||||
<h:column id="upload_empty" rendered="#{empty DialogManager.bean.fileName}">
|
||||
<r:upload id="uploader" value="#{DialogManager.bean.fileName}" framework="dialog"/>
|
||||
</h:column>
|
||||
</h:panelGrid>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
</f:verbatim>
|
||||
</a:booleanEvaluator>
|
||||
<%
|
||||
|
||||
if (fileUploaded)
|
||||
{
|
||||
%>
|
||||
<f:verbatim>
|
||||
<tr>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<a:booleanEvaluator value="#{DialogManager.bean.versionable}" >
|
||||
<f:verbatim>
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td class="wizardSectionHeading"> </f:verbatim>
|
||||
<h:outputText value="#{msg.version_info}" /> <f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </f:verbatim>
|
||||
<h:outputText value="#{msg.new_version_has}" escape="false" rendered="#{DialogManager.bean.sourceVersionable}" />
|
||||
<h:outputText value="#{msg.initial_version}" escape="false" rendered="#{!DialogManager.bean.sourceVersionable}" /> <f:verbatim>
|
||||
</f:verbatim>
|
||||
<h:panelGrid id="upload_panel" columns="2" cellpadding="2" cellspacing="2" border="0" width="100%" columnClasses="panelGridLabelColumn,panelGridValueColumn" >
|
||||
<h:outputText value="#{msg.locate_content_upload}" style="padding-left:8px"/>
|
||||
<f:verbatim> <br/> </f:verbatim>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </f:verbatim>
|
||||
<h:selectOneRadio value="#{CCProperties.minorChange}" required="true" layout="pageDirection" rendered="#{DialogManager.bean.sourceVersionable}">
|
||||
<f:selectItem itemValue="#{true}" itemLabel="#{msg.minor_changes} (#{DialogManager.bean.minorNewVersionLabel})" />
|
||||
<f:selectItem itemValue="#{false}" itemLabel="#{msg.major_changes} (#{DialogManager.bean.majorNewVersionLabel})" />
|
||||
</h:selectOneRadio>
|
||||
|
||||
<f:verbatim>
|
||||
</span> <br/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </f:verbatim>
|
||||
<h:outputText value="#{msg.version_notes}" /> <f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </f:verbatim>
|
||||
<h:inputTextarea value="#{CCProperties.versionNotes}" rows="4" cols="50" /> <f:verbatim>
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paddingRow"></td>
|
||||
</tr>
|
||||
</table> </f:verbatim>
|
||||
</a:booleanEvaluator>
|
||||
<f:verbatim>
|
||||
<h:outputText id="out_schema" value="#{msg.file_location}:" style="padding-left:8px" />
|
||||
<h:column id="upload_empty" rendered="#{empty DialogManager.bean.fileName}">
|
||||
<r:upload id="uploader" value="#{DialogManager.bean.fileName}" framework="dialog"/>
|
||||
</h:column>
|
||||
</h:panelGrid>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td class="wizardSectionHeading" colspan="2"></f:verbatim><h:outputText value="#{msg.other_options}" /><f:verbatim></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:selectBooleanCheckbox value="#{DialogManager.bean.finishedEditing}"/>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td width="100%">
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.checkin_this_file}"/>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</f:verbatim>
|
||||
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<f:verbatim>
|
||||
</a:booleanEvaluator>
|
||||
<f:verbatim>
|
||||
</table>
|
||||
</f:verbatim>
|
||||
</f:verbatim>
|
@@ -61,7 +61,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:name"),
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
true);
|
||||
}
|
||||
else
|
||||
|
@@ -62,7 +62,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:name"),
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
true);
|
||||
}
|
||||
else
|
||||
|
@@ -214,7 +214,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:file-name"),
|
||||
decodeURI('</f:verbatim><a:outputText id="text11" value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'), true);
|
||||
unescape('</f:verbatim><a:outputText id="text11" value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -63,12 +63,12 @@
|
||||
|
||||
if (inputField.value == "no-condition")
|
||||
{
|
||||
document.getElementById("composite-condition:set-add-button").value = decodeURI(short_label);
|
||||
document.getElementById("composite-condition:set-add-button").value = unescape(short_label);
|
||||
document.getElementById("composite-condition:instruction-text").innerHTML = short_text;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("composite-condition:set-add-button").value = decodeURI(long_label);
|
||||
document.getElementById("composite-condition:set-add-button").value = unescape(long_label);
|
||||
document.getElementById("composite-condition:instruction-text").innerHTML = long_text;
|
||||
}
|
||||
}
|
||||
|
@@ -49,12 +49,12 @@
|
||||
|
||||
if (inputField.value == "no-condition")
|
||||
{
|
||||
document.getElementById("wizard:wizard-body:set-add-button").value = decodeURI(short_label);
|
||||
document.getElementById("wizard:wizard-body:set-add-button").value = unescape(short_label);
|
||||
document.getElementById("wizard:wizard-body:instruction-text").innerHTML = short_text;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("wizard:wizard-body:set-add-button").value = decodeURI(long_label);
|
||||
document.getElementById("wizard:wizard-body:set-add-button").value = unescape(long_label);
|
||||
document.getElementById("wizard:wizard-body:instruction-text").innerHTML = long_text;
|
||||
}
|
||||
}
|
||||
|
@@ -61,7 +61,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:name"),
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
true);
|
||||
}
|
||||
else
|
||||
|
@@ -84,7 +84,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("wizard:wizard-body:name"),
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
true);
|
||||
}
|
||||
else
|
||||
|
@@ -197,7 +197,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:file-name"),
|
||||
decodeURI('</f:verbatim><a:outputText id="text11" value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'), true);
|
||||
unescape('</f:verbatim><a:outputText id="text11" value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -60,7 +60,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:name"),
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
true);
|
||||
}
|
||||
else
|
||||
|
@@ -62,7 +62,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("wizard:wizard-body:file-name"),
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
true);
|
||||
}
|
||||
else
|
||||
|
@@ -60,7 +60,7 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
return validateName(document.getElementById("dialog:dialog-body:name"),
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
true);
|
||||
}
|
||||
else
|
||||
|
@@ -64,13 +64,13 @@
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
var valid = validateName(document.getElementById("wizard:wizard-body:name"),
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" encodeForJavaScript="true" /><f:verbatim>'),
|
||||
true);
|
||||
if (valid == true)
|
||||
{
|
||||
valid = validateRegex(document.getElementById("wizard:wizard-body:dnsname"),
|
||||
"^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", true, null,
|
||||
decodeURI('</f:verbatim><a:outputText value="#{msg.validation_invalid_dns_name}" encodeForJavaScript="true" /><f:verbatim>'), true);
|
||||
unescape('</f:verbatim><a:outputText value="#{msg.validation_invalid_dns_name}" encodeForJavaScript="true" /><f:verbatim>'), true);
|
||||
}
|
||||
return valid;
|
||||
}
|
||||
|
@@ -121,6 +121,7 @@
|
||||
<r:actions id="col6-actions" value="#{WizardManager.bean.packageItemActionGroup}"
|
||||
context="#{r}" showLink="false" styleClass="inlineAction" />
|
||||
</a:column>
|
||||
<a:dataPager id="pager1" styleClass="pager" />
|
||||
</a:richList>
|
||||
|
||||
<h:panelGrid id="package-actions-group" columns="1" styleClass="paddingRow">
|
||||
|
@@ -97,6 +97,7 @@
|
||||
<a:convertXMLDate type="both" pattern="#{msg.date_time_pattern}" />
|
||||
</h:outputText>
|
||||
</a:column>
|
||||
<a:dataPager id="pager1" styleClass="pager" />
|
||||
</a:richList>
|
||||
</a:panel>
|
||||
|
||||
|
@@ -3,6 +3,7 @@
|
||||
// Gavin Cornwell 14-07-2006
|
||||
//
|
||||
|
||||
|
||||
// Global Alfresco namespace object
|
||||
if (typeof Alfresco == "undefined")
|
||||
{
|
||||
@@ -11,6 +12,22 @@ if (typeof Alfresco == "undefined")
|
||||
|
||||
var _alfContextPath = null;
|
||||
|
||||
|
||||
/**
|
||||
* window.onload function for r:page tag
|
||||
*/
|
||||
function onloadFunc(webdavUrl, cifsPath)
|
||||
{
|
||||
if (webdavUrl != "")
|
||||
{
|
||||
openDoc(webdavUrl);
|
||||
}
|
||||
if (cifsPath != "")
|
||||
{
|
||||
window.open(cifsPath, "_blank");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Error handler for errors caught in a catch block
|
||||
*/
|
||||
@@ -119,6 +136,89 @@ if (typeof document.ELEMENT_NODE == "undefined")
|
||||
document.NOTATION_NODE = 12;
|
||||
}
|
||||
|
||||
/**
|
||||
* UIDataPager functions
|
||||
*/
|
||||
function validateAndSubmit(e, pageInputId, formClientId, hiddenFieldName)
|
||||
{
|
||||
var keycode;
|
||||
if (window.event) keycode = window.event.keyCode;
|
||||
else if (e) keycode = e.which;
|
||||
if (keycode == 13)
|
||||
{
|
||||
var inputControl = $(pageInputId);
|
||||
var dialogForm = $('dialog');
|
||||
if (dialogForm)
|
||||
{
|
||||
dialogForm.removeProperty('onsubmit');
|
||||
}
|
||||
var val = parseInt(inputControl.value);
|
||||
if (val == 'NaN' || document.forms[formClientId][hiddenFieldName] == undefined)
|
||||
{
|
||||
inputControl.value = 1;
|
||||
//console.log("validateAndSubmit: reverting to 1");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = (val-1)>=0 ? val-1 : 0;
|
||||
document.forms[formClientId][hiddenFieldName].value = val;
|
||||
document.forms[formClientId].submit();
|
||||
//console.log("validateAndSubmit: submitting value: " + val);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//console.log("validateAndSubmit: passthrough...");
|
||||
return true;
|
||||
}
|
||||
|
||||
function onlyDigitsIE6(e, pageInputId, formClientId, hiddenFieldName)
|
||||
{
|
||||
var keycode;
|
||||
if (window.event) keycode = window.event.keyCode;
|
||||
else if (e) keycode = e.which;
|
||||
var keychar = String.fromCharCode(keycode);
|
||||
var numcheck = /\d/;
|
||||
if (keycode == 13)
|
||||
{
|
||||
var inputControl = $(pageInputId);
|
||||
var val = parseInt(inputControl.value);
|
||||
if (val == 'NaN' || document.forms[formClientId][hiddenFieldName] == undefined)
|
||||
{
|
||||
inputControl.value = 1;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = (val-1)>=0 ? val-1 : 0;
|
||||
document.forms[formClientId][hiddenFieldName].value = val;
|
||||
document.forms[formClientId].submit();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var result = (keycode==13 || keycode==8 || keycode==37 || keycode==39 || keycode==46 || (keycode>=96 && keycode<=105) || numcheck.test(keychar));
|
||||
//console.log("onlyDigits: " + result);
|
||||
return result;
|
||||
}
|
||||
|
||||
function onlyDigits(e)
|
||||
{
|
||||
var keycode;
|
||||
if (window.event) keycode = window.event.keyCode;
|
||||
else if (e) keycode = e.which;
|
||||
var keychar = String.fromCharCode(keycode);
|
||||
var numcheck = /\d/;
|
||||
var dialogForm = $('dialog');
|
||||
if (dialogForm && keyCode == 13)
|
||||
{
|
||||
dialogForm.setProperty('onsubmit', 'return false;');
|
||||
}
|
||||
var result = (keycode==13 || keycode==8 || keycode==37 || keycode==39 || keycode==46 || (keycode>=96 && keycode<=105) || numcheck.test(keychar));
|
||||
//console.log("onlyDigits: " + result);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Alfresco Utility libraries
|
||||
*/
|
||||
|
@@ -1,15 +0,0 @@
|
||||
//
|
||||
// window.onload function for r:page tag
|
||||
//
|
||||
|
||||
function onloadFunc(webdavUrl, cifsPath)
|
||||
{
|
||||
if (webdavUrl != "")
|
||||
{
|
||||
openDoc(webdavUrl);
|
||||
}
|
||||
if (cifsPath != "")
|
||||
{
|
||||
window.open(cifsPath, "_blank");
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user