From 1dd2a7b72bee57b14c61020ac0b873957e638f35 Mon Sep 17 00:00:00 2001 From: Britt Park Date: Fri, 12 May 2006 20:22:46 +0000 Subject: [PATCH] Daily merge. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@2882 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../web-client-config-custom.xml.sample | 2 +- config/alfresco/messages/webclient.properties | 15 +- config/alfresco/web-client-config-actions.xml | 18 +- config/alfresco/web-client-config-dialogs.xml | 4 +- .../web-client-config-forum-actions.xml | 60 +-- config/alfresco/web-client-config-wizards.xml | 13 +- config/alfresco/web-client-config.xml | 38 +- .../web/app/AlfrescoNavigationHandler.java | 91 ++--- .../alfresco/web/bean/AdvancedSearchBean.java | 98 ++++- .../org/alfresco/web/bean/SearchContext.java | 42 +- .../org/alfresco/web/bean/TrashcanBean.java | 380 +++++++++++++++++- .../web/bean/actions/BaseActionWizard.java | 20 +- .../web/bean/content/BaseContentWizard.java | 4 +- .../web/bean/dialog/BaseDialogBean.java | 3 + .../web/bean/dialog/DialogManager.java | 11 + .../web/bean/repository/Repository.java | 17 +- .../web/bean/rules/CreateRuleWizard.java | 6 +- .../web/bean/spaces/CreateSpaceWizard.java | 4 +- .../web/bean/wizard/BaseContentWizard.java | 4 +- .../web/bean/wizard/NewSpaceWizard.java | 4 +- .../web/bean/wizard/WizardManager.java | 11 + .../web/config/ActionsConfigElement.java | 93 ++++- .../web/config/ActionsElementReader.java | 15 +- .../config/AdvancedSearchConfigElement.java | 62 ++- .../config/AdvancedSearchElementReader.java | 19 + .../web/config/ClientConfigElement.java | 62 +-- .../config/CommandServletConfigElement.java | 12 +- .../web/config/DialogsConfigElement.java | 17 +- .../web/config/DialogsElementReader.java | 4 +- .../web/config/LanguagesConfigElement.java | 16 +- .../web/config/NavigationConfigElement.java | 18 +- .../config/PropertySheetConfigElement.java | 8 +- .../web/config/ViewsConfigElement.java | 42 +- .../web/config/WebClientConfigTest.java | 112 ++++++ .../web/config/WizardsConfigElement.java | 18 +- .../web/config/WizardsElementReader.java | 4 +- .../web/ui/repo/component/UIActions.java | 8 +- .../alfresco/web/ui/repo/tag/NodePathTag.java | 2 +- .../org/alfresco/web/ui/repo/tag/PageTag.java | 4 +- .../test-config-dialogs-wizards.xml | 10 +- .../test-resources/test-config-override.xml | 29 +- source/test-resources/test-config.xml | 29 ++ .../web/WEB-INF/faces-config-navigation.xml | 4 + source/web/css/main.css | 18 + source/web/images/filetypes/js.gif | Bin 0 -> 1058 bytes source/web/images/filetypes32/js.gif | Bin 0 -> 1072 bytes source/web/images/icons/reapply_rules.gif | Bin 0 -> 609 bytes source/web/images/logo/sflogo.php.png | Bin 0 -> 1040 bytes source/web/jsp/actions/actions.jsp | 6 - .../create-content-wizard/create-html.jsp | 6 +- .../create-content-wizard/create-text.jsp | 2 - .../content/create-content-wizard/details.jsp | 2 - .../jsp/content/edit-content-properties.jsp | 2 - source/web/jsp/dialog/about.jsp | 10 +- source/web/jsp/dialog/advanced-search.jsp | 8 + source/web/jsp/dialog/container.jsp | 3 + source/web/jsp/rules/conditions.jsp | 6 - source/web/jsp/rules/details.jsp | 6 - source/web/jsp/spaces/create-space-dialog.jsp | 8 - .../spaces/create-space-wizard/details.jsp | 4 - source/web/jsp/spaces/edit-space-dialog.jsp | 6 - source/web/jsp/trashcan/delete-listed.jsp | 2 +- source/web/jsp/trashcan/recover-item.jsp | 3 +- source/web/jsp/trashcan/recover-listed.jsp | 34 +- source/web/jsp/trashcan/recovery-report.jsp | 169 ++++++++ source/web/jsp/trashcan/trash-list.jsp | 14 +- source/web/jsp/wizard/container.jsp | 11 +- 67 files changed, 1364 insertions(+), 389 deletions(-) create mode 100644 source/web/images/filetypes/js.gif create mode 100644 source/web/images/filetypes32/js.gif create mode 100644 source/web/images/icons/reapply_rules.gif create mode 100644 source/web/images/logo/sflogo.php.png create mode 100644 source/web/jsp/trashcan/recovery-report.jsp diff --git a/config/alfresco/extension/web-client-config-custom.xml.sample b/config/alfresco/extension/web-client-config-custom.xml.sample index b8a54707c8..fcaf522a8f 100644 --- a/config/alfresco/extension/web-client-config-custom.xml.sample +++ b/config/alfresco/extension/web-client-config-custom.xml.sample @@ -60,7 +60,7 @@ @@ -318,8 +318,7 @@ create_content /images/icons/new_content.gif - createContent - #{CreateContentWizard.startWizard} + wizard:createContent @@ -330,7 +329,6 @@ create_space /images/icons/create_space.gif dialog:createSpace - @@ -341,7 +339,6 @@ advanced_space_wizard /images/icons/create_space.gif wizard:createSpace - @@ -374,9 +371,6 @@ - - Write - manage_deleted_items /images/icons/trashcan.gif dialog:manageDeletedItems @@ -433,9 +427,9 @@ /images/icons/action.gif wizard:runAction #{WizardManager.setupParameters} - - #{actionContext.id} - + + #{actionContext.id} + @@ -466,7 +460,7 @@ reapply_rules - /images/icons/export.gif + /images/icons/reapply_rules.gif #{RulesBean.reapplyRules} diff --git a/config/alfresco/web-client-config-dialogs.xml b/config/alfresco/web-client-config-dialogs.xml index 8a8dfd1e36..2e95fbe78b 100644 --- a/config/alfresco/web-client-config-dialogs.xml +++ b/config/alfresco/web-client-config-dialogs.xml @@ -1,6 +1,6 @@ - + /jsp/dialog/container.jsp @@ -8,7 +8,7 @@ + description-id="create_space_description" error-message-id="error_create_space_dialog" /> - + org.alfresco.web.action.evaluator.DiscussNodeEvaluator @@ -180,89 +180,35 @@ false - inlineAction - - - - - - - - - - + - - - - - - - false - inlineAction - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/config/alfresco/web-client-config-wizards.xml b/config/alfresco/web-client-config-wizards.xml index 0ee698ff88..638d499e6b 100644 --- a/config/alfresco/web-client-config-wizards.xml +++ b/config/alfresco/web-client-config-wizards.xml @@ -1,6 +1,6 @@ - + /jsp/wizard/container.jsp @@ -144,12 +144,11 @@ description-id="create_content_step2_desc" instruction-id="default_instruction" /> - - - + + - + + + + + + - - - - - - - + + - + + + + + + + + + - + + - + + + + + + + @@ -196,6 +211,7 @@ + diff --git a/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java b/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java index c87c132971..fe95708dfa 100644 --- a/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java +++ b/source/java/org/alfresco/web/app/AlfrescoNavigationHandler.java @@ -52,8 +52,6 @@ public class AlfrescoNavigationHandler extends NavigationHandler public final static String CLOSE_WIZARD_OUTCOME = WIZARD_PREFIX + "close"; protected final static String CONFIG_NAV_BEAN = "NavigationBean"; - protected final static String CONFIG_DIALOGS = "Dialogs"; - protected final static String CONFIG_WIZARDS = "Wizards"; protected String dialogContainer = null; protected String wizardContainer = null; @@ -252,8 +250,7 @@ public class AlfrescoNavigationHandler extends NavigationHandler /** * Returns the dialog configuration object for the given dialog name. * If there is a node in the dispatch context a lookup is performed using - * the node. If this doesn't return any config or there is no dispatch - * context node a 'global' dialog lookup is performed. + * the node otherwise the global config section is used. * * * @param name The name of dialog being launched @@ -265,32 +262,26 @@ public class AlfrescoNavigationHandler extends NavigationHandler DialogConfig dialogConfig = null; ConfigService configSvc = Application.getConfigService(context); + Config config = null; + if (dispatchContext != null) { - Config config = configSvc.getConfig(dispatchContext); - if (config != null) - { - DialogsConfigElement dialogsCfg = (DialogsConfigElement)config.getConfigElement( - DialogsConfigElement.CONFIG_ELEMENT_ID); - if (dialogsCfg != null) - { - dialogConfig = dialogsCfg.getDialog(name); - } - } + // use the node to perform the lookup (this will include the global section) + config = configSvc.getConfig(dispatchContext); } - - // if we didn't find a dialog via the dispatch look it up in the 'global' dialogs config - if (dialogConfig == null) + else { - Config config = configSvc.getConfig(CONFIG_DIALOGS); - if (config != null) + // just use the global + config = configSvc.getGlobalConfig(); + } + + if (config != null) + { + DialogsConfigElement dialogsCfg = (DialogsConfigElement)config.getConfigElement( + DialogsConfigElement.CONFIG_ELEMENT_ID); + if (dialogsCfg != null) { - DialogsConfigElement dialogsCfg = (DialogsConfigElement)config.getConfigElement( - DialogsConfigElement.CONFIG_ELEMENT_ID); - if (dialogsCfg != null) - { - dialogConfig = dialogsCfg.getDialog(name); - } + dialogConfig = dialogsCfg.getDialog(name); } } @@ -300,7 +291,7 @@ public class AlfrescoNavigationHandler extends NavigationHandler /** * Returns the wizard configuration object for the given wizard name. * If there is a node in the dispatch context a lookup is performed using - * the node otherwise a 'global' wizard lookup is performed. + * the node otherwise the global config section is used. * * @param name The name of wizard being launched * @param dispatchContext The node being acted upon @@ -311,32 +302,26 @@ public class AlfrescoNavigationHandler extends NavigationHandler WizardConfig wizardConfig = null; ConfigService configSvc = Application.getConfigService(context); + Config config = null; + if (dispatchContext != null) { - Config config = configSvc.getConfig(dispatchContext); - if (config != null) - { - WizardsConfigElement wizardsCfg = (WizardsConfigElement)config.getConfigElement( - WizardsConfigElement.CONFIG_ELEMENT_ID); - if (wizardsCfg != null) - { - wizardConfig = wizardsCfg.getWizard(name); - } - } + // use the node to perform the lookup (this will include the global section) + config = configSvc.getConfig(dispatchContext); } - - // if we didn't find a dialog via the dispatch look it up in the 'global' wizards config - if (wizardConfig == null) + else { - Config config = configSvc.getConfig(CONFIG_WIZARDS); - if (config != null) + // just use the global + config = configSvc.getGlobalConfig(); + } + + if (config != null) + { + WizardsConfigElement wizardsCfg = (WizardsConfigElement)config.getConfigElement( + WizardsConfigElement.CONFIG_ELEMENT_ID); + if (wizardsCfg != null) { - WizardsConfigElement wizardsCfg = (WizardsConfigElement)config.getConfigElement( - WizardsConfigElement.CONFIG_ELEMENT_ID); - if (wizardsCfg != null) - { - wizardConfig = wizardsCfg.getWizard(name); - } + wizardConfig = wizardsCfg.getWizard(name); } } @@ -354,11 +339,11 @@ public class AlfrescoNavigationHandler extends NavigationHandler if (this.dialogContainer == null) { ConfigService configSvc = Application.getConfigService(context); - Config dialogsConfig = configSvc.getConfig(CONFIG_DIALOGS); + Config globalConfig = configSvc.getGlobalConfig(); - if (dialogsConfig != null) + if (globalConfig != null) { - this.dialogContainer = dialogsConfig.getConfigElement("dialog-container").getValue(); + this.dialogContainer = globalConfig.getConfigElement("dialog-container").getValue(); } } @@ -376,11 +361,11 @@ public class AlfrescoNavigationHandler extends NavigationHandler if (this.wizardContainer == null) { ConfigService configSvc = Application.getConfigService(context); - Config wizardsConfig = configSvc.getConfig(CONFIG_WIZARDS); + Config globalConfig = configSvc.getGlobalConfig(); - if (wizardsConfig != null) + if (globalConfig != null) { - this.wizardContainer = wizardsConfig.getConfigElement("wizard-container").getValue(); + this.wizardContainer = globalConfig.getConfigElement("wizard-container").getValue(); } } diff --git a/source/java/org/alfresco/web/bean/AdvancedSearchBean.java b/source/java/org/alfresco/web/bean/AdvancedSearchBean.java index 106b9a7b20..44047c6587 100644 --- a/source/java/org/alfresco/web/bean/AdvancedSearchBean.java +++ b/source/java/org/alfresco/web/bean/AdvancedSearchBean.java @@ -522,6 +522,22 @@ public class AdvancedSearchBean this.contentType = contentType; } + /** + * @return Returns the folder type currenty selected + */ + public String getFolderType() + { + return this.folderType; + } + + /** + * @param folderType Sets the currently selected folder type + */ + public void setFolderType(String folderType) + { + this.folderType = folderType; + } + /** * @return Returns the contentFormat. */ @@ -571,16 +587,17 @@ public class AdvancedSearchBean { FacesContext context = FacesContext.getCurrentInstance(); + DictionaryService dictionaryService = Repository.getServiceRegistry(context).getDictionaryService(); + // add the well known cm:content object type by default this.contentTypes = new ArrayList(5); this.contentTypes.add(new SelectItem(ContentModel.TYPE_CONTENT.toString(), - Application.getMessage(context, MSG_CONTENT))); + dictionaryService.getType(ContentModel.TYPE_CONTENT).getTitle())); // add any configured content sub-types to the list List types = getSearchConfig().getContentTypes(); if (types != null) { - DictionaryService dictionaryService = Repository.getServiceRegistry(context).getDictionaryService(); for (String type : types) { QName idQName = Repository.resolveToQName(type); @@ -613,6 +630,58 @@ public class AdvancedSearchBean return this.contentTypes; } + /** + * @return Returns a list of folder object types to allow the user to select from + */ + public List getFolderTypes() + { + if (this.folderTypes == null) + { + FacesContext context = FacesContext.getCurrentInstance(); + + DictionaryService dictionaryService = Repository.getServiceRegistry(context).getDictionaryService(); + + // add the well known cm:folder object type by default + this.folderTypes = new ArrayList(5); + this.folderTypes.add(new SelectItem(ContentModel.TYPE_FOLDER.toString(), + dictionaryService.getType(ContentModel.TYPE_FOLDER).getTitle())); + + // add any configured folder sub-types to the list + List types = getSearchConfig().getFolderTypes(); + if (types != null) + { + for (String type : types) + { + QName idQName = Repository.resolveToQName(type); + if (idQName != null) + { + TypeDefinition typeDef = dictionaryService.getType(idQName); + + if (typeDef != null && dictionaryService.isSubClass(typeDef.getName(), ContentModel.TYPE_FOLDER)) + { + // try and get label from the dictionary + String label = typeDef.getTitle(); + + // else just use the localname + if (label == null) + { + label = idQName.getLocalName(); + } + + this.folderTypes.add(new SelectItem(idQName.toString(), label)); + } + } + } + + // make sure the list is sorted by the label + QuickSort sorter = new QuickSort(this.folderTypes, "label", true, IDataContainer.SORT_CASEINSENSITIVE); + sorter.sort(); + } + } + + return this.folderTypes; + } + /** * @return Returns a list of content formats to allow the user to select from */ @@ -662,6 +731,7 @@ public class AdvancedSearchBean this.lookin = LOOKIN_ALL; this.contentType = null; this.contentFormat = null; + this.folderType = null; this.location = null; this.locationChildren = true; this.categories = new ArrayList(2); @@ -822,6 +892,12 @@ public class AdvancedSearchBean search.setContentType(this.contentType); } + // folder type restriction + if (this.folderType != null) + { + search.setFolderType(this.folderType); + } + // set the Search Context onto the top-level navigator bean // this causes the browse screen to switch into search results view this.navigator.setSearchContext(search); @@ -1168,6 +1244,7 @@ public class AdvancedSearchBean this.contentType = search.getContentType(); this.contentFormat = search.getMimeType(); + this.folderType = search.getFolderType(); this.description = search.getAttributeQuery(ContentModel.PROP_DESCRIPTION); this.title = search.getAttributeQuery(ContentModel.PROP_TITLE); @@ -1476,7 +1553,6 @@ public class AdvancedSearchBean // ------------------------------------------------------------------------------ // Private data - private static final String MSG_CONTENT = "content"; private static final String MSG_ALL_FORMATS = "all_formats"; private static final String MSG_ERROR_SAVE_SEARCH = "error_save_search"; private static final String MSG_ERROR_RESTORE_SEARCH = "error_restore_search"; @@ -1536,17 +1612,23 @@ public class AdvancedSearchBean /** lookup of custom property QName string to DataTypeDefinition for the property */ private Map customPropertyLookup = null; - /** content types to for restricting searches */ - private List contentTypes; - /** content format list restricting searches */ private List contentFormats; + /** content format selection */ + private String contentFormat; + /** content type selection */ private String contentType; - /** content format selection */ - private String contentFormat; + /** content types for restricting searches */ + private List contentTypes; + + /** folder type selection */ + private String folderType; + + /** folder types for restricting searches */ + private List folderTypes; /** the text to search for */ private String text = ""; diff --git a/source/java/org/alfresco/web/bean/SearchContext.java b/source/java/org/alfresco/web/bean/SearchContext.java index 5aea16661e..f100d0d4d8 100644 --- a/source/java/org/alfresco/web/bean/SearchContext.java +++ b/source/java/org/alfresco/web/bean/SearchContext.java @@ -73,6 +73,7 @@ public final class SearchContext implements Serializable private static final String ELEMENT_ATTRIBUTES = "attributes"; private static final String ELEMENT_MIMETYPE = "mimetype"; private static final String ELEMENT_CONTENT_TYPE = "content-type"; + private static final String ELEMENT_FOLDER_TYPE = "folder-type"; private static final String ELEMENT_CATEGORY = "category"; private static final String ELEMENT_CATEGORIES = "categories"; private static final String ELEMENT_LOCATION = "location"; @@ -104,6 +105,9 @@ public final class SearchContext implements Serializable /** categories to add to the search */ private String[] categories = new String[0]; + /** folder type to restrict search against */ + private String folderType = null; + /** content type to restrict search against */ private String contentType = null; @@ -384,8 +388,16 @@ public final class SearchContext implements Serializable fileTypeQuery = " TYPE:\"{" + NamespaceService.CONTENT_MODEL_1_0_URI + "}content\" "; } - // match against FOLDER type - String folderTypeQuery = " TYPE:\"{" + NamespaceService.CONTENT_MODEL_1_0_URI + "}folder\" "; + // match against appropriate folder type + String folderTypeQuery; + if (folderType != null) + { + folderTypeQuery = " TYPE:\"" + folderType + "\" "; + } + else + { + folderTypeQuery = " TYPE:\"{" + NamespaceService.CONTENT_MODEL_1_0_URI + "}folder\" "; + } String fullTextQuery = fullTextBuf.toString(); String nameAttrQuery = nameAttrBuf.toString(); @@ -595,6 +607,22 @@ public final class SearchContext implements Serializable this.contentType = contentType; } + /** + * @return Returns the folderType. + */ + public String getFolderType() + { + return this.folderType; + } + + /** + * @param folderType The folder type to restrict attribute search against. + */ + public void setFolderType(String folderType) + { + this.folderType = folderType; + } + /** * @return Returns the mimeType. */ @@ -690,6 +718,7 @@ public final class SearchContext implements Serializable * XPath * * String + * String * String * * String @@ -735,6 +764,10 @@ public final class SearchContext implements Serializable { root.addElement(ELEMENT_CONTENT_TYPE).addText(this.contentType); } + if (this.folderType != null) + { + root.addElement(ELEMENT_FOLDER_TYPE).addText(this.folderType); + } if (this.mimeType != null && this.mimeType.length() != 0) { root.addElement(ELEMENT_MIMETYPE).addText(this.mimeType); @@ -834,6 +867,11 @@ public final class SearchContext implements Serializable { this.contentType = contentTypeElement.getText(); } + Element folderTypeElement = rootElement.element(ELEMENT_FOLDER_TYPE); + if (folderTypeElement != null) + { + this.folderType = folderTypeElement.getText(); + } Element mimetypeElement = rootElement.element(ELEMENT_MIMETYPE); if (mimetypeElement != null) { diff --git a/source/java/org/alfresco/web/bean/TrashcanBean.java b/source/java/org/alfresco/web/bean/TrashcanBean.java index eab0d28bdd..763a9d6c45 100644 --- a/source/java/org/alfresco/web/bean/TrashcanBean.java +++ b/source/java/org/alfresco/web/bean/TrashcanBean.java @@ -35,10 +35,10 @@ import org.alfresco.repo.node.archive.RestoreNodeReport; import org.alfresco.repo.node.archive.RestoreNodeReport.RestoreStatus; import org.alfresco.repo.search.impl.lucene.QueryParser; import org.alfresco.service.cmr.dictionary.DictionaryService; +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.repository.NodeService; -import org.alfresco.service.cmr.repository.Path; import org.alfresco.service.cmr.search.ResultSet; import org.alfresco.service.cmr.search.ResultSetRow; import org.alfresco.service.cmr.search.SearchParameters; @@ -47,6 +47,7 @@ import org.alfresco.service.namespace.QName; import org.alfresco.util.CachingDateFormat; import org.alfresco.web.app.Application; import org.alfresco.web.app.context.IContextListener; +import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.NodePropertyResolver; @@ -64,6 +65,23 @@ import org.alfresco.web.ui.common.component.data.UIRichList; */ public class TrashcanBean implements IContextListener { + private static final String MSG_DELETED_ITEMS_FOR = "deleted_items_for"; + private static final String MSG_DELETED_ITEMS = "deleted_items"; + private static final String MSG_RECOVERED_ITEM_INTEGRITY = "recovered_item_integrity"; + private static final String MSG_RECOVERED_ITEM_PERMISSION = "recovered_item_permission"; + private static final String MSG_RECOVERED_ITEM_PARENT = "recovered_item_parent"; + private static final String MSG_RECOVERED_ITEM_FAILURE = "recovered_item_failure"; + private static final String MSG_RECOVERED_ITEM_INTEGRITY_S = "recovered_item_integrity_short"; + private static final String MSG_RECOVERED_ITEM_PERMISSION_S = "recovered_item_permission_short"; + private static final String MSG_RECOVERED_ITEM_PARENT_S = "recovered_item_parent_short"; + private static final String MSG_RECOVERED_ITEM_FAILURE_S = "recovered_item_failure_short"; + private static final String MSG_RECOVERED_ITEM_SUCCESS = "recovered_item_success"; + private static final String MSG_RECOVERY_REASON = "recovery_report_reason"; + private static final String MSG_LOCATION = "location"; + private static final String MSG_NAME = "name"; + + private static final String PROP_RECOVERSTATUS = "recoverstatus"; + private static final String FILTER_DATE_ALL = "all"; private static final String FILTER_DATE_TODAY = "today"; private static final String FILTER_DATE_WEEK = "week"; @@ -71,15 +89,8 @@ public class TrashcanBean implements IContextListener private static final String FILTER_USER_ALL = "all"; private static final String FILTER_USER_USER = "user"; - private static final String MSG_DELETED_ITEMS_FOR = "deleted_items_for"; - private static final String MSG_DELETED_ITEMS = "deleted_items"; - private static final String MSG_RECOVERED_ITEM_INTEGRITY = "recovered_item_integrity"; - private static final String MSG_RECOVERED_ITEM_PERMISSION = "recovered_item_permission"; - private static final String MSG_RECOVERED_ITEM_PARENT = "recovered_item_parent"; - private static final String MSG_RECOVERED_ITEM_FAILURE = "recovered_item_failure"; - private static final String MSG_RECOVERED_ITEM_SUCCESS = "recovered_item_success"; - private static final String OUTCOME_DIALOGCLOSE = "dialog:close"; + private static final String OUTCOME_RECOVERY_REPORT = "recoveryReport"; private static final String RICHLIST_ID = "trashcan-list"; private static final String RICHLIST_MSG_ID = "trashcan" + ':' + RICHLIST_ID; @@ -121,6 +132,10 @@ public class TrashcanBean implements IContextListener /** Currently listed items */ private List listedItems = Collections.emptyList(); + private List successItems = Collections.emptyList(); + + private List failureItems = Collections.emptyList(); + /** Current action context Node */ private Node actionNode; @@ -331,6 +346,38 @@ public class TrashcanBean implements IContextListener { this.listedItems = listedItems; } + + /** + * @return HTML table of the listed items + */ + public String getListedItemsTable() + { + return buildItemsTable(getListedItems(), "recoveredItemsList", false, true); + } + + /** + * @return HTML table of the items successfully recovered + */ + public String getSuccessItemsTable() + { + return buildItemsTable(this.successItems, "recoveredItemsList", false, false); + } + + /** + * @return HTML table of the items that failed to recover + */ + public String getFailureItemsTable() + { + return buildItemsTable(this.failureItems, "failedItemsList", true, false); + } + + /** + * @return count of the items that failed to recover + */ + public int getFailureItemsCount() + { + return this.failureItems.size(); + } /** * @param node The item context for the current action @@ -432,13 +479,31 @@ public class TrashcanBean implements IContextListener private NodePropertyResolver resolverLocationPath = new NodePropertyResolver() { public Object get(Node node) { - return (Path)node.getProperties().get(ContentModel.PROP_ARCHIVED_ORIGINAL_PATH); + ChildAssociationRef childRef = + (ChildAssociationRef)node.getProperties().get(ContentModel.PROP_ARCHIVED_ORIGINAL_PARENT_ASSOC); + if (nodeService.exists(childRef.getParentRef())) + { + return nodeService.getPath(childRef.getParentRef()); + } + else + { + return null; + } } }; private NodePropertyResolver resolverDisplayPath = new NodePropertyResolver() { public Object get(Node node) { - return Repository.getDisplayPath((Path)node.getProperties().get(ContentModel.PROP_ARCHIVED_ORIGINAL_PATH)); + ChildAssociationRef childRef = + (ChildAssociationRef)node.getProperties().get(ContentModel.PROP_ARCHIVED_ORIGINAL_PARENT_ASSOC); + if (nodeService.exists(childRef.getParentRef())) + { + return Repository.getDisplayPath(nodeService.getPath(childRef.getParentRef()), true); + } + else + { + return ""; + } } }; @@ -492,10 +557,6 @@ public class TrashcanBean implements IContextListener // ------------------------------------------------------------------------------ // Action handlers - // TODO: - // need the following Action Handlers: - // deleteAllItemsOK, recoverAllItemsOK, recoverListedItemsOK, deleteListedItemsOK - /** * Search the deleted item store by name */ @@ -580,6 +641,16 @@ public class TrashcanBean implements IContextListener contextUpdated(); } + /** + * Action handler to setup actions that act on lists + */ + public void setupListAction(ActionEvent event) + { + // clear the UI state in preparation for finishing the next action + setDestination(null); + contextUpdated(); + } + /** * Delete single item OK button handler */ @@ -689,6 +760,146 @@ public class TrashcanBean implements IContextListener return outcome; } + /** + * Action handler to recover the list items + */ + public String recoverListedItemsOK() + { + FacesContext fc = FacesContext.getCurrentInstance(); + + // restore the nodes - the user may have requested a restore to a different parent + List nodeRefs = new ArrayList(this.listedItems.size()); + for (Node node : this.listedItems) + { + nodeRefs.add(node.getNodeRef()); + } + List reports; + if (this.destination == null) + { + reports = this.nodeArchiveService.restoreArchivedNodes(nodeRefs); + } + else + { + reports = this.nodeArchiveService.restoreArchivedNodes(nodeRefs, this.destination, null, null); + } + + UserTransaction tx = null; + try + { + tx = Repository.getUserTransaction(FacesContext.getCurrentInstance(), true); + tx.begin(); + + saveReportDetail(reports); + + tx.commit(); + } + catch (Throwable err) + { + try { if (tx != null) {tx.rollback();} } catch (Exception tex) {} + // most exceptions will be caught and returned as RestoreNodeReport objects by the service + String reason = err.getMessage(); + String msg = MessageFormat.format( + Application.getMessage(fc, Repository.ERROR_GENERIC), reason); + FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg); + fc.addMessage(null, facesMsg); + } + + return OUTCOME_RECOVERY_REPORT; + } + + /** + * Action handler called to recover all items from the store (Admin only) + */ + public String recoverAllItemsOK() + { + FacesContext fc = FacesContext.getCurrentInstance(); + + // restore all nodes - the user may have requested a restore to a different parent + List reports; + if (this.destination == null) + { + reports = this.nodeArchiveService.restoreAllArchivedNodes(Repository.getStoreRef()); + } + else + { + reports = this.nodeArchiveService.restoreAllArchivedNodes(Repository.getStoreRef(), this.destination, null, null); + } + + UserTransaction tx = null; + try + { + tx = Repository.getUserTransaction(FacesContext.getCurrentInstance(), true); + tx.begin(); + + saveReportDetail(reports); + + tx.commit(); + } + catch (Throwable err) + { + try { if (tx != null) {tx.rollback();} } catch (Exception tex) {} + // most exceptions will be caught and returned as RestoreNodeReport objects by the service + String reason = err.getMessage(); + String msg = MessageFormat.format( + Application.getMessage(fc, Repository.ERROR_GENERIC), reason); + FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, msg); + fc.addMessage(null, facesMsg); + } + + return OUTCOME_RECOVERY_REPORT; + } + + /** + * @return outcome to close the main list screen and reset other beans ready for display + */ + public String close() + { + // call beans to update UI context for other screens + UIContextService.getInstance(FacesContext.getCurrentInstance()).notifyBeans(); + return OUTCOME_DIALOGCLOSE; + } + + /** + * Action handler to delete the listed items + */ + public String deleteListedItemsOK() + { + try + { + List nodeRefs = new ArrayList(this.listedItems.size()); + for (Node node : this.listedItems) + { + nodeRefs.add(node.getNodeRef()); + } + this.nodeArchiveService.purgeArchivedNodes(nodeRefs); + } + catch (Throwable err) + { + Utils.addErrorMessage(MessageFormat.format(Application.getMessage( + FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err); + } + + return OUTCOME_DIALOGCLOSE; + } + + /** + * Action handler to delete all items + */ + public String deleteAllItemsOK() + { + try + { + this.nodeArchiveService.purgeAllArchivedNodes(Repository.getStoreRef()); + } + catch (Throwable err) + { + Utils.addErrorMessage(MessageFormat.format(Application.getMessage( + FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), err.getMessage()), err); + } + + return OUTCOME_DIALOGCLOSE; + } + /** * Action handler to initially setup the trashcan screen */ @@ -825,6 +1036,145 @@ public class TrashcanBean implements IContextListener return query; } + /** + * Save the detail of the items that were successfully or unsuccessfully restored + * + * @param reports The List of RestoreNodeReport objects to walk for results + */ + private void saveReportDetail(List reports) + { + // store the results ready for the next dialog page + this.successItems = new ArrayList(reports.size()); + this.failureItems = new ArrayList(reports.size()); + for (RestoreNodeReport report : reports) + { + if (RestoreStatus.SUCCESS == report.getStatus()) + { + Node node = new Node(report.getRestoredNodeRef()); + node.getProperties().put(PROP_RECOVERSTATUS, report.getStatus()); + this.successItems.add(node); + } + else + { + Node node = new Node(report.getArchivedNodeRef()); + node.getProperties().put(PROP_RECOVERSTATUS, report.getStatus()); + this.failureItems.add(node); + } + } + } + + /** + * Build an HTML table of the items that are to be or have been recovered. + * + * @param items List of Node objects to display in the table + * @param cssClass CSS style to apply to the table + * @param report Set true to report the reason for any failure. This flag requires that the Node + * object has a pseudo property "recoverstatus" containing the RestoreStatus. + * @param archivedPath Set true to show the path from the 'sys:archivedOriginalParentAssoc' property, + * else the current Node Path will be used. + * + * + * @return HTML table of node info + */ + private String buildItemsTable(List items, String cssClass, boolean report, boolean archivedPath) + { + FacesContext fc = FacesContext.getCurrentInstance(); + String contextPath = fc.getExternalContext().getRequestContextPath(); + + StringBuilder buf = new StringBuilder(1024); + + // outer table + buf.append(""); + // title row + buf.append(""); + if (report == true) + { + buf.append(""); + } + else + { + buf.append(""); + } + buf.append(""); + for (Node node : items) + { + // listed item rows + buf.append(""); + + if (report) + { + buf.append(""); + } + else + { + buf.append(""); + } + + buf.append(""); + } + // end table + buf.append("
"); + buf.append(Application.getMessage(fc, MSG_NAME)); + buf.append(""); + buf.append(Application.getMessage(fc, MSG_RECOVERY_REASON)); + buf.append(""); + buf.append(Application.getMessage(fc, MSG_LOCATION)); + buf.append("
"); + String img; + if (this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_FOLDER)) + { + String icon = (String)node.getProperties().get("app:icon"); + img = "/images/icons/" + (icon != null ? icon + "-16.gif" : BrowseBean.SPACE_SMALL_DEFAULT + ".gif"); + } + else + { + img = Utils.getFileTypeImage(node.getName(), false); + } + buf.append(""); + buf.append(""); + buf.append(node.getName()); + buf.append(""); + String msg; + switch ((RestoreStatus)node.getProperties().get(PROP_RECOVERSTATUS)) + { + case FAILURE_INVALID_PARENT: + msg = MSG_RECOVERED_ITEM_PARENT_S; + break; + + case FAILURE_PERMISSION: + msg = MSG_RECOVERED_ITEM_PERMISSION_S; + break; + + case FAILURE_INTEGRITY: + msg = MSG_RECOVERED_ITEM_INTEGRITY_S; + break; + + default: + msg = MSG_RECOVERED_ITEM_FAILURE_S; + break; + } + buf.append(Application.getMessage(fc, msg)); + buf.append(""); + if (archivedPath) + { + ChildAssociationRef childRef = + (ChildAssociationRef)node.getProperties().get(ContentModel.PROP_ARCHIVED_ORIGINAL_PARENT_ASSOC); + if (nodeService.exists(childRef.getParentRef())) + { + buf.append(Repository.getNamePath(nodeService, nodeService.getPath(childRef.getParentRef()), null, "/", null)); + } + } + else + { + buf.append(Repository.getNamePath(nodeService, nodeService.getPath(node.getNodeRef()), null, "/", null)); + } + buf.append("
"); + + return buf.toString(); + } + private boolean isAdminUser() { return Application.getCurrentUser(FacesContext.getCurrentInstance()).isAdmin(); diff --git a/source/java/org/alfresco/web/bean/actions/BaseActionWizard.java b/source/java/org/alfresco/web/bean/actions/BaseActionWizard.java index 3154896bbe..f62a63863a 100644 --- a/source/java/org/alfresco/web/bean/actions/BaseActionWizard.java +++ b/source/java/org/alfresco/web/bean/actions/BaseActionWizard.java @@ -306,12 +306,12 @@ public abstract class BaseActionWizard extends BaseWizardBean } else { - logger.warn("Could not find aspects configuration element"); + logger.warn("Could not find 'aspects' configuration element"); } } else { - logger.warn("Could not find Action Wizards configuration section"); + logger.warn("Could not find 'Action Wizards' configuration section"); } } @@ -334,10 +334,10 @@ public abstract class BaseActionWizard extends BaseWizardBean // add any configured content sub-types to the list ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance()); - Config wizardCfg = svc.getConfig("Custom Content Types"); + Config wizardCfg = svc.getConfig("Action Wizards"); if (wizardCfg != null) { - ConfigElement typesCfg = wizardCfg.getConfigElement("content-types"); + ConfigElement typesCfg = wizardCfg.getConfigElement("specialise-types"); if (typesCfg != null) { for (ConfigElement child : typesCfg.getChildren()) @@ -373,12 +373,12 @@ public abstract class BaseActionWizard extends BaseWizardBean } else { - logger.warn("Could not find 'content-types' configuration element"); + logger.warn("Could not find 'specialise-types' configuration element"); } } else { - logger.warn("Could not find 'Custom Content Types' configuration section"); + logger.warn("Could not find 'Action Wizards' configuration section"); } } @@ -456,12 +456,12 @@ public abstract class BaseActionWizard extends BaseWizardBean } else { - logger.warn("Could not find transformers configuration element"); + logger.warn("Could not find 'transformers' configuration element"); } } else { - logger.warn("Could not find Action Wizards configuration section"); + logger.warn("Could not find 'Action Wizards' configuration section"); } } @@ -509,12 +509,12 @@ public abstract class BaseActionWizard extends BaseWizardBean } else { - logger.warn("Could not find image-transformers configuration element"); + logger.warn("Could not find 'image-transformers' configuration element"); } } else { - logger.warn("Could not find Action Wizards configuration section"); + logger.warn("Could not find 'Action Wizards' configuration section"); } } diff --git a/source/java/org/alfresco/web/bean/content/BaseContentWizard.java b/source/java/org/alfresco/web/bean/content/BaseContentWizard.java index 5f29234d2e..85282dd709 100644 --- a/source/java/org/alfresco/web/bean/content/BaseContentWizard.java +++ b/source/java/org/alfresco/web/bean/content/BaseContentWizard.java @@ -246,7 +246,7 @@ public abstract class BaseContentWizard extends BaseWizardBean // add any configured content sub-types to the list ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance()); - Config wizardCfg = svc.getConfig("Custom Content Types"); + Config wizardCfg = svc.getConfig("Content Wizards"); if (wizardCfg != null) { ConfigElement typesCfg = wizardCfg.getConfigElement("content-types"); @@ -305,7 +305,7 @@ public abstract class BaseContentWizard extends BaseWizardBean } else { - logger.warn("Could not find 'Custom Content Types' configuration section"); + logger.warn("Could not find 'Content Wizards' configuration section"); } } diff --git a/source/java/org/alfresco/web/bean/dialog/BaseDialogBean.java b/source/java/org/alfresco/web/bean/dialog/BaseDialogBean.java index 2bc9cd7db1..f2a906d448 100644 --- a/source/java/org/alfresco/web/bean/dialog/BaseDialogBean.java +++ b/source/java/org/alfresco/web/bean/dialog/BaseDialogBean.java @@ -90,6 +90,9 @@ public abstract class BaseDialogBean implements IDialogBean } catch (Throwable e) { + // reset the flag so we can re-attempt the operation + isFinished = false; + // rollback the transaction try { if (tx != null) {tx.rollback();} } catch (Exception ex) {} Utils.addErrorMessage(formatErrorMessage(e)); diff --git a/source/java/org/alfresco/web/bean/dialog/DialogManager.java b/source/java/org/alfresco/web/bean/dialog/DialogManager.java index b28ebe2f9c..a588eb5c77 100644 --- a/source/java/org/alfresco/web/bean/dialog/DialogManager.java +++ b/source/java/org/alfresco/web/bean/dialog/DialogManager.java @@ -94,6 +94,17 @@ public class DialogManager return this.currentDialogConfig.getIcon(); } + /** + * Returns the error message to use in error conditions + * + * @return The error message + */ + public String getErrorMessage() + { + return Application.getMessage(FacesContext.getCurrentInstance(), + this.currentDialogConfig.getErrorMessageId()); + } + /** * Returns the resolved title to use for the dialog * diff --git a/source/java/org/alfresco/web/bean/repository/Repository.java b/source/java/org/alfresco/web/bean/repository/Repository.java index 3f3b4b0ea0..3860ac21ee 100644 --- a/source/java/org/alfresco/web/bean/repository/Repository.java +++ b/source/java/org/alfresco/web/bean/repository/Repository.java @@ -223,10 +223,25 @@ public final class Repository * @return human readable form of the Path excluding the final element */ public static String getDisplayPath(Path path) + { + return getDisplayPath(path, false); + } + + /** + * Return the human readable form of the specified node Path. Fast version of the method that + * simply converts QName localname components to Strings. + * + * @param path Path to extract readable form from + * @param showLeaf Whether to process the final leaf element of the path + * + * @return human readable form of the Path excluding the final element + */ + public static String getDisplayPath(Path path, boolean showLeaf) { StringBuilder buf = new StringBuilder(64); - for (int i=0; i(); @@ -277,12 +277,12 @@ public class CreateRuleWizard extends BaseActionWizard } else { - logger.warn("Could not find types configuration element"); + logger.warn("Could not find 'subtypes' configuration element"); } } else { - logger.warn("Could not find Action Wizards configuration section"); + logger.warn("Could not find 'Action Wizards' configuration section"); } } diff --git a/source/java/org/alfresco/web/bean/spaces/CreateSpaceWizard.java b/source/java/org/alfresco/web/bean/spaces/CreateSpaceWizard.java index fb1590b8ba..f72775087f 100644 --- a/source/java/org/alfresco/web/bean/spaces/CreateSpaceWizard.java +++ b/source/java/org/alfresco/web/bean/spaces/CreateSpaceWizard.java @@ -470,7 +470,7 @@ public class CreateSpaceWizard extends BaseWizardBean // add any configured content sub-types to the list Config wizardCfg = Application.getConfigService(FacesContext.getCurrentInstance()). - getConfig("Custom Folder Types"); + getConfig("Space Wizards"); if (wizardCfg != null) { ConfigElement typesCfg = wizardCfg.getConfigElement("folder-types"); @@ -548,7 +548,7 @@ public class CreateSpaceWizard extends BaseWizardBean } else { - logger.warn("Could not find 'Custom Folder Types' configuration section"); + logger.warn("Could not find 'Space Wizards' configuration section"); } } diff --git a/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java b/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java index 4b9cdadcf2..3dafdc1f83 100644 --- a/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java +++ b/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java @@ -499,7 +499,7 @@ public abstract class BaseContentWizard extends AbstractWizardBean // add any configured content sub-types to the list ConfigService svc = Application.getConfigService(FacesContext.getCurrentInstance()); - Config wizardCfg = svc.getConfig("Custom Content Types"); + Config wizardCfg = svc.getConfig("Content Wizards"); if (wizardCfg != null) { ConfigElement typesCfg = wizardCfg.getConfigElement("content-types"); @@ -558,7 +558,7 @@ public abstract class BaseContentWizard extends AbstractWizardBean } else { - logger.warn("Could not find 'Custom Content Types' configuration section"); + logger.warn("Could not find 'Content Wizards' configuration section"); } } diff --git a/source/java/org/alfresco/web/bean/wizard/NewSpaceWizard.java b/source/java/org/alfresco/web/bean/wizard/NewSpaceWizard.java index b28ad83b57..f851e6ce87 100644 --- a/source/java/org/alfresco/web/bean/wizard/NewSpaceWizard.java +++ b/source/java/org/alfresco/web/bean/wizard/NewSpaceWizard.java @@ -558,7 +558,7 @@ public class NewSpaceWizard extends AbstractWizardBean // add any configured content sub-types to the list Config wizardCfg = Application.getConfigService(FacesContext.getCurrentInstance()). - getConfig("Custom Folder Types"); + getConfig("Space Wizards"); if (wizardCfg != null) { ConfigElement typesCfg = wizardCfg.getConfigElement("folder-types"); @@ -624,7 +624,7 @@ public class NewSpaceWizard extends AbstractWizardBean } else { - logger.warn("Could not find 'Custom Folder Types' configuration section"); + logger.warn("Could not find 'Space Wizards' configuration section"); } } diff --git a/source/java/org/alfresco/web/bean/wizard/WizardManager.java b/source/java/org/alfresco/web/bean/wizard/WizardManager.java index 6a696930fb..79c587f8c7 100644 --- a/source/java/org/alfresco/web/bean/wizard/WizardManager.java +++ b/source/java/org/alfresco/web/bean/wizard/WizardManager.java @@ -115,6 +115,17 @@ public class WizardManager return this.currentWizardConfig.getIcon(); } + /** + * Returns the error message to use in error conditions + * + * @return The error message + */ + public String getErrorMessage() + { + return Application.getMessage(FacesContext.getCurrentInstance(), + this.currentWizardConfig.getErrorMessageId()); + } + /** * Returns the resolved title to use for the wizard * diff --git a/source/java/org/alfresco/web/config/ActionsConfigElement.java b/source/java/org/alfresco/web/config/ActionsConfigElement.java index d880982405..4331d6b85a 100644 --- a/source/java/org/alfresco/web/config/ActionsConfigElement.java +++ b/source/java/org/alfresco/web/config/ActionsConfigElement.java @@ -18,8 +18,8 @@ package org.alfresco.web.config; import java.util.ArrayList; import java.util.HashMap; +import java.util.HashSet; import java.util.Iterator; -import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; @@ -29,6 +29,7 @@ import org.alfresco.config.ConfigElement; import org.alfresco.config.ConfigException; import org.alfresco.config.element.ConfigElementAdapter; import org.alfresco.web.action.ActionEvaluator; +import org.alfresco.web.bean.repository.Repository; /** * Action config element. @@ -71,15 +72,58 @@ public class ActionsConfigElement extends ConfigElementAdapter */ public ConfigElement combine(ConfigElement configElement) { - ActionsConfigElement existingElement = (ActionsConfigElement)configElement; + ActionsConfigElement newElement = (ActionsConfigElement)configElement; ActionsConfigElement combinedElement = new ActionsConfigElement(); + // add the existing action definitions combinedElement.actionDefs.putAll(this.actionDefs); - combinedElement.actionDefs.putAll(existingElement.actionDefs); + // overwrite any existing action definitions i.e. don't combine + combinedElement.actionDefs.putAll(newElement.actionDefs); + + // add the existing action groups combinedElement.actionGroups.putAll(this.actionGroups); - combinedElement.actionGroups.putAll(existingElement.actionGroups); + // any new action groups with the same name must be combined + for (ActionGroup newGroup : newElement.actionGroups.values()) + { + if (combinedElement.actionGroups.containsKey(newGroup.getId())) + { + // there is already a group with this id, combine it + // with the new one + ActionGroup combinedGroup = combinedElement.actionGroups.get(newGroup.getId()); + if (newGroup.ShowLink != combinedGroup.ShowLink) + { + combinedGroup.ShowLink = newGroup.ShowLink; + } + if (newGroup.Style != null) + { + combinedGroup.Style = newGroup.Style; + } + if (newGroup.StyleClass != null) + { + combinedGroup.StyleClass = newGroup.StyleClass; + } + + // add all the actions from the new group to the combined one + for (String actionRef : newGroup.getAllActions()) + { + combinedGroup.addAction(actionRef); + } + + // add all the hidden actions from the new group to the combined one + for (String actionRef : newGroup.getHiddenActions()) + { + combinedGroup.hideAction(actionRef); + } + } + else + { + // it's a new group so just add it + combinedElement.actionGroups.put(newGroup.getId(), newGroup); + } + } + return combinedElement; } @@ -210,17 +254,43 @@ public class ActionsConfigElement extends ConfigElementAdapter return id; } - public void addAction(String actionId) + /** + * @return Iterator over the visible ActionDefinition IDs referenced by this group + */ + public Iterator iterator() + { + // create a list of the visible actions and return it's iterator + ArrayList visibleActions = new ArrayList( + this.actions.size() - this.hiddenActions.size()); + for (String actionId : this.actions) + { + if (this.hiddenActions.contains(actionId) == false) + { + visibleActions.add(actionId); + } + } + + return visibleActions.iterator(); + } + + /*package*/ void addAction(String actionId) { actions.add(actionId); } - /** - * @return Iterator over the ActionDefinition IDs referenced by this group - */ - public Iterator iterator() + /*package*/ void hideAction(String actionId) { - return actions.iterator(); + this.hiddenActions.add(actionId); + } + + /*package*/ Set getAllActions() + { + return this.actions; + } + + /*pacakge*/ Set getHiddenActions() + { + return this.hiddenActions; } private String id; @@ -229,6 +299,9 @@ public class ActionsConfigElement extends ConfigElementAdapter than one action with the same Id and that the insertion order is preserved */ private Set actions = new LinkedHashSet(16, 1.0f); + /** the actions that have been hidden */ + private Set hiddenActions = new HashSet(4, 1.0f); + public boolean ShowLink; public String Style; public String StyleClass; diff --git a/source/java/org/alfresco/web/config/ActionsElementReader.java b/source/java/org/alfresco/web/config/ActionsElementReader.java index 8533270d36..6c1fce52d1 100644 --- a/source/java/org/alfresco/web/config/ActionsElementReader.java +++ b/source/java/org/alfresco/web/config/ActionsElementReader.java @@ -56,7 +56,7 @@ public class ActionsElementReader implements ConfigElementReader public static final String ATTRIBUTE_IDREF = "idref"; public static final String ATTRIBUTE_NAME = "name"; public static final String ATTRIBUTE_ALLOW = "allow"; - + public static final String ATTRIBUTE_HIDE = "hide"; /** * @see org.alfresco.config.xml.elementreader.ConfigElementReader#parse(org.dom4j.Element) @@ -123,8 +123,17 @@ public class ActionsElementReader implements ConfigElementReader } else { - // add the action definition ID to the group - actionGroup.addAction(idRef); + // look for the hide attribute + String hide = actionRefElement.attributeValue(ATTRIBUTE_HIDE); + if (hide != null && Boolean.parseBoolean(hide)) + { + actionGroup.hideAction(idRef); + } + else + { + // add the action definition ID to the group + actionGroup.addAction(idRef); + } } } diff --git a/source/java/org/alfresco/web/config/AdvancedSearchConfigElement.java b/source/java/org/alfresco/web/config/AdvancedSearchConfigElement.java index 6a711ba85b..7f32a07573 100644 --- a/source/java/org/alfresco/web/config/AdvancedSearchConfigElement.java +++ b/source/java/org/alfresco/web/config/AdvancedSearchConfigElement.java @@ -33,6 +33,7 @@ public class AdvancedSearchConfigElement extends ConfigElementAdapter public static final String CONFIG_ELEMENT_ID = "advanced-search"; private List contentTypes = null; + private List folderTypes = null; private List customProps = null; /** @@ -67,15 +68,22 @@ public class AdvancedSearchConfigElement extends ConfigElementAdapter */ public ConfigElement combine(ConfigElement configElement) { - AdvancedSearchConfigElement existingElement = (AdvancedSearchConfigElement)configElement; - AdvancedSearchConfigElement newElement = new AdvancedSearchConfigElement(); + AdvancedSearchConfigElement newElement = (AdvancedSearchConfigElement)configElement; + AdvancedSearchConfigElement combinedElement = new AdvancedSearchConfigElement(); // just copy the list of types and properties from this instance to the new one if (this.contentTypes != null) { for (String type : this.contentTypes) { - newElement.addContentType(type); + combinedElement.addContentType(type); + } + } + if (this.folderTypes != null) + { + for (String type : this.folderTypes) + { + combinedElement.addFolderType(type); } } @@ -83,28 +91,28 @@ public class AdvancedSearchConfigElement extends ConfigElementAdapter { for (CustomProperty property : this.customProps) { - newElement.addCustomProperty(property); + combinedElement.addCustomProperty(property); } } // now add those types and custom properties from the element to be combined - if (existingElement.getContentTypes() != null) + if (newElement.getContentTypes() != null) { - for (String type : existingElement.getContentTypes()) + for (String type : newElement.getContentTypes()) { - newElement.addContentType(type); + combinedElement.addContentType(type); } } - if (existingElement.getCustomProperties() != null) + if (newElement.getCustomProperties() != null) { - for (CustomProperty property : existingElement.getCustomProperties()) + for (CustomProperty property : newElement.getCustomProperties()) { - newElement.addCustomProperty(property); + combinedElement.addCustomProperty(property); } } - return newElement; + return combinedElement; } /** @@ -139,6 +147,38 @@ public class AdvancedSearchConfigElement extends ConfigElementAdapter } } + /** + * @return Returns the folderTypes. + */ + public List getFolderTypes() + { + return this.folderTypes; + } + + /** + * @param folderTypes The folderTypes to set. + */ + /*package*/ void setFolderTypes(List folderTypes) + { + this.folderTypes = folderTypes; + } + + /** + * @param folderType Adds the given folder type to the list + */ + /*package*/ void addFolderType(String folderType) + { + if (this.folderTypes == null) + { + this.folderTypes = new ArrayList(3); + } + + if (this.folderTypes.contains(folderType) == false) + { + this.folderTypes.add(folderType); + } + } + /** * @return Returns the customProps. */ diff --git a/source/java/org/alfresco/web/config/AdvancedSearchElementReader.java b/source/java/org/alfresco/web/config/AdvancedSearchElementReader.java index 62d9e05ae6..8ee3299349 100644 --- a/source/java/org/alfresco/web/config/AdvancedSearchElementReader.java +++ b/source/java/org/alfresco/web/config/AdvancedSearchElementReader.java @@ -34,6 +34,7 @@ import org.dom4j.Element; public class AdvancedSearchElementReader implements ConfigElementReader { public static final String ELEMENT_CONTENTTYPES = "content-types"; + public static final String ELEMENT_FOLDERTYPES = "folder-types"; public static final String ELEMENT_TYPE = "type"; public static final String ELEMENT_CUSTOMPROPS = "custom-properties"; public static final String ELEMENT_METADATA = "meta-data"; @@ -81,6 +82,24 @@ public class AdvancedSearchElementReader implements ConfigElementReader configElement.setContentTypes(types); } + // get the list of folder types + Element folderTypes = element.element(ELEMENT_FOLDERTYPES); + if (folderTypes != null) + { + Iterator typesItr = folderTypes.elementIterator(ELEMENT_TYPE); + List types = new ArrayList(5); + while (typesItr.hasNext()) + { + Element folderType = typesItr.next(); + String type = folderType.attributeValue(ATTRIBUTE_NAME); + if (type != null) + { + types.add(type); + } + } + configElement.setFolderTypes(types); + } + // get the list of custom properties to display Element customProps = element.element(ELEMENT_CUSTOMPROPS); if (customProps != null) diff --git a/source/java/org/alfresco/web/config/ClientConfigElement.java b/source/java/org/alfresco/web/config/ClientConfigElement.java index 602159cb92..fc7488ceea 100644 --- a/source/java/org/alfresco/web/config/ClientConfigElement.java +++ b/source/java/org/alfresco/web/config/ClientConfigElement.java @@ -63,88 +63,88 @@ public class ClientConfigElement extends ConfigElementAdapter */ public ConfigElement combine(ConfigElement configElement) { - ClientConfigElement existingElement = (ClientConfigElement)configElement; - ClientConfigElement newElement = new ClientConfigElement(); + ClientConfigElement newElement = (ClientConfigElement)configElement; + ClientConfigElement combinedElement = new ClientConfigElement(); // set those values that have changed - if (existingElement.getEditLinkType() == null) + if (newElement.getEditLinkType() == null) { - newElement.setEditLinkType(this.editLinkType); + combinedElement.setEditLinkType(this.editLinkType); } else { - newElement.setEditLinkType(existingElement.getEditLinkType()); + combinedElement.setEditLinkType(newElement.getEditLinkType()); } - if (existingElement.getErrorPage() == null) + if (newElement.getErrorPage() == null) { - newElement.setErrorPage(this.errorPage); + combinedElement.setErrorPage(this.errorPage); } else { - newElement.setErrorPage(existingElement.getErrorPage()); + combinedElement.setErrorPage(newElement.getErrorPage()); } - if (existingElement.getLoginPage() == null) + if (newElement.getLoginPage() == null) { - newElement.setLoginPage(this.loginPage); + combinedElement.setLoginPage(this.loginPage); } else { - newElement.setLoginPage(existingElement.getLoginPage()); + combinedElement.setLoginPage(newElement.getLoginPage()); } - if (existingElement.getHelpUrl() == null ) + if (newElement.getHelpUrl() == null ) { - newElement.setHelpUrl(this.helpUrl); + combinedElement.setHelpUrl(this.helpUrl); } else { - newElement.setHelpUrl(existingElement.getHelpUrl()); + combinedElement.setHelpUrl(newElement.getHelpUrl()); } - if (existingElement.getHomeSpacePermission() == null) + if (newElement.getHomeSpacePermission() == null) { - newElement.setHomeSpacePermission(this.homeSpacePermission); + combinedElement.setHomeSpacePermission(this.homeSpacePermission); } else { - newElement.setHomeSpacePermission(existingElement.getHomeSpacePermission()); + combinedElement.setHomeSpacePermission(newElement.getHomeSpacePermission()); } // override default values if they have changed - if (existingElement.getRecentSpacesItems() != newElement.getRecentSpacesItems()) + if (newElement.getRecentSpacesItems() != combinedElement.getRecentSpacesItems()) { - newElement.setRecentSpacesItems(existingElement.getRecentSpacesItems()); + combinedElement.setRecentSpacesItems(newElement.getRecentSpacesItems()); } - if (existingElement.getSearchMinimum() != newElement.getSearchMinimum()) + if (newElement.getSearchMinimum() != combinedElement.getSearchMinimum()) { - newElement.setSearchMinimum(existingElement.getSearchMinimum()); + combinedElement.setSearchMinimum(newElement.getSearchMinimum()); } - if (existingElement.getForceAndTerms() != newElement.getForceAndTerms()) + if (newElement.getForceAndTerms() != combinedElement.getForceAndTerms()) { - newElement.setForceAndTerms(existingElement.getForceAndTerms()); + combinedElement.setForceAndTerms(newElement.getForceAndTerms()); } - if (existingElement.getSearchMaxResults() != newElement.getSearchMaxResults()) + if (newElement.getSearchMaxResults() != combinedElement.getSearchMaxResults()) { - newElement.setSearchMaxResults(existingElement.getSearchMaxResults()); + combinedElement.setSearchMaxResults(newElement.getSearchMaxResults()); } - if (existingElement.isShelfVisible() != newElement.isShelfVisible()) + if (newElement.isShelfVisible() != combinedElement.isShelfVisible()) { - newElement.setShelfVisible(existingElement.isShelfVisible()); + combinedElement.setShelfVisible(newElement.isShelfVisible()); } - if (existingElement.getFromEmailAddress() != null && - (existingElement.getFromEmailAddress().equals(newElement.getFromEmailAddress()) == false)) + if (newElement.getFromEmailAddress() != null && + (newElement.getFromEmailAddress().equals(combinedElement.getFromEmailAddress()) == false)) { - newElement.setFromEmailAddress(existingElement.getFromEmailAddress()); + combinedElement.setFromEmailAddress(newElement.getFromEmailAddress()); } - return newElement; + return combinedElement; } /** diff --git a/source/java/org/alfresco/web/config/CommandServletConfigElement.java b/source/java/org/alfresco/web/config/CommandServletConfigElement.java index 58cfa57485..5213297ff0 100644 --- a/source/java/org/alfresco/web/config/CommandServletConfigElement.java +++ b/source/java/org/alfresco/web/config/CommandServletConfigElement.java @@ -64,19 +64,19 @@ public class CommandServletConfigElement extends ConfigElementAdapter */ public ConfigElement combine(ConfigElement configElement) { - CommandServletConfigElement existingElement = (CommandServletConfigElement)configElement; - CommandServletConfigElement newElement = new CommandServletConfigElement(); + CommandServletConfigElement newElement = (CommandServletConfigElement)configElement; + CommandServletConfigElement combinedElement = new CommandServletConfigElement(); for (String name : commandProcessors.keySet()) { - newElement.addCommandProcessor(name, commandProcessors.get(name)); + combinedElement.addCommandProcessor(name, commandProcessors.get(name)); } - for (String name : existingElement.commandProcessors.keySet()) + for (String name : newElement.commandProcessors.keySet()) { - newElement.addCommandProcessor(name, existingElement.commandProcessors.get(name)); + combinedElement.addCommandProcessor(name, newElement.commandProcessors.get(name)); } - return newElement; + return combinedElement; } /*package*/ void addCommandProcessor(String name, String className) diff --git a/source/java/org/alfresco/web/config/DialogsConfigElement.java b/source/java/org/alfresco/web/config/DialogsConfigElement.java index 60f42b4941..e9298ce86c 100644 --- a/source/java/org/alfresco/web/config/DialogsConfigElement.java +++ b/source/java/org/alfresco/web/config/DialogsConfigElement.java @@ -130,11 +130,13 @@ public class DialogsConfigElement extends ConfigElementAdapter protected String titleId; protected String description; protected String descriptionId; + protected String errorMsgId = "error_dialog"; public DialogConfig(String name, String page, String bean, String actionsConfigId, String icon, String title, String titleId, - String description, String descriptionId) + String description, String descriptionId, + String errorMsgId) { // check the mandatory parameters are present ParameterCheck.mandatoryString("name", name); @@ -150,6 +152,11 @@ public class DialogsConfigElement extends ConfigElementAdapter this.titleId = titleId; this.description = description; this.descriptionId = descriptionId; + + if (errorMsgId != null && errorMsgId.length() > 0) + { + this.errorMsgId = errorMsgId; + } } public String getDescription() @@ -197,6 +204,11 @@ public class DialogsConfigElement extends ConfigElementAdapter return this.titleId; } + public String getErrorMessageId() + { + return this.errorMsgId; + } + /** * @see java.lang.Object#toString() */ @@ -212,7 +224,8 @@ public class DialogsConfigElement extends ConfigElementAdapter buffer.append(" title=").append(this.title); buffer.append(" titleId=").append(this.titleId); buffer.append(" description=").append(this.description); - buffer.append(" descriptionId=").append(this.descriptionId).append(")"); + buffer.append(" descriptionId=").append(this.descriptionId); + buffer.append(" errorMsgId=").append(this.errorMsgId).append(")"); return buffer.toString(); } } diff --git a/source/java/org/alfresco/web/config/DialogsElementReader.java b/source/java/org/alfresco/web/config/DialogsElementReader.java index e47e9d7bf9..f0fc6f4949 100644 --- a/source/java/org/alfresco/web/config/DialogsElementReader.java +++ b/source/java/org/alfresco/web/config/DialogsElementReader.java @@ -41,6 +41,7 @@ public class DialogsElementReader implements ConfigElementReader public static final String ATTR_TITLE_ID = "title-id"; public static final String ATTR_DESCRIPTION = "description"; public static final String ATTR_DESCRIPTION_ID = "description-id"; + public static final String ATTR_ERROR_MSG_ID = "error-message-id"; /** * @see org.alfresco.config.xml.elementreader.ConfigElementReader#parse(org.dom4j.Element) @@ -76,10 +77,11 @@ public class DialogsElementReader implements ConfigElementReader String titleId = item.attributeValue(ATTR_TITLE_ID); String description = item.attributeValue(ATTR_DESCRIPTION); String descriptionId = item.attributeValue(ATTR_DESCRIPTION_ID); + String errorMsgId = item.attributeValue(ATTR_ERROR_MSG_ID); DialogsConfigElement.DialogConfig cfg = new DialogsConfigElement.DialogConfig( name, page, bean, actions, icon, title, titleId, description, - descriptionId); + descriptionId, errorMsgId); configElement.addDialog(cfg); } diff --git a/source/java/org/alfresco/web/config/LanguagesConfigElement.java b/source/java/org/alfresco/web/config/LanguagesConfigElement.java index c4ddc96ac3..2d95da1cac 100644 --- a/source/java/org/alfresco/web/config/LanguagesConfigElement.java +++ b/source/java/org/alfresco/web/config/LanguagesConfigElement.java @@ -69,28 +69,28 @@ public class LanguagesConfigElement extends ConfigElementAdapter */ public ConfigElement combine(ConfigElement configElement) { - LanguagesConfigElement existingElement = (LanguagesConfigElement)configElement; - LanguagesConfigElement newElement = new LanguagesConfigElement(); + LanguagesConfigElement newElement = (LanguagesConfigElement)configElement; + LanguagesConfigElement combinedElement = new LanguagesConfigElement(); // add the languages from this config element for (String locale : this.languages) { - newElement.addLanguage(locale, this.localeMap.get(locale)); + combinedElement.addLanguage(locale, this.localeMap.get(locale)); } // now add the languages from the one to be combined (but // only if they are not already in the list) - List languages = existingElement.getLanguages(); + List languages = newElement.getLanguages(); for (String locale : languages) { - if (newElement.getLabelForLanguage(locale) == null) + if (combinedElement.getLabelForLanguage(locale) == null) { - String label = existingElement.getLabelForLanguage(locale); - newElement.addLanguage(locale, label); + String label = newElement.getLabelForLanguage(locale); + combinedElement.addLanguage(locale, label); } } - return newElement; + return combinedElement; } /** diff --git a/source/java/org/alfresco/web/config/NavigationConfigElement.java b/source/java/org/alfresco/web/config/NavigationConfigElement.java index 91d3fff88d..905551567b 100644 --- a/source/java/org/alfresco/web/config/NavigationConfigElement.java +++ b/source/java/org/alfresco/web/config/NavigationConfigElement.java @@ -123,36 +123,36 @@ public class NavigationConfigElement extends ConfigElementAdapter */ public ConfigElement combine(ConfigElement configElement) { - NavigationConfigElement combined = new NavigationConfigElement(); + NavigationConfigElement newElement = (NavigationConfigElement)configElement; + NavigationConfigElement combinedElement = new NavigationConfigElement(); // add all the existing from view id overrides for (String fromViewId : this.viewIds.keySet()) { - combined.addOverride(fromViewId, null, this.viewIds.get(fromViewId)); + combinedElement.addOverride(fromViewId, null, this.viewIds.get(fromViewId)); } // add all the existing from outcome overrides for (String fromOutcome : this.outcomes.keySet()) { - combined.addOverride(null, fromOutcome, this.outcomes.get(fromOutcome)); + combinedElement.addOverride(null, fromOutcome, this.outcomes.get(fromOutcome)); } // add all the from view id overrides from the given element - NavigationConfigElement navCfg = (NavigationConfigElement)configElement; - HashMap viewIds = navCfg.getViewIds(); + HashMap viewIds = newElement.getViewIds(); for (String fromViewId : viewIds.keySet()) { - combined.addOverride(fromViewId, null, viewIds.get(fromViewId)); + combinedElement.addOverride(fromViewId, null, viewIds.get(fromViewId)); } // add all the from outcome overrides from the given element - HashMap outcomes = navCfg.getOutcomes(); + HashMap outcomes = newElement.getOutcomes(); for (String fromOutcome : outcomes.keySet()) { - combined.addOverride(null, fromOutcome, outcomes.get(fromOutcome)); + combinedElement.addOverride(null, fromOutcome, outcomes.get(fromOutcome)); } - return combined; + return combinedElement; } /** diff --git a/source/java/org/alfresco/web/config/PropertySheetConfigElement.java b/source/java/org/alfresco/web/config/PropertySheetConfigElement.java index 67daeb174c..59a669b10d 100644 --- a/source/java/org/alfresco/web/config/PropertySheetConfigElement.java +++ b/source/java/org/alfresco/web/config/PropertySheetConfigElement.java @@ -72,21 +72,21 @@ public class PropertySheetConfigElement extends ConfigElementAdapter */ public ConfigElement combine(ConfigElement configElement) { - PropertySheetConfigElement combined = new PropertySheetConfigElement(); + PropertySheetConfigElement combinedElement = new PropertySheetConfigElement(); // add all the existing properties for (ItemConfig item : this.getItems().values()) { - combined.addItem(item); + combinedElement.addItem(item); } // add all the properties from the given element for (ItemConfig item : ((PropertySheetConfigElement)configElement).getItems().values()) { - combined.addItem(item); + combinedElement.addItem(item); } - return combined; + return combinedElement; } /** diff --git a/source/java/org/alfresco/web/config/ViewsConfigElement.java b/source/java/org/alfresco/web/config/ViewsConfigElement.java index 68f5dd806a..f5a0b01aba 100644 --- a/source/java/org/alfresco/web/config/ViewsConfigElement.java +++ b/source/java/org/alfresco/web/config/ViewsConfigElement.java @@ -101,18 +101,18 @@ public class ViewsConfigElement extends ConfigElementAdapter */ public ConfigElement combine(ConfigElement configElement) { - ViewsConfigElement existingElement = (ViewsConfigElement)configElement; - ViewsConfigElement newElement = new ViewsConfigElement(); + ViewsConfigElement newElement = (ViewsConfigElement)configElement; + ViewsConfigElement combinedElement = new ViewsConfigElement(); // copy all the config from this element into the new one for (String viewImpl : this.views) { - newElement.addView(viewImpl); + combinedElement.addView(viewImpl); } for (String page : this.defaultViews.keySet()) { - newElement.addDefaultView(page, this.defaultViews.get(page)); + combinedElement.addDefaultView(page, this.defaultViews.get(page)); } for (String pageView : this.pageSizes.keySet()) @@ -121,56 +121,56 @@ public class ViewsConfigElement extends ConfigElementAdapter { String page = pageView.substring(0, pageView.indexOf(SEPARATOR)); String view = pageView.substring(pageView.indexOf(SEPARATOR)+1); - newElement.addDefaultPageSize(page, view, this.pageSizes.get(pageView).intValue()); + combinedElement.addDefaultPageSize(page, view, this.pageSizes.get(pageView).intValue()); } } for (String page : this.sortColumns.keySet()) { - newElement.addDefaultSortColumn(page, this.sortColumns.get(page)); + combinedElement.addDefaultSortColumn(page, this.sortColumns.get(page)); } for (String page : this.sortDirections.keySet()) { - newElement.addSortDirection(page, this.sortDirections.get(page)); + combinedElement.addSortDirection(page, this.sortDirections.get(page)); } // copy all the config from the element to be combined into the new one - for (String viewImpl : existingElement.getViews()) + for (String viewImpl : newElement.getViews()) { - newElement.addView(viewImpl); + combinedElement.addView(viewImpl); } - Map existingDefaultViews = existingElement.getDefaultViews(); - for (String page : existingDefaultViews.keySet()) + Map newDefaultViews = newElement.getDefaultViews(); + for (String page : newDefaultViews.keySet()) { - newElement.addDefaultView(page, existingDefaultViews.get(page)); + combinedElement.addDefaultView(page, newDefaultViews.get(page)); } - Map existingPageSizes = existingElement.getDefaultPageSizes(); - for (String pageView : existingPageSizes.keySet()) + Map newPageSizes = newElement.getDefaultPageSizes(); + for (String pageView : newPageSizes.keySet()) { if (pageView.indexOf(SEPARATOR) != -1) { String page = pageView.substring(0, pageView.indexOf(SEPARATOR)); String view = pageView.substring(pageView.indexOf(SEPARATOR)+1); - newElement.addDefaultPageSize(page, view, existingPageSizes.get(pageView).intValue()); + combinedElement.addDefaultPageSize(page, view, newPageSizes.get(pageView).intValue()); } } - Map existingSortColumns = existingElement.getDefaultSortColumns(); - for (String page : existingSortColumns.keySet()) + Map newSortColumns = newElement.getDefaultSortColumns(); + for (String page : newSortColumns.keySet()) { - newElement.addDefaultSortColumn(page, existingSortColumns.get(page)); + combinedElement.addDefaultSortColumn(page, newSortColumns.get(page)); } - Map existingSortDirs = existingElement.getSortDirections(); + Map existingSortDirs = newElement.getSortDirections(); for (String page : existingSortDirs.keySet()) { - newElement.addSortDirection(page, existingSortDirs.get(page)); + combinedElement.addSortDirection(page, existingSortDirs.get(page)); } - return newElement; + return combinedElement; } /** diff --git a/source/java/org/alfresco/web/config/WebClientConfigTest.java b/source/java/org/alfresco/web/config/WebClientConfigTest.java index 1d872c7737..cb375f0957 100644 --- a/source/java/org/alfresco/web/config/WebClientConfigTest.java +++ b/source/java/org/alfresco/web/config/WebClientConfigTest.java @@ -18,6 +18,7 @@ package org.alfresco.web.config; import java.util.ArrayList; import java.util.Collection; +import java.util.Iterator; import java.util.List; import java.util.Map; @@ -27,6 +28,8 @@ import org.alfresco.config.ConfigException; import org.alfresco.config.source.FileConfigSource; import org.alfresco.config.xml.XMLConfigService; import org.alfresco.util.BaseTest; +import org.alfresco.web.config.ActionsConfigElement.ActionDefinition; +import org.alfresco.web.config.ActionsConfigElement.ActionGroup; import org.alfresco.web.config.AdvancedSearchConfigElement.CustomProperty; import org.alfresco.web.config.DialogsConfigElement.DialogConfig; import org.alfresco.web.config.PropertySheetConfigElement.ItemConfig; @@ -653,6 +656,7 @@ public class WebClientConfigTest extends BaseTest assertEquals("icon", "/images/icons/create_space_large.gif", dialog.getIcon()); assertEquals("title-id", "create_space_title", dialog.getTitleId()); assertEquals("description-id", "create_space_description", dialog.getDescriptionId()); + assertEquals("error-message-id", "error_create_space_dialog", dialog.getErrorMessageId()); assertNull("title should be null", dialog.getTitle()); assertNull("description should be null", dialog.getDescription()); @@ -668,6 +672,7 @@ public class WebClientConfigTest extends BaseTest assertEquals("icon", "/images/icons/create_space_large.gif", dialog.getIcon()); assertEquals("title", "Space Details Dialog", dialog.getTitle()); assertEquals("description", "Space Details Dialog Decsription", dialog.getDescription()); + assertEquals("error-message-id", "error_dialog", dialog.getErrorMessageId()); assertNull("title-id should be null", dialog.getTitleId()); assertNull("description-id should be null", dialog.getDescriptionId()); } @@ -738,6 +743,7 @@ public class WebClientConfigTest extends BaseTest assertEquals("icon", "/images/icons/example-logo.gif", wizard.getIcon()); assertEquals("title", "Example Wizard Title", wizard.getTitle()); assertEquals("description", "Example Wizard Description", wizard.getDescription()); + assertEquals("error-message-id", "error_wizard", wizard.getErrorMessageId()); assertNull("title-id should be null", wizard.getTitleId()); assertNull("description-id should be null", wizard.getDescriptionId()); @@ -757,6 +763,7 @@ public class WebClientConfigTest extends BaseTest assertEquals("icon", "/images/icons/create_space_large.gif", wizard.getIcon()); assertEquals("title-id", "advanced_space_details_title", wizard.getTitleId()); assertEquals("description-id", "advanced_space_details_description", wizard.getDescriptionId()); + assertEquals("error-message-id", "error_create_space_wizard", wizard.getErrorMessageId()); assertNull("title should be null", wizard.getTitle()); assertNull("description should be null", wizard.getDescription()); List steps = wizard.getStepsAsList(); @@ -815,4 +822,109 @@ public class WebClientConfigTest extends BaseTest assertNull("step 3 title should be null", step3Page.getTitle()); assertNull("step 3 description should be null", step3Page.getDescription()); } + + public void testActions() + { + // setup the config service + String configFile = getResourcesDir() + "test-config.xml"; + XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFile)); + svc.init(); + + // get the "Actions" config + Config cfg = svc.getGlobalConfig(); + assertNotNull("cfg should not be null", cfg); + + // get the config element + ActionsConfigElement actionsConfig = (ActionsConfigElement)cfg. + getConfigElement(ActionsConfigElement.CONFIG_ELEMENT_ID); + assertNotNull("actions config element should not be null", actionsConfig); + + // get the individual actions + ActionDefinition docDetails = actionsConfig.getActionDefinition("details_doc"); + assertNotNull("details_doc action definition should not be null", docDetails); + assertEquals("details_doc action", "dialog:showDocDetails", docDetails.Action); + + ActionDefinition spaceDetails = actionsConfig.getActionDefinition("details_space"); + assertNotNull("details_space action definition should not be null", spaceDetails); + assertEquals("details_space action", "dialog:showSpaceDetails", spaceDetails.Action); + + // get the action group + ActionGroup group = actionsConfig.getActionGroup("document_browse"); + assertNotNull("group definition should not be null", group); + assertFalse("showLink for document_browse group should be false", group.ShowLink); + for (String actionId : group) + { + if (actionId.equals("details_doc") == false && + actionId.equals("details_space") == false) + { + fail("Unrecognised action-id '" + actionId + "' in action group '" + group.getId() + "'"); + } + } + } + + public void testActionsOverriding() + { + // setup the config service + List configFiles = new ArrayList(2); + configFiles.add(getResourcesDir() + "test-config.xml"); + configFiles.add(getResourcesDir() + "test-config-override.xml"); + XMLConfigService svc = new XMLConfigService(new FileConfigSource(configFiles)); + svc.init(); + + // get the "Actions" config + Config cfg = svc.getConfig("Actions Override"); + assertNotNull("cfg should not be null", cfg); + + // get the config element + ActionsConfigElement actionsConfig = (ActionsConfigElement)cfg. + getConfigElement(ActionsConfigElement.CONFIG_ELEMENT_ID); + assertNotNull("actions config element should not be null", actionsConfig); + + // get the individual actions + ActionDefinition docDetails = actionsConfig.getActionDefinition("details_doc"); + assertNotNull("details_doc action definition should not be null", docDetails); + assertEquals("details_doc action", "dialog:showCustomDocDetails", docDetails.Action); + + ActionDefinition spaceDetails = actionsConfig.getActionDefinition("details_space"); + assertNotNull("details_space action definition should not be null", spaceDetails); + assertEquals("details_space action", "dialog:showSpaceDetails", spaceDetails.Action); + + ActionDefinition customAction = actionsConfig.getActionDefinition("custom_action"); + assertNotNull("custom_action action definition should not be null", customAction); + assertEquals("custom_action action", "customAction", customAction.Action); + + // get the document_browse action group + ActionGroup group = actionsConfig.getActionGroup("document_browse"); + assertNotNull("group definition should not be null", group); + assertTrue("showLink for document_browse group should be true", group.ShowLink); + assertEquals("document_browse group style class", "inlineAction", group.StyleClass); + assertNull("Style for document_browse group should be null", group.Style); + + // make sure there are 2 items (as one was hidden in the override) + ArrayList actions = new ArrayList(3); + for (String actionId : group) + { + actions.add(actionId); + } + + assertEquals("number of items in document_browse group", 2, actions.size()); + + // make sure they are in the correct order + assertEquals("first action", "details_doc", actions.get(0)); + assertEquals("second action", "custom_action", actions.get(1)); + + // get the new_group action group + ActionGroup newGroup = actionsConfig.getActionGroup("new_group"); + assertNotNull("new_group definition should not be null", newGroup); + + // make sure there is only 1 item and it's id is correct + actions = new ArrayList(1); + for (String actionId : newGroup) + { + actions.add(actionId); + } + + assertEquals("number of items in new_group group", 1, actions.size()); + assertEquals("action", "custom_action", actions.get(0)); + } } diff --git a/source/java/org/alfresco/web/config/WizardsConfigElement.java b/source/java/org/alfresco/web/config/WizardsConfigElement.java index 20309bc452..0cb60588fd 100644 --- a/source/java/org/alfresco/web/config/WizardsConfigElement.java +++ b/source/java/org/alfresco/web/config/WizardsConfigElement.java @@ -160,12 +160,15 @@ public class WizardsConfigElement extends ConfigElementAdapter protected String managedBean; protected String icon; protected String actionsConfigId; + protected String errorMsgId = "error_wizard"; + protected Map steps = new LinkedHashMap(4); public WizardConfig(String name, String bean, String actionsConfigId, String icon, String title, String titleId, - String description, String descriptionId) + String description, String descriptionId, + String errorMsgId) { super(title, titleId, description, descriptionId); @@ -176,6 +179,11 @@ public class WizardsConfigElement extends ConfigElementAdapter this.managedBean = bean; this.icon = icon; this.actionsConfigId = actionsConfigId; + + if (errorMsgId != null && errorMsgId.length() > 0) + { + this.errorMsgId = errorMsgId; + } } public String getName() @@ -198,6 +206,11 @@ public class WizardsConfigElement extends ConfigElementAdapter return this.actionsConfigId; } + public String getErrorMessageId() + { + return this.errorMsgId; + } + public int getNumberSteps() { return this.steps.size(); @@ -244,7 +257,8 @@ public class WizardsConfigElement extends ConfigElementAdapter buffer.append(" title=").append(this.title); buffer.append(" titleId=").append(this.titleId); buffer.append(" description=").append(this.description); - buffer.append(" descriptionId=").append(this.descriptionId).append(")"); + buffer.append(" descriptionId=").append(this.descriptionId); + buffer.append(" errorMsgId=").append(this.errorMsgId).append(")"); return buffer.toString(); } } diff --git a/source/java/org/alfresco/web/config/WizardsElementReader.java b/source/java/org/alfresco/web/config/WizardsElementReader.java index 8ea3fb4da9..b775e6fef7 100644 --- a/source/java/org/alfresco/web/config/WizardsElementReader.java +++ b/source/java/org/alfresco/web/config/WizardsElementReader.java @@ -49,6 +49,7 @@ public class WizardsElementReader implements ConfigElementReader public static final String ATTR_DESCRIPTION_ID = "description-id"; public static final String ATTR_INSTRUCTION = "instruction"; public static final String ATTR_INSTRUCTION_ID = "instruction-id"; + public static final String ATTR_ERROR_MSG_ID = "error-message-id"; public static final String ATTR_IF = "if"; public static final String ATTR_PATH = "path"; @@ -85,10 +86,11 @@ public class WizardsElementReader implements ConfigElementReader String titleId = wizard.attributeValue(ATTR_TITLE_ID); String description = wizard.attributeValue(ATTR_DESCRIPTION); String descriptionId = wizard.attributeValue(ATTR_DESCRIPTION_ID); + String errorMsgId = wizard.attributeValue(ATTR_ERROR_MSG_ID); // create the wizard config object WizardsConfigElement.WizardConfig wizardCfg = new WizardsConfigElement.WizardConfig( - name, bean, actions, icon, title, titleId, description, descriptionId); + name, bean, actions, icon, title, titleId, description, descriptionId, errorMsgId); Iterator steps = wizard.elementIterator(ELEMENT_STEP); while (steps.hasNext()) diff --git a/source/java/org/alfresco/web/ui/repo/component/UIActions.java b/source/java/org/alfresco/web/ui/repo/component/UIActions.java index cf2b87f191..bdbbce52c8 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UIActions.java +++ b/source/java/org/alfresco/web/ui/repo/component/UIActions.java @@ -22,7 +22,6 @@ import java.util.List; import java.util.Map; import java.util.ResourceBundle; -import javax.faces.component.NamingContainer; import javax.faces.component.UIComponent; import javax.faces.component.UIParameter; import javax.faces.context.FacesContext; @@ -108,6 +107,7 @@ public class UIActions extends SelfRenderingComponent /** * @see javax.faces.component.UIComponentBase#encodeBegin(javax.faces.context.FacesContext) */ + @SuppressWarnings("unchecked") public void encodeBegin(FacesContext context) throws IOException { if (isRendered() == false) @@ -130,12 +130,10 @@ public class UIActions extends SelfRenderingComponent return; } - ResponseWriter out = context.getResponseWriter(); - String groupId = getValue(); if (groupId != null && groupId.length() != 0) { - Config config = Application.getConfigService(context).getConfig("Actions"); + Config config = Application.getConfigService(context).getGlobalConfig(); if (config != null) { // find the Actions specific config element @@ -222,11 +220,11 @@ public class UIActions extends SelfRenderingComponent * @param context * @param actionGroup */ + @SuppressWarnings("unchecked") private void buildActionGroup(FacesContext context, ActionsConfigElement config, ActionGroup actionGroup) throws IOException { javax.faces.application.Application facesApp = context.getApplication(); - Node node = getContext(); ResourceBundle messages = Application.getBundle(context); // get overriding display attributes diff --git a/source/java/org/alfresco/web/ui/repo/tag/NodePathTag.java b/source/java/org/alfresco/web/ui/repo/tag/NodePathTag.java index b26ffb8de2..dc90db8245 100644 --- a/source/java/org/alfresco/web/ui/repo/tag/NodePathTag.java +++ b/source/java/org/alfresco/web/ui/repo/tag/NodePathTag.java @@ -55,7 +55,7 @@ public class NodePathTag extends HtmlComponentTag setActionListenerProperty((UICommand)component, this.actionListener); setBooleanProperty(component, "breadcrumb", this.breadcrumb); setBooleanProperty(component, "disabled", this.disabled); - setBooleanProperty(component, "showLeaf", this.disabled); + setBooleanProperty(component, "showLeaf", this.showLeaf); setStringBindingProperty(component, "value", this.value); } diff --git a/source/java/org/alfresco/web/ui/repo/tag/PageTag.java b/source/java/org/alfresco/web/ui/repo/tag/PageTag.java index 999986c17a..633258fcff 100644 --- a/source/java/org/alfresco/web/ui/repo/tag/PageTag.java +++ b/source/java/org/alfresco/web/ui/repo/tag/PageTag.java @@ -48,6 +48,7 @@ public class PageTag extends TagSupport private final static String ALF_URL = "http://www.alfresco.com"; private final static String ALF_LOGO = "http://www.alfresco.com/images/alfresco_community_horizont.gif"; + private final static String SF_LOGO = "/images/logo/sflogo.php.png"; private final static String ALF_TEXT = "Alfresco Community"; private final static String ALF_COPY = "Supplied free of charge with " + "no support, " + @@ -213,7 +214,8 @@ public class PageTag extends TagSupport "" + "" + "" + ALF_COPY + - "" + + "" + ""; } diff --git a/source/test-resources/test-config-dialogs-wizards.xml b/source/test-resources/test-config-dialogs-wizards.xml index e6a1ed512a..dd8f8d4ed9 100644 --- a/source/test-resources/test-config-dialogs-wizards.xml +++ b/source/test-resources/test-config-dialogs-wizards.xml @@ -7,13 +7,14 @@ - + /jsp/dialog/container.jsp + title-id="create_space_title" description-id="create_space_description" + error-message-id="error_create_space_dialog" /> - + /jsp/wizard/container.jsp @@ -49,7 +50,8 @@ icon="/images/icons/create_space_large.gif" actions-config-id="create-space-actions" title-id="advanced_space_details_title" - description-id="advanced_space_details_description"> + description-id="advanced_space_details_description" + error-message-id="error_create_space_wizard"> - + /custom/my-container.jsp @@ -100,4 +100,31 @@ + + + + view_details + /images/icons/View_details.gif + dialog:showCustomDocDetails + + + + some_label_id + /images/icons/details.gif + customAction + + + + + true + + + + + + + + + +
\ No newline at end of file diff --git a/source/test-resources/test-config.xml b/source/test-resources/test-config.xml index 8af108bea9..1b655ce234 100644 --- a/source/test-resources/test-config.xml +++ b/source/test-resources/test-config.xml @@ -8,6 +8,7 @@ + @@ -47,6 +48,34 @@ alfresco@alfresco.org + + + + view_details + /images/icons/View_details.gif + dialog:showDocDetails + + + + view_details + /images/icons/View_details.gif + dialog:showSpaceDetails + + + + view_details + /images/icons/View_details.gif + dialog:showSpaceDetails + + + + false + inlineAction + + + + +
diff --git a/source/web/WEB-INF/faces-config-navigation.xml b/source/web/WEB-INF/faces-config-navigation.xml index d004f78ee2..9379bce93f 100644 --- a/source/web/WEB-INF/faces-config-navigation.xml +++ b/source/web/WEB-INF/faces-config-navigation.xml @@ -927,6 +927,10 @@ itemDetails /jsp/trashcan/item-details.jsp + + recoveryReport + /jsp/trashcan/recovery-report.jsp + diff --git a/source/web/css/main.css b/source/web/css/main.css index b66583be3c..e14fded8b0 100644 --- a/source/web/css/main.css +++ b/source/web/css/main.css @@ -402,6 +402,24 @@ a.topToolbarLinkHighlight, a.topToolbarLinkHighlight:link, a.topToolbarLinkHighl border-color: #003366; } +.recoveredItemsList +{ + padding: 2px; + background-color: #EEEEEE; + border-width: 1px; + border-style: solid; + border-color: #AAAAAA; +} + +.failedItemsList +{ + padding: 2px; + background-color: #EEEEEE; + border-width: 1px; + border-style: solid; + border-color: #e00028; +} + .wizardSectionHeading { padding: 2px; diff --git a/source/web/images/filetypes/js.gif b/source/web/images/filetypes/js.gif new file mode 100644 index 0000000000000000000000000000000000000000..9e3f3b9f3a614cd94366aed1d99764f8c945ea4f GIT binary patch literal 1058 zcmeH`-A|GM6vkiFEj2StS4o=_Wz7q-Wo_B=LNQJA3R@eiwPm$g^QKKNa#IA+AVon5 z6$J?dBIm$4Ev5t-sM!3%4^&VA`49w6J_Ixzy=oU-_6Kw>&ehrPInQ%;?ib``+$n|v zP{0QqS1=g#dcE!K?OhC}_{&$lPA?LQ_&k0faOCs(J)V7+%k6ON?0bDqm)o#uJPHPX z1p)_$hd#f5-|KaIJll4=*(=`g$T!y|{Sb_dECYeu8v|W6NUMH2eXB(AAZd#RU+lnw^=MnVz1WnwnH9 zC&tGWa{2es(Gi(UGCVvyG}QC?GoJ@Sx!mq<4x9av#bR`JcF^gEpf8`#!UB8yl0$)_zv($doY{{H>_{rvp=`}_O)`uh3# z`S|$w_xJbq_V)Gl_4M@g^Yioa^78TV@$m5Q@9*#K?(XgF?dgww0>FMa`=;!C> z=H}+*<>ln$K_O#KgqI!^6VD z!ok78z`(%2zrVh|zP-J@yu7@-ySuu&y1BWzxVX5tx3{*owzajjw6wIdv$L|YvazwT zu&}VNudlAIuC1-DtgNi7tE;N2s;Q}|sHmu?r>CZ-rlqB&q@<*yqobmtqM@OoprD|i zpP!zdo}HbYoSdASo12=NnwgoIn3$NCmzR~5m6Vi}larH@l9G{;k&uv(kB^Uzj*g9u zjf;zmii(PfiHV4ah=+%Vf`Wp9fr0=3{{R30000000000000000A^8LW004RbEC2ui z03ZM$000O7fO>+1goTEOh#><5BPAv%Dl9DoFfubXH$D@Hh9d|E1_cEM2M7ua3=Izu z5k^QEoP;F_2cV<}38xGWs}VOWOd7F*CkdamrMaoR5E4KlIZwi|DGCY32-ms|4y+PN zG(AvM(}*ey3f8&X%n=e;Q&?SOP_T$B3=8`E%e@j4BWBE?F@%eWO@~}GXuzOhDsJum zQLu19z>F>}E+Bg0z`??W9j8#iLPcT)iUMMEAs_$|j0Z3sTu=hD%mfT(CQz`_p&|yA zED_0oKomnABVD@exUiwf7&cPce87+a#>$q5Xh?_E0mDWbsu~D*33})Tg~JoZkQgE22bnTPUeM4HCxeC!E(T*Y zq@zLwCvbwSNI~QbMKn%w^qAr%42R5w4K1~hriKg{FVbA7D4Coa!>_R;R z2w1ZNhm9I*lw-i~2KW*vc|5Q%zPZqk=~&cg>A_pS zLxc#)5=RafB~3)}h6f*fAm4F>46%U*4APNA5=bPW#1c(FF@+U$m;eF@D$I9C5gcr= zK^SO2@x+NxL~$V&T(m((2qB~Z27-eaVOIwv%%R2`cZgvH7HstAh8-v@l0q0X3W9`< z2TXcU!W2x#(S;XoY)D251Bg%-lHC!aM1f#}sRkZ+bfHL=T9R;r7)k2ELaj7;QGO$e)1Pd1sz^mcVD1gKROyqKr~OMHN+8VZ{|#WTAx?TX4}u94uIX qhy(+$K)|S^mTD@gEDRt4Cla8f+^ew08kPmC4rA-BxaK-YAOJg;r4>p5 literal 0 HcmV?d00001 diff --git a/source/web/images/icons/reapply_rules.gif b/source/web/images/icons/reapply_rules.gif new file mode 100644 index 0000000000000000000000000000000000000000..fca27651eb960804582458b39cc35dd4bcff5154 GIT binary patch literal 609 zcmZ?wbhEHb6krfwc*Xz%|Ns9#|L9Fa!;YGoZH0yFg(tWrC$C6KTAr4+GBa~^PR`oA zytO4I8_UWzRa9)Qs@hsrwWXzHcXRX3_Vzt(ZM!==_jY&h>*?9o*LR@5|G?zQhiA_| zK6mbkg$qwDUVM7_@^dR!o?o}_(uNI}w`{q(ef#yjdv6^+eDBDSduPr(I(P2z<;%}* z-hB1?^_N$#K7ai9y{=(LS>4vm;`KQ-o5PFO#8z+EdiZwZoWo@c4|8VE<;s~WTfS7W zYMFZN3jL-vhRtiNIyTt%Z1R}6EnwQtpy|7!=kAN1vo~eY!OW$HbCw;+S$?E=_3`qx zC%boEn7aSU{G&Gy+NM zg^jb%Z+!CUmDe<`(8$W|mHt+@2m*eLW$qTn!m@HG$qf z9c@h^T~QS!#hJ5Mh166P_+;f|#FzH6DoDx8ib_keDD%wfVKNbu5D^wM-Pao&Xu!hH zYvksBg2^MmjEkGo!qvKmjjhMuCoJ5M-8jVAHi9kdL9V~2ub(*wo2#QOTTJwOrXa6X zI)(xV8upo_AK8=5?7|_a#I|RHVZ*YXX|1^|A3l6Md|;Md^of>(Cp5SPWi5GTNHVvn RY%*ipx1)wrI8uSZ8UVUv33>nk literal 0 HcmV?d00001 diff --git a/source/web/images/logo/sflogo.php.png b/source/web/images/logo/sflogo.php.png new file mode 100644 index 0000000000000000000000000000000000000000..6faea16e260abb4f9258775c064869f2ede38fac GIT binary patch literal 1040 zcmV+r1n>KaP)LhnLj|HhpEy=(u*d;g_U_pP=6-o5{|g#WF3 z|IW_;=g$AmrT^Bggp7=}wY8fRlAaV{5DSy~iXU zs550;cn_dHzkV}ubxqK4AXoW@=@mic5dcvoy(u`A#&Sv)Wza+g@WT)hYH(;!O3MzV zA%fkfce4@*fD@FSqUS771nba|V(h?zw2tF8Sn;luKnQZoK0u&?iD3eU_aCNUN1(k| z{5jre!J(@$*P?^hZMi1KM~vX$Rg3~EL?XK$k=8!Ww6Qq$hIhjZOxXT>1~y(g9Jjuw z8Q4iy1SZH3VjLd|+W|}DP!n)K#D=^KcnS@w9*|eI?SLg)!~^2TDo!X{bJml0Vh1l?jz)j`(!&3QGPN8qiba6al-oCTR6Jm+ zTmZNyM3R(340x@xUS8&foLn8roEc}L?5AodB&nayZ1)h_aB@Fs|A2>Y;E7XwR8JU z2Rv*?V_xv)m94ASHdZ%bFax6~`BnuzfWElS^Lm{3EQTil0000< KMNUMnLSTYAg#@ku literal 0 HcmV?d00001 diff --git a/source/web/jsp/actions/actions.jsp b/source/web/jsp/actions/actions.jsp index fddd5b8c59..4e483d7cf4 100644 --- a/source/web/jsp/actions/actions.jsp +++ b/source/web/jsp/actions/actions.jsp @@ -51,13 +51,7 @@ } } - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - - diff --git a/source/web/jsp/content/create-content-wizard/create-html.jsp b/source/web/jsp/content/create-content-wizard/create-html.jsp index 7f5a498b30..9fa813e2bf 100644 --- a/source/web/jsp/content/create-content-wizard/create-html.jsp +++ b/source/web/jsp/content/create-content-wizard/create-html.jsp @@ -47,11 +47,7 @@ var isIE = (document.all); - - - - - +
diff --git a/source/web/jsp/content/create-content-wizard/create-text.jsp b/source/web/jsp/content/create-content-wizard/create-text.jsp index 1835e135cb..f65af1f775 100644 --- a/source/web/jsp/content/create-content-wizard/create-text.jsp +++ b/source/web/jsp/content/create-content-wizard/create-text.jsp @@ -19,8 +19,6 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - - \ No newline at end of file diff --git a/source/web/jsp/content/create-content-wizard/details.jsp b/source/web/jsp/content/create-content-wizard/details.jsp index dc072dce91..fdb516d9c1 100644 --- a/source/web/jsp/content/create-content-wizard/details.jsp +++ b/source/web/jsp/content/create-content-wizard/details.jsp @@ -66,8 +66,6 @@ - - diff --git a/source/web/jsp/content/edit-content-properties.jsp b/source/web/jsp/content/edit-content-properties.jsp index 6451f6ed83..6aa2bb0bdc 100644 --- a/source/web/jsp/content/edit-content-properties.jsp +++ b/source/web/jsp/content/edit-content-properties.jsp @@ -19,8 +19,6 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - - diff --git a/source/web/jsp/dialog/about.jsp b/source/web/jsp/dialog/about.jsp index 41c4929316..45bccbc610 100644 --- a/source/web/jsp/dialog/about.jsp +++ b/source/web/jsp/dialog/about.jsp @@ -102,7 +102,7 @@
http://www.alfresco.org

- Alfresco Software Inc. © 2005 All rights reserved. Legal and License + Alfresco Software Inc. © 2005-2006 All rights reserved. Legal and License

@@ -183,13 +183,13 @@

- Alfresco Software contributors: + Alfresco Software contributors
1.
- Meta Data Extraction Framework and PDF/Open Office Format meta data extraction. + Meta Data Extraction Framework and PDF/Open Office Format meta data extraction:  •  @@ -198,7 +198,7 @@
- Open Document Format meta data extraction. + Open Document Format meta data extraction:  •  @@ -207,7 +207,7 @@
- Language and translation packs. + Language and translation packs:  •  diff --git a/source/web/jsp/dialog/advanced-search.jsp b/source/web/jsp/dialog/advanced-search.jsp index ad7b91e617..0e45054bbb 100644 --- a/source/web/jsp/dialog/advanced-search.jsp +++ b/source/web/jsp/dialog/advanced-search.jsp @@ -261,6 +261,14 @@
+ + + +
: + + + +
: diff --git a/source/web/jsp/dialog/container.jsp b/source/web/jsp/dialog/container.jsp index 8a061b41fd..a5dcd4cd25 100644 --- a/source/web/jsp/dialog/container.jsp +++ b/source/web/jsp/dialog/container.jsp @@ -94,6 +94,9 @@
+ + + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> diff --git a/source/web/jsp/rules/conditions.jsp b/source/web/jsp/rules/conditions.jsp index 79f4e71668..ac26fcd9ac 100644 --- a/source/web/jsp/rules/conditions.jsp +++ b/source/web/jsp/rules/conditions.jsp @@ -51,13 +51,7 @@ } } - - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - diff --git a/source/web/jsp/rules/details.jsp b/source/web/jsp/rules/details.jsp index 21ed32b499..9048abe903 100644 --- a/source/web/jsp/rules/details.jsp +++ b/source/web/jsp/rules/details.jsp @@ -35,13 +35,7 @@ } } - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - -
1.
diff --git a/source/web/jsp/spaces/create-space-dialog.jsp b/source/web/jsp/spaces/create-space-dialog.jsp index 727cfc71c0..38170ad0f8 100644 --- a/source/web/jsp/spaces/create-space-dialog.jsp +++ b/source/web/jsp/spaces/create-space-dialog.jsp @@ -63,15 +63,7 @@ } - -<%-- Create Space Dialog Fragment --%> - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - -
diff --git a/source/web/jsp/spaces/create-space-wizard/details.jsp b/source/web/jsp/spaces/create-space-wizard/details.jsp index 32cc2740fb..f7c9feda8e 100644 --- a/source/web/jsp/spaces/create-space-wizard/details.jsp +++ b/source/web/jsp/spaces/create-space-wizard/details.jsp @@ -85,11 +85,7 @@ } } - - - - diff --git a/source/web/jsp/trashcan/recover-item.jsp b/source/web/jsp/trashcan/recover-item.jsp index bc8fea3246..8cd74f48cf 100644 --- a/source/web/jsp/trashcan/recover-item.jsp +++ b/source/web/jsp/trashcan/recover-item.jsp @@ -121,13 +121,12 @@ - diff --git a/source/web/jsp/trashcan/recover-listed.jsp b/source/web/jsp/trashcan/recover-listed.jsp index a59cca65a0..1b1b2b1c20 100644 --- a/source/web/jsp/trashcan/recover-listed.jsp +++ b/source/web/jsp/trashcan/recover-listed.jsp @@ -96,17 +96,43 @@
diff --git a/source/web/jsp/spaces/edit-space-dialog.jsp b/source/web/jsp/spaces/edit-space-dialog.jsp index d030b7fef5..86f0e52869 100644 --- a/source/web/jsp/spaces/edit-space-dialog.jsp +++ b/source/web/jsp/spaces/edit-space-dialog.jsp @@ -20,12 +20,6 @@ <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> -<%-- Edit Space Dialog Fragment --%> - -<%-- TODO: Move this to the container page and add error-message-id attribute to dialog config --%> - - - diff --git a/source/web/jsp/trashcan/delete-listed.jsp b/source/web/jsp/trashcan/delete-listed.jsp index fb8f24e343..6808b9a951 100644 --- a/source/web/jsp/trashcan/delete-listed.jsp +++ b/source/web/jsp/trashcan/delete-listed.jsp @@ -104,7 +104,7 @@
- +
+ value="#{TrashcanBean.destination}" styleClass="selector" />
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> - +
- - + + + + + + + + + +
+
- + +
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "yellowInner", "#ffffcc"); %> + + + + + +
+ +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "yellowInner"); %> +
+ :  + + +
<%-- Error Messages --%> diff --git a/source/web/jsp/trashcan/recovery-report.jsp b/source/web/jsp/trashcan/recovery-report.jsp new file mode 100644 index 0000000000..037663530a --- /dev/null +++ b/source/web/jsp/trashcan/recovery-report.jsp @@ -0,0 +1,169 @@ +<%-- + Copyright (C) 2005 Alfresco, Inc. + + Licensed under the Mozilla Public License version 1.1 + with a permitted attribution clause. You may obtain a + copy of the License at + + http://www.alfresco.org/legal/license.txt + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + either express or implied. See the License for the specific + language governing permissions and limitations under the + License. +--%> +<%@ 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" %> + + + + + + <%-- load a bundle of properties with I18N strings --%> + + + <%-- set the form name here --%> + + + <%-- Main outer table --%> + + + <%-- Title bar --%> + + + + + <%-- Main area --%> + + <%-- Shelf --%> + + + <%-- Work Area --%> + + +
+ <%@ include file="../parts/titlebar.jsp" %> +
+ <%@ include file="../parts/shelf.jsp" %> + + + <%-- Breadcrumb --%> + <%@ include file="../parts/breadcrumb.jsp" %> + + <%-- Status and Actions --%> + + + + + + + <%-- separator row with gradient shadow --%> + + + + + + + <%-- Details --%> + + + + + + + <%-- separator row with bottom panel graphics --%> + + + + + + +
+ + <%-- Status and Actions inner contents table --%> + <%-- Generally this consists of an icon, textual summary and actions for the current object --%> + + + + + +
+ + +
+
+
+ +
+ + + + + + + +
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> + + + + + + + + <%-- show this panel if some items failed to recover --%> + + + + + + + + + + + + +
+ +
+ +
+ +
+ +
+ <%-- Error Messages --%> + <%-- messages tag to show messages not handled by other specific message tags --%> + + +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> +
+ <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %> + + + + +
+ +
+ <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %> +
+
+
+ +
+ +
+ +
diff --git a/source/web/jsp/trashcan/trash-list.jsp b/source/web/jsp/trashcan/trash-list.jsp index e657e751f2..28bc203b61 100644 --- a/source/web/jsp/trashcan/trash-list.jsp +++ b/source/web/jsp/trashcan/trash-list.jsp @@ -113,9 +113,9 @@
- <%-- Current object actions --%> -   - + <%-- Admin only global actions --%> +   +
@@ -210,8 +210,8 @@
<%-- Recover Listed Items actions --%> -   - +   +
- + <%-- Deleted Date column --%> @@ -286,7 +286,7 @@
- +
diff --git a/source/web/jsp/wizard/container.jsp b/source/web/jsp/wizard/container.jsp index f2a42990f7..64d64be191 100644 --- a/source/web/jsp/wizard/container.jsp +++ b/source/web/jsp/wizard/container.jsp @@ -98,12 +98,6 @@
- <%-- - - - - - --%> <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %> @@ -111,10 +105,7 @@
- <%-- Externalise the error message into an error-message-id attribute on the wizard config --%> - <%-- - - --%> + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>