Index: lams_tool_forum/.classpath =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/.classpath,v diff -u -r1.9 -r1.10 --- lams_tool_forum/.classpath 17 Jan 2006 00:17:20 -0000 1.9 +++ lams_tool_forum/.classpath 12 May 2006 05:14:21 -0000 1.10 @@ -10,5 +10,6 @@ + Index: lams_tool_forum/build.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/build.xml,v diff -u -r1.38 -r1.39 --- lams_tool_forum/build.xml 14 Apr 2006 06:14:48 -0000 1.38 +++ lams_tool_forum/build.xml 12 May 2006 05:14:21 -0000 1.39 @@ -65,7 +65,7 @@ - + + + Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java,v diff -u -r1.36 -r1.37 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java 6 Apr 2006 06:40:40 -0000 1.36 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java 12 May 2006 05:14:21 -0000 1.37 @@ -49,6 +49,7 @@ import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.apache.struts.upload.FormFile; +import org.lamsfoundation.lams.authoring.web.AuthoringConstants; import org.lamsfoundation.lams.contentrepository.client.IToolContentHandler; import org.lamsfoundation.lams.tool.forum.dto.MessageDTO; import org.lamsfoundation.lams.tool.forum.persistence.Attachment; @@ -323,6 +324,7 @@ } String mode = (String) request.getSession().getAttribute(ForumConstants.MODE); + request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE); if(StringUtils.equals(mode,ForumConstants.AUTHOR_MODE)) return mapping.findForward("author"); else Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/ClearSessionAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/ClearSessionAction.java,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/ClearSessionAction.java 12 May 2006 05:14:22 -0000 1.1 @@ -0,0 +1,54 @@ +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/* $Id$ */ +package org.lamsfoundation.lams.tool.forum.web.actions; + +import javax.servlet.http.HttpSession; + +import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction; +import org.lamsfoundation.lams.tool.ToolAccessMode; +import org.lamsfoundation.lams.tool.forum.util.ForumConstants; + +/** + * This class give a chance to clear HttpSession when user save/close authoring page. + * @author Steve.Ni + * + * @version $Revision$ + */ +public class ClearSessionAction extends LamsAuthoringFinishAction { + + @Override + public void clearSession(HttpSession session, ToolAccessMode mode) { + if(mode.isAuthor()){ + session.removeAttribute(ForumConstants.MODE); + session.removeAttribute(ForumConstants.AUTHORING_TOPICS_LIST); + session.removeAttribute(ForumConstants.ATTACHMENT_LIST); + session.removeAttribute(ForumConstants.DELETED_ATTACHMENT_LIST); + session.removeAttribute(ForumConstants.DELETED_ATTACHMENT_LIST); + session.removeAttribute(ForumConstants.DELETED_AUTHORING_TOPICS_LIST); + } + } + + +} Index: lams_tool_forum/web/WEB-INF/lams.tld =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/Attic/lams.tld,v diff -u -r1.4 -r1.5 --- lams_tool_forum/web/WEB-INF/lams.tld 8 Mar 2006 23:58:05 -0000 1.4 +++ lams_tool_forum/web/WEB-INF/lams.tld 12 May 2006 05:14:21 -0000 1.5 @@ -63,6 +63,15 @@ org.lamsfoundation.lams.web.tag.CssTag empty + + Output stylesheet based on the user preferences. + localLink + false + + true + + + @@ -265,5 +274,9 @@ SetEditor /WEB-INF/tags/SetEditor.tag + + AuthoringButton + /WEB-INF/tags/AuthoringButton.tag + Index: lams_tool_forum/web/WEB-INF/struts-config.xml =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/Attic/struts-config.xml,v diff -u -r1.32 -r1.33 --- lams_tool_forum/web/WEB-INF/struts-config.xml 27 Mar 2006 22:24:53 -0000 1.32 +++ lams_tool_forum/web/WEB-INF/struts-config.xml 12 May 2006 05:14:21 -0000 1.33 @@ -319,6 +319,10 @@ parameter="tiles:/error" /> + + + Index: lams_tool_forum/web/WEB-INF/tags/AuthoringButton.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/tags/AuthoringButton.tag,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ lams_tool_forum/web/WEB-INF/tags/AuthoringButton.tag 12 May 2006 05:14:21 -0000 1.1 @@ -0,0 +1,90 @@ +<% +/**************************************************************** + * Copyright (C) 2005 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + + /** + * AuthoringButton.tag + * Author: Dapeng Ni + * Description: Creates the save/cancel button for authoring page + */ + + %> +<%@ tag body-content="scriptless" %> +<%@ taglib uri="tags-core" prefix="c" %> +<%@ taglib uri="tags-fmt" prefix="fmt" %> +<%@ taglib uri="tags-html" prefix="html" %> + +<%@ attribute name="formID" required="true" rtexprvalue="true" %> +<%@ attribute name="toolSignature" required="true" rtexprvalue="true" %> +<%@ attribute name="toolContentID" required="true" rtexprvalue="true" %> +<%@ attribute name="clearSessionActionUrl" required="true" rtexprvalue="true" %> + +<%-- Optional attribute --%> +<%@ attribute name="accessMode" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="saveButtonLabelKey" required="false" rtexprvalue="true" %> +<%@ attribute name="cancelConfirmMsgKey" required="false" rtexprvalue="true" %> + +<%-- Default value for message key --%> + + + + + + + + + + + + + + + +

+ + + + + + +

+ \ No newline at end of file Index: lams_tool_forum/web/jsps/authoring/advance.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/authoring/advance.jsp,v diff -u -r1.8 -r1.9 --- lams_tool_forum/web/jsps/authoring/advance.jsp 5 Apr 2006 12:47:45 -0000 1.8 +++ lams_tool_forum/web/jsps/authoring/advance.jsp 12 May 2006 05:14:21 -0000 1.9 @@ -40,17 +40,6 @@ - -
-

- - - - - - -

-