mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
UI related code/jsp fixes and cleanup to new ML space/dialog components.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5764 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -103,6 +103,7 @@
|
||||
<param name="id">#{actionContext.id}</param>
|
||||
</params>
|
||||
</action>
|
||||
|
||||
<!-- Edit document action to open using normal HTTP access or inline Edit if set -->
|
||||
<action id="edit_doc_http">
|
||||
<permissions>
|
||||
|
@@ -29,7 +29,7 @@
|
||||
<!-- Content and Space Dialogs -->
|
||||
|
||||
<!-- Definition of the create space dialog -->
|
||||
<dialog name="createSpace" page="/jsp/spaces/create-space-dialog.jsp" managed-bean="CreateMultilingualSpaceDialog"
|
||||
<dialog name="createSpace" page="/jsp/spaces/create-space-dialog.jsp" managed-bean="CreateSpaceDialog"
|
||||
icon="/images/icons/create_space_large.gif" title-id="create_space"
|
||||
description-id="create_space_description" error-message-id="error_create_space_dialog" />
|
||||
|
||||
|
@@ -473,4 +473,3 @@
|
||||
</config>
|
||||
|
||||
</alfresco-config>
|
||||
|
||||
|
@@ -84,7 +84,6 @@ public class CreateMultilingualPropertiesBean
|
||||
return this.newlanguage;
|
||||
}
|
||||
|
||||
|
||||
public void setUserPreferencesBean(UserPreferencesBean preferences)
|
||||
{
|
||||
this.preferences = preferences;
|
||||
@@ -115,17 +114,16 @@ public class CreateMultilingualPropertiesBean
|
||||
return this.description;
|
||||
}
|
||||
|
||||
|
||||
// Display the list of all multilingual properties
|
||||
public SelectItem[] getListAllDescriptionsProperties()
|
||||
{
|
||||
MLPropertyInterceptor.setMLAware(true);
|
||||
BrowseBean browseBean = (BrowseBean) FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), "BrowseBean");
|
||||
BrowseBean browseBean = (BrowseBean)FacesHelper.getManagedBean(FacesContext.getCurrentInstance(), BrowseBean.BEAN_NAME);
|
||||
|
||||
// create the space (just create a folder for now)
|
||||
NodeRef nodeRef = browseBean.getDocument().getNodeRef();
|
||||
|
||||
if(nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION) != null)
|
||||
if (nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION) != null)
|
||||
{
|
||||
List<SelectItem> sel = new ArrayList<SelectItem>();
|
||||
|
||||
@@ -175,7 +173,7 @@ public class CreateMultilingualPropertiesBean
|
||||
// create the space (just create a folder for now)
|
||||
NodeRef nodeRef = browseBean.getDocument().getNodeRef();
|
||||
|
||||
if(nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION) != null)
|
||||
if (nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION) != null)
|
||||
{
|
||||
List<SelectItem> sel = new ArrayList<SelectItem>();
|
||||
|
||||
@@ -218,7 +216,15 @@ public class CreateMultilingualPropertiesBean
|
||||
{
|
||||
return preferences.getContentFilterLanguages(false);
|
||||
}
|
||||
public boolean isAdd_new_properties() {return this.add_new_properties;}
|
||||
public void setAdd_new_properties(boolean x){this.add_new_properties = x;}
|
||||
|
||||
public boolean isAdd_new_properties()
|
||||
{
|
||||
return this.add_new_properties;
|
||||
}
|
||||
|
||||
public void setAdd_new_properties(boolean x)
|
||||
{
|
||||
this.add_new_properties = x;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -265,7 +265,6 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
|
||||
if (getDocument().hasAspect(ContentModel.ASPECT_MULTILINGUAL_DOCUMENT))
|
||||
{
|
||||
|
||||
Map<Locale, NodeRef> translationsMap = this.multilingualContentService.getTranslations(getDocument().getNodeRef());
|
||||
|
||||
if (translationsMap != null && translationsMap.size() > 0)
|
||||
@@ -282,7 +281,7 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
String lgge = (locale != null) ?
|
||||
// convert the locale into new ISO codes
|
||||
contentFilterLanguagesService.convertToNewISOCode(locale.getLanguage()).toUpperCase()
|
||||
: null ;
|
||||
: null;
|
||||
|
||||
mapNode.put("name", nodeService.getProperty(nodeRef, ContentModel.PROP_NAME));
|
||||
mapNode.put("language", lgge);
|
||||
@@ -789,7 +788,6 @@ public class DocumentDetailsBean extends BaseDetailsBean
|
||||
return new Node(multilingualContentService.getTranslationContainer(nodeRef));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the lock service instance the bean should use
|
||||
*
|
||||
|
@@ -48,7 +48,6 @@ import org.alfresco.web.ui.common.Utils;
|
||||
*/
|
||||
public class AddTranslationWithoutContentDialog extends BaseDialogBean
|
||||
{
|
||||
|
||||
public static String LOCALE_REGEX = "%locale%";
|
||||
public static String EMPTY_DOCUMENT_EXTENSION = "." + LOCALE_REGEX + "_properties";
|
||||
|
||||
@@ -65,7 +64,6 @@ public class AddTranslationWithoutContentDialog extends BaseDialogBean
|
||||
private String language;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void init(Map<String, String> parameters)
|
||||
{
|
||||
@@ -76,7 +74,6 @@ public class AddTranslationWithoutContentDialog extends BaseDialogBean
|
||||
description = null;
|
||||
author = null;
|
||||
language = null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -133,7 +130,6 @@ public class AddTranslationWithoutContentDialog extends BaseDialogBean
|
||||
this.multilingualContentService = multilingualContentService;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the author
|
||||
*/
|
||||
|
@@ -45,7 +45,6 @@ import org.alfresco.web.bean.repository.Node;
|
||||
*/
|
||||
public class AddTranslationlDialog extends AddContentDialog
|
||||
{
|
||||
|
||||
private MultilingualContentService multilingualContentService;
|
||||
private UserPreferencesBean userPreferencesBean;
|
||||
|
||||
@@ -58,6 +57,7 @@ public class AddTranslationlDialog extends AddContentDialog
|
||||
// languages available in the ML container yet
|
||||
private SelectItem[] unusedLanguages;
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.web.bean.content.AddContentDialog#init(java.util.Map)
|
||||
*/
|
||||
@@ -70,7 +70,6 @@ public class AddTranslationlDialog extends AddContentDialog
|
||||
setMlContainer(this.browseBean.getDocument().getNodeRef());
|
||||
setFileName(null);
|
||||
unusedLanguages = null;
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -79,7 +78,6 @@ public class AddTranslationlDialog extends AddContentDialog
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
|
||||
// add the new file to the repository
|
||||
outcome = super.finishImpl(context, outcome);
|
||||
|
||||
@@ -94,7 +92,6 @@ public class AddTranslationlDialog extends AddContentDialog
|
||||
@Override
|
||||
protected String getDefaultFinishOutcome()
|
||||
{
|
||||
|
||||
return "showDocDetails";
|
||||
}
|
||||
|
||||
@@ -149,15 +146,17 @@ public class AddTranslationlDialog extends AddContentDialog
|
||||
{
|
||||
type = nodeService.getType(mlContainer);
|
||||
|
||||
if(ContentModel.TYPE_MULTILINGUAL_CONTAINER.equals(type)){
|
||||
if(ContentModel.TYPE_MULTILINGUAL_CONTAINER.equals(type))
|
||||
{
|
||||
this.mlContainer = mlContainer;
|
||||
}
|
||||
else if(ContentModel.TYPE_CONTENT.equals(type)
|
||||
&& nodeService.hasAspect(mlContainer, ContentModel.ASPECT_MULTILINGUAL_DOCUMENT)){
|
||||
|
||||
else if (ContentModel.TYPE_CONTENT.equals(type)
|
||||
&& nodeService.hasAspect(mlContainer, ContentModel.ASPECT_MULTILINGUAL_DOCUMENT))
|
||||
{
|
||||
this.mlContainer = multilingualContentService.getTranslationContainer(mlContainer);
|
||||
}
|
||||
else{
|
||||
else
|
||||
{
|
||||
this.mlContainer = null;
|
||||
}
|
||||
}
|
||||
@@ -179,7 +178,6 @@ public class AddTranslationlDialog extends AddContentDialog
|
||||
|
||||
public SelectItem[] getUnusedLanguages()
|
||||
{
|
||||
|
||||
if(unusedLanguages == null)
|
||||
{
|
||||
unusedLanguages = userPreferencesBean.getAvailablesContentFilterLanguages(getMlContainer(), false);
|
||||
|
@@ -43,7 +43,6 @@ import org.alfresco.web.bean.repository.Node;
|
||||
*/
|
||||
public class EditMLContainerDialog extends BaseDialogBean
|
||||
{
|
||||
|
||||
MultilingualContentService multilingualContentService;
|
||||
|
||||
private Node editableNode;
|
||||
@@ -54,7 +53,6 @@ public class EditMLContainerDialog extends BaseDialogBean
|
||||
super.init(parameters);
|
||||
|
||||
this.editableNode = initEditableNode();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,8 +61,6 @@ public class EditMLContainerDialog extends BaseDialogBean
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getFinishButtonLabel()
|
||||
{
|
||||
@@ -105,7 +101,8 @@ public class EditMLContainerDialog extends BaseDialogBean
|
||||
/**
|
||||
* @return the editableNode
|
||||
*/
|
||||
public Node getEditableNode() {
|
||||
public Node getEditableNode()
|
||||
{
|
||||
return editableNode;
|
||||
}
|
||||
|
||||
@@ -135,6 +132,4 @@ public class EditMLContainerDialog extends BaseDialogBean
|
||||
MultilingualContentService multilingualContentService) {
|
||||
this.multilingualContentService = multilingualContentService;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -46,7 +46,6 @@ import org.alfresco.web.bean.repository.Node;
|
||||
*/
|
||||
public class MakeMultilingualDialog extends BaseDialogBean
|
||||
{
|
||||
|
||||
private MultilingualContentService multilingualContentService;
|
||||
|
||||
private UserPreferencesBean userPreferencesBean;
|
||||
@@ -71,6 +70,7 @@ public class MakeMultilingualDialog extends BaseDialogBean
|
||||
// the node to edit
|
||||
protected Node editableNode;
|
||||
|
||||
|
||||
@Override
|
||||
public void init(Map<String, String> parameters)
|
||||
{
|
||||
@@ -82,7 +82,7 @@ public class MakeMultilingualDialog extends BaseDialogBean
|
||||
NodeRef nodeRef = this.editableNode.getNodeRef();
|
||||
|
||||
// propose the author and the language of the content for the properties of the MLContainer
|
||||
if(this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUTHOR) == true
|
||||
if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUTHOR) == true
|
||||
&& this.nodeService.getProperty(nodeRef, ContentModel.PROP_AUTHOR) != null)
|
||||
{
|
||||
setAuthor((String) this.nodeService.getProperty(nodeRef, ContentModel.PROP_AUTHOR));
|
||||
@@ -92,7 +92,7 @@ public class MakeMultilingualDialog extends BaseDialogBean
|
||||
setAuthor("");
|
||||
}
|
||||
|
||||
if(this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCALIZED) == true
|
||||
if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_LOCALIZED) == true
|
||||
&& this.nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE) != null)
|
||||
{
|
||||
setLanguage(((Locale) this.nodeService.getProperty(nodeRef, ContentModel.PROP_LOCALE)).toString());
|
||||
@@ -133,7 +133,7 @@ public class MakeMultilingualDialog extends BaseDialogBean
|
||||
// if the author of the node is not set, set it with the default author name of
|
||||
// the new ML Container
|
||||
String nodeAuthor = (String) nodeService.getProperty(nodeRef, ContentModel.PROP_AUTHOR);
|
||||
if(nodeAuthor == null || nodeAuthor.length() < 1)
|
||||
if (nodeAuthor == null || nodeAuthor.length() < 1)
|
||||
nodeService.setProperty(nodeRef, ContentModel.PROP_AUTHOR, getAuthor());
|
||||
|
||||
// set properties of the ml container
|
||||
@@ -167,6 +167,7 @@ public class MakeMultilingualDialog extends BaseDialogBean
|
||||
return "addTranslation";
|
||||
}
|
||||
}
|
||||
|
||||
// close the dialog
|
||||
return outcome;
|
||||
}
|
||||
@@ -252,7 +253,8 @@ public class MakeMultilingualDialog extends BaseDialogBean
|
||||
* @return if the new translation must be added at the end of this dialog,
|
||||
* this mode defines if the translation will be an empty document or not
|
||||
*/
|
||||
public String getAddingMode() {
|
||||
public String getAddingMode()
|
||||
{
|
||||
return addingMode;
|
||||
}
|
||||
|
||||
@@ -260,7 +262,8 @@ public class MakeMultilingualDialog extends BaseDialogBean
|
||||
* @param addingMode if the new translation must be added at the end of this dialog,
|
||||
* this mode defines if the translation will be an empty document or not
|
||||
*/
|
||||
public void setAddingMode(String addingMode) {
|
||||
public void setAddingMode(String addingMode)
|
||||
{
|
||||
this.addingMode = addingMode;
|
||||
}
|
||||
|
||||
@@ -282,7 +285,4 @@ public class MakeMultilingualDialog extends BaseDialogBean
|
||||
{
|
||||
this.userPreferencesBean = userPreferencesBean;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@@ -29,7 +29,6 @@ import javax.faces.context.FacesContext;
|
||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||
import org.alfresco.web.app.Application;
|
||||
|
||||
|
||||
public class CreateMultilingualPropertiesDialog extends CreateMultilingualPropertiesWizard
|
||||
{
|
||||
// ------------------------------------------------------------------------------
|
||||
@@ -57,16 +56,10 @@ public class CreateMultilingualPropertiesDialog extends CreateMultilingualPrope
|
||||
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected String doPostCommitProcessing(FacesContext context, String outcome)
|
||||
{
|
||||
// do nothing by default, subclasses can override if necessary
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@@ -64,7 +64,6 @@ public class CreateMultilingualPropertiesWizard extends CreateSpaceWizard
|
||||
Serializable oTitle = nodeService.getProperty(nodeRef, ContentModel.PROP_TITLE);
|
||||
Serializable oDescription = nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION);
|
||||
|
||||
|
||||
if(oTitle instanceof MLText)
|
||||
{
|
||||
title = (MLText) oTitle;
|
||||
@@ -75,8 +74,6 @@ public class CreateMultilingualPropertiesWizard extends CreateSpaceWizard
|
||||
title.addValue(I18NUtil.parseLocale(userPreferencesBean.getContentFilterLanguage()), oTitle.toString());
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(oDescription instanceof MLText)
|
||||
{
|
||||
description = (MLText) oDescription;
|
||||
@@ -93,10 +90,9 @@ public class CreateMultilingualPropertiesWizard extends CreateSpaceWizard
|
||||
properties.put(ContentModel.PROP_TITLE, title);
|
||||
properties.put(ContentModel.PROP_DESCRIPTION, description);
|
||||
|
||||
|
||||
// Ajout de l'aspect multilingue sur le titre
|
||||
this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_TITLED, properties);
|
||||
/*
|
||||
/*
|
||||
MLText descriptionss = (MLText) nodeService.getProperty(nodeRef, ContentModel.PROP_DESCRIPTION);
|
||||
|
||||
List<SelectItem> sel = new ArrayList();
|
||||
@@ -108,7 +104,7 @@ public class CreateMultilingualPropertiesWizard extends CreateSpaceWizard
|
||||
|
||||
SelectItem[] items = new SelectItem[sel.size()];
|
||||
sel.toArray(items);
|
||||
*/
|
||||
*/
|
||||
// Modification du casting de l objet r<>cup<75>r<EFBFBD> des getters de MLText en Text
|
||||
MLPropertyInterceptor.setMLAware(false);
|
||||
}
|
||||
@@ -119,7 +115,6 @@ public class CreateMultilingualPropertiesWizard extends CreateSpaceWizard
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
if (createMultilingualPropertiesBean.isAdd_new_properties())
|
||||
{
|
||||
createMultilingualPropertiesBean.setTitle("");
|
||||
@@ -134,7 +129,6 @@ public class CreateMultilingualPropertiesWizard extends CreateSpaceWizard
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param preferences The UserPreferencesBean to set
|
||||
*/
|
||||
|
@@ -53,8 +53,6 @@ public class CreateMultilingualSpaceDialog extends CreateMultilingualSpaceWizard
|
||||
return AlfrescoNavigationHandler.CLOSE_DIALOG_OUTCOME;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected String doPostCommitProcessing(FacesContext context, String outcome)
|
||||
{
|
||||
// do nothing by default, subclasses can override if necessary
|
||||
@@ -68,7 +66,6 @@ public class CreateMultilingualSpaceDialog extends CreateMultilingualSpaceWizard
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void setCreateMultilingualPropertiesBean(CreateMultilingualPropertiesBean x)
|
||||
{
|
||||
this.createMultilingualPropertiesBean = x;
|
||||
@@ -84,12 +81,9 @@ public class CreateMultilingualSpaceDialog extends CreateMultilingualSpaceWizard
|
||||
this.edit=x;
|
||||
}
|
||||
|
||||
|
||||
private boolean edit;
|
||||
|
||||
public CreateMultilingualPropertiesBean getCreateMultilingualPropertiesBean(){return this.createMultilingualPropertiesBean;}
|
||||
|
||||
protected CreateMultilingualPropertiesBean createMultilingualPropertiesBean;
|
||||
|
||||
}
|
||||
|
||||
|
@@ -48,13 +48,10 @@ import org.alfresco.web.bean.UserPreferencesBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
|
||||
|
||||
public class CreateMultilingualSpaceWizard extends CreateSpaceWizard
|
||||
{
|
||||
|
||||
protected boolean showOtherProperties = true;
|
||||
|
||||
|
||||
/**
|
||||
* @return Determines whether the edit properties dialog should be
|
||||
* shown when this one ends
|
||||
@@ -72,14 +69,12 @@ public class CreateMultilingualSpaceWizard extends CreateSpaceWizard
|
||||
this.showOtherProperties = showOthers;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected String finishImpl(FacesContext context, String outcome) throws Exception
|
||||
{
|
||||
String newSpaceId = null;
|
||||
CreateMultilingualPropertiesBean createMultilingualPropertiesBean = (CreateMultilingualPropertiesBean) FacesHelper.getManagedBean(context, "CreateMultilingualPropertiesBean");
|
||||
|
||||
|
||||
if (this.createFrom.equals("scratch"))
|
||||
{
|
||||
// create the space (just create a folder for now)
|
||||
@@ -96,19 +91,17 @@ public class CreateMultilingualSpaceWizard extends CreateSpaceWizard
|
||||
parentNodeRef = new NodeRef(Repository.getStoreRef(), nodeId);
|
||||
}
|
||||
|
||||
|
||||
FileInfo fileInfo = fileFolderService.create(parentNodeRef, this.name, Repository.resolveToQName(this.spaceType));
|
||||
NodeRef nodeRef = fileInfo.getNodeRef();
|
||||
newSpaceId = nodeRef.getId();
|
||||
|
||||
// apply the uifacets aspect - icon, title and description props
|
||||
Map<QName, Serializable> uiFacetsProps = new HashMap<QName, Serializable>(5);
|
||||
Map<QName, Serializable> uiFacetsProps = new HashMap<QName, Serializable>(2, 1.0f);
|
||||
|
||||
uiFacetsProps.put(ApplicationModel.PROP_ICON, this.icon);
|
||||
// uiFacetsProps.put(ContentModel.PROP_TITLE, this.title);
|
||||
// uiFacetsProps.put(ContentModel.PROP_DESCRIPTION, this.description);
|
||||
|
||||
|
||||
// Ajout de l icone
|
||||
this.nodeService.addAspect(nodeRef, ApplicationModel.ASPECT_UIFACETS, uiFacetsProps);
|
||||
|
||||
@@ -117,13 +110,14 @@ public class CreateMultilingualSpaceWizard extends CreateSpaceWizard
|
||||
this.nodeService.setProperty(nodeRef, ContentModel.PROP_TITLE, new MLText(language, this.title));
|
||||
this.nodeService.setProperty(nodeRef, ContentModel.PROP_DESCRIPTION, new MLText(language, this.description));
|
||||
|
||||
|
||||
// remember the created node
|
||||
this.createdNode = nodeRef;
|
||||
// Passer le noeud en parametre afin de le recuperer dans un autre dialogue
|
||||
this.browseBean.setDocument(new Node(this.createdNode));
|
||||
|
||||
setTitle(""); setDescription(""); setName("");
|
||||
setTitle("");
|
||||
setDescription("");
|
||||
setName("");
|
||||
}
|
||||
else if (this.createFrom.equals("existing"))
|
||||
{
|
||||
@@ -162,7 +156,6 @@ public class CreateMultilingualSpaceWizard extends CreateSpaceWizard
|
||||
|
||||
newSpaceId = copiedNode.getId();
|
||||
|
||||
|
||||
// remember the created node
|
||||
this.createdNode = copiedNode;
|
||||
}
|
||||
@@ -193,11 +186,9 @@ public class CreateMultilingualSpaceWizard extends CreateSpaceWizard
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param preferences The UserPreferencesBean to set
|
||||
*/
|
||||
@@ -216,7 +207,6 @@ public class CreateMultilingualSpaceWizard extends CreateSpaceWizard
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** The user preferences bean reference */
|
||||
protected UserPreferencesBean preferences;
|
||||
protected CreateMultilingualPropertiesBean createMultilingualPropertiesBean;
|
||||
|
@@ -249,7 +249,8 @@ public class CreateSpaceWizard extends BaseWizardBean
|
||||
}
|
||||
}
|
||||
|
||||
setTitle(""); setDescription("");
|
||||
setTitle("");
|
||||
setDescription("");
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
@@ -321,16 +321,11 @@
|
||||
rowStyleClass="recordSetRow" altRowStyleClass="recordSetRowAlt" width="100%"
|
||||
pageSize="10" initialSortColumn="Name" initialSortDescending="false">
|
||||
|
||||
<%-- Icon details view mode --%>
|
||||
<a:column id="col20" primary="true" width="20" style="padding:2px;">
|
||||
<f:facet name="header">
|
||||
<h:outputText value=""/>
|
||||
<%-- Name and icon columns --%>
|
||||
<a:column id="col21" primary="true" width="300" style="text-align:left">
|
||||
<f:facet name="small-icon">
|
||||
<h:graphicImage url="/images/filetypes/_default.gif" width="16" height="16"/>
|
||||
</f:facet>
|
||||
<h:graphicImage url="/images/icons/space_small.gif" />
|
||||
</a:column>
|
||||
|
||||
<%-- Name columns --%>
|
||||
<a:column id="col21" width="300" style="text-align:left">
|
||||
<f:facet name="header">
|
||||
<a:sortLink label="#{msg.name}" value="Name" mode="case-insensitive" styleClass="header"/>
|
||||
</f:facet>
|
||||
@@ -368,10 +363,11 @@
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<%-- Panel if the node has not the multinlingual aspect--%>
|
||||
<a:panel label="#{msg.ml_content_info}" id="no-ml-info-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white"
|
||||
rendered="#{DetailsBean.multilingual == false}"
|
||||
rendered="#{DocumentDetailsBean.multilingual == false}"
|
||||
expanded='#{DocumentDetailsBean.panels["ml-info-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
|
||||
<h:outputText id="no-ml-msg" value="#{msg.not_multilingual}<br/><br/>" escape="false" />
|
||||
<%-- Actions add translation --%>
|
||||
|
@@ -166,7 +166,7 @@
|
||||
<f:facet name="header">
|
||||
<h:outputText value=""/>
|
||||
</f:facet>
|
||||
<h:graphicImage url="/images/icons/space_small.gif" />
|
||||
<h:graphicImage url="/images/filetypes/_default.gif" />
|
||||
</a:column>
|
||||
|
||||
<%-- Name Columns --%>
|
||||
|
@@ -63,14 +63,14 @@ function validate()
|
||||
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="3" class="wizardSectionHeading">
|
||||
<td colspan="4" class="wizardSectionHeading">
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.properties}" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td >
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
@@ -84,13 +84,13 @@ function validate()
|
||||
<h:inputText id="title" value="#{CreateMultilingualPropertiesBean.title}" size="35" maxlength="1024" onkeyup="javascript:checkButtonState();" onchange="javascript:checkButtonState();" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
<f:verbatim>
|
||||
<td width=100%>
|
||||
</f:verbatim>
|
||||
<%-- existing properties --%>
|
||||
<h:selectOneMenu id="existingpropertiestitle" value="#{CreateMultilingualPropertiesBean.language}" style="width:150px" >
|
||||
<f:selectItems value="#{CreateMultilingualPropertiesBean.listAllTitlesProperties}" />
|
||||
</h:selectOneMenu>
|
||||
</f:verbatim>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -107,41 +107,27 @@ function validate()
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
<f:verbatim>
|
||||
</f:verbatim>
|
||||
<%-- existing properties --%>
|
||||
<h:selectOneMenu id="existingproperties" value="#{CreateMultilingualPropertiesBean.language}" style="width:150px" >
|
||||
<f:selectItems value="#{CreateMultilingualPropertiesBean.listAllDescriptionsProperties}" />
|
||||
</h:selectOneMenu>
|
||||
</f:verbatim>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
|
||||
</br>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</f:verbatim>
|
||||
|
||||
<table cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="3" style="padding-left:22px">
|
||||
|
||||
|
||||
<td style="padding-left" >
|
||||
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.properties_close}:" />
|
||||
<h:selectBooleanCheckbox value="#{CreateMultilingualPropertiesBean.add_new_properties}" id="editnewproperties" />
|
||||
|
||||
<span style="vertical-align:20%"></span>
|
||||
<h:outputText value=" " />
|
||||
|
||||
<h:selectOneMenu id="newlanguage" immediate="true" value="#{CreateMultilingualPropertiesBean.newlanguage}" style="width:80px" >
|
||||
<f:selectItems value="#{CreateMultilingualPropertiesBean.contentFilterLanguages}" />
|
||||
</h:selectOneMenu>
|
||||
|
||||
<h:outputText value=" " />
|
||||
<h:outputText value="#{msg.properties_close}" />
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</f:verbatim>
|
@@ -32,47 +32,45 @@
|
||||
<script type="text/javascript" src="<%=request.getContextPath()%>/scripts/validation.js"> </script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
var finishButtonPressed = false;
|
||||
window.onload = pageLoaded;
|
||||
|
||||
function pageLoaded()
|
||||
{
|
||||
document.getElementById("dialog:dialog-body:name").focus();
|
||||
document.getElementById("dialog").onsubmit = validate;
|
||||
document.getElementById("dialog:finish-button").onclick = function() {finishButtonPressed = true; clear_dialog();}
|
||||
checkButtonState();
|
||||
}
|
||||
function pageLoaded()
|
||||
{
|
||||
document.getElementById("dialog:dialog-body:name").focus();
|
||||
document.getElementById("dialog").onsubmit = validate;
|
||||
document.getElementById("dialog:finish-button").onclick = function() {finishButtonPressed = true; clear_dialog();}
|
||||
checkButtonState();
|
||||
}
|
||||
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("dialog:dialog-body:name").value.length == 0 )
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = false;
|
||||
}
|
||||
}
|
||||
function checkButtonState()
|
||||
{
|
||||
if (document.getElementById("dialog:dialog-body:name").value.length == 0 )
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
document.getElementById("dialog:finish-button").disabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
|
||||
var retour = "";
|
||||
var val = document.getElementById("dialog:dialog-body:name");
|
||||
for(i=0;i < val.length;i++) if(val.charAt(i) != " ") {retour += val.charAt(i)}
|
||||
return validateName(retour,
|
||||
'</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" /><f:verbatim>',
|
||||
true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
function validate()
|
||||
{
|
||||
if (finishButtonPressed)
|
||||
{
|
||||
finishButtonPressed = false;
|
||||
var retour = "";
|
||||
var val = document.getElementById("dialog:dialog-body:name");
|
||||
for(i=0;i < val.length;i++) if(val.charAt(i) != " ") {retour += val.charAt(i)}
|
||||
return validateName(retour,
|
||||
'</f:verbatim><a:outputText value="#{msg.validation_invalid_character}" /><f:verbatim>', true);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -136,38 +134,30 @@ onkeyup="javascript:checkButtonState();" onchange="javascript:checkButtonState()
|
||||
<f:verbatim>
|
||||
</td>
|
||||
<td>
|
||||
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
|
||||
</f:verbatim>
|
||||
<a:imagePickerRadioPanel id="space-icon" columns="6" spacing="4" value="#{DialogManager.bean.icon}"
|
||||
panelBorder="greyround" panelBgcolor="#F5F5F5">
|
||||
<a:listItems value="#{DialogManager.bean.icons}" />
|
||||
</a:imagePickerRadioPanel>
|
||||
|
||||
<table border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
</f:verbatim>
|
||||
<a:imagePickerRadioPanel id="space-icon" columns="6" spacing="4" value="#{DialogManager.bean.icon}"
|
||||
panelBorder="greyround" panelBgcolor="#F5F5F5">
|
||||
<a:listItems value="#{DialogManager.bean.icons}" />
|
||||
</a:imagePickerRadioPanel>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<td style="padding-left">
|
||||
<h:outputText value="#{msg.properties_close}:" />
|
||||
<h:outputText value=" " />
|
||||
<tr>
|
||||
<td></td><td colspan=2>
|
||||
</f:verbatim>
|
||||
<h:outputText value="#{msg.properties_close}:" style="padding-right:8px" />
|
||||
<h:selectBooleanCheckbox value="#{CreateMultilingualSpaceDialog.edit}" id="Nedit" />
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<h:selectOneMenu id="newlanguage" immediate="true" value="#{CreateMultilingualPropertiesBean.newlanguage}" style="width:80px" >
|
||||
<f:selectItems value="#{CreateMultilingualPropertiesBean.contentFilterLanguages}" />
|
||||
</h:selectOneMenu>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
<f:verbatim>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</f:verbatim>
|
Reference in New Issue
Block a user