mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. WCM UI
- Added Edit and Delete actions for AVM files and Delete action for AVM folders - Available on the Modified Items list for a user and also in the website sandbox browse screens - Edit is working using the inline editors for plain text and HTML files - XML form content editing to be integrated shortly! - Edit for non-inline editable files is working (i.e. download file), but no "Update" action available at present for saving updates - Delete will delete files/folders structures from the current sandbox, deleted files in a layer are shown in My Modified Files (see below) - User sandbox My Modified Files now shows deleted files as differences (as ghosted out rows) - Refactoring of the modified Create Content Wizard into a new wizard Create Web Content Wizard - responsible for creating content in the AVM store rather than usual SpacesStore - removed XML specific handling from Create Content Wizard (now only present in Create Web Content Wizard) - Create Content action added to sandbox view - NOTE: does not yet create content in the AVM world! - Added "jsp" filetype as plain text format mimetype (to allow inline-edit for JSP files as website content) - Open/closed state of My Modified Files panel is remembered between screen refreshes git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3864 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -381,7 +381,7 @@ public abstract class BaseContentWizard extends BaseWizardBean
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.putContent(strContent == null ? "" : strContent);
|
||||
writer.putContent(strContent == null ? "" : strContent);
|
||||
}
|
||||
|
||||
// remember the created node now
|
||||
|
@@ -17,7 +17,6 @@
|
||||
package org.alfresco.web.bean.content;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.ResourceBundle;
|
||||
@@ -35,17 +34,9 @@ import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.data.IDataContainer;
|
||||
import org.alfresco.web.data.QuickSort;
|
||||
import org.alfresco.web.templating.*;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.service.cmr.model.FileInfo;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import java.io.OutputStreamWriter;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
|
||||
/**
|
||||
* Bean implementation for the "Create Content Wizard" dialog
|
||||
*
|
||||
@@ -54,11 +45,9 @@ import org.alfresco.web.app.servlet.FacesHelper;
|
||||
public class CreateContentWizard extends BaseContentWizard
|
||||
{
|
||||
protected String content = null;
|
||||
protected String templateTypeName;
|
||||
protected List<SelectItem> createMimeTypes;
|
||||
|
||||
private static final Log LOGGER =
|
||||
LogFactory.getLog(CreateContentWizard.class);
|
||||
private static Log logger = LogFactory.getLog(CreateContentWizard.class);
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
@@ -68,25 +57,7 @@ public class CreateContentWizard extends BaseContentWizard
|
||||
protected String finishImpl(FacesContext context, String outcome)
|
||||
throws Exception
|
||||
{
|
||||
LOGGER.debug("saving file content to " + this.fileName);
|
||||
saveContent(null, this.content);
|
||||
if (this.templateTypeName != null)
|
||||
{
|
||||
LOGGER.debug("generating template output for " + this.templateTypeName);
|
||||
this.nodeService.setProperty(this.createdNode,
|
||||
TemplatingService.TT_QNAME,
|
||||
this.templateTypeName);
|
||||
TemplatingService ts = TemplatingService.getInstance();
|
||||
TemplateType tt = this.getTemplateType();
|
||||
OutputUtil.generate(this.createdNode,
|
||||
ts.parseXML(this.content),
|
||||
tt,
|
||||
this.fileName,
|
||||
this.getContainerNodeRef(),
|
||||
this.fileFolderService,
|
||||
this.contentService,
|
||||
this.nodeService);
|
||||
}
|
||||
|
||||
// return the default outcome
|
||||
return outcome;
|
||||
@@ -99,7 +70,6 @@ public class CreateContentWizard extends BaseContentWizard
|
||||
|
||||
this.content = null;
|
||||
this.inlineEdit = true;
|
||||
this.templateTypeName = null;
|
||||
this.mimeType = MimetypeMap.MIMETYPE_HTML;
|
||||
}
|
||||
|
||||
@@ -163,20 +133,6 @@ public class CreateContentWizard extends BaseContentWizard
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public List<SelectItem> getCreateTemplateTypes()
|
||||
{
|
||||
Collection<TemplateType> ttl = TemplatingService.getInstance().getTemplateTypes();
|
||||
List<SelectItem> sil = new ArrayList<SelectItem>(ttl.size());
|
||||
for (TemplateType tt : ttl)
|
||||
{
|
||||
sil.add(new SelectItem(tt.getName(), tt.getName()));
|
||||
}
|
||||
|
||||
QuickSort sorter = new QuickSort(sil, "label", true, IDataContainer.SORT_CASEINSENSITIVE);
|
||||
sorter.sort();
|
||||
return sil;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns a list of mime types to allow the user to select from
|
||||
*/
|
||||
@@ -213,12 +169,12 @@ public class CreateContentWizard extends BaseContentWizard
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.warn("Could not find 'create-mime-types' configuration element");
|
||||
logger.warn("Could not find 'create-mime-types' configuration element");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LOGGER.warn("Could not find 'Content Wizards' configuration section");
|
||||
logger.warn("Could not find 'Content Wizards' configuration section");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -226,25 +182,6 @@ public class CreateContentWizard extends BaseContentWizard
|
||||
return this.createMimeTypes;
|
||||
}
|
||||
|
||||
public String getTemplateTypeName()
|
||||
{
|
||||
return this.templateTypeName;
|
||||
}
|
||||
|
||||
public TemplateType getTemplateType()
|
||||
{
|
||||
final TemplatingService ts = TemplatingService.getInstance();
|
||||
return ts.getTemplateType(this.getTemplateTypeName());
|
||||
}
|
||||
|
||||
/**
|
||||
* @param templateType Sets the currently selected template type
|
||||
*/
|
||||
public void setTemplateTypeName(final String templateTypeName)
|
||||
{
|
||||
this.templateTypeName = templateTypeName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Returns the summary data for the wizard.
|
||||
*/
|
||||
@@ -261,6 +198,7 @@ public class CreateContentWizard extends BaseContentWizard
|
||||
getSummaryMimeType(this.mimeType)});
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Action event handlers
|
||||
|
||||
@@ -272,12 +210,4 @@ public class CreateContentWizard extends BaseContentWizard
|
||||
// clear the content as HTML is not compatible with the plain text box etc.
|
||||
this.content = null;
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Service Injection
|
||||
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Helper methods
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user