Index: lams_tool_forum/web/error.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/error.jsp,v diff -u -r1.6 -r1.7 --- lams_tool_forum/web/error.jsp 27 Jul 2013 07:53:20 -0000 1.6 +++ lams_tool_forum/web/error.jsp 8 Jun 2016 04:28:39 -0000 1.7 @@ -1,5 +1,4 @@ - + <%@ page language="java" isErrorPage="true" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%> <%@ taglib uri="tags-lams" prefix="lams"%> Index: lams_tool_forum/web/WEB-INF/tags/Head.tag =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/WEB-INF/tags/Head.tag,v diff -u -r1.3 -r1.4 --- lams_tool_forum/web/WEB-INF/tags/Head.tag 19 Jun 2013 08:33:48 -0000 1.3 +++ lams_tool_forum/web/WEB-INF/tags/Head.tag 8 Jun 2016 04:28:39 -0000 1.4 @@ -1,42 +1,41 @@ -<%/**************************************************************** - * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 - * USA - * - * http://www.gnu.org/licenses/gpl.txt - * **************************************************************** - */ - -/** - * Head.tag - * Author: Fiona Malikoff +<%/**************************************************************** + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 + * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + */ + +/** + * Head.tag + * Author: Fiona Malikoff * Description: Sets up the non-cache pragma statements and the UTF-8 - * encoding. Use in place of the normal head tag. - */ + * encoding. Use in place of the normal head tag. + */ %> + +<%@ tag body-content="scriptless"%> -<%@ tag body-content="scriptless"%> - - - + Index: lams_tool_forum/web/includes/layout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/includes/layout.jsp,v diff -u -r1.19 -r1.20 --- lams_tool_forum/web/includes/layout.jsp 8 Jun 2007 01:35:33 -0000 1.19 +++ lams_tool_forum/web/includes/layout.jsp 8 Jun 2016 04:28:39 -0000 1.20 @@ -1,5 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> <%@ taglib uri="tags-tiles" prefix="tiles"%> Index: lams_tool_forum/web/includes/learnerLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/includes/learnerLayout.jsp,v diff -u -r1.7 -r1.8 --- lams_tool_forum/web/includes/learnerLayout.jsp 27 Dec 2014 00:03:14 -0000 1.7 +++ lams_tool_forum/web/includes/learnerLayout.jsp 8 Jun 2016 04:28:39 -0000 1.8 @@ -1,4 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> <%@ taglib uri="tags-tiles" prefix="tiles"%> Index: lams_tool_forum/web/includes/mobileLearnerLayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/includes/mobileLearnerLayout.jsp,v diff -u -r1.7 -r1.8 --- lams_tool_forum/web/includes/mobileLearnerLayout.jsp 29 Dec 2014 23:43:51 -0000 1.7 +++ lams_tool_forum/web/includes/mobileLearnerLayout.jsp 8 Jun 2016 04:28:39 -0000 1.8 @@ -1,5 +1,4 @@ - +> <%@ include file="/common/taglibs.jsp"%> Index: lams_tool_forum/web/includes/tablayout.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/includes/tablayout.jsp,v diff -u -r1.11 -r1.12 --- lams_tool_forum/web/includes/tablayout.jsp 8 Jun 2007 01:35:33 -0000 1.11 +++ lams_tool_forum/web/includes/tablayout.jsp 8 Jun 2016 04:28:39 -0000 1.12 @@ -1,5 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> <%@ taglib uri="tags-tiles" prefix="tiles"%> Index: lams_tool_forum/web/jsps/authoring/message/create.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/authoring/message/create.jsp,v diff -u -r1.42 -r1.43 --- lams_tool_forum/web/jsps/authoring/message/create.jsp 13 Feb 2015 14:45:57 -0000 1.42 +++ lams_tool_forum/web/jsps/authoring/message/create.jsp 8 Jun 2016 04:28:39 -0000 1.43 @@ -1,4 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> Index: lams_tool_forum/web/jsps/authoring/message/edit.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/authoring/message/edit.jsp,v diff -u -r1.28 -r1.29 --- lams_tool_forum/web/jsps/authoring/message/edit.jsp 13 Feb 2015 14:45:57 -0000 1.28 +++ lams_tool_forum/web/jsps/authoring/message/edit.jsp 8 Jun 2016 04:28:39 -0000 1.29 @@ -1,4 +1,4 @@ - + <%@ include file="/common/taglibs.jsp"%> Index: lams_tool_forum/web/jsps/authoring/message/forbiddenedit.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/authoring/message/forbiddenedit.jsp,v diff -u -r1.8 -r1.9 --- lams_tool_forum/web/jsps/authoring/message/forbiddenedit.jsp 8 Jun 2007 01:35:32 -0000 1.8 +++ lams_tool_forum/web/jsps/authoring/message/forbiddenedit.jsp 8 Jun 2016 04:28:39 -0000 1.9 @@ -1,7 +1,5 @@ - + - <%@ include file="/common/taglibs.jsp"%> Index: lams_tool_forum/web/jsps/learning/edit.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/learning/edit.jsp,v diff -u -r1.14 -r1.15 --- lams_tool_forum/web/jsps/learning/edit.jsp 18 Apr 2016 01:39:10 -0000 1.14 +++ lams_tool_forum/web/jsps/learning/edit.jsp 8 Jun 2016 04:28:39 -0000 1.15 @@ -15,9 +15,7 @@ e.stopPropagation(); }); - // The treetable code uses the clicks to expand and collapse the replies but then - // the buttons will not work. So stop the event propogating up the event chain. - $('#editForm').submit(function() { // catch the form's submit event + function submitEdit(){ disableSubmitButton(); if ( validateForm() ) { @@ -27,50 +25,71 @@ CKEDITOR.instances[instance].updateElement(); } - var formData = new FormData(this); - - $.ajax({ // create an AJAX call... - data: formData, - processData: false, // tell jQuery not to process the data - contentType: false, // tell jQuery not to set contentType - type: $(this).attr('method'), // GET or POST - url: $(this).attr('action'), // the file to call - success: function (response) { - var messageUid = response.messageUid; - if ( messageUid ) { - var rootUid = response.rootUid; - var messDiv = document.getElementById('msg'+messageUid); - if ( ! messDiv) { - alert(''); - } else { - // make sure the old edit form is gone, so if something goes wrong - // the user won't try to submit it again - $('#edit').remove(); - var loadString = '' + rootUid + "&sessionMapID=" + response.sessionMapID + "&messageUid="+messageUid; - $(messDiv).load(loadString, function() { - $('#msg'+messageUid).focus(); - setupJRating("?toolSessionID=${sessionMap.toolSessionID}&sessionMapID=${sessionMapID}"); - highlightMessage(); - }); - } + var replyForm = $("#editForm"); + if(typeof FormData == "undefined"){ + + if ( $("#attachmentFile").val() ) { + alert("Your browser is missing the required FormData component. Files cannot be uploaded."); + } - } else { - // No valid id? Validation failed! Assume it is the form coming back. - $('#edit').html(response); - } - } - }); + $.ajax({ // create an AJAX call... + data: replyForm.serialize(), + type: replyForm.attr('method'), // GET or POST + url: replyForm.attr('action'), // the file to call + success: function(response) { + submitSuccess(response); + } + }); + + } else { + + $.ajax({ // create an AJAX call... + data: new FormData(replyForm[0]), + processData: false, + contentType: false, + type: replyForm.attr('method'), // GET or POST + url: replyForm.attr('action'), // the file to call + success: function(response) { + submitSuccess(response); + } + }); + + } } // end validateForm() else { enableSubmitButton(); } return false; - }); + } function cancelEdit() { $('#edit').remove(); } - + + function submitSuccess(response) { + var messageUid = response.messageUid; + if ( messageUid ) { + var rootUid = response.rootUid; + var messDiv = document.getElementById('msg'+messageUid); + if ( ! messDiv) { + alert(''); + } else { + // make sure the old edit form is gone, so if something goes wrong + // the user won't try to submit it again + $('#edit').remove(); + var loadString = '' + rootUid + "&sessionMapID=" + response.sessionMapID + "&messageUid="+messageUid; + $(messDiv).load(loadString, function() { + $('#msg'+messageUid).focus(); + setupJRating("?toolSessionID=${sessionMap.toolSessionID}&sessionMapID=${sessionMapID}"); + highlightMessage(); + }); + } + + } else { + // No valid id? Validation failed! Assume it is the form coming back. + $('#edit').html(response); + } + } '); - } else { - var loadString = '' + rootUid + "&sessionMapID=" + response.sessionMapID + "&threadUid=" + threadUid+"&messageUid="+messageUid; - $(threadDiv).load(loadString, function() { - // expand up to the reply - in case it is buried down in a lot of replies - // don't need to do this if we have started a new thread. - if ( threadUid != messageUid ) { - $('#tree' + threadUid).treetable("reveal",messageUid); - $('#msg'+messageUid).focus(); - } - setupJRating("?toolSessionID=${sessionMap.toolSessionID}&sessionMapID=${sessionMapID}"); - highlightMessage(); - }); - } + var replyForm = $("#replyForm"); + if(typeof FormData == "undefined"){ - if ( response.noMorePosts ) { - $('.replybutton').hide(); - } - - - } else { - // No new id? Validation failed! - $('#reply').html(response); - } - } - }); + if ( $("#attachmentFile").val() ) { + alert("Your browser is missing the required FormData component. Files cannot be uploaded."); + } + + $.ajax({ // create an AJAX call... + data: replyForm.serialize(), + type: replyForm.attr('method'), // GET or POST + url: replyForm.attr('action'), // the file to call + success: function(response) { + submitSuccess(response); + } + }); + + } else { + + $.ajax({ // create an AJAX call... + data: new FormData(replyForm[0]), + processData: false, + contentType: false, + type: replyForm.attr('method'), // GET or POST + url: replyForm.attr('action'), // the file to call + success: function(response) { + submitSuccess(response); + } + }); + } + } // end validateForm() else { enableSubmitButton(); } return false; - }); + } + function submitSuccess(response) { + var threadDiv = document.getElementById('thread'+response.threadUid); + var threadUid = response.threadUid; + var messageUid = response.messageUid; + var rootUid = response.rootUid; + + if ( rootUid ) { + if ( ! threadDiv) { + // must have replied to the top level, so show the posting at the top. + var threadDiv = document.getElementById('reply'); + threadDiv.id = 'thread'+messageUid; + } else { + // make sure the old reply form is gone, so if something goes wrong + // the user won't try to submit it again + $('#reply').remove(); + } + + if ( ! threadDiv) { + alert(''); + } else { + var loadString = '' + rootUid + "&sessionMapID=" + response.sessionMapID + "&threadUid=" + threadUid+"&messageUid="+messageUid; + $(threadDiv).load(loadString, function() { + // expand up to the reply - in case it is buried down in a lot of replies + // don't need to do this if we have started a new thread. + if ( threadUid != messageUid ) { + $('#tree' + threadUid).treetable("reveal",messageUid); + $('#msg'+messageUid).focus(); + } + setupJRating("?toolSessionID=${sessionMap.toolSessionID}&sessionMapID=${sessionMapID}"); + highlightMessage(); + }); + } + + if ( response.noMorePosts ) { + $('.replybutton').hide(); + } + + } else { + // No new id? Validation failed! + $('#reply').html(response); + } + } + function cancelReply() { $('#reply').remove(); } Index: lams_tool_forum/web/jsps/learning/message/msgattachment.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/learning/message/msgattachment.jsp,v diff -u -r1.6 -r1.7 --- lams_tool_forum/web/jsps/learning/message/msgattachment.jsp 4 Mar 2015 20:06:53 -0000 1.6 +++ lams_tool_forum/web/jsps/learning/message/msgattachment.jsp 8 Jun 2016 04:28:39 -0000 1.7 @@ -26,5 +26,5 @@ - + Index: lams_tool_forum/web/jsps/learning/message/msgviewwrapper.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/learning/message/msgviewwrapper.jsp,v diff -u -r1.2 -r1.3 --- lams_tool_forum/web/jsps/learning/message/msgviewwrapper.jsp 20 May 2015 11:50:40 -0000 1.2 +++ lams_tool_forum/web/jsps/learning/message/msgviewwrapper.jsp 8 Jun 2016 04:28:39 -0000 1.3 @@ -1,4 +1,4 @@ - + <%-- Wraps up msgview.jsp for returning a single message - called when an edit is performed. It needs to do all the setup that topicview.jsp normally does. --%> Index: lams_tool_forum/web/jsps/learning/message/topiceditform.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/learning/message/topiceditform.jsp,v diff -u -r1.25 -r1.26 --- lams_tool_forum/web/jsps/learning/message/topiceditform.jsp 18 Mar 2015 11:24:44 -0000 1.25 +++ lams_tool_forum/web/jsps/learning/message/topiceditform.jsp 8 Jun 2016 04:28:39 -0000 1.26 @@ -33,8 +33,9 @@ - + - + Index: lams_tool_forum/web/jsps/learning/message/topicreplyform.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/learning/message/topicreplyform.jsp,v diff -u -r1.24 -r1.25 --- lams_tool_forum/web/jsps/learning/message/topicreplyform.jsp 14 Mar 2015 10:46:04 -0000 1.24 +++ lams_tool_forum/web/jsps/learning/message/topicreplyform.jsp 8 Jun 2016 04:28:39 -0000 1.25 @@ -19,7 +19,7 @@
- +
@@ -36,8 +36,9 @@ styleClass="button"> - + - +
Index: lams_tool_forum/web/jsps/learning/message/topicviewwrapper.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_forum/web/jsps/learning/message/topicviewwrapper.jsp,v diff -u -r1.2 -r1.3 --- lams_tool_forum/web/jsps/learning/message/topicviewwrapper.jsp 14 Mar 2015 10:46:04 -0000 1.2 +++ lams_tool_forum/web/jsps/learning/message/topicviewwrapper.jsp 8 Jun 2016 04:28:39 -0000 1.3 @@ -1,4 +1,4 @@ - +