|
-
-
-
-
-
-
-
-
-
-
+
+
+
|
|
|
Index: lams_tool_vote/.classpath
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/.classpath,v
diff -u -r1.1 -r1.2
--- lams_tool_vote/.classpath 7 Apr 2006 18:00:39 -0000 1.1
+++ lams_tool_vote/.classpath 16 May 2006 05:13:25 -0000 1.2
@@ -8,5 +8,6 @@
+
Index: lams_tool_vote/conf/language/ApplicationResources.properties
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/conf/language/Attic/ApplicationResources.properties,v
diff -u -r1.26 -r1.27
--- lams_tool_vote/conf/language/ApplicationResources.properties 16 May 2006 00:05:24 -0000 1.26
+++ lams_tool_vote/conf/language/ApplicationResources.properties 16 May 2006 05:13:25 -0000 1.27
@@ -105,3 +105,5 @@
#======= End labels: Exported 96 labels for en AU =====
+#======= Add on 16/05/2006 =====
+authoring.msg.cancel.save=Do you want to close this window without saving?
\ No newline at end of file
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ClearSessionAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ClearSessionAction.java,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/ClearSessionAction.java 16 May 2006 05:13:25 -0000 1.1
@@ -0,0 +1,79 @@
+/****************************************************************
+ * 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.vote.web;
+
+import javax.servlet.http.HttpSession;
+
+import org.lamsfoundation.lams.authoring.web.LamsAuthoringFinishAction;
+import org.lamsfoundation.lams.tool.ToolAccessMode;
+import org.lamsfoundation.lams.web.util.AttributeNames;
+
+/**
+ * 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(VoteAction.MAP_OPTIONS_CONTENT);
+ session.removeAttribute(VoteAction.ACTIVITY_INSTRUCTIONS);
+ session.removeAttribute(VoteAction.TOOL_SERVICE);
+ session.removeAttribute(VoteAction.TOOL_CONTENT_ID);
+ session.removeAttribute(VoteAction.MAX_OPTION_INDEX);
+ session.removeAttribute(VoteAction.USER_EXCEPTION_NO_TOOL_SESSIONS);
+ session.removeAttribute(VoteAction.ATTACHMENT_LIST);
+ session.removeAttribute(VoteAction.DELETED_ATTACHMENT_LIST);
+ session.removeAttribute(VoteAction.LIST_OFFLINEFILES_METADATA);
+ session.removeAttribute(VoteAction.LIST_ONLINEFILES_METADATA);
+ session.removeAttribute(VoteAction.DEFINE_LATER_IN_EDIT_MODE);
+ session.removeAttribute(VoteAction.SHOW_AUTHORING_TABS);
+ session.removeAttribute(VoteAction.IS_MONITORED_CONTENT_IN_USE);
+ session.removeAttribute(AttributeNames.PARAM_TOOL_CONTENT_ID);
+ session.removeAttribute(VoteAction.DEFAULT_OPTION_CONTENT);
+ session.removeAttribute(VoteAction.RICHTEXT_OFFLINEINSTRUCTIONS);
+ session.removeAttribute(VoteAction.RICHTEXT_ONLINEINSTRUCTIONS);
+ session.removeAttribute(VoteAction.ACTIVITY_TITLE);
+ session.removeAttribute("optIndex");
+ session.removeAttribute(VoteAction.LIST_UPLOADED_OFFLINE_FILENAMES);
+ session.removeAttribute(VoteAction.LIST_UPLOADED_ONLINE_FILENAMES);
+ session.removeAttribute(VoteAction.RICHTEXT_TITLE);
+ session.removeAttribute(VoteAction.RICHTEXT_TITLE);
+ session.removeAttribute(VoteAction.DEFAULT_CONTENT_ID_STR);
+ session.removeAttribute(VoteAction.DEFAULT_CONTENT_ID);
+ session.removeAttribute(VoteAction.ACTIVE_MODULE);
+ session.removeAttribute(VoteAction.IS_DEFINE_LATER);
+
+ }
+ }
+
+
+}
Index: lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java,v
diff -u -r1.18 -r1.19
--- lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 15 May 2006 22:42:12 -0000 1.18
+++ lams_tool_vote/src/java/org/lamsfoundation/lams/tool/vote/web/VoteAction.java 16 May 2006 05:13:25 -0000 1.19
@@ -38,6 +38,7 @@
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
+import org.lamsfoundation.lams.authoring.web.AuthoringConstants;
import org.lamsfoundation.lams.contentrepository.RepositoryCheckedException;
import org.lamsfoundation.lams.tool.exception.ToolException;
import org.lamsfoundation.lams.tool.vote.VoteAppConstants;
@@ -453,6 +454,8 @@
logger.debug("final submit status :" +voteAuthoringForm.getSbmtSuccess());
logger.debug("final duplicate status :" +request.getAttribute(USER_EXCEPTION_OPTIONS_DUPLICATE));
logger.debug("fwding to destination :" +destination);
+
+ request.setAttribute(AuthoringConstants.LAMS_AUTHORING_SUCCESS_FLAG,Boolean.TRUE);
return (mapping.findForward(destination));
}
Index: lams_tool_vote/web/WEB-INF/lams.tld
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/web/WEB-INF/Attic/lams.tld,v
diff -u -r1.2 -r1.3
--- lams_tool_vote/web/WEB-INF/lams.tld 19 Apr 2006 02:24:38 -0000 1.2
+++ lams_tool_vote/web/WEB-INF/lams.tld 16 May 2006 05:13:25 -0000 1.3
@@ -275,7 +275,12 @@
/WEB-INF/tags/SetEditor.tag
+ AuthoringButton
+ /WEB-INF/tags/AuthoringButton.tag
+
+
headItems
/WEB-INF/tags/headItems.tag
-
+
+
Index: lams_tool_vote/web/WEB-INF/struts-config.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/web/WEB-INF/struts-config.xml,v
diff -u -r1.15 -r1.16
--- lams_tool_vote/web/WEB-INF/struts-config.xml 15 May 2006 22:42:12 -0000 1.15
+++ lams_tool_vote/web/WEB-INF/struts-config.xml 16 May 2006 05:13:25 -0000 1.16
@@ -457,6 +457,10 @@
redirect="false"
/>
+
+
+
Index: lams_tool_vote/web/WEB-INF/web.xml
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/web/WEB-INF/web.xml,v
diff -u -r1.5 -r1.6
--- lams_tool_vote/web/WEB-INF/web.xml 6 May 2006 15:10:20 -0000 1.5
+++ lams_tool_vote/web/WEB-INF/web.xml 16 May 2006 05:13:25 -0000 1.6
@@ -23,7 +23,7 @@
-->
javax.servlet.jsp.jstl.fmt.localizationContext
- org.lamsfoundation.lams.tool.vote.web.ApplicationResources
+ org.lamsfoundation.lams.tool.vote.ApplicationResources
Index: lams_tool_vote/web/WEB-INF/tags/AuthoringButton.tag
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/web/WEB-INF/tags/AuthoringButton.tag,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ lams_tool_vote/web/WEB-INF/tags/AuthoringButton.tag 16 May 2006 05:13:25 -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_vote/web/authoring/AuthoringMaincontent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/AuthoringMaincontent.jsp,v
diff -u -r1.8 -r1.9
--- lams_tool_vote/web/authoring/AuthoringMaincontent.jsp 27 Apr 2006 16:48:37 -0000 1.8
+++ lams_tool_vote/web/authoring/AuthoringMaincontent.jsp 16 May 2006 05:13:25 -0000 1.9
@@ -138,8 +138,8 @@
-
-
+
+
@@ -160,6 +160,11 @@
+
+
+
+
@@ -181,6 +186,10 @@
+
+
+
Index: lams_tool_vote/web/authoring/BasicContent.jsp
===================================================================
RCS file: /usr/local/cvsroot/lams_tool_vote/web/authoring/BasicContent.jsp,v
diff -u -r1.17 -r1.18
--- lams_tool_vote/web/authoring/BasicContent.jsp 15 May 2006 22:42:12 -0000 1.17
+++ lams_tool_vote/web/authoring/BasicContent.jsp 16 May 2006 05:13:25 -0000 1.18
@@ -150,11 +150,6 @@
-
-
-
-
-