Index: lams_tool_nb/conf/language/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_nb/conf/language/Attic/ApplicationResources.properties,v
diff -u -r1.8 -r1.9
--- lams_tool_nb/conf/language/ApplicationResources.properties 14 Apr 2006 10:05:36 -0000 1.8
+++ lams_tool_nb/conf/language/ApplicationResources.properties 15 May 2006 06:57:14 -0000 1.9
@@ -59,3 +59,6 @@
#======= End labels: Exported 50 labels for en AU =====
+#======= New labels: after 12/05/2006 =============
+authoring.msg.cancel.save=Do you want to close this window without saving?
+
Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/ClearSessionAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/ClearSessionAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/ClearSessionAction.java 15 May 2006 06:57:14 -0000 1.1
@@ -0,0 +1,56 @@
+/****************************************************************
+ * 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.noticeboard.web;
+
+import javax.servlet.http.HttpSession;
+
+import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
+import org.lamsfoundation.lams.tool.ToolAccessMode;
+import org.lamsfoundation.lams.tool.noticeboard.NoticeboardConstants;
+
+/**
+ * This class give a chance to clear HttpSession when user save/close authoring page.
+ * @author Steve.Ni
+ * ----------------XDoclet Tags--------------------
+ *
+ * @struts:action path="/clearsession" validate="false"
+ *
+ * @version $Revision$
+ */
+public class ClearSessionAction extends LamsAuthoringFinishAction {
+
+ @Override
+ public void clearSession(HttpSession session, ToolAccessMode mode) {
+ if(mode.isAuthor()){
+ session.removeAttribute(NoticeboardConstants.TOOL_CONTENT_ID);
+ session.removeAttribute(NoticeboardConstants.ATTACHMENT_LIST);
+ session.removeAttribute(NoticeboardConstants.DELETED_ATTACHMENT_LIST);
+ session.removeAttribute(NoticeboardConstants.MODE);
+ session.removeAttribute(NbAuthoringAction.FORM);
+ }
+ }
+
+
+}
Index: lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java,v
diff -u -r1.24 -r1.25
--- lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java 6 Apr 2006 07:05:07 -0000 1.24
+++ lams_tool_nb/src/java/org/lamsfoundation/lams/tool/noticeboard/web/NbAuthoringAction.java 15 May 2006 06:57:14 -0000 1.25
@@ -43,6 +43,7 @@
import org.apache.struts.action.ActionMessages;
import org.apache.struts.upload.FormFile;
import org.apache.struts.util.MessageResources;
+import org.lamsfoundation.lams.authoring.web.AuthoringConstants;
import org.lamsfoundation.lams.contentrepository.InvalidParameterException;
import org.lamsfoundation.lams.contentrepository.NodeKey;
import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
@@ -310,6 +311,7 @@
if (request.getSession().getAttribute(NoticeboardConstants.MODE).equals(DEFINE_LATER_MODE))
request.setAttribute(SHOW_BASIC_TAB, "true");
+ request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE);
return mapping.findForward(NoticeboardConstants.AUTHOR_PAGE);
}
Index: lams_tool_nb/web/WEB-INF/lams.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_nb/web/WEB-INF/Attic/lams.tld,v
diff -u -r1.4 -r1.5
--- lams_tool_nb/web/WEB-INF/lams.tld 19 Apr 2006 02:24:03 -0000 1.4
+++ lams_tool_nb/web/WEB-INF/lams.tld 15 May 2006 06:57:14 -0000 1.5
@@ -275,7 +275,12 @@
/WEB-INF/tags/SetEditor.tag
+ AuthoringButton
+ /WEB-INF/tags/AuthoringButton.tag
+
+
headItems
/WEB-INF/tags/headItems.tag
-
+
+
Index: lams_tool_nb/web/WEB-INF/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_nb/web/WEB-INF/Attic/struts-config.xml,v
diff -u -r1.16 -r1.17
--- lams_tool_nb/web/WEB-INF/struts-config.xml 5 Apr 2006 04:08:10 -0000 1.16
+++ lams_tool_nb/web/WEB-INF/struts-config.xml 15 May 2006 06:57:14 -0000 1.17
@@ -78,6 +78,13 @@
/>
+
+
+<%@ 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_nb/web/authoring/authoring.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_nb/web/authoring/authoring.jsp,v
diff -u -r1.3 -r1.4
--- lams_tool_nb/web/authoring/authoring.jsp 19 Apr 2006 02:25:49 -0000 1.3
+++ lams_tool_nb/web/authoring/authoring.jsp 15 May 2006 06:57:14 -0000 1.4
@@ -52,7 +52,7 @@
-
+
@@ -90,10 +90,18 @@
-
-
-
-
+<%-- Default value
+ cancelButtonLabelKey="label.authoring.cancel.button"
+ saveButtonLabelKey="label.authoring.save.button"
+ cancelConfirmMsgKey="authoring.msg.cancel.save"
+ accessMode="author"
+--%>
+
+
+
+
+
+