mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Configuration changes
- each wizard now has its own list of types - made the inline text editing page the default page in create content wizard - dialog and wizard config is now global - fixed problem with create content wizard action git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2870 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -60,7 +60,7 @@
|
||||
<!-- into the web client, for this to work you will need to -->
|
||||
<!-- rename example-model-context.xml.sample to example-model-context.xml -->
|
||||
<!--
|
||||
<config evaluator="string-compare" condition="Custom Content Types">
|
||||
<config evaluator="string-compare" condition="Content Wizards">
|
||||
<content-types>
|
||||
<type name="my:sop" />
|
||||
</content-types>
|
||||
|
@@ -318,8 +318,7 @@
|
||||
</permissions>
|
||||
<label-id>create_content</label-id>
|
||||
<image>/images/icons/new_content.gif</image>
|
||||
<action>createContent</action>
|
||||
<action-listener>#{CreateContentWizard.startWizard}</action-listener>
|
||||
<action>wizard:createContent</action>
|
||||
</action>
|
||||
|
||||
<!-- Create space -->
|
||||
@@ -330,7 +329,6 @@
|
||||
<label-id>create_space</label-id>
|
||||
<image>/images/icons/create_space.gif</image>
|
||||
<action>dialog:createSpace</action>
|
||||
<!-- <action-listener>#{NewSpaceDialog.startWizard}</action-listener> -->
|
||||
</action>
|
||||
|
||||
<!-- Create Advanced Space Wizard -->
|
||||
@@ -341,7 +339,6 @@
|
||||
<label-id>advanced_space_wizard</label-id>
|
||||
<image>/images/icons/create_space.gif</image>
|
||||
<action>wizard:createSpace</action>
|
||||
<!-- <action-listener>#{NewSpaceWizard.startWizard}</action-listener> -->
|
||||
</action>
|
||||
|
||||
<!-- Manage Space Users -->
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<alfresco-config>
|
||||
|
||||
<config evaluator="string-compare" condition="Dialogs">
|
||||
<config>
|
||||
<dialog-container>/jsp/dialog/container.jsp</dialog-container>
|
||||
|
||||
<dialogs>
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<alfresco-config>
|
||||
|
||||
<config evaluator="string-compare" condition="Wizards">
|
||||
<config>
|
||||
<wizard-container>/jsp/wizard/container.jsp</wizard-container>
|
||||
|
||||
<wizards>
|
||||
@@ -144,12 +144,11 @@
|
||||
description-id="create_content_step2_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</condition>
|
||||
<condition if="#{CreateContentWizard.mimeType == 'text/plain'}">
|
||||
<page path="/jsp/content/create-content-wizard/create-text.jsp"
|
||||
title-id="create_content_step2_title"
|
||||
description-id="create_content_step2_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</condition>
|
||||
<!-- Default to the inline text editor -->
|
||||
<page path="/jsp/content/create-content-wizard/create-text.jsp"
|
||||
title-id="create_content_step2_title"
|
||||
description-id="create_content_step2_desc"
|
||||
instruction-id="default_instruction" />
|
||||
</step>
|
||||
<step name="summary" title-id="summary" description-id="summary_step_description">
|
||||
<page path="/jsp/wizard/summary.jsp"
|
||||
|
@@ -160,31 +160,41 @@
|
||||
</advanced-search>
|
||||
</config>
|
||||
|
||||
<config evaluator="string-compare" condition="Custom Content Types">
|
||||
<content-types>
|
||||
<type name="cm:dictionaryModel"/>
|
||||
</content-types>
|
||||
</config>
|
||||
|
||||
<config evaluator="string-compare" condition="Custom Folder Types">
|
||||
<config evaluator="string-compare" condition="Space Wizards">
|
||||
<!-- The list of custom folder types to show in the advanced space wizard -->
|
||||
<folder-types>
|
||||
<type name="fm:forums" icon="/images/icons/forums.gif" description-id="forums_desc" />
|
||||
</folder-types>
|
||||
</config>
|
||||
|
||||
<config evaluator="string-compare" condition="Content Wizards">
|
||||
<other-properties user-choice-visible="true" user-choice-default="true" />
|
||||
<!-- The list of custom content types to show in the content wizards -->
|
||||
<content-types>
|
||||
<type name="cm:dictionaryModel"/>
|
||||
</content-types>
|
||||
|
||||
<!-- The list of mime types that can be created inline -->
|
||||
<create-mime-types>
|
||||
<mime-type name="text/html" />
|
||||
<mime-type name="text/plain" />
|
||||
</create-mime-types>
|
||||
|
||||
<!-- Controls the message regarding property editing after the content is created -->
|
||||
<other-properties user-choice-visible="true" user-choice-default="true" />
|
||||
</config>
|
||||
|
||||
<config evaluator="string-compare" condition="Action Wizards">
|
||||
<types>
|
||||
<!-- The list of types shown in the is-subtype condition -->
|
||||
<subtypes>
|
||||
<type name="folder" display-label-id="space"/>
|
||||
<type name="content"/>
|
||||
</types>
|
||||
</subtypes>
|
||||
<!-- The list of content types shown in the specialise-type action -->
|
||||
<specialise-types>
|
||||
<type name="cm:dictionaryModel"/>
|
||||
</specialise-types>
|
||||
<!-- The list of aspects to show in the add/remove features action -->
|
||||
<!-- and the has-aspect condition -->
|
||||
<aspects>
|
||||
<aspect name="generalclassifiable"/>
|
||||
<aspect name="complianceable"/>
|
||||
@@ -196,6 +206,7 @@
|
||||
<aspect name="translatable"/>
|
||||
<aspect name="localizable"/>
|
||||
</aspects>
|
||||
<!-- The list of transformers to show in the transform actions -->
|
||||
<transformers>
|
||||
<transformer name="text/html"/>
|
||||
<transformer name="application/pdf"/>
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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<SelectItem>();
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user