Reverted Logneon Offline editing changes.
These will be transfered to a DEV branch. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8226 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
@@ -104,7 +104,6 @@ linkdetails_description=View the details about the link object.
|
||||
previewdocument_description=Preview the content or space within a Template.
|
||||
spacedetails_description=View the details about the space.
|
||||
undocheckoutfile_description=Cancel the check out of a document and discard any changes.
|
||||
cancel_editing_file_description=Cancel editing of a document and discard any changes.
|
||||
updatefile_description=Update a document on the repository with content from your computer.
|
||||
editfile_description=Edit the content of the file.
|
||||
editfileinline_description=Edit the content of the document, then click Save.
|
||||
@@ -131,16 +130,7 @@ status_message_default=No messages.
|
||||
no_icons_found=No icons found
|
||||
required_field=Required Field
|
||||
|
||||
# Offline editing
|
||||
click_here= click here
|
||||
offline_help=For help on offline editing
|
||||
offline_download_first=If your document does not start downloading in
|
||||
offline_download_second=seconds then
|
||||
offline_download_third=If you do not want files to start downloading automatically when you select offline editing then
|
||||
|
||||
|
||||
# UI Component messages
|
||||
done=Done
|
||||
yes=Yes
|
||||
no=No
|
||||
no_not_now=No not now
|
||||
@@ -292,9 +282,6 @@ click_to_set_date=Click to set a date
|
||||
today=Today
|
||||
reset=Reset
|
||||
label=Label
|
||||
edit_doc_offline=Edit offline
|
||||
upload_new_version=Upload new version
|
||||
done_editing_file=I am done editing this file
|
||||
|
||||
# Properties
|
||||
username=User Name
|
||||
@@ -343,7 +330,6 @@ checkin=Check In
|
||||
checkout=Check Out
|
||||
checkout_document=Check out this document
|
||||
undocheckout=Undo Check Out
|
||||
cancel_editing=Cancel File Editing
|
||||
delete_space=Delete Space
|
||||
delete_file=Delete File
|
||||
delete_rule=Delete Rule
|
||||
@@ -622,13 +608,6 @@ file_location=Location
|
||||
minor_change=Minor Change
|
||||
major_change=Major Change
|
||||
notes=Notes
|
||||
new_version_has=This new version has
|
||||
minor_changes=Minor Changes
|
||||
major_changes=Major Changes
|
||||
done_editing_title_versionable=New Version info for
|
||||
done_editing_title_not_versionable=Done editing for
|
||||
done_editing=Done Editing
|
||||
version_info=Version Info
|
||||
|
||||
# Check-out messages
|
||||
check_out=Check Out
|
||||
@@ -648,8 +627,6 @@ download_complete=When the download is complete, click OK.
|
||||
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.
|
||||
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.
|
||||
|
@@ -42,18 +42,6 @@
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- Edit document offline action -->
|
||||
<action id="edit_doc_offline">
|
||||
<evaluator>org.alfresco.web.action.evaluator.CheckoutDocEvaluator</evaluator>
|
||||
<label-id>edit_doc_offline</label-id>
|
||||
<image>/images/icons/edit_offline.gif</image>
|
||||
<action>dialog:editOfflineDialog</action>
|
||||
<action-listener>#{EditOfflineDialog.setupContentAction}</action-listener>
|
||||
<params>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- Edit document action to open using normal HTTP access or inline Edit if set -->
|
||||
<action id="edit_doc_http">
|
||||
<permissions>
|
||||
@@ -130,30 +118,6 @@
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- Cancel editing document -->
|
||||
<action id="cancelediting_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.CancelCheckoutDocEvaluator</evaluator>
|
||||
<label-id>cancel_editing</label-id>
|
||||
<image>/images/icons/cancel_editing.gif</image>
|
||||
<action-listener>#{CancelEditingDialog.setupContentAction}</action-listener>
|
||||
<action>dialog:cancelEditing</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- Done-editing document -->
|
||||
<action id="done_editing_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.CheckinDocEvaluator</evaluator>
|
||||
<label-id>done_editing</label-id>
|
||||
<image>/images/icons/done_editing.gif</image>
|
||||
<action-listener>#{CCDoneEditingDialog.setupContentAction}</action-listener>
|
||||
<action>dialog:doneEditingFile</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- View document details -->
|
||||
<action id="details_doc">
|
||||
<label-id>view_details</label-id>
|
||||
@@ -242,22 +206,6 @@
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- Upload new version of document-->
|
||||
<action id="upload_new_version">
|
||||
<permissions>
|
||||
<permission allow="true">Write</permission>
|
||||
</permissions>
|
||||
<evaluator>org.alfresco.web.action.evaluator.UploadNewVersionEvaluator</evaluator>
|
||||
<label-id>upload_new_version</label-id>
|
||||
<image>/images/icons/upload_new_version.gif</image>
|
||||
<action-listener>#{CheckinCheckoutDialog.setupContentAction}</action-listener>
|
||||
<action>dialog:uploadVersion</action>
|
||||
<params>
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
|
||||
<!-- 'Approve' workflow step for document -->
|
||||
<action id="approve_doc">
|
||||
<evaluator>org.alfresco.web.action.evaluator.ApproveDocEvaluator</evaluator>
|
||||
@@ -960,14 +908,11 @@
|
||||
<show-link>false</show-link>
|
||||
<style-class>inlineAction</style-class>
|
||||
|
||||
<action idref="upload_new_version" />
|
||||
<action idref="edit_doc_offline" />
|
||||
<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="done_editing_doc" />
|
||||
<action idref="details_doc" />
|
||||
<action idref="delete_doc" />
|
||||
|
||||
@@ -990,7 +935,6 @@
|
||||
<action idref="preview_doc" />
|
||||
<action idref="update_doc" />
|
||||
<action idref="cancelcheckout_doc" />
|
||||
<action idref="cancelediting_doc" />
|
||||
<action idref="approve_doc" />
|
||||
<action idref="reject_doc" />
|
||||
<action idref="cut_node" />
|
||||
@@ -1052,13 +996,9 @@
|
||||
|
||||
<!-- Actions Menu for Document Details screen -->
|
||||
<action-group id="doc_details_actions">
|
||||
<action idref="upload_new_version" />
|
||||
<action idref="edit_doc_offline" />
|
||||
<action idref="checkout_doc" />
|
||||
<action idref="checkin_doc" />
|
||||
<action idref="done_editing_doc" />
|
||||
<action idref="cancelcheckout_doc" />
|
||||
<action idref="cancelediting_doc" />
|
||||
<action idref="approve_doc_details" />
|
||||
<action idref="reject_doc_details" />
|
||||
<action idref="edit_doc_http" />
|
||||
|
@@ -350,20 +350,10 @@
|
||||
icon="/images/icons/cancel_checkout_large.gif" title-id="undo_checkout_for"
|
||||
description-id="undocheckoutfile_description" />
|
||||
|
||||
<dialog name="cancelEditing" page="/jsp/coci/cancel-editing-file.jsp" managed-bean="CancelEditingDialog"
|
||||
icon="/images/icons/cancel_editing_large.gif" title-id="cancel_editing_for"
|
||||
description-id="cancel_editing_file_description" />
|
||||
|
||||
|
||||
<dialog name="checkoutFile" page="/jsp/coci/checkout-file.jsp" managed-bean="CCCheckoutFileDialog"
|
||||
icon="/images/icons/check_out_large.gif" title-id="check_out"
|
||||
description-id="checkoutfile_description" />
|
||||
|
||||
<dialog name="editOfflineDialog" page="/jsp/coci/edit-offline-file.jsp" managed-bean="EditOfflineDialog"
|
||||
icon="/images/icons/edit_offline_large.GIF" title-id="edit_doc_offline"
|
||||
show-ok-button="false"/>
|
||||
|
||||
|
||||
<dialog name="editFile" page="/jsp/content/edit-file.jsp" managed-bean="CCEditFileDialog"
|
||||
icon="/images/icons/edit_large.gif" title-id="edit"
|
||||
description-id="editfile_description" show-ok-button="false" />
|
||||
@@ -544,9 +534,6 @@
|
||||
icon="/images/icons/check_in_large.gif" title-id="check_in"
|
||||
description-id="checkinfile_description" />
|
||||
|
||||
<dialog name="doneEditingFile" page="/jsp/coci/done-editing.jsp" managed-bean="CCDoneEditingDialog"
|
||||
icon="/images/icons/check_in_large.gif" />
|
||||
|
||||
<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" />
|
||||
|
||||
@@ -561,9 +548,6 @@
|
||||
icon="/images/icons/users_large.gif" title-id="manage_content_users" description-id="manage_content_users_description" show-ok-button="false"
|
||||
actions-config-id="invite_content_user_menu" error-message-id="empty_message"/>
|
||||
|
||||
<dialog name="uploadVersion" page="/jsp/content/upload-new-version.jsp" managed-bean="UploadNewVersionDialog"
|
||||
icon="/images/icons/upload_new_version_large.gif" title-id="upload_new_version_of" />
|
||||
|
||||
</dialogs>
|
||||
</config>
|
||||
|
||||
|
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
|
||||
/**
|
||||
* 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)
|
||||
{
|
||||
DictionaryService dd = Repository.getServiceRegistry(
|
||||
FacesContext.getCurrentInstance()).getDictionaryService();
|
||||
|
||||
return dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT) && node.isWorkingCopyOwner();
|
||||
}
|
||||
}
|
@@ -1,96 +0,0 @@
|
||||
|
||||
package org.alfresco.web.bean.coci;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.version.Version;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
|
||||
/**
|
||||
* This bean class handle done-editing(commit) dialog.
|
||||
*
|
||||
*/
|
||||
public class CCDoneEditingDialog extends CheckinCheckoutDialog
|
||||
{
|
||||
|
||||
private final static String MSG_DONE = "done";
|
||||
private final static String MSG_TITLE_VERSIONABLE = "done_editing_title_versionable";
|
||||
private final static String MSG_TITLE_NOT_VERSIONABLE = "done_editing_title_not_versionable";
|
||||
|
||||
/**
|
||||
* @return Returns label for new version with major changes
|
||||
*/
|
||||
public String getMajorNewVersionLabel()
|
||||
{
|
||||
String label = getCurrentVersionLabel();
|
||||
StringTokenizer st = new StringTokenizer(label, ".");
|
||||
return (Integer.valueOf(st.nextToken()) + 1) + ".0";
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns label for new version with minor changes
|
||||
*/
|
||||
public String getMinorNewVersionLabel()
|
||||
{
|
||||
String label = getCurrentVersionLabel();
|
||||
StringTokenizer st = new StringTokenizer(label, ".");
|
||||
return st.nextToken() + "." + (Integer.valueOf(st.nextToken()) + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFinishButtonDisabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContainerTitle()
|
||||
{
|
||||
if (property.getDocument().hasAspect(ContentModel.ASPECT_VERSIONABLE))
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_TITLE_VERSIONABLE) + " '" + property.getDocument().getName() + "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_TITLE_NOT_VERSIONABLE) + " '" + property.getDocument().getName() + "'";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
return checkinFileOK(context, outcome);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return version label for source node for working copy.
|
||||
*/
|
||||
private String getCurrentVersionLabel()
|
||||
{
|
||||
NodeRef workingCopyNodeRef = property.getDocument().getNodeRef();
|
||||
if (this.nodeService.hasAspect(workingCopyNodeRef, ContentModel.ASPECT_COPIEDFROM) == true)
|
||||
{
|
||||
Map<QName, Serializable> workingCopyProperties = nodeService.getProperties(workingCopyNodeRef);
|
||||
NodeRef nodeRef = (NodeRef) workingCopyProperties.get(ContentModel.PROP_COPY_REFERENCE);
|
||||
|
||||
Version curVersion = property.getVersionQueryService().getCurrentVersion(nodeRef);
|
||||
return curVersion.getVersionLabel();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@@ -29,7 +29,6 @@ import java.io.File;
|
||||
import org.alfresco.service.cmr.coci.CheckOutCheckInService;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.version.VersionService;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowService;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
@@ -39,9 +38,6 @@ public class CCProperties
|
||||
/** The VersionOperationsService to be used by the bean */
|
||||
protected CheckOutCheckInService versionOperationsService;
|
||||
|
||||
/** The VersionQueryService to be used by the bean */
|
||||
protected VersionService versionQueryService;
|
||||
|
||||
/** The ContentService to be used by the bean */
|
||||
protected ContentService contentService;
|
||||
|
||||
@@ -93,23 +89,6 @@ public class CCProperties
|
||||
this.versionOperationsService = versionOperationsService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the VersionQueryService.
|
||||
*/
|
||||
public VersionService getVersionQueryService()
|
||||
{
|
||||
return this.versionQueryService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param versionQueryService
|
||||
* The VersionQueryService to set.
|
||||
*/
|
||||
public void setVersionQueryService(VersionService versionQueryService)
|
||||
{
|
||||
this.versionQueryService = versionQueryService;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the ContentService.
|
||||
*/
|
||||
|
@@ -1,119 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package org.alfresco.web.bean.coci;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.apache.commons.logging.Log;
|
||||
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_FOR = "cancel_editing_for";
|
||||
|
||||
private static Log logger = LogFactory.getLog(CheckinCheckoutDialog.class);
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
undoCheckoutFile(context, outcome);
|
||||
return "dialog:close[2]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContainerTitle()
|
||||
{
|
||||
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CANCEL_EDITING_FOR) + " '" + property.getDocument().getName() + "'";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFinishButtonDisabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), LBL_CANCEL_EDITING);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Action to undo the checkout of a locked document. This document may
|
||||
* either by the original copy or the working copy node. Therefore calculate
|
||||
* which it is, if the working copy is found then we simply cancel checkout
|
||||
* on that document. If the original copy is found then we need to find the
|
||||
* appropriate working copy and perform the action on that node.
|
||||
*/
|
||||
public String undoCheckoutFile(FacesContext context, String outcome)
|
||||
{
|
||||
Node node = property.getDocument();
|
||||
if (node != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (node.hasAspect(ContentModel.ASPECT_WORKING_COPY))
|
||||
{
|
||||
this.property.getVersionOperationsService().cancelCheckout(node.getNodeRef());
|
||||
}
|
||||
else if (node.hasAspect(ContentModel.ASPECT_LOCKABLE))
|
||||
{
|
||||
// TODO: find the working copy for this document and cancel
|
||||
// the checkout on it
|
||||
// is this possible? as currently only the workingcopy
|
||||
// aspect has the copyReference
|
||||
// attribute - this means we cannot find out where the copy
|
||||
// is to cancel it!
|
||||
// can we construct an XPath node lookup?
|
||||
throw new RuntimeException("NOT IMPLEMENTED");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new IllegalStateException("Node supplied for undo checkout has neither Working Copy or Locked aspect!");
|
||||
}
|
||||
|
||||
resetState();
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(), MSG_ERROR_CANCELCHECKOUT) + err.getMessage(), err);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("WARNING: undoCheckout called without a current WorkingDocument!");
|
||||
}
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
}
|
@@ -28,7 +28,6 @@ import java.io.Serializable;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.event.ActionEvent;
|
||||
|
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package org.alfresco.web.bean.coci;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.web.app.Application;
|
||||
|
||||
public class UploadNewVersionDialog extends CCDoneEditingDialog
|
||||
{
|
||||
|
||||
private final static String MSG_UPLOAD_NEW_VERSION = "upload_new_version";
|
||||
private final static String MSG_OF = "of";
|
||||
|
||||
private boolean finishedEditing = false;
|
||||
|
||||
public void setFinishedEditing(boolean finished)
|
||||
{
|
||||
this.finishedEditing = finished;
|
||||
}
|
||||
|
||||
public boolean isFinishedEditing()
|
||||
{
|
||||
return finishedEditing;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getFinishButtonDisabled()
|
||||
{
|
||||
return property.getFile() == null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getContainerTitle()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_UPLOAD_NEW_VERSION) + " " + Application.getMessage(FacesContext.getCurrentInstance(), MSG_OF) + " '"
|
||||
+ property.getDocument().getName() + "'";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
property.setKeepCheckedOut(!finishedEditing);
|
||||
return checkinFileOK(context, outcome);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetState()
|
||||
{
|
||||
super.resetState();
|
||||
finishedEditing = false;
|
||||
}
|
||||
|
||||
}
|
@@ -1,223 +0,0 @@
|
||||
package org.alfresco.web.bean.content;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.workflow.WorkflowModel;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowTask;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.context.UIContextService;
|
||||
import org.alfresco.web.app.servlet.DownloadContentServlet;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.event.ActionEvent;
|
||||
|
||||
import org.alfresco.web.bean.FileUploadBean;
|
||||
import org.alfresco.web.bean.coci.CCProperties;
|
||||
import org.alfresco.web.bean.coci.CheckinCheckoutDialog;
|
||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.alfresco.web.ui.common.component.UIActionLink;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
public class EditOfflineDialog extends BaseDialogBean
|
||||
{
|
||||
|
||||
private static final String CLOSE = "close";
|
||||
public static final String MSG_ERROR_CHECKOUT = "error_checkout";
|
||||
private static Log logger = LogFactory.getLog(EditOfflineDialog.class);
|
||||
protected CCProperties property;
|
||||
|
||||
public CCProperties getProperty()
|
||||
{
|
||||
return property;
|
||||
}
|
||||
|
||||
public void setProperty(CCProperties property)
|
||||
{
|
||||
this.property = property;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getContainerTitle()
|
||||
{
|
||||
return "Download of '" + getProperty().getDocument().getName() + "' for offline editing.";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
return outcome;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getCancelButtonLabel()
|
||||
{
|
||||
return Application.getMessage(FacesContext.getCurrentInstance(), CLOSE);
|
||||
}
|
||||
|
||||
public void setupContentAction(ActionEvent event)
|
||||
{
|
||||
UIActionLink link = (UIActionLink) event.getComponent();
|
||||
Map<String, String> params = link.getParameterMap();
|
||||
String id = params.get("id");
|
||||
if (id != null && id.length() != 0)
|
||||
{
|
||||
setupContentDocument(id);
|
||||
checkoutFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
property.setDocument(null);
|
||||
}
|
||||
|
||||
resetState();
|
||||
}
|
||||
|
||||
private Node setupContentDocument(String id)
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Setup for action, setting current document to: " + id);
|
||||
|
||||
Node node = null;
|
||||
|
||||
try
|
||||
{
|
||||
// create the node ref, then our node representation
|
||||
NodeRef ref = new NodeRef(Repository.getStoreRef(), id);
|
||||
node = new Node(ref);
|
||||
|
||||
// create content URL to the content download servlet with ID and expected filename
|
||||
// the myfile part will be ignored by the servlet but gives the browser a hint
|
||||
String url = DownloadContentServlet.generateDownloadURL(ref, node.getName());
|
||||
node.getProperties().put("url", url);
|
||||
node.getProperties().put("workingCopy", node.hasAspect(ContentModel.ASPECT_WORKING_COPY));
|
||||
node.getProperties().put("fileType32", Utils.getFileTypeImage(node.getName(), false));
|
||||
|
||||
// remember the document
|
||||
property.setDocument(node);
|
||||
|
||||
// refresh the UI, calling this method now is fine as it basically makes sure certain
|
||||
// beans clear the state - so when we finish here other beans will have been reset
|
||||
UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans();
|
||||
}
|
||||
catch (InvalidNodeRefException refErr)
|
||||
{
|
||||
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
|
||||
FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] {id}) );
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
public void resetState()
|
||||
{
|
||||
// delete the temporary file we uploaded earlier
|
||||
if (property.getFile() != null)
|
||||
{
|
||||
property.getFile().delete();
|
||||
}
|
||||
|
||||
property.setFile(null);
|
||||
property.setFileName(null);
|
||||
property.setKeepCheckedOut(false);
|
||||
property.setMinorChange(true);
|
||||
property.setCopyLocation(CCProperties.COPYLOCATION_CURRENT);
|
||||
property.setVersionNotes("");
|
||||
property.setSelectedSpaceId(null);
|
||||
property.setWorkflowAction(false);
|
||||
property.setWorkflowTaskId(null);
|
||||
|
||||
// remove the file upload bean from the session
|
||||
FacesContext ctx = FacesContext.getCurrentInstance();
|
||||
ctx.getExternalContext().getSessionMap().remove(FileUploadBean.FILE_UPLOAD_BEAN_NAME);
|
||||
}
|
||||
|
||||
public void checkoutFile()
|
||||
{
|
||||
final Node node = property.getDocument();
|
||||
if (node != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Trying to checkout content node Id: " + node.getId());
|
||||
|
||||
// checkout the node content to create a working copy
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug("Checkout copy location: " + property.getCopyLocation());
|
||||
logger.debug("Selected Space Id: " + property.getSelectedSpaceId());
|
||||
}
|
||||
NodeRef workingCopyRef = null;
|
||||
if (property.getCopyLocation().equals(CCProperties.COPYLOCATION_OTHER) && property.getSelectedSpaceId() != null)
|
||||
{
|
||||
// checkout to a arbituary parent Space
|
||||
NodeRef destRef = property.getSelectedSpaceId();
|
||||
|
||||
ChildAssociationRef childAssocRef = nodeService.getPrimaryParent(destRef);
|
||||
workingCopyRef = property.getVersionOperationsService().checkout(node.getNodeRef(), destRef, ContentModel.ASSOC_CONTAINS, childAssocRef.getQName());
|
||||
}
|
||||
else
|
||||
{
|
||||
// checkout the content to the current space
|
||||
workingCopyRef = property.getVersionOperationsService().checkout(node.getNodeRef());
|
||||
|
||||
// if this is a workflow action and there is a task id
|
||||
// present we need
|
||||
// to also link the working copy to the workflow package so
|
||||
// it appears
|
||||
// in the resources panel in the manage task dialog
|
||||
if (property.isWorkflowAction() && property.getWorkflowTaskId() != null && (property.getWorkflowTaskId().equals("null") == false))
|
||||
{
|
||||
WorkflowTask task = property.getWorkflowService().getTaskById(property.getWorkflowTaskId());
|
||||
if (task != null)
|
||||
{
|
||||
NodeRef workflowPackage = (NodeRef) task.properties.get(WorkflowModel.ASSOC_PACKAGE);
|
||||
if (workflowPackage != null)
|
||||
{
|
||||
nodeService.addChild(workflowPackage, workingCopyRef, ContentModel.ASSOC_CONTAINS, QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, QName
|
||||
.createValidLocalName((String) nodeService.getProperty(workingCopyRef, ContentModel.PROP_NAME))));
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
logger.debug("Added working copy to workflow package: " + workflowPackage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// set the working copy Node instance
|
||||
Node workingCopy = new Node(workingCopyRef);
|
||||
property.setWorkingDocument(workingCopy);
|
||||
|
||||
// create content URL to the content download servlet with ID
|
||||
// and expected filename
|
||||
// the myfile part will be ignored by the servlet but gives the
|
||||
// browser a hint
|
||||
String url = DownloadContentServlet.generateDownloadURL(workingCopyRef, workingCopy.getName());
|
||||
|
||||
workingCopy.getProperties().put("url", url);
|
||||
workingCopy.getProperties().put("fileType32", Utils.getFileTypeImage(workingCopy.getName(), false));
|
||||
|
||||
}
|
||||
catch (Throwable err)
|
||||
{
|
||||
Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(), MSG_ERROR_CHECKOUT) + err.getMessage(), err);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
logger.warn("WARNING: checkoutFile called without a current Document!");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1301,10 +1301,6 @@
|
||||
<managed-bean-name>CCProperties</managed-bean-name>
|
||||
<managed-bean-class>org.alfresco.web.bean.coci.CCProperties</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>versionQueryService</property-name>
|
||||
<value>#{VersionService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>versionOperationsService</property-name>
|
||||
<value>#{CheckoutCheckinService}</value>
|
||||
@@ -1319,29 +1315,6 @@
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>The bean that help with edit offline procedure.</description>
|
||||
<managed-bean-name>EditOfflineDialog</managed-bean-name>
|
||||
<managed-bean-class>org.alfresco.web.bean.content.EditOfflineDialog</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>browseBean</property-name>
|
||||
<value>#{BrowseBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>navigator</property-name>
|
||||
<value>#{NavigationBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>nodeService</property-name>
|
||||
<value>#{NodeService}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>property</property-name>
|
||||
<value>#{CCProperties}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>The bean that backs up the Checkin and Checkout pages.</description>
|
||||
<managed-bean-name>CheckinCheckoutDialog</managed-bean-name>
|
||||
@@ -1378,27 +1351,6 @@
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>The bean for the Upload a new versoin Screen.</description>
|
||||
<managed-bean-name>UploadNewVersionDialog</managed-bean-name>
|
||||
<managed-bean-class>
|
||||
org.alfresco.web.bean.coci.UploadNewVersionDialog
|
||||
</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>property</property-name>
|
||||
<value>#{CCProperties}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>navigator</property-name>
|
||||
<value>#{NavigationBean}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>nodeService</property-name>
|
||||
<value>#{NodeService}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>
|
||||
The bean that holds manage content rules state
|
||||
@@ -5465,20 +5417,6 @@
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>The bean for the Cancel Editing File Screen.</description>
|
||||
<managed-bean-name>CancelEditingDialog</managed-bean-name>
|
||||
<managed-bean-class>
|
||||
org.alfresco.web.bean.coci.CancelEditingDialog
|
||||
</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>property</property-name>
|
||||
<value>#{CCProperties}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
|
||||
<managed-bean>
|
||||
<description>The bean for the Working Copy Missing Screen.</description>
|
||||
<managed-bean-name>CCWorkingCopyMissingDialog</managed-bean-name>
|
||||
@@ -5505,23 +5443,6 @@
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>The bean for the Done-Editing File Screen(New commit dialog).</description>
|
||||
<managed-bean-name>CCDoneEditingDialog</managed-bean-name>
|
||||
<managed-bean-class>
|
||||
org.alfresco.web.bean.coci.CCDoneEditingDialog
|
||||
</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>property</property-name>
|
||||
<value>#{CCProperties}</value>
|
||||
</managed-property>
|
||||
<managed-property>
|
||||
<property-name>nodeService</property-name>
|
||||
<value>#{NodeService}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>The bean for the Edit Search Screen.</description>
|
||||
<managed-bean-name>EditSearchDialog</managed-bean-name>
|
||||
|
Before Width: | Height: | Size: 852 B |
Before Width: | Height: | Size: 912 B |
Before Width: | Height: | Size: 859 B |
Before Width: | Height: | Size: 864 B |
Before Width: | Height: | Size: 954 B |
Before Width: | Height: | Size: 847 B |
Before Width: | Height: | Size: 910 B |
@@ -1,48 +0,0 @@
|
||||
<%--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
--%>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
|
||||
|
||||
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
|
||||
|
||||
<f:verbatim>
|
||||
<table cellspacing="0" cellpadding="3" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td valign=top style="padding-top:2px" width=20></f:verbatim><h:graphicImage url="/images/icons/info_icon.gif" width="16" height="16"/><f:verbatim></td>
|
||||
<td class="mainSubText"></f:verbatim><h:outputText value="#{msg.cancel_editing_info}" /><f:verbatim></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</f:verbatim>
|
@@ -1,101 +0,0 @@
|
||||
<%--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
--%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a"%>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r"%>
|
||||
|
||||
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8"%>
|
||||
<%@ page isELIgnored="false"%>
|
||||
|
||||
<%@page import="org.alfresco.web.ui.common.PanelGenerator"%>
|
||||
|
||||
<a:booleanEvaluator value="#{!DialogManager.bean.versionable}">
|
||||
<f:verbatim>
|
||||
<table cellspacing="0" cellpadding="3" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %>
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td valign=top style="padding-top:2px" width=20></f:verbatim><h:graphicImage url="/images/icons/info_icon.gif" width="16" height="16"/><f:verbatim></td>
|
||||
<td class="mainSubText"> </f:verbatim>
|
||||
<h:outputText value="#{msg.done_editing}?" /> <f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</f:verbatim>
|
||||
</a:booleanEvaluator>
|
||||
|
||||
<a:booleanEvaluator value="#{DialogManager.bean.versionable}">
|
||||
<f:verbatim>
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td class="wizardSectionHeading"> </f:verbatim>
|
||||
<h:outputText value="#{msg.version_info}" rendered="#{DialogManager.bean.versionable}" /> <f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </f:verbatim>
|
||||
<h:outputText value="#{msg.new_version_has}" escape="false" rendered="#{DialogManager.bean.versionable}" /> <f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </f:verbatim>
|
||||
<h:selectOneRadio value="#{CCProperties.minorChange}" layout="pageDirection" rendered="#{DialogManager.bean.versionable}" >
|
||||
<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}" rendered="#{DialogManager.bean.versionable}" /> <f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </f:verbatim>
|
||||
<h:inputTextarea value="#{CCProperties.versionNotes}" rows="4" cols="50" rendered="#{DialogManager.bean.versionable}" /> <f:verbatim>
|
||||
</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paddingRow"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</f:verbatim>
|
||||
</a:booleanEvaluator>
|
@@ -1,61 +0,0 @@
|
||||
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
|
||||
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
|
||||
<%@taglib prefix="a" uri="/WEB-INF/alfresco.tld" %>
|
||||
<%@taglib prefix="c" uri="/WEB-INF/c.tld" %>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
setTimeout("document.location.href=" + "\'" + document.getElementById("url") + "\'", 10000);
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function timer(second)
|
||||
{
|
||||
document.getElementById("time").innerHTML = second;
|
||||
second--;
|
||||
if (second >=0)
|
||||
{
|
||||
window.setTimeout('timer('+second+')', 1000);
|
||||
}
|
||||
}
|
||||
//-->
|
||||
</script>
|
||||
|
||||
|
||||
<f:verbatim>
|
||||
<body onload="timer(10)">
|
||||
|
||||
</f:verbatim><h:outputText value="#{msg.offline_download_first}"/>
|
||||
|
||||
<f:verbatim> <b id="time">10</b> </f:verbatim>
|
||||
|
||||
<h:outputText value="#{msg.offline_download_second}"/><f:verbatim> </f:verbatim>
|
||||
<a:actionLink id="url" style="text-decoration: underline;" value="#{msg.click_here}" href="#{CCProperties.document.properties.url}"/>
|
||||
|
||||
<f:verbatim><br/><br/>
|
||||
|
||||
</f:verbatim><h:outputText value="#{msg.offline_download_third}"/><f:verbatim> </f:verbatim>
|
||||
|
||||
<a:actionLink value="#{msg.click_here}"
|
||||
action="dialog:userConsole"
|
||||
actionListener="#{UsersDialog.setupUserAction}"
|
||||
style="text-decoration: underline;">
|
||||
<f:param name="id" value="#{NavigationBean.currentUser.person.id}" />
|
||||
</a:actionLink>
|
||||
|
||||
<f:verbatim><br/><br/> </f:verbatim>
|
||||
|
||||
<h:graphicImage url="/images/icons/Help_icon.gif" alt="#{msg.help}"/><f:verbatim> </f:verbatim>
|
||||
<h:outputText value="#{msg.offline_help}"/><f:verbatim> </f:verbatim>
|
||||
<a:actionLink style="text-decoration: underline;" value="#{msg.click_here}" target="_blank" href="http://wiki.alfresco.com/wiki/Main_Page"/>
|
||||
|
||||
<f:verbatim>
|
||||
<br/>
|
||||
</f:verbatim>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,160 +0,0 @@
|
||||
<%--
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
--%>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
|
||||
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a"%>
|
||||
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r"%>
|
||||
|
||||
<%@ page import="org.alfresco.web.ui.common.PanelGenerator"%>
|
||||
<%@ page import="org.alfresco.web.bean.coci.UploadNewVersionDialog"%>
|
||||
<%@ page import="org.alfresco.web.app.servlet.FacesHelper"%>
|
||||
<%@ page import="javax.faces.context.FacesContext"%>
|
||||
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8"%>
|
||||
|
||||
|
||||
<%
|
||||
boolean fileUploaded = false;
|
||||
|
||||
UploadNewVersionDialog dialog = (UploadNewVersionDialog) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "UploadNewVersionDialog");
|
||||
if (dialog != null && dialog.getFileName() != null)
|
||||
{
|
||||
fileUploaded = true;
|
||||
}
|
||||
%>
|
||||
<f:verbatim>
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<%
|
||||
if (fileUploaded)
|
||||
{
|
||||
PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc");
|
||||
out.write("<img alt='' align='absmiddle' src='");
|
||||
out.write(request.getContextPath());
|
||||
out.write("/images/icons/info_icon.gif' /> ");
|
||||
out.write(dialog.getFileUploadSuccessMsg());
|
||||
PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner");
|
||||
out.write("<div style='padding:2px;'></div>");
|
||||
}
|
||||
%>
|
||||
<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" >
|
||||
|
||||
<h:outputText value="#{msg.locate_content_upload}" style="padding-left:8px"/>
|
||||
<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>
|
||||
<f:verbatim>
|
||||
<tr>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<%
|
||||
if (fileUploaded)
|
||||
{
|
||||
%>
|
||||
<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" /> <f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </f:verbatim>
|
||||
<h:selectOneRadio id="vvvv" value="#{CCProperties.minorChange}" required="true" layout="pageDirection" rendered="#{DialogManager.bean.versionable}">
|
||||
<f:selectItem itemValue="#{true}" itemLabel="#{msg.minor_changes} (#{DialogManager.bean.minorNewVersionLabel})" />
|
||||
<f:selectItem itemValue="#{false}" itemLabel="#{msg.major_changes} (#{DialogManager.bean.majorNewVersionLabel})" />
|
||||
</h:selectOneRadio>
|
||||
<h:message for="vvvv"></h:message>
|
||||
|
||||
<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>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</f:verbatim>
|
||||
|
||||
<f:verbatim>
|
||||
<tr>
|
||||
<td class="wizardSectionHeading"></f:verbatim><h:outputText value="#{msg.other_options}" /><f:verbatim></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:selectBooleanCheckbox value="#{DialogManager.bean.finishedEditing}"/> <h:outputText value="#{msg.done_editing_file}"/>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
</f:verbatim>
|
||||
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<f:verbatim>
|
||||
</table>
|
||||
</f:verbatim>
|