From 0ee6dbcfc8b13c70217114f273012684fbf3c4d5 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Wed, 20 Sep 2006 14:32:29 +0000 Subject: [PATCH] . 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@3863 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../create-web-content-wizard/create-html.jsp | 57 +++++++++ .../create-web-content-wizard/create-text.jsp | 24 ++++ .../create-web-content-wizard/create-xml.jsp | 81 +++++++++++++ .../wcm/create-web-content-wizard/details.jsp | 113 ++++++++++++++++++ 4 files changed, 275 insertions(+) create mode 100644 source/web/jsp/wcm/create-web-content-wizard/create-html.jsp create mode 100644 source/web/jsp/wcm/create-web-content-wizard/create-text.jsp create mode 100644 source/web/jsp/wcm/create-web-content-wizard/create-xml.jsp create mode 100644 source/web/jsp/wcm/create-web-content-wizard/details.jsp diff --git a/source/web/jsp/wcm/create-web-content-wizard/create-html.jsp b/source/web/jsp/wcm/create-web-content-wizard/create-html.jsp new file mode 100644 index 0000000000..9fa813e2bf --- /dev/null +++ b/source/web/jsp/wcm/create-web-content-wizard/create-html.jsp @@ -0,0 +1,57 @@ +<%-- + 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="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + + + + + +
+ + + +
+
+ diff --git a/source/web/jsp/wcm/create-web-content-wizard/create-text.jsp b/source/web/jsp/wcm/create-web-content-wizard/create-text.jsp new file mode 100644 index 0000000000..f65af1f775 --- /dev/null +++ b/source/web/jsp/wcm/create-web-content-wizard/create-text.jsp @@ -0,0 +1,24 @@ +<%-- + 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="/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/wcm/create-web-content-wizard/create-xml.jsp b/source/web/jsp/wcm/create-web-content-wizard/create-xml.jsp new file mode 100644 index 0000000000..13781e81f5 --- /dev/null +++ b/source/web/jsp/wcm/create-web-content-wizard/create-xml.jsp @@ -0,0 +1,81 @@ +<%-- + 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="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> +<%@ page import="org.alfresco.web.app.Application" %> +<%@ page import="org.alfresco.web.templating.*" %> +<%@ page import="org.alfresco.web.bean.wcm.CreateWebContentWizard" %> +<%@ page import="org.w3c.dom.Document" %> + +<% +final CreateWebContentWizard wiz = (CreateWebContentWizard) + Application.getWizardManager().getBean(); +TemplateType tt = wiz.getTemplateType(); +TemplateInputMethod tim = tt.getInputMethods().get(0); +final TemplatingService ts = TemplatingService.getInstance(); +final InstanceData instanceData = new InstanceData() +{ + public Document getContent() + { + try + { + return (wiz.getContent() != null ? ts.parseXML(wiz.getContent()) : null); + } + catch (Exception e) + { + e.printStackTrace(); + return null; + } + } + + public void setContent(final Document d) + { + wiz.setContent(ts.writeXMLToString(d)); + } +}; +tim.generate(instanceData, tt, out); +%> + diff --git a/source/web/jsp/wcm/create-web-content-wizard/details.jsp b/source/web/jsp/wcm/create-web-content-wizard/details.jsp new file mode 100644 index 0000000000..1ee4a2a749 --- /dev/null +++ b/source/web/jsp/wcm/create-web-content-wizard/details.jsp @@ -0,0 +1,113 @@ +<%-- + 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="/WEB-INF/alfresco.tld" prefix="a" %> +<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +