From b98c2309a4e3439b7d823a27157315a6e77cf7db Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Tue, 6 Feb 2007 17:16:22 +0000 Subject: [PATCH] . Fix for http://issues.alfresco.com/browse/WCM-299 - Inline editing mode no longer used for HTML/Text in WCM spaces Not appropriate for WCM files which are editing using external editors - i.e. the browser based HTML editors make a nasty mess of anything remotely complicated git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5057 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/web/bean/wcm/AVMEditBean.java | 22 +-- .../web/WEB-INF/faces-config-navigation.xml | 8 - source/web/jsp/wcm/edit-html-inline.jsp | 179 ------------------ source/web/jsp/wcm/edit-text-inline.jsp | 150 --------------- 4 files changed, 4 insertions(+), 355 deletions(-) delete mode 100644 source/web/jsp/wcm/edit-html-inline.jsp delete mode 100644 source/web/jsp/wcm/edit-text-inline.jsp diff --git a/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java b/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java index 4337589374..ff71c614c7 100644 --- a/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java +++ b/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java @@ -361,38 +361,24 @@ public class AVMEditBean String mimetype = reader.getMimetype(); String outcome = null; // calculate which editor screen to display - if (MimetypeMap.MIMETYPE_TEXT_PLAIN.equals(mimetype) || - MimetypeMap.MIMETYPE_XML.equals(mimetype) || - MimetypeMap.MIMETYPE_TEXT_CSS.equals(mimetype) || - MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype)) + if (MimetypeMap.MIMETYPE_XML.equals(mimetype) && + this.avmService.hasAspect(-1, avmPath, WCMAppModel.ASPECT_FORM_INSTANCE_DATA)) { // make content available to the editing screen this.setEditorOutput(reader.getContentString()); this.setFormProcessorSession(null); this.instanceDataDocument = null; this.form = null; - - // navigate to appropriate screen - outcome = ((MimetypeMap.MIMETYPE_XML.equals(mimetype) && - this.avmService.hasAspect(-1, avmPath, WCMAppModel.ASPECT_FORM_INSTANCE_DATA)) - ? "dialog:editAvmXmlInline" - : "dialog:editAvmTextInline"); - } - else if (MimetypeMap.MIMETYPE_HTML.equals(mimetype)) - { - // make content available to the editing screen - setDocumentContent(reader.getContentString()); - setEditorOutput(null); // navigate to appropriate screen - outcome = "dialog:editAvmHtmlInline"; + outcome = "dialog:editAvmXmlInline"; } else { // normal downloadable document outcome = "dialog:editAvmFile"; } - + final FacesContext fc = FacesContext.getCurrentInstance(); fc.getApplication().getNavigationHandler().handleNavigation(fc, null, outcome); } diff --git a/source/web/WEB-INF/faces-config-navigation.xml b/source/web/WEB-INF/faces-config-navigation.xml index 40f490b455..040fd19cd4 100644 --- a/source/web/WEB-INF/faces-config-navigation.xml +++ b/source/web/WEB-INF/faces-config-navigation.xml @@ -904,14 +904,6 @@ editAvmFile /jsp/wcm/edit-file.jsp - - editAvmHtmlInline - /jsp/wcm/edit-html-inline.jsp - - - editAvmTextInline - /jsp/wcm/edit-text-inline.jsp - editAvmXmlInline /jsp/wcm/edit-xml-inline.jsp diff --git a/source/web/jsp/wcm/edit-html-inline.jsp b/source/web/jsp/wcm/edit-html-inline.jsp deleted file mode 100644 index c38c72824a..0000000000 --- a/source/web/jsp/wcm/edit-html-inline.jsp +++ /dev/null @@ -1,179 +0,0 @@ -<%-- - 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="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> -<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - -<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> - - - - - - - - - - <%-- load a bundle of properties with I18N strings --%> - - - - - <%-- Main outer table --%> - - - <%-- Title bar --%> - - - - - <%-- Main area --%> - - <%-- Shelf --%> - - - <%-- Work Area --%> - - -
- <%@ include file="../parts/titlebar.jsp" %> -
- <%@ include file="../parts/shelf.jsp" %> - - - <%-- Breadcrumb --%> - <%@ include file="../parts/breadcrumb.jsp" %> - - <%-- Status and Actions --%> - - - - - - - <%-- separator row with gradient shadow --%> - - - - - - - <%-- Details --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- separator row with bottom panel graphics --%> - - - - - - -
- - <%-- Status and Actions inner contents table --%> - <%-- Generally this consists of an icon, textual summary and actions for the current object --%> - - - - - -
- -
''
-
-
- -
- - - <%-- Inline editor --%> - - - - -
-
- -
- -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
- -
\ No newline at end of file diff --git a/source/web/jsp/wcm/edit-text-inline.jsp b/source/web/jsp/wcm/edit-text-inline.jsp deleted file mode 100644 index 43d8ff5cf2..0000000000 --- a/source/web/jsp/wcm/edit-text-inline.jsp +++ /dev/null @@ -1,150 +0,0 @@ -<%-- - 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="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> -<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> - -<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %> -<%@ page isELIgnored="false" %> -<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> - - - - - - <%-- load a bundle of properties with I18N strings --%> - - - - - <%-- Main outer table --%> - - - <%-- Title bar --%> - - - - - <%-- Main area --%> - - <%-- Shelf --%> - - - <%-- Work Area --%> - - -
- <%@ include file="../parts/titlebar.jsp" %> -
- <%@ include file="../parts/shelf.jsp" %> - - - <%-- Breadcrumb --%> - <%@ include file="../parts/breadcrumb.jsp" %> - - <%-- Status and Actions --%> - - - - - - - <%-- separator row with gradient shadow --%> - - - - - - - <%-- Details --%> - - - - - - - <%-- Error Messages --%> - - - - - - - <%-- separator row with bottom panel graphics --%> - - - - - - -
- - <%-- Status and Actions inner contents table --%> - <%-- Generally this consists of an icon, textual summary and actions for the current object --%> - - - - - -
- -
''
-
-
- -
- - - <%-- Inline editor --%> - - - -
- <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %> - - <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %> - - <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "greyround", "#F5F5F5"); %> - - - - - - - - -
- -
- -
- <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "greyround"); %> -
-
- <%-- messages tag to show messages not handled by other specific message tags --%> - -
-
- -
- -
- -
\ No newline at end of file