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 @@ @@ -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 - diff --git a/config/alfresco/web-client-config-dialogs.xml b/config/alfresco/web-client-config-dialogs.xml index 863f399109..f45f66d0f1 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 diff --git a/config/alfresco/web-client-config-wizards.xml b/config/alfresco/web-client-config-wizards.xml index 8253dfbb29..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 +206,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/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/rules/CreateRuleWizard.java b/source/java/org/alfresco/web/bean/rules/CreateRuleWizard.java index ac9478d679..f811fefb5d 100644 --- a/source/java/org/alfresco/web/bean/rules/CreateRuleWizard.java +++ b/source/java/org/alfresco/web/bean/rules/CreateRuleWizard.java @@ -243,7 +243,7 @@ public class CreateRuleWizard extends BaseActionWizard Config wizardCfg = svc.getConfig("Action Wizards"); if (wizardCfg != null) { - ConfigElement typesCfg = wizardCfg.getConfigElement("types"); + ConfigElement typesCfg = wizardCfg.getConfigElement("subtypes"); if (typesCfg != null) { this.modelTypes = new ArrayList(); @@ -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"); } }