Index: lams_tool_forum/.classpath =================================================================== diff -u -ra95235508798fd78a88bd54a8f067b4936a1d8fa -rb9a105856c81f49b60f18e80bf9ee1bc7913f390 --- lams_tool_forum/.classpath (.../.classpath) (revision a95235508798fd78a88bd54a8f067b4936a1d8fa) +++ lams_tool_forum/.classpath (.../.classpath) (revision b9a105856c81f49b60f18e80bf9ee1bc7913f390) @@ -10,5 +10,6 @@ + Index: lams_tool_forum/build.xml =================================================================== diff -u -r477b19dd83e2be0e1b3b2493fb4cdbe68a5cddc1 -rb9a105856c81f49b60f18e80bf9ee1bc7913f390 --- lams_tool_forum/build.xml (.../build.xml) (revision 477b19dd83e2be0e1b3b2493fb4cdbe68a5cddc1) +++ lams_tool_forum/build.xml (.../build.xml) (revision b9a105856c81f49b60f18e80bf9ee1bc7913f390) @@ -65,7 +65,7 @@ - + + + Index: lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java =================================================================== diff -u -rd9c7ddef141d19423b6ab2914d153c2cb748f187 -rb9a105856c81f49b60f18e80bf9ee1bc7913f390 --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision d9c7ddef141d19423b6ab2914d153c2cb748f187) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/AuthoringAction.java (.../AuthoringAction.java) (revision b9a105856c81f49b60f18e80bf9ee1bc7913f390) @@ -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 =================================================================== diff -u --- lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/ClearSessionAction.java (revision 0) +++ lams_tool_forum/src/java/org/lamsfoundation/lams/tool/forum/web/actions/ClearSessionAction.java (revision b9a105856c81f49b60f18e80bf9ee1bc7913f390) @@ -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 =================================================================== diff -u -r10071967b5c1e8a0352207114e694b0533708af5 -rb9a105856c81f49b60f18e80bf9ee1bc7913f390 --- lams_tool_forum/web/WEB-INF/lams.tld (.../lams.tld) (revision 10071967b5c1e8a0352207114e694b0533708af5) +++ lams_tool_forum/web/WEB-INF/lams.tld (.../lams.tld) (revision b9a105856c81f49b60f18e80bf9ee1bc7913f390) @@ -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 =================================================================== diff -u -r1c31dbd6b844bffd77d86babab9592e8267cc462 -rb9a105856c81f49b60f18e80bf9ee1bc7913f390 --- lams_tool_forum/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision 1c31dbd6b844bffd77d86babab9592e8267cc462) +++ lams_tool_forum/web/WEB-INF/struts-config.xml (.../struts-config.xml) (revision b9a105856c81f49b60f18e80bf9ee1bc7913f390) @@ -319,6 +319,10 @@ parameter="tiles:/error" /> + + + Index: lams_tool_forum/web/WEB-INF/tags/AuthoringButton.tag =================================================================== diff -u --- lams_tool_forum/web/WEB-INF/tags/AuthoringButton.tag (revision 0) +++ lams_tool_forum/web/WEB-INF/tags/AuthoringButton.tag (revision b9a105856c81f49b60f18e80bf9ee1bc7913f390) @@ -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 =================================================================== diff -u -r3080478ec97071f97aa35c5eb46fa2552e652f83 -rb9a105856c81f49b60f18e80bf9ee1bc7913f390 --- lams_tool_forum/web/jsps/authoring/advance.jsp (.../advance.jsp) (revision 3080478ec97071f97aa35c5eb46fa2552e652f83) +++ lams_tool_forum/web/jsps/authoring/advance.jsp (.../advance.jsp) (revision b9a105856c81f49b60f18e80bf9ee1bc7913f390) @@ -40,17 +40,6 @@ - -
-

- - - - - - -

-