You can subscribe to this list here.
2004 |
Jan
|
Feb
(5) |
Mar
(8) |
Apr
(32) |
May
(6) |
Jun
(9) |
Jul
|
Aug
(1) |
Sep
(22) |
Oct
(21) |
Nov
(6) |
Dec
(19) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(2) |
Feb
|
Mar
(14) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(12) |
Sep
(29) |
Oct
(30) |
Nov
(19) |
Dec
(6) |
2006 |
Jan
(29) |
Feb
(11) |
Mar
(2) |
Apr
(6) |
May
(2) |
Jun
(6) |
Jul
|
Aug
|
Sep
(3) |
Oct
(9) |
Nov
(2) |
Dec
|
2007 |
Jan
(1) |
Feb
(6) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(3) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: <inv...@ha...> - 2011-11-06 20:51:35
|
Querido amigo, Somos de HabboLatino.Us y te queremos invitar a este nuevo juego virtual. Es similar a HabboEspaña, con la diferencia de que los créditos y demás son gratis. Tu cuenta del Habbo España no funcionará, por lo que debes registrar una nueva. Puedes registrarte en http://www.HabboLatino.Us/ gratuitamente y jugar Online donde estés. ¡Sin descargas! |
From: Dayong W. <wa...@gm...> - 2010-02-08 15:10:14
|
Hi Gator Mail experts, I want to forward my GatorLink email to another email box. The forward settings at GatorLink seem to only redirect the email without keeping local copy , but I also want to keep a copy at the UF mail server. How could I achieve this? If this feature is not there, could you please add it? I think it is a quite important and common feature. Thanks for the help! Best Regards, Dayong |
From: <san...@us...> - 2008-04-30 06:32:31
|
Revision: 37 http://gatormail.svn.sourceforge.net/gatormail/?rev=37&view=rev Author: sandymac Date: 2008-04-29 23:32:37 -0700 (Tue, 29 Apr 2008) Log Message: ----------- Bump version Modified Paths: -------------- GatorMail/trunk/build.xml Modified: GatorMail/trunk/build.xml =================================================================== --- GatorMail/trunk/build.xml 2008-04-29 21:13:24 UTC (rev 36) +++ GatorMail/trunk/build.xml 2008-04-30 06:32:37 UTC (rev 37) @@ -19,7 +19,7 @@ <property name="gatormail.jdbc.url" value="" description="depricated"/> <property name="gatormail.attachment.path" value="" description="Local path to hold attachments until they are sent."/> - <property name="VERSION" value="1.0.23"/> + <property name="VERSION" value="1.0.24"/> <tstamp/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2008-04-29 21:18:26
|
Revision: 36 http://gatormail.svn.sourceforge.net/gatormail/?rev=36&view=rev Author: sandymac Date: 2008-04-29 14:13:24 -0700 (Tue, 29 Apr 2008) Log Message: ----------- New easy header message code. Modified Paths: -------------- GatorMail/trunk/build.xml GatorMail/trunk/src/webapp/tiles/common/header.jsp GatorMail/trunk/src/webapp/tiles/login/loginHeader.jsp Added Paths: ----------- GatorMail/trunk/src/webapp/alertMessage.js Modified: GatorMail/trunk/build.xml =================================================================== --- GatorMail/trunk/build.xml 2008-03-27 21:49:26 UTC (rev 35) +++ GatorMail/trunk/build.xml 2008-04-29 21:13:24 UTC (rev 36) @@ -275,6 +275,7 @@ <!-- / --> <fileset dir="${build.jsp.dir}"/> <fileset dir="${src.webapp.dir}" includes="yui/**"/> + <fileset dir="${src.webapp.dir}" includes="alertMessage.js"/> <fileset refid="fileset.gatormail.images"/> Added: GatorMail/trunk/src/webapp/alertMessage.js =================================================================== --- GatorMail/trunk/src/webapp/alertMessage.js (rev 0) +++ GatorMail/trunk/src/webapp/alertMessage.js 2008-04-29 21:13:24 UTC (rev 36) @@ -0,0 +1,7 @@ +// You can: +// document.write("A message"); +// for something easy. +// +// either use document.getElementByID("headerAlertMessage") for the top of each page +// or use document.getElementByID("loginAlertMessage") for the login page and +// test for what type of page you are on and customize out put there. \ No newline at end of file Modified: GatorMail/trunk/src/webapp/tiles/common/header.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/common/header.jsp 2008-03-27 21:49:26 UTC (rev 35) +++ GatorMail/trunk/src/webapp/tiles/common/header.jsp 2008-04-29 21:13:24 UTC (rev 36) @@ -25,6 +25,10 @@ <%-- Don't fotget to bump the version number in the feedback forward of struts-config.xml --%> <td height="75" valign="bottom" class="version">v@VERSION@</td> + <td rowspan="2" height="75" width="100%" valign="bottom" class="alertMessage" id="headerAlertMessage"> + <script type="text/javascript" src="alertMessage.js"></script> + + </td> <td rowspan="2" valign="middle" align="right"> <table border="0" cellpadding="2"> Modified: GatorMail/trunk/src/webapp/tiles/login/loginHeader.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/login/loginHeader.jsp 2008-03-27 21:49:26 UTC (rev 35) +++ GatorMail/trunk/src/webapp/tiles/login/loginHeader.jsp 2008-04-29 21:13:24 UTC (rev 36) @@ -1,3 +1,11 @@ <%@page contentType="text/html"%> <%@taglib uri="/tags/struts-html" prefix="html"%> <html:img page="/webMail-logo.jpg" border="0"/> +<table border="0" width="600" id="announcement"> + <tr> + <td class="alertMessage" id="loginAlertMessage"> + <script type="text/javascript" src="alertMessage.js"></script> + + </td> + </tr> +</table> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2008-03-27 21:49:25
|
Revision: 35 http://gatormail.svn.sourceforge.net/gatormail/?rev=35&view=rev Author: sandymac Date: 2008-03-27 14:49:26 -0700 (Thu, 27 Mar 2008) Log Message: ----------- Log Remote IP addresses to help in phishing research. Modified Paths: -------------- GatorMail/trunk/src/webapp/WEB-INF/web.xml Added Paths: ----------- GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/LogRemoteIpAddressFilter.java Added: GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/LogRemoteIpAddressFilter.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/LogRemoteIpAddressFilter.java (rev 0) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/LogRemoteIpAddressFilter.java 2008-03-27 21:49:26 UTC (rev 35) @@ -0,0 +1,87 @@ +package edu.ufl.osg.webmail.util; + +import org.apache.log4j.Logger; + +import javax.servlet.Filter; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.FilterChain; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpSession; +import java.io.IOException; + +import edu.ufl.osg.webmail.Constants; +import edu.ufl.osg.webmail.User; + +/** + * Logs the IP address used by remote users. + * + * @author Sandy McArthur + */ +public class LogRemoteIpAddressFilter implements Filter { + private static final Logger logger = Logger.getLogger(LogRemoteIpAddressFilter.class.getName()); + + public void init(final FilterConfig config) throws ServletException { + } + + public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException { + try { + chain.doFilter(request, response); + } finally { + // Log after the main request has happened so we can catch the user name during login + if (request instanceof HttpServletRequest) { + final HttpServletRequest httpRequest = (HttpServletRequest)request; + final HttpSession session = httpRequest.getSession(false); + + // If there is no session, we don't know who this is. + if (session != null) { + final User user = (User)session.getAttribute(Constants.USER_KEY); + + // If we don't know who is logged in, don't bother logging anything + if (user != null) { + + final String ip = httpRequest.getRemoteAddr(); + // try to pick up if the user is using a proxy too + final String via = httpRequest.getHeader("Via"); + final String xForwardedFor = httpRequest.getHeader("X-Forwarded-For"); + + // create a stable, unique key for IP + proxy combinations + final StringBuffer keyBuffer = new StringBuffer("observed-"); + keyBuffer.append(ip); + if (via != null && via.length() > 0) { + keyBuffer.append("-").append(via); + } + if (xForwardedFor != null && xForwardedFor.length() > 0) { + keyBuffer.append("-").append(xForwardedFor); + } + + // if we haven't logged the IP already + if (session.getAttribute(keyBuffer.toString()) == null) { + + final StringBuffer messageBuffer = new StringBuffer(128); + messageBuffer.append("user: ").append(user.getEmail()); + messageBuffer.append(" observed using: ").append(ip); + if (via != null && via.length() > 0) { + messageBuffer.append(" Via: ").append(via); + } + if (xForwardedFor != null && xForwardedFor.length() > 0) { + messageBuffer.append(" X-Forwarded-For: ").append(xForwardedFor); + } + + // Collapse whitespace and newlines into 1 space + final String message = messageBuffer.toString().replaceAll("\\s+", " "); + + session.setAttribute(keyBuffer.toString(), message); + logger.info(message); + } + } + } + } + } + } + + public void destroy() { + } +} Modified: GatorMail/trunk/src/webapp/WEB-INF/web.xml =================================================================== --- GatorMail/trunk/src/webapp/WEB-INF/web.xml 2008-03-27 21:48:09 UTC (rev 34) +++ GatorMail/trunk/src/webapp/WEB-INF/web.xml 2008-03-27 21:49:26 UTC (rev 35) @@ -73,6 +73,15 @@ <url-pattern>*.do</url-pattern> </filter-mapping> + <filter> + <filter-name>LogRemoteIpAddress</filter-name> + <filter-class>edu.ufl.osg.webmail.util.LogRemoteIpAddressFilter</filter-class> + </filter> + <filter-mapping> + <filter-name>LogRemoteIpAddress</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> + <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2008-03-27 21:48:10
|
Revision: 34 http://gatormail.svn.sourceforge.net/gatormail/?rev=34&view=rev Author: sandymac Date: 2008-03-27 14:48:09 -0700 (Thu, 27 Mar 2008) Log Message: ----------- Move the Empty Current Folder button down below the quota bar to reduce people requesting restores. Modified Paths: -------------- GatorMail/trunk/src/webapp/layouts/folderLayout.jsp Modified: GatorMail/trunk/src/webapp/layouts/folderLayout.jsp =================================================================== --- GatorMail/trunk/src/webapp/layouts/folderLayout.jsp 2007-09-27 20:51:18 UTC (rev 33) +++ GatorMail/trunk/src/webapp/layouts/folderLayout.jsp 2008-03-27 21:48:09 UTC (rev 34) @@ -41,9 +41,9 @@ %> <hr align="center" width="90%"> - <tiles:get name="emptyFolder"/> <tiles:get name="emptyTrash"/> <tiles:get name="folderQuota"/> + <tiles:get name="emptyFolder"/> <% } catch (NoSuchMethodException nsme) { // do nothing This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-09-27 22:08:23
|
Revision: 33 http://gatormail.svn.sourceforge.net/gatormail/?rev=33&view=rev Author: sandymac Date: 2007-09-27 13:51:18 -0700 (Thu, 27 Sep 2007) Log Message: ----------- Fix for rename folder issue Modified Paths: -------------- GatorMail/trunk/build.xml GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java Modified: GatorMail/trunk/build.xml =================================================================== --- GatorMail/trunk/build.xml 2007-07-18 19:55:30 UTC (rev 32) +++ GatorMail/trunk/build.xml 2007-09-27 20:51:18 UTC (rev 33) @@ -19,7 +19,7 @@ <property name="gatormail.jdbc.url" value="" description="depricated"/> <property name="gatormail.attachment.path" value="" description="Local path to hold attachments until they are sent."/> - <property name="VERSION" value="1.0.22"/> + <property name="VERSION" value="1.0.23"/> <tstamp/> Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2007-07-18 19:55:30 UTC (rev 32) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2007-09-27 20:51:18 UTC (rev 33) @@ -85,6 +85,7 @@ private static final String MAIL_STORE_GROUP = "mailStore"; private static final String[] MAIL_STORE_CACHE_GROUP = new String[] {MAIL_STORE_GROUP}; + private static final Folder[] NO_FOLDERS = new Folder[0]; /** * Checks the users session and throws an exception if a problem is found. @@ -473,7 +474,11 @@ list.add(rootFolder); } - folders = getFolderList(rootFolder, includeUnsubscribed); + try { + folders = getFolderList(rootFolder, includeUnsubscribed); + } catch (FolderNotFoundException fnfe) { + folders = NO_FOLDERS; + } } finally { Util.releaseFolder(rootFolder); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-07-18 20:46:44
|
Revision: 32 http://svn.sourceforge.net/gatormail/?rev=32&view=rev Author: sandymac Date: 2007-07-18 12:55:30 -0700 (Wed, 18 Jul 2007) Log Message: ----------- Fix for create folder issue Modified Paths: -------------- GatorMail/trunk/build.xml GatorMail/trunk/src/Messages.properties GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/CreateFolderAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PerformDeleteFolderAction.java Modified: GatorMail/trunk/build.xml =================================================================== --- GatorMail/trunk/build.xml 2007-07-10 18:56:07 UTC (rev 31) +++ GatorMail/trunk/build.xml 2007-07-18 19:55:30 UTC (rev 32) @@ -19,7 +19,7 @@ <property name="gatormail.jdbc.url" value="" description="depricated"/> <property name="gatormail.attachment.path" value="" description="Local path to hold attachments until they are sent."/> - <property name="VERSION" value="1.0.21"/> + <property name="VERSION" value="1.0.22"/> <tstamp/> Modified: GatorMail/trunk/src/Messages.properties =================================================================== --- GatorMail/trunk/src/Messages.properties 2007-07-10 18:56:07 UTC (rev 31) +++ GatorMail/trunk/src/Messages.properties 2007-07-18 19:55:30 UTC (rev 32) @@ -90,6 +90,7 @@ error.attachment.required=No attachment was selected. error.changeSubscription.unsubscribe.inbox=You cannot unsubscribe your INBOX. error.compose.to.required=The To: field cannot be blank. +error.createFolder.newFolder=Error creating new folder with name: {0}. error.createFolder.newFolder.required=Please enter the name of a new folder. error.createFolder.newFolder.toolong=The new folder name is too long. Please keep it to {0} or less characters. error.createFolder.parentFolder.required=Please select the name of the parent folder. Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2007-07-10 18:56:07 UTC (rev 31) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2007-07-18 19:55:30 UTC (rev 32) @@ -94,7 +94,7 @@ * @throws InvalidSessionException If the user's session is out of wack for * some reason. */ - public static void checkSession(final HttpServletRequest request) throws SessionExpiredException, InvalidSessionException, NoSuchProviderException { + public static void checkSession(final HttpServletRequest request) throws InvalidSessionException, NoSuchProviderException { final HttpSession session = request.getSession(); // Cheeze hack to let us track how long a request took. @@ -489,7 +489,7 @@ } // is this folder to be restricted from the list? - private static boolean isFolderIncluded(final Folder folder, final boolean includeReserved, HttpSession session) throws MessagingException { + private static boolean isFolderIncluded(final Folder folder, final boolean includeReserved, final HttpSession session) throws MessagingException { return (!(!includeReserved && Util.isReservedFolder(folder.getFullName(), session))); } @@ -705,7 +705,7 @@ /** * Returned folder is always open. */ - protected final static Folder createFolder(final Folder folder) throws MessagingException { + protected static Folder createFolder(final Folder folder) throws MessagingException { logger.debug("creating new folder: " + folder.getFullName()); folder.create(Folder.HOLDS_FOLDERS | Folder.HOLDS_MESSAGES); @@ -724,22 +724,8 @@ * The returned List may be smaller than the passed in array, if * one or more of the Messages is null or expunged. */ - protected final static List buildMessageList(final Message[] messages) throws MessagingException { - // Get the Messages in the folder - final List messageList = new ArrayList(Arrays.asList(messages)); - - // Remove any expunged messages, to prevent a NullPointerException - /* - final ListIterator it = messageList.listIterator(); - while (it.hasNext()) { - final Message message = (Message)it.next(); - if (message == null || message.isExpunged() || message.isSet(Flags.Flag.DELETED)) { - it.remove(); - } - } - */ - - return messageList; + protected static List buildMessageList(final Message[] messages) throws MessagingException { + return new ArrayList(Arrays.asList(messages)); } /** Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/CreateFolderAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/CreateFolderAction.java 2007-07-10 18:56:07 UTC (rev 31) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/CreateFolderAction.java 2007-07-18 19:55:30 UTC (rev 32) @@ -31,8 +31,10 @@ import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; +import org.apache.struts.action.ActionError; import javax.mail.Folder; +import javax.mail.FolderNotFoundException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @@ -72,10 +74,12 @@ final String parentFolderName = newFolderForm.getFolder(); final String newFolderName = newFolderForm.getNewFolder(); + /* if (!ActionsUtil.isLegalNewFolder(newFolderName, parentFolderName, errors, request)) { saveErrors(request, errors); return mapping.findForward("fail"); } + */ // OK looks good. let's create that folder Folder parentFolder = null; @@ -90,6 +94,10 @@ try { ActionsUtil.flushMailStoreGroupCache(request.getSession()); ActionsUtil.createFolder(newFolder); // creates & opens newFolder + } catch (FolderNotFoundException fnfe) { + errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.createFolder.newFolder", newFolder.getFullName())); + saveErrors(request, errors); + return mapping.findForward("fail"); } finally { Util.releaseFolder(newFolder); // clean up } Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PerformDeleteFolderAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PerformDeleteFolderAction.java 2007-07-10 18:56:07 UTC (rev 31) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PerformDeleteFolderAction.java 2007-07-18 19:55:30 UTC (rev 32) @@ -32,6 +32,7 @@ import org.apache.struts.actions.LookupDispatchAction; import javax.mail.Folder; +import javax.mail.MessagingException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @@ -131,6 +132,12 @@ // folder must be closed for delete folder.close(true); + try { + folder.setSubscribed(false); + } catch (MessagingException e) { + // swallowed + } + // recursive delete is OK - if the user didn't check "deleteChildren" and there // were children, the form validation would have caught that. folder.delete(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-07-10 18:56:05
|
Revision: 31 http://svn.sourceforge.net/gatormail/?rev=31&view=rev Author: sandymac Date: 2007-07-10 11:56:07 -0700 (Tue, 10 Jul 2007) Log Message: ----------- version number bump Modified Paths: -------------- GatorMail/trunk/build.xml Modified: GatorMail/trunk/build.xml =================================================================== --- GatorMail/trunk/build.xml 2007-07-05 22:18:09 UTC (rev 30) +++ GatorMail/trunk/build.xml 2007-07-10 18:56:07 UTC (rev 31) @@ -19,7 +19,7 @@ <property name="gatormail.jdbc.url" value="" description="depricated"/> <property name="gatormail.attachment.path" value="" description="Local path to hold attachments until they are sent."/> - <property name="VERSION" value="1.0.20"/> + <property name="VERSION" value="1.0.21"/> <tstamp/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-07-05 22:37:35
|
Revision: 30 http://svn.sourceforge.net/gatormail/?rev=30&view=rev Author: sandymac Date: 2007-07-05 15:18:09 -0700 (Thu, 05 Jul 2007) Log Message: ----------- Subscribed folder fixed, I18N fixed, fixed link colors overridden via html mail css Modified Paths: -------------- GatorMail/trunk/lib/struts-1.1/struts-config_1_0.dtd GatorMail/trunk/lib/struts-1.1/tiles-config.dtd GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java GatorMail/trunk/src/webapp/WEB-INF/struts-config.xml GatorMail/trunk/src/webapp/WEB-INF/tiles-defs.xml GatorMail/trunk/src/webapp/WEB-INF/web.xml GatorMail/trunk/src/webapp/about.jsp GatorMail/trunk/src/webapp/addAddress.jsp GatorMail/trunk/src/webapp/addressbook.jsp GatorMail/trunk/src/webapp/compose.jsp GatorMail/trunk/src/webapp/confirmDeleteFolder.jsp GatorMail/trunk/src/webapp/confirmEmptyFolder.jsp GatorMail/trunk/src/webapp/cookiesDisabled.jsp GatorMail/trunk/src/webapp/errorBasic.jsp GatorMail/trunk/src/webapp/errorCopy.jsp GatorMail/trunk/src/webapp/errorCopyToSent.jsp GatorMail/trunk/src/webapp/errorCopyToTrash.jsp GatorMail/trunk/src/webapp/errorLogout.jsp GatorMail/trunk/src/webapp/errorUncaught.jsp GatorMail/trunk/src/webapp/feedback.jsp GatorMail/trunk/src/webapp/folder.jsp GatorMail/trunk/src/webapp/folderManage.jsp GatorMail/trunk/src/webapp/folderManageModify.jsp GatorMail/trunk/src/webapp/help.jsp GatorMail/trunk/src/webapp/index.jsp GatorMail/trunk/src/webapp/login.jsp GatorMail/trunk/src/webapp/loginMessage.jsp GatorMail/trunk/src/webapp/message.jsp GatorMail/trunk/src/webapp/noInbox.jsp GatorMail/trunk/src/webapp/overLimit.jsp GatorMail/trunk/src/webapp/preferences.jsp GatorMail/trunk/src/webapp/printerFriendly.jsp GatorMail/trunk/src/webapp/selectAddresses.jsp GatorMail/trunk/src/webapp/stats.jsp GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp GatorMail/trunk/src/webapp/tiles/message/messageMenuFoot.jsp GatorMail/trunk/src/webapp/tiles/message/messageMenuHead.jsp Modified: GatorMail/trunk/lib/struts-1.1/struts-config_1_0.dtd =================================================================== --- GatorMail/trunk/lib/struts-1.1/struts-config_1_0.dtd 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/lib/struts-1.1/struts-config_1_0.dtd 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="UTF-8"?> <!-- Modified: GatorMail/trunk/lib/struts-1.1/tiles-config.dtd =================================================================== --- GatorMail/trunk/lib/struts-1.1/tiles-config.dtd 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/lib/struts-1.1/tiles-config.dtd 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="UTF-8"?> <!-- DTD for the Tile Definition File, Version 1.0 Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2007-07-05 22:18:09 UTC (rev 30) @@ -755,7 +755,13 @@ final Folder[] subscribedFolders = folder.listSubscribed("*"); // Be careful about users with zero subscribed folders. if (subscribedFolders != null) { - list = Arrays.asList(subscribedFolders); + list = new ArrayList(subscribedFolders.length); + for (int i=0; i < subscribedFolders.length; i++) { + if (subscribedFolders[i].isSubscribed()) { + list.add(subscribedFolders[i]); + } + } + //list = Arrays.asList(subscribedFolders); } else { list = Collections.EMPTY_LIST; } Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java 2007-07-05 22:18:09 UTC (rev 30) @@ -258,6 +258,16 @@ return ((parentPart instanceof BodyPart) ? (getPartPath((BodyPart)parentPart) + ".") : "") + partNumber; } + public static boolean hasSubscribedSubfolder(final Folder folder) throws MessagingException { + final Folder[] subscribedFolders = folder.listSubscribed("*"); + for (int i=0; i < subscribedFolders.length; i++) { + if (subscribedFolders[i].isSubscribed()) { + return true; + } + } + return false; + } + /** * Used to sort messages newest first, this will me moving out of Util * later. Modified: GatorMail/trunk/src/webapp/WEB-INF/struts-config.xml =================================================================== --- GatorMail/trunk/src/webapp/WEB-INF/struts-config.xml 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/WEB-INF/struts-config.xml 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> +<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" Modified: GatorMail/trunk/src/webapp/WEB-INF/tiles-defs.xml =================================================================== --- GatorMail/trunk/src/webapp/WEB-INF/tiles-defs.xml 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/WEB-INF/tiles-defs.xml 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> +<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration//EN" Modified: GatorMail/trunk/src/webapp/WEB-INF/web.xml =================================================================== --- GatorMail/trunk/src/webapp/WEB-INF/web.xml 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/WEB-INF/web.xml 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> Modified: GatorMail/trunk/src/webapp/about.jsp =================================================================== --- GatorMail/trunk/src/webapp/about.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/about.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="simpleLayout"> Modified: GatorMail/trunk/src/webapp/addAddress.jsp =================================================================== --- GatorMail/trunk/src/webapp/addAddress.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/addAddress.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="defaultLayout"> Modified: GatorMail/trunk/src/webapp/addressbook.jsp =================================================================== --- GatorMail/trunk/src/webapp/addressbook.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/addressbook.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="defaultLayout"> Modified: GatorMail/trunk/src/webapp/compose.jsp =================================================================== --- GatorMail/trunk/src/webapp/compose.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/compose.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="defaultLayout"> Modified: GatorMail/trunk/src/webapp/confirmDeleteFolder.jsp =================================================================== --- GatorMail/trunk/src/webapp/confirmDeleteFolder.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/confirmDeleteFolder.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="folderManageLayout"> Modified: GatorMail/trunk/src/webapp/confirmEmptyFolder.jsp =================================================================== --- GatorMail/trunk/src/webapp/confirmEmptyFolder.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/confirmEmptyFolder.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="folderManageLayout"> Modified: GatorMail/trunk/src/webapp/cookiesDisabled.jsp =================================================================== --- GatorMail/trunk/src/webapp/cookiesDisabled.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/cookiesDisabled.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="simpleLayout"> Modified: GatorMail/trunk/src/webapp/errorBasic.jsp =================================================================== --- GatorMail/trunk/src/webapp/errorBasic.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/errorBasic.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="errorLayout"> Modified: GatorMail/trunk/src/webapp/errorCopy.jsp =================================================================== --- GatorMail/trunk/src/webapp/errorCopy.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/errorCopy.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1" +<%@page contentType="text/html; charset=utf-8" import="edu.ufl.osg.webmail.Constants" %> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> Modified: GatorMail/trunk/src/webapp/errorCopyToSent.jsp =================================================================== --- GatorMail/trunk/src/webapp/errorCopyToSent.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/errorCopyToSent.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1" +<%@page contentType="text/html; charset=utf-8" import="edu.ufl.osg.webmail.Constants" %> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> Modified: GatorMail/trunk/src/webapp/errorCopyToTrash.jsp =================================================================== --- GatorMail/trunk/src/webapp/errorCopyToTrash.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/errorCopyToTrash.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1" +<%@page contentType="text/html; charset=utf-8" import="edu.ufl.osg.webmail.Constants" %> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> Modified: GatorMail/trunk/src/webapp/errorLogout.jsp =================================================================== --- GatorMail/trunk/src/webapp/errorLogout.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/errorLogout.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="errorLayout"> Modified: GatorMail/trunk/src/webapp/errorUncaught.jsp =================================================================== --- GatorMail/trunk/src/webapp/errorUncaught.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/errorUncaught.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="errorLayout"> Modified: GatorMail/trunk/src/webapp/feedback.jsp =================================================================== --- GatorMail/trunk/src/webapp/feedback.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/feedback.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="simpleLayout"> Modified: GatorMail/trunk/src/webapp/folder.jsp =================================================================== --- GatorMail/trunk/src/webapp/folder.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/folder.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> Modified: GatorMail/trunk/src/webapp/folderManage.jsp =================================================================== --- GatorMail/trunk/src/webapp/folderManage.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/folderManage.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="folderManageLayout"> Modified: GatorMail/trunk/src/webapp/folderManageModify.jsp =================================================================== --- GatorMail/trunk/src/webapp/folderManageModify.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/folderManageModify.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="folderManageLayout"> Modified: GatorMail/trunk/src/webapp/help.jsp =================================================================== --- GatorMail/trunk/src/webapp/help.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/help.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="simpleLayout"> Modified: GatorMail/trunk/src/webapp/index.jsp =================================================================== --- GatorMail/trunk/src/webapp/index.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/index.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-logic" prefix="logic"%> <logic:redirect forward="login"/> <%-- Modified: GatorMail/trunk/src/webapp/login.jsp =================================================================== --- GatorMail/trunk/src/webapp/login.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/login.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="loginLayout"> Modified: GatorMail/trunk/src/webapp/loginMessage.jsp =================================================================== --- GatorMail/trunk/src/webapp/loginMessage.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/loginMessage.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="simpleLayout"> Modified: GatorMail/trunk/src/webapp/message.jsp =================================================================== --- GatorMail/trunk/src/webapp/message.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/message.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,6 +1,6 @@ <%@ page import="javax.mail.Message, edu.ufl.osg.webmail.util.Util"%> -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <% Util.getFolder(((Message)request.getAttribute("message")).getFolder()); Modified: GatorMail/trunk/src/webapp/noInbox.jsp =================================================================== --- GatorMail/trunk/src/webapp/noInbox.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/noInbox.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="simpleLayout"> Modified: GatorMail/trunk/src/webapp/overLimit.jsp =================================================================== --- GatorMail/trunk/src/webapp/overLimit.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/overLimit.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="loginLayout"> Modified: GatorMail/trunk/src/webapp/preferences.jsp =================================================================== --- GatorMail/trunk/src/webapp/preferences.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/preferences.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="defaultLayout"> Modified: GatorMail/trunk/src/webapp/printerFriendly.jsp =================================================================== --- GatorMail/trunk/src/webapp/printerFriendly.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/printerFriendly.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="printerFriendlyLayout"/> Modified: GatorMail/trunk/src/webapp/selectAddresses.jsp =================================================================== --- GatorMail/trunk/src/webapp/selectAddresses.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/selectAddresses.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -1,4 +1,4 @@ -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%@taglib uri="/tags/struts-tiles" prefix="tiles"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <tiles:insert definition="defaultLayout"> Modified: GatorMail/trunk/src/webapp/stats.jsp =================================================================== --- GatorMail/trunk/src/webapp/stats.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/stats.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -10,7 +10,7 @@ java.util.HashMap, java.util.Collection, java.util.Arrays"%> -<%@page contentType="text/html; charset=iso-8859-1"%> +<%@page contentType="text/html; charset=utf-8"%> <%! private static final Date statsStart = new Date(); Modified: GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -63,7 +63,18 @@ %> </html:link> <% + } else if (Util.hasSubscribedSubfolder(currentRootFolder)) { +%> + <span title="Unsubscribed Folder. Subscribe to this folder in Edit Folders."> + <html:img page="<%= imageName %>" alt="Folder:" border="0" align="absmiddle" hspace="5"/><bean:write name="currentRootFolder" property="name"/> +<% + if (unreadMessageCount != 0) { + out.print("(" + unreadMessageCount + ")"); } +%> + </span> +<% + } final List subFolderList; subFolderList = Arrays.asList(currentRootFolder.listSubscribed()); Modified: GatorMail/trunk/src/webapp/tiles/message/messageMenuFoot.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/message/messageMenuFoot.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/tiles/message/messageMenuFoot.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -25,7 +25,7 @@ <th width="15%"> <nobr> <%-- Priner friendly Link --%> - <html:link forward="printerFriendly" name="messageParams" scope="request" titleKey="link.printerFriendly.title" style="#ffffff"> + <html:link forward="printerFriendly" name="messageParams" scope="request" titleKey="link.printerFriendly.title" style="color:#ffffff;"> <bean:message key="link.printerFriendly"/> </html:link> </nobr> @@ -39,7 +39,7 @@ <tr> <th width="15%"> <nobr> - <html:link forward="rawMessage" name="messageParams" scope="request" titleKey="link.message.source.title" style="#ffffff"><bean:message key="link.message.source"/></html:link> + <html:link forward="rawMessage" name="messageParams" scope="request" titleKey="link.message.source.title" style="color:#ffffff;"><bean:message key="link.message.source"/></html:link> </nobr> </th> </tr> Modified: GatorMail/trunk/src/webapp/tiles/message/messageMenuHead.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/message/messageMenuHead.jsp 2007-06-29 18:13:01 UTC (rev 29) +++ GatorMail/trunk/src/webapp/tiles/message/messageMenuHead.jsp 2007-07-05 22:18:09 UTC (rev 30) @@ -78,14 +78,14 @@ if (!isJunk) { %> <%-- Report Spam Link --%> - <html:link forward="reportSpam" name="messageParams" scope="request" titleKey="link.reportSpam.title" style="#ffffff"> + <html:link forward="reportSpam" name="messageParams" scope="request" titleKey="link.reportSpam.title" style="color:#ffffff;"> <bean:message key="link.report.spam"/> </html:link> <% } else { %> <%-- Report Ham Link --%> - <html:link forward="reportHam" name="messageParams" scope="request" titleKey="link.reportHam.title" style="#ffffff"> + <html:link forward="reportHam" name="messageParams" scope="request" titleKey="link.reportHam.title" style="color:#ffffff;"> <bean:message key="link.report.ham"/> </html:link> <% This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-06-29 18:41:33
|
Revision: 29 http://svn.sourceforge.net/gatormail/?rev=29&view=rev Author: sandymac Date: 2007-06-29 11:13:01 -0700 (Fri, 29 Jun 2007) Log Message: ----------- don't show old subscribed folders. Modified Paths: -------------- GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp Modified: GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp 2007-04-20 17:25:45 UTC (rev 28) +++ GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp 2007-06-29 18:13:01 UTC (rev 29) @@ -63,17 +63,6 @@ %> </html:link> <% - } else { -%> - <span title="Unsubscribed Folder"> - <html:img page="<%= imageName %>" alt="Folder:" border="0" align="absmiddle" hspace="5"/><bean:write name="currentRootFolder" property="name"/> -<% - if (unreadMessageCount != 0) { - out.print("(" + unreadMessageCount + ")"); - } -%> - </span> -<% } final List subFolderList; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-04-20 18:36:00
|
Revision: 28 http://svn.sourceforge.net/gatormail/?rev=28&view=rev Author: sandymac Date: 2007-04-20 10:25:45 -0700 (Fri, 20 Apr 2007) Log Message: ----------- small cleanups Modified Paths: -------------- GatorMail/trunk/src/webapp/layouts/messageLayout.jsp GatorMail/trunk/src/webapp/tiles/compose/message.jsp GatorMail/trunk/src/webapp/tiles/error/errorUncaughtMessage.jsp Modified: GatorMail/trunk/src/webapp/layouts/messageLayout.jsp =================================================================== --- GatorMail/trunk/src/webapp/layouts/messageLayout.jsp 2007-02-23 00:43:38 UTC (rev 27) +++ GatorMail/trunk/src/webapp/layouts/messageLayout.jsp 2007-04-20 17:25:45 UTC (rev 28) @@ -25,7 +25,6 @@ <title> <bean:message key="site.title"/> <bean:message key="message.title"/> - <tiles:getAsString name="messageName"/> </title> <%-- // TODO I18N these Modified: GatorMail/trunk/src/webapp/tiles/compose/message.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-02-23 00:43:38 UTC (rev 27) +++ GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-04-20 17:25:45 UTC (rev 28) @@ -129,6 +129,7 @@ } else { // if (autocomplete) %> <script> +<!-- function initAutoComplete(elem, container) { return null; } Modified: GatorMail/trunk/src/webapp/tiles/error/errorUncaughtMessage.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/error/errorUncaughtMessage.jsp 2007-02-23 00:43:38 UTC (rev 27) +++ GatorMail/trunk/src/webapp/tiles/error/errorUncaughtMessage.jsp 2007-04-20 17:25:45 UTC (rev 28) @@ -1,12 +1,16 @@ <%@page contentType="text/html" import="org.apache.struts.Globals"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> <%@taglib uri="/tags/struts-html" prefix="html"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <p> <font class="error"><bean:message key="errorUncaught.introduction"/></font> <blockquote> <pre> - <%= request.getAttribute(Globals.EXCEPTION_KEY) %> +<% + request.setAttribute("exception", request.getAttribute(Globals.EXCEPTION_KEY)); +%> + <c:out value="${'exception'}"/> </pre> </blockquote> </p> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-02-23 00:43:37
|
Revision: 27 http://svn.sourceforge.net/gatormail/?rev=27&view=rev Author: sandymac Date: 2007-02-22 16:43:38 -0800 (Thu, 22 Feb 2007) Log Message: ----------- Catch the preference change the first time and bump the version number. Modified Paths: -------------- GatorMail/trunk/build.xml GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java Modified: GatorMail/trunk/build.xml =================================================================== --- GatorMail/trunk/build.xml 2007-02-23 00:16:15 UTC (rev 26) +++ GatorMail/trunk/build.xml 2007-02-23 00:43:38 UTC (rev 27) @@ -19,7 +19,7 @@ <property name="gatormail.jdbc.url" value="" description="depricated"/> <property name="gatormail.attachment.path" value="" description="Local path to hold attachments until they are sent."/> - <property name="VERSION" value="1.0.19"/> + <property name="VERSION" value="1.0.20"/> <tstamp/> Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2007-02-23 00:16:15 UTC (rev 26) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2007-02-23 00:43:38 UTC (rev 27) @@ -206,11 +206,7 @@ } final Boolean autocomplete = prefsForm.getAutocomplete(); - if (autocomplete == null && prefs.getProperty("compose.recipients.autocomplete") != null) { - prefs.remove("compose.recipients.autocomplete"); - } else if (autocomplete != null || prefs.getProperty("compose.recipients.autocomplete") == null) { - prefs.setProperty("compose.recipients.autocomplete", autocomplete == null ? "false" : autocomplete.toString()); - } + prefs.setProperty("compose.recipients.autocomplete", autocomplete == null ? "false" : autocomplete.toString()); final Boolean threading = prefsForm.getThreading(); if (threading == null && prefs.getProperty("folder.list.threading") != null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-02-23 00:16:21
|
Revision: 26 http://svn.sourceforge.net/gatormail/?rev=26&view=rev Author: sandymac Date: 2007-02-22 16:16:15 -0800 (Thu, 22 Feb 2007) Log Message: ----------- Added a preference to disable the new autocomplete. Modified Paths: -------------- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/forms/PreferencesForm.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/prefs/DBPrefsProvider.java GatorMail/trunk/src/webapp/tiles/common/footer.jsp GatorMail/trunk/src/webapp/tiles/compose/message.jsp GatorMail/trunk/src/webapp/tiles/login/loginFooter.jsp GatorMail/trunk/src/webapp/tiles/message/messageMenu.jsp GatorMail/trunk/src/webapp/tiles/preferences/preferences.jsp Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2007-02-09 21:27:47 UTC (rev 25) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2007-02-23 00:16:15 UTC (rev 26) @@ -205,6 +205,13 @@ } } + final Boolean autocomplete = prefsForm.getAutocomplete(); + if (autocomplete == null && prefs.getProperty("compose.recipients.autocomplete") != null) { + prefs.remove("compose.recipients.autocomplete"); + } else if (autocomplete != null || prefs.getProperty("compose.recipients.autocomplete") == null) { + prefs.setProperty("compose.recipients.autocomplete", autocomplete == null ? "false" : autocomplete.toString()); + } + final Boolean threading = prefsForm.getThreading(); if (threading == null && prefs.getProperty("folder.list.threading") != null) { prefs.remove("folder.list.threading"); @@ -258,6 +265,11 @@ prefsForm.setImageUrl(prefs.getProperty("compose.X-Image-Url")); prefsForm.setJunkThreshold(prefs.getProperty("message.junk.threshold", "5")); prefsForm.setVacationMessage(prefs.getProperty("vacation.message", "I am currently unavailable. Your message will be read when I return.\n\nPS: This is an automated response.")); + if (prefs.getProperty("compose.recipients.autocomplete") != null) { + prefsForm.setAutocomplete(Boolean.valueOf(prefs.getProperty("compose.recipients.autocomplete"))); + } else { + prefsForm.setAutocomplete(Boolean.TRUE); + } if (prefs.getProperty("folder.list.threading") != null) { prefsForm.setThreading(Boolean.valueOf(prefs.getProperty("folder.list.threading"))); } Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/forms/PreferencesForm.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/forms/PreferencesForm.java 2007-02-09 21:27:47 UTC (rev 25) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/forms/PreferencesForm.java 2007-02-23 00:16:15 UTC (rev 26) @@ -43,6 +43,7 @@ private String action; + private Boolean autocomplete; private String username; private String replyTo; private String signature; @@ -57,6 +58,7 @@ public void reset(final ActionMapping actionMapping, final HttpServletRequest request) { super.reset(actionMapping, request); setAction(null); + setAutocomplete(null); setSignature(null); setReplyTo(null); setUsername(null); @@ -129,6 +131,14 @@ this.action = action; } + public Boolean getAutocomplete() { + return autocomplete; + } + + public void setAutocomplete(final Boolean autocomplete) { + this.autocomplete = autocomplete; + } + public String getUsername() { return username; } Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/prefs/DBPrefsProvider.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/prefs/DBPrefsProvider.java 2007-02-09 21:27:47 UTC (rev 25) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/prefs/DBPrefsProvider.java 2007-02-23 00:16:15 UTC (rev 26) @@ -261,7 +261,6 @@ * list, or <code>null</code> if it did not have one. */ public synchronized Object setProperty(final String key, final String value) throws RuntimeException { - // TODO: Put in DB deleteKey(key); if (value != null) { insertKeyValue(key, value); Modified: GatorMail/trunk/src/webapp/tiles/common/footer.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/common/footer.jsp 2007-02-09 21:27:47 UTC (rev 25) +++ GatorMail/trunk/src/webapp/tiles/common/footer.jsp 2007-02-23 00:16:15 UTC (rev 26) @@ -6,7 +6,7 @@ <td class="footer" align="center"> Copyright © 2002-2005 <a href="http://Sandy.McArthur.org/" style="color:gray;text-decoration:none">William A. McArthur, Jr.</a> <br/> <br/> - Copyright © 2003-2006 <html:link href="http://open-systems.ufl.edu/">The Open Systems Group</html:link> | + Copyright © 2003-2007 <html:link href="http://open-systems.ufl.edu/">The Open Systems Group</html:link> | <html:link href="http://www.cns.ufl.edu/">Computing and Networking Services</html:link> | <html:link href="http://www.ufl.edu/">University of Florida</html:link> <br/> <br/> Modified: GatorMail/trunk/src/webapp/tiles/compose/message.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-02-09 21:27:47 UTC (rev 25) +++ GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-02-23 00:16:15 UTC (rev 26) @@ -1,6 +1,9 @@ <%@page contentType="text/html" import="java.util.List, edu.ufl.osg.webmail.util.Util, edu.ufl.osg.webmail.Constants"%> +<%@ page import="edu.ufl.osg.webmail.prefs.PreferencesProvider" %> +<%@ page import="edu.ufl.osg.webmail.User" %> +<%@ page import="java.util.Properties" %> <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@taglib uri="/tags/struts-html" prefix="html"%> <%@taglib uri="/tags/struts-bean" prefix="bean"%> @@ -11,12 +14,129 @@ <script type="text/javascript" src="yui/dom/dom-min.js"></script> <script type="text/javascript" src="yui/event/event-min.js"></script> + +<% + final User user = Util.getUser(session); + boolean autocomplete = true; + if (user != null) { + final PreferencesProvider pp = (PreferencesProvider)application.getAttribute(Constants.PREFERENCES_PROVIDER); + final Properties prefs = pp.getPreferences(user, session); + autocomplete = Boolean.valueOf(prefs.getProperty("compose.recipients.autocomplete", "true")).booleanValue(); + } + if (autocomplete) { +%> + <%-- OPTIONAL: Animation (required only if enabling animation) --%> <script type="text/javascript" src="yui/animation/animation-min.js"></script> <%-- Source file --%> <script type="text/javascript" src="yui/autocomplete/autocomplete-min.js"></script> +<script language="JavaScript" type="text/javascript"> +<!-- + function populateAddress(field) { + var contacts = document.composeForm.contacts; + var length = contacts.length; + while( length-- ) { + if (contacts.options[length].selected) { + if (field.value == "") { + field.value += contacts.options[length].value; + + } else if (contacts.options[length].value != "" + && field.value.search(" " + contacts.options[length].value + ",") == -1 + && field.value.search("^" + contacts.options[length].value) == -1 + && field.value.search(" " + contacts.options[length].value + "$") == -1) { + field.value += ", " + contacts.options[length].value; + } + } + } + + return false; + } + + <c:choose> + <c:when test="${!empty addressList}"> + var addressList = [ + <c:forEach items="${addressList}" var="iAddress"> + {p:"<c:out value="${iAddress.personal}"/>", a:"<c:out value="${iAddress.address}"/>"}, + </c:forEach> + ]; + </c:when> + <c:otherwise> + var addressList = []; + </c:otherwise> + </c:choose> + var addressListFunction = function (query) { + var results = []; + if (query && query.length > 0) { + var queryLower = query.toLowerCase(); + for (var i=0; i < addressList.length; i++) { + var addressItem = addressList[i]; + if (addressItem) { + var personal = addressItem["p"]; + var address = addressItem["a"]; + var result = []; + var found = false; + if (address && address.toLowerCase().indexOf(queryLower) === 0) { + result[0] = address; + result[1] = personal; + results[results.length] = result; + found = true; + } + if (!found && personal && personal.toLowerCase().indexOf(queryLower) >= 0) { + var idx = personal.toLowerCase().indexOf(queryLower); + if (idx === 0 || personal.toLowerCase().indexOf(" " + queryLower) >= 0) { + result[0] = address; + result[1] = personal; + results[results.length] = result; + found = true; + } + } + } else { + delete addressList[i]; + } + } + } + return results; + } + var addressListDataSource = new YAHOO.widget.DS_JSFunction(addressListFunction); + var addressListFormatter = function (result, query) { + var markup = ""; + if (result[1]) { + markup = "\"" + result[1] + "\" "; + } + markup += "<" + result[0] + ">"; + try { + var re = new RegExp("(" + query + ")", "i"); + markup = markup.replace(re, "<b>$1</b>"); + } catch (ex) { + // ignore + } + return markup; + } + function initAutoComplete(elem, container) { + var ac = new YAHOO.widget.AutoComplete(elem, container, addressListDataSource); + ac.delimChar = ","; + ac.maxResultsDisplayed = 20; + ac.queryDelay = 0.1; + ac.animSpeed = 0.2; + ac.formatResult = addressListFormatter; + return ac; + } +// --> +</script> +<% + } else { // if (autocomplete) +%> +<script> + function initAutoComplete(elem, container) { + return null; + } +// --> +</script> +<% + } // if (autocomplete) else +%> <html:form method="post" action="modifyCompose" enctype="multipart/form-data" focus="to"> <html:hidden property="composeKey"/> <style type="text/css"> @@ -37,94 +157,6 @@ <script language="JavaScript" type="text/javascript"> <!-- -function populateAddress(field) { - var contacts = document.composeForm.contacts; - var length = contacts.length; - - while( length-- ) { - if (contacts.options[length].selected) { - if (field.value == "") { - field.value += contacts.options[length].value; - - } else if (contacts.options[length].value != "" - && field.value.search(" " + contacts.options[length].value + ",") == -1 - && field.value.search("^" + contacts.options[length].value) == -1 - && field.value.search(" " + contacts.options[length].value + "$") == -1) { - field.value += ", " + contacts.options[length].value; - } - } - } - - return false; -} - - <c:choose> - <c:when test="${!empty addressList}"> -var addressList = [ - <c:forEach items="${addressList}" var="iAddress"> -{p:"<c:out value="${iAddress.personal}"/>", a:"<c:out value="${iAddress.address}"/>"}, - </c:forEach> -]; - </c:when> - <c:otherwise> -var addressList = []; - </c:otherwise> - </c:choose> -var addressListFunction = function (query) { - var results = []; - if (query && query.length > 0) { - var queryLower = query.toLowerCase(); - for (var i=0; i < addressList.length; i++) { - var addressItem = addressList[i]; - if (addressItem) { - var personal = addressItem["p"]; - var address = addressItem["a"]; - var result = []; - var found = false; - if (address && address.toLowerCase().indexOf(queryLower) === 0) { - result[0] = address; - result[1] = personal; - results[results.length] = result; - found = true; - } - if (!found && personal && personal.toLowerCase().indexOf(queryLower) >= 0) { - var idx = personal.toLowerCase().indexOf(queryLower); - if (idx === 0 || personal.toLowerCase().indexOf(" " + queryLower) >= 0) { - result[0] = address; - result[1] = personal; - results[results.length] = result; - found = true; - } - } - } else { - delete addressList[i]; - } - } - } - return results; -} -var addressListDataSource = new YAHOO.widget.DS_JSFunction(addressListFunction); -var addressListFormatter = function (result, query) { - var markup = ""; - if (result[1]) { - markup = "\"" + result[1] + "\" "; - } - markup += "<" + result[0] + ">"; - try { - var re = new RegExp("(" + query + ")", "i"); - markup = markup.replace(re, "<b>$1</b>"); - } catch (ex) { - // ignore - } - return markup; -} -function initAutoComplete(elem, container) { - var ac = new YAHOO.widget.AutoComplete(elem, container, addressListDataSource); - ac.delimChar = ","; - ac.maxResultsDisplayed = 20; - ac.formatResult = addressListFormatter; - return ac; -} var preventSubmit = function (e) { if (YAHOO.util.Event.getCharCode(e) == 13) { YAHOO.util.Event.preventDefault(e); Modified: GatorMail/trunk/src/webapp/tiles/login/loginFooter.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/login/loginFooter.jsp 2007-02-09 21:27:47 UTC (rev 25) +++ GatorMail/trunk/src/webapp/tiles/login/loginFooter.jsp 2007-02-23 00:16:15 UTC (rev 26) @@ -12,7 +12,7 @@ <br/> <p class="copyright"> Copyright © 2002-2005 <a href="http://Sandy.McArthur.org/" style="color:gray;text-decoration:none">William A. McArthur, Jr.</a> <br/> - Copyright © 2003-2006 <html:link href="http://open-systems.ufl.edu/">The Open Systems Group</html:link> <br/> + Copyright © 2003-2007 <html:link href="http://open-systems.ufl.edu/">The Open Systems Group</html:link> <br/> <html:link href="http://www.cns.ufl.edu/">Computing and Networking Services</html:link> / <html:link href="http://www.ufl.edu/">University of Florida</html:link> <br/> Site maintained by <html:link href="http://open-systems.ufl.edu/">The Open Systems Group</html:link> Modified: GatorMail/trunk/src/webapp/tiles/message/messageMenu.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/message/messageMenu.jsp 2007-02-09 21:27:47 UTC (rev 25) +++ GatorMail/trunk/src/webapp/tiles/message/messageMenu.jsp 2007-02-23 00:16:15 UTC (rev 26) @@ -13,15 +13,15 @@ <%-- Prev/Up/Next Links --%> <th width="15%"> <nobr> - <html:link forward="prevMessage" name="messageParams" scope="request" titleKey="link.previous.title" style="#ffffff"><bean:message key="link.previous"/></html:link> + <html:link forward="prevMessage" name="messageParams" scope="request" titleKey="link.previous.title" style="color:#ffffff;"><bean:message key="link.previous"/></html:link> <% pageContext.setAttribute("folderName", messageFolder.getFullName()); pageContext.setAttribute("sort", (String)request.getAttribute("folderSort")); %> - <a href="folder.do?folder=<c:out value="${folderName}"/>&sort=<c:out value="${folderSort}"/>" title="Back to Folder" style="#ffffff"><bean:message key="link.up"/></a> + <a href="folder.do?folder=<c:out value="${folderName}"/>&sort=<c:out value="${folderSort}"/>" title="Back to Folder" style="color:#ffffff;"><bean:message key="link.up"/></a> - <html:link forward="nextMessage" name="messageParams" scope="request" titleKey="link.next.title" style="#ffffff"><bean:message key="link.next"/></html:link> + <html:link forward="nextMessage" name="messageParams" scope="request" titleKey="link.next.title" style="color:#ffffff;"><bean:message key="link.next"/></html:link> </nobr> </th> @@ -29,13 +29,13 @@ <th width="20%"> <c:choose> <c:when test="${folder.fullName != 'INBOX.Trash' and folder.fullName != 'INBOX/Trash'}"> - <html:link forward="deleteMessage" name="messageParams" scope="request" titleKey="link.delete.title" style="#ffffff"><bean:message key="link.delete"/></html:link> + <html:link forward="deleteMessage" name="messageParams" scope="request" titleKey="link.delete.title" style="color:#ffffff;"><bean:message key="link.delete"/></html:link> </c:when> <c:otherwise> <% messageParams.put(Constants.DELETE_FOREVER, "true"); %> - <html:link forward="deleteMessage" name="messageParams" scope="request" titleKey="link.deleteForever.title" style="#ffffff"><bean:message key="link.deleteForever"/></html:link> + <html:link forward="deleteMessage" name="messageParams" scope="request" titleKey="link.deleteForever.title" style="color:#ffffff;"><bean:message key="link.deleteForever"/></html:link> <% messageParams.remove(Constants.DELETE_FOREVER); %> @@ -45,14 +45,14 @@ <%-- Reply Link --%> <th width="20%"> - <html:link forward="reply" name="messageParams" scope="request" titleKey="link.reply.title" style="#ffffff"> + <html:link forward="reply" name="messageParams" scope="request" titleKey="link.reply.title" style="color:#ffffff;"> <bean:message key="link.reply"/> </html:link> <% messageParams.put("action", "reply-all"); %> - <html:link forward="reply" name="messageParams" scope="request" titleKey="link.reply-all.title" style="#ffffff"> + <html:link forward="reply" name="messageParams" scope="request" titleKey="link.reply-all.title" style="color:#ffffff;"> <bean:message key="link.reply-all"/> </html:link> <% @@ -62,7 +62,7 @@ <%-- Forward Link --%> <th width="20%"> - <html:link forward="forward" name="messageParams" scope="request" titleKey="link.forward.title" style="#ffffff"> + <html:link forward="forward" name="messageParams" scope="request" titleKey="link.forward.title" style="color:#ffffff;"> <bean:message key="link.forward"/> </html:link> </th> Modified: GatorMail/trunk/src/webapp/tiles/preferences/preferences.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/preferences/preferences.jsp 2007-02-09 21:27:47 UTC (rev 25) +++ GatorMail/trunk/src/webapp/tiles/preferences/preferences.jsp 2007-02-23 00:16:15 UTC (rev 26) @@ -59,6 +59,20 @@ </tr> <tr class="altrow"> + <th width="20%" align="right" valign="top">Recipient Auto Complete:</th> + <td> + <html:checkbox property="autocomplete"/> + <div class="tip"> + If checked, addresses in your address book will be autocompleted as you type them. + <p> + You must have at least one address in your address book for this to work.<br/> + If your browser can remember previous recipients and you prefer that method then disable this feature. + </p> + </div> + </td> + </tr> + + <tr> <th width="20%" align="right" valign="top">Image URL:</th> <td> <% @@ -77,7 +91,7 @@ Enter the full URL to a small image to be shown like a buddy icon for <br/> email if the reciepient's email client supports it. <p> - The image should have a size of 48x48 which means buddy icons icons work well. <br/> + The image should have a size of 48x48 which means buddy icons work well. <br/> When set a preview will be shown on the right. </p> </div> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-02-09 21:27:50
|
Revision: 25 http://svn.sourceforge.net/gatormail/?rev=25&view=rev Author: sandymac Date: 2007-02-09 13:27:47 -0800 (Fri, 09 Feb 2007) Log Message: ----------- work around a rendering bug in IE Modified Paths: -------------- GatorMail/trunk/src/webapp/tiles/compose/message.jsp Modified: GatorMail/trunk/src/webapp/tiles/compose/message.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-02-09 20:07:57 UTC (rev 24) +++ GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-02-09 21:27:47 UTC (rev 25) @@ -20,7 +20,7 @@ <html:form method="post" action="modifyCompose" enctype="multipart/form-data" focus="to"> <html:hidden property="composeKey"/> <style type="text/css"> - #toAutoComplete, #ccAutoComplete, #bccAutoComplete {position:relative;width:100%;}/* set width of widget here*/ + #toAutoComplete, #ccAutoComplete, #bccAutoComplete {position:relative;width:100%;height:2em;}/* set width of widget here*/ #toAutoComplete {z-index:9000} /* for IE z-index of absolute divs inside relative divs issue */ #ccAutoComplete {z-index:8000} /* for IE z-index of absolute divs inside relative divs issue */ #bccAutoComplete {z-index:7000} /* for IE z-index of absolute divs inside relative divs issue */ @@ -76,24 +76,28 @@ var queryLower = query.toLowerCase(); for (var i=0; i < addressList.length; i++) { var addressItem = addressList[i]; - var personal = addressItem["p"]; - var address = addressItem["a"]; - var result = []; - var found = false; - if (address && address.toLowerCase().indexOf(queryLower) === 0) { - result[0] = address; - result[1] = personal; - results[results.length] = result; - found = true; - } - if (!found && personal && personal.toLowerCase().indexOf(queryLower) >= 0) { - var idx = personal.toLowerCase().indexOf(queryLower); - if (idx === 0 || personal.toLowerCase().indexOf(" " + queryLower) >= 0) { + if (addressItem) { + var personal = addressItem["p"]; + var address = addressItem["a"]; + var result = []; + var found = false; + if (address && address.toLowerCase().indexOf(queryLower) === 0) { result[0] = address; result[1] = personal; results[results.length] = result; found = true; } + if (!found && personal && personal.toLowerCase().indexOf(queryLower) >= 0) { + var idx = personal.toLowerCase().indexOf(queryLower); + if (idx === 0 || personal.toLowerCase().indexOf(" " + queryLower) >= 0) { + result[0] = address; + result[1] = personal; + results[results.length] = result; + found = true; + } + } + } else { + delete addressList[i]; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-02-09 20:08:05
|
Revision: 24 http://svn.sourceforge.net/gatormail/?rev=24&view=rev Author: sandymac Date: 2007-02-09 12:07:57 -0800 (Fri, 09 Feb 2007) Log Message: ----------- Bold the matching part of an autocomplete result Modified Paths: -------------- GatorMail/trunk/src/webapp/tiles/compose/message.jsp Modified: GatorMail/trunk/src/webapp/tiles/compose/message.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-02-06 18:16:58 UTC (rev 23) +++ GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-02-09 20:07:57 UTC (rev 24) @@ -106,6 +106,12 @@ markup = "\"" + result[1] + "\" "; } markup += "<" + result[0] + ">"; + try { + var re = new RegExp("(" + query + ")", "i"); + markup = markup.replace(re, "<b>$1</b>"); + } catch (ex) { + // ignore + } return markup; } function initAutoComplete(elem, container) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-02-06 18:36:42
|
Revision: 22 http://svn.sourceforge.net/gatormail/?rev=22&view=rev Author: sandymac Date: 2007-02-06 10:15:32 -0800 (Tue, 06 Feb 2007) Log Message: ----------- YUI Added Paths: ----------- GatorMail/trunk/src/webapp/yui/ GatorMail/trunk/src/webapp/yui/animation/ GatorMail/trunk/src/webapp/yui/animation/README GatorMail/trunk/src/webapp/yui/animation/animation-debug.js GatorMail/trunk/src/webapp/yui/animation/animation-min.js GatorMail/trunk/src/webapp/yui/animation/animation.js GatorMail/trunk/src/webapp/yui/autocomplete/ GatorMail/trunk/src/webapp/yui/autocomplete/README GatorMail/trunk/src/webapp/yui/autocomplete/autocomplete-debug.js GatorMail/trunk/src/webapp/yui/autocomplete/autocomplete-min.js GatorMail/trunk/src/webapp/yui/autocomplete/autocomplete.js GatorMail/trunk/src/webapp/yui/calendar/ GatorMail/trunk/src/webapp/yui/calendar/README GatorMail/trunk/src/webapp/yui/calendar/assets/ GatorMail/trunk/src/webapp/yui/calendar/assets/calendar.css GatorMail/trunk/src/webapp/yui/calendar/assets/callt.gif GatorMail/trunk/src/webapp/yui/calendar/assets/calrt.gif GatorMail/trunk/src/webapp/yui/calendar/assets/calx.gif GatorMail/trunk/src/webapp/yui/calendar/calendar-debug.js GatorMail/trunk/src/webapp/yui/calendar/calendar-min.js GatorMail/trunk/src/webapp/yui/calendar/calendar.js GatorMail/trunk/src/webapp/yui/connection/ GatorMail/trunk/src/webapp/yui/connection/README GatorMail/trunk/src/webapp/yui/connection/connection-debug.js GatorMail/trunk/src/webapp/yui/connection/connection-min.js GatorMail/trunk/src/webapp/yui/connection/connection.js GatorMail/trunk/src/webapp/yui/container/ GatorMail/trunk/src/webapp/yui/container/README GatorMail/trunk/src/webapp/yui/container/assets/ GatorMail/trunk/src/webapp/yui/container/assets/alrt16_1.gif GatorMail/trunk/src/webapp/yui/container/assets/blck16_1.gif GatorMail/trunk/src/webapp/yui/container/assets/close12_1.gif GatorMail/trunk/src/webapp/yui/container/assets/container.css GatorMail/trunk/src/webapp/yui/container/assets/hlp16_1.gif GatorMail/trunk/src/webapp/yui/container/assets/info16_1.gif GatorMail/trunk/src/webapp/yui/container/assets/tip16_1.gif GatorMail/trunk/src/webapp/yui/container/assets/warn16_1.gif GatorMail/trunk/src/webapp/yui/container/container-debug.js GatorMail/trunk/src/webapp/yui/container/container-min.js GatorMail/trunk/src/webapp/yui/container/container.js GatorMail/trunk/src/webapp/yui/container/container_core-debug.js GatorMail/trunk/src/webapp/yui/container/container_core-min.js GatorMail/trunk/src/webapp/yui/container/container_core.js GatorMail/trunk/src/webapp/yui/dom/ GatorMail/trunk/src/webapp/yui/dom/README GatorMail/trunk/src/webapp/yui/dom/dom-debug.js GatorMail/trunk/src/webapp/yui/dom/dom-min.js GatorMail/trunk/src/webapp/yui/dom/dom.js GatorMail/trunk/src/webapp/yui/dragdrop/ GatorMail/trunk/src/webapp/yui/dragdrop/README GatorMail/trunk/src/webapp/yui/dragdrop/dragdrop-debug.js GatorMail/trunk/src/webapp/yui/dragdrop/dragdrop-min.js GatorMail/trunk/src/webapp/yui/dragdrop/dragdrop.js GatorMail/trunk/src/webapp/yui/event/ GatorMail/trunk/src/webapp/yui/event/README GatorMail/trunk/src/webapp/yui/event/event-debug.js GatorMail/trunk/src/webapp/yui/event/event-min.js GatorMail/trunk/src/webapp/yui/event/event.js GatorMail/trunk/src/webapp/yui/fonts/ GatorMail/trunk/src/webapp/yui/fonts/README GatorMail/trunk/src/webapp/yui/fonts/fonts-min.css GatorMail/trunk/src/webapp/yui/fonts/fonts.css GatorMail/trunk/src/webapp/yui/grids/ GatorMail/trunk/src/webapp/yui/grids/README GatorMail/trunk/src/webapp/yui/grids/grids-min.css GatorMail/trunk/src/webapp/yui/grids/grids.css GatorMail/trunk/src/webapp/yui/logger/ GatorMail/trunk/src/webapp/yui/logger/README GatorMail/trunk/src/webapp/yui/logger/assets/ GatorMail/trunk/src/webapp/yui/logger/assets/logger.css GatorMail/trunk/src/webapp/yui/logger/logger-debug.js GatorMail/trunk/src/webapp/yui/logger/logger-min.js GatorMail/trunk/src/webapp/yui/logger/logger.js GatorMail/trunk/src/webapp/yui/menu/ GatorMail/trunk/src/webapp/yui/menu/README GatorMail/trunk/src/webapp/yui/menu/assets/ GatorMail/trunk/src/webapp/yui/menu/assets/menu.css GatorMail/trunk/src/webapp/yui/menu/assets/menuarodwn8_dim_1.gif GatorMail/trunk/src/webapp/yui/menu/assets/menuarodwn8_hov_1.gif GatorMail/trunk/src/webapp/yui/menu/assets/menuarodwn8_nrm_1.gif GatorMail/trunk/src/webapp/yui/menu/assets/menuarorght8_dim_1.gif GatorMail/trunk/src/webapp/yui/menu/assets/menuarorght8_hov_1.gif GatorMail/trunk/src/webapp/yui/menu/assets/menuarorght8_nrm_1.gif GatorMail/trunk/src/webapp/yui/menu/assets/menuchk8_dim_1.gif GatorMail/trunk/src/webapp/yui/menu/assets/menuchk8_hov_1.gif GatorMail/trunk/src/webapp/yui/menu/assets/menuchk8_nrm_1.gif GatorMail/trunk/src/webapp/yui/menu/menu-debug.js GatorMail/trunk/src/webapp/yui/menu/menu-min.js GatorMail/trunk/src/webapp/yui/menu/menu.js GatorMail/trunk/src/webapp/yui/reset/ GatorMail/trunk/src/webapp/yui/reset/README GatorMail/trunk/src/webapp/yui/reset/reset-min.css GatorMail/trunk/src/webapp/yui/reset/reset.css GatorMail/trunk/src/webapp/yui/reset-fonts-grids/ GatorMail/trunk/src/webapp/yui/reset-fonts-grids/README GatorMail/trunk/src/webapp/yui/reset-fonts-grids/reset-fonts-grids.css GatorMail/trunk/src/webapp/yui/slider/ GatorMail/trunk/src/webapp/yui/slider/README GatorMail/trunk/src/webapp/yui/slider/slider-debug.js GatorMail/trunk/src/webapp/yui/slider/slider-min.js GatorMail/trunk/src/webapp/yui/slider/slider.js GatorMail/trunk/src/webapp/yui/tabview/ GatorMail/trunk/src/webapp/yui/tabview/README GatorMail/trunk/src/webapp/yui/tabview/assets/ GatorMail/trunk/src/webapp/yui/tabview/assets/border_tabs.css GatorMail/trunk/src/webapp/yui/tabview/assets/tabview.css GatorMail/trunk/src/webapp/yui/tabview/tabview-debug.js GatorMail/trunk/src/webapp/yui/tabview/tabview-min.js GatorMail/trunk/src/webapp/yui/tabview/tabview.js GatorMail/trunk/src/webapp/yui/treeview/ GatorMail/trunk/src/webapp/yui/treeview/README GatorMail/trunk/src/webapp/yui/treeview/assets/ GatorMail/trunk/src/webapp/yui/treeview/assets/lm.gif GatorMail/trunk/src/webapp/yui/treeview/assets/lmh.gif GatorMail/trunk/src/webapp/yui/treeview/assets/ln.gif GatorMail/trunk/src/webapp/yui/treeview/assets/loading.gif GatorMail/trunk/src/webapp/yui/treeview/assets/lp.gif GatorMail/trunk/src/webapp/yui/treeview/assets/lph.gif GatorMail/trunk/src/webapp/yui/treeview/assets/tm.gif GatorMail/trunk/src/webapp/yui/treeview/assets/tmh.gif GatorMail/trunk/src/webapp/yui/treeview/assets/tn.gif GatorMail/trunk/src/webapp/yui/treeview/assets/tp.gif GatorMail/trunk/src/webapp/yui/treeview/assets/tph.gif GatorMail/trunk/src/webapp/yui/treeview/assets/tree.css GatorMail/trunk/src/webapp/yui/treeview/assets/vline.gif GatorMail/trunk/src/webapp/yui/treeview/treeview-debug.js GatorMail/trunk/src/webapp/yui/treeview/treeview-min.js GatorMail/trunk/src/webapp/yui/treeview/treeview.js GatorMail/trunk/src/webapp/yui/utilities/ GatorMail/trunk/src/webapp/yui/utilities/README GatorMail/trunk/src/webapp/yui/utilities/utilities.js GatorMail/trunk/src/webapp/yui/yahoo/ GatorMail/trunk/src/webapp/yui/yahoo/README GatorMail/trunk/src/webapp/yui/yahoo/yahoo-debug.js GatorMail/trunk/src/webapp/yui/yahoo/yahoo-min.js GatorMail/trunk/src/webapp/yui/yahoo/yahoo.js GatorMail/trunk/src/webapp/yui/yahoo-dom-event/ GatorMail/trunk/src/webapp/yui/yahoo-dom-event/README GatorMail/trunk/src/webapp/yui/yahoo-dom-event/yahoo-dom-event.js Added: GatorMail/trunk/src/webapp/yui/animation/README =================================================================== --- GatorMail/trunk/src/webapp/yui/animation/README (rev 0) +++ GatorMail/trunk/src/webapp/yui/animation/README 2007-02-06 18:15:32 UTC (rev 22) @@ -0,0 +1,41 @@ +Animation Release Notes + +*** version 0.12.2 *** + +* raised AnimMgr.fps to 1000 + +*** version 0.12.1 *** +* minified version no longer strips line breaks + +*** version 0.12.0 *** + +* added boolean finish argument to Anim.stop() + +*** version 0.11.3 *** + +* no changes + +*** version 0.11.1 *** + +* changed "prototype" shorthand to "proto" (workaround firefox < 1.5 scoping +bug) + +*** version 0.11.0 *** + +* ColorAnim subclass added +* Motion and Scroll now inherit from ColorAnim +* getDefaultUnit method added +* defaultUnit and defaultUnits deprecated +* getDefault and setDefault methods deprecated + +*** version 0.10.0 *** + +* Scroll now handles relative ("by") animation correctly + +* Now converts "auto" values of "from" to appropriate initial values + +*** version 0.9.0 *** + +* Initial release + + Added: GatorMail/trunk/src/webapp/yui/animation/animation-debug.js =================================================================== --- GatorMail/trunk/src/webapp/yui/animation/animation-debug.js (rev 0) +++ GatorMail/trunk/src/webapp/yui/animation/animation-debug.js 2007-02-06 18:15:32 UTC (rev 22) @@ -0,0 +1,1345 @@ +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 0.12.2 +*/ +/** + * The animation module provides allows effects to be added to HTMLElements. + * @module animation + * @requires yahoo, event, dom + */ + +/** + * + * Base animation class that provides the interface for building animated effects. + * <p>Usage: var myAnim = new YAHOO.util.Anim(el, { width: { from: 10, to: 100 } }, 1, YAHOO.util.Easing.easeOut);</p> + * @class Anim + * @namespace YAHOO.util + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @constructor + * @param {String | HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + +YAHOO.util.Anim = function(el, attributes, duration, method) { + if (el) { + this.init(el, attributes, duration, method); + } +}; + +YAHOO.util.Anim.prototype = { + /** + * Provides a readable name for the Anim instance. + * @method toString + * @return {String} + */ + toString: function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Anim " + id); + }, + + patterns: { // cached for performance + noNegatives: /width|height|opacity|padding/i, // keep at zero or above + offsetAttribute: /^((width|height)|(top|left))$/, // use offsetValue as default + defaultUnit: /width|height|top$|bottom$|left$|right$/i, // use 'px' by default + offsetUnit: /\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i // IE may return these, so convert these to offset + }, + + /** + * Returns the value computed by the animation's "method". + * @method doMethod + * @param {String} attr The name of the attribute. + * @param {Number} start The value this attribute should start from for this animation. + * @param {Number} end The value this attribute should end at for this animation. + * @return {Number} The Value to be applied to the attribute. + */ + doMethod: function(attr, start, end) { + return this.method(this.currentFrame, start, end - start, this.totalFrames); + }, + + /** + * Applies a value to an attribute. + * @method setAttribute + * @param {String} attr The name of the attribute. + * @param {Number} val The value to be applied to the attribute. + * @param {String} unit The unit ('px', '%', etc.) of the value. + */ + setAttribute: function(attr, val, unit) { + if ( this.patterns.noNegatives.test(attr) ) { + val = (val > 0) ? val : 0; + } + + YAHOO.util.Dom.setStyle(this.getEl(), attr, val + unit); + }, + + /** + * Returns current value of the attribute. + * @method getAttribute + * @param {String} attr The name of the attribute. + * @return {Number} val The current value of the attribute. + */ + getAttribute: function(attr) { + var el = this.getEl(); + var val = YAHOO.util.Dom.getStyle(el, attr); + + if (val !== 'auto' && !this.patterns.offsetUnit.test(val)) { + return parseFloat(val); + } + + var a = this.patterns.offsetAttribute.exec(attr) || []; + var pos = !!( a[3] ); // top or left + var box = !!( a[2] ); // width or height + + // use offsets for width/height and abs pos top/left + if ( box || (YAHOO.util.Dom.getStyle(el, 'position') == 'absolute' && pos) ) { + val = el['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)]; + } else { // default to zero for other 'auto' + val = 0; + } + + return val; + }, + + /** + * Returns the unit to use when none is supplied. + * @method getDefaultUnit + * @param {attr} attr The name of the attribute. + * @return {String} The default unit to be used. + */ + getDefaultUnit: function(attr) { + if ( this.patterns.defaultUnit.test(attr) ) { + return 'px'; + } + + return ''; + }, + + /** + * Sets the actual values to be used during the animation. Should only be needed for subclass use. + * @method setRuntimeAttribute + * @param {Object} attr The attribute object + * @private + */ + setRuntimeAttribute: function(attr) { + var start; + var end; + var attributes = this.attributes; + + this.runtimeAttributes[attr] = {}; + + var isset = function(prop) { + return (typeof prop !== 'undefined'); + }; + + if ( !isset(attributes[attr]['to']) && !isset(attributes[attr]['by']) ) { + return false; // note return; nothing to animate to + } + + start = ( isset(attributes[attr]['from']) ) ? attributes[attr]['from'] : this.getAttribute(attr); + + // To beats by, per SMIL 2.1 spec + if ( isset(attributes[attr]['to']) ) { + end = attributes[attr]['to']; + } else if ( isset(attributes[attr]['by']) ) { + if (start.constructor == Array) { + end = []; + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + attributes[attr]['by'][i]; + } + } else { + end = start + attributes[attr]['by']; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + + // set units if needed + this.runtimeAttributes[attr].unit = ( isset(attributes[attr].unit) ) ? attributes[attr]['unit'] : this.getDefaultUnit(attr); + }, + + /** + * Constructor for Anim instance. + * @method init + * @param {String | HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + init: function(el, attributes, duration, method) { + /** + * Whether or not the animation is running. + * @property isAnimated + * @private + * @type Boolean + */ + var isAnimated = false; + + /** + * A Date object that is created when the animation begins. + * @property startTime + * @private + * @type Date + */ + var startTime = null; + + /** + * The number of frames this animation was able to execute. + * @property actualFrames + * @private + * @type Int + */ + var actualFrames = 0; + + /** + * The element to be animated. + * @property el + * @private + * @type HTMLElement + */ + el = YAHOO.util.Dom.get(el); + + /** + * The collection of attributes to be animated. + * Each attribute must have at least a "to" or "by" defined in order to animate. + * If "to" is supplied, the animation will end with the attribute at that value. + * If "by" is supplied, the animation will end at that value plus its starting value. + * If both are supplied, "to" is used, and "by" is ignored. + * Optional additional member include "from" (the value the attribute should start animating from, defaults to current value), and "unit" (the units to apply to the values). + * @property attributes + * @type Object + */ + this.attributes = attributes || {}; + + /** + * The length of the animation. Defaults to "1" (second). + * @property duration + * @type Number + */ + this.duration = duration || 1; + + /** + * The method that will provide values to the attribute(s) during the animation. + * Defaults to "YAHOO.util.Easing.easeNone". + * @property method + * @type Function + */ + this.method = method || YAHOO.util.Easing.easeNone; + + /** + * Whether or not the duration should be treated as seconds. + * Defaults to true. + * @property useSeconds + * @type Boolean + */ + this.useSeconds = true; // default to seconds + + /** + * The location of the current animation on the timeline. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property currentFrame + * @type Int + */ + this.currentFrame = 0; + + /** + * The total number of frames to be executed. + * In time-based animations, this is used by AnimMgr to ensure the animation finishes on time. + * @property totalFrames + * @type Int + */ + this.totalFrames = YAHOO.util.AnimMgr.fps; + + + /** + * Returns a reference to the animated element. + * @method getEl + * @return {HTMLElement} + */ + this.getEl = function() { return el; }; + + /** + * Checks whether the element is currently animated. + * @method isAnimated + * @return {Boolean} current value of isAnimated. + */ + this.isAnimated = function() { + return isAnimated; + }; + + /** + * Returns the animation start time. + * @method getStartTime + * @return {Date} current value of startTime. + */ + this.getStartTime = function() { + return startTime; + }; + + this.runtimeAttributes = {}; + + var logger = {}; + logger.log = function() {YAHOO.log.apply(window, arguments)}; + + logger.log('creating new instance of ' + this); + + /** + * Starts the animation by registering it with the animation manager. + * @method animate + */ + this.animate = function() { + if ( this.isAnimated() ) { + return false; + } + + this.currentFrame = 0; + + this.totalFrames = ( this.useSeconds ) ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration) : this.duration; + + YAHOO.util.AnimMgr.registerElement(this); + }; + + /** + * Stops the animation. Normally called by AnimMgr when animation completes. + * @method stop + * @param {Boolean} finish (optional) If true, animation will jump to final frame. + */ + this.stop = function(finish) { + if (finish) { + this.currentFrame = this.totalFrames; + this._onTween.fire(); + } + YAHOO.util.AnimMgr.stop(this); + }; + + var onStart = function() { + this.onStart.fire(); + + this.runtimeAttributes = {}; + for (var attr in this.attributes) { + this.setRuntimeAttribute(attr); + } + + isAnimated = true; + actualFrames = 0; + startTime = new Date(); + }; + + /** + * Feeds the starting and ending values for each animated attribute to doMethod once per frame, then applies the resulting value to the attribute(s). + * @private + */ + + var onTween = function() { + var data = { + duration: new Date() - this.getStartTime(), + currentFrame: this.currentFrame + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', currentFrame: ' + data.currentFrame + ); + }; + + this.onTween.fire(data); + + var runtimeAttributes = this.runtimeAttributes; + + for (var attr in runtimeAttributes) { + this.setAttribute(attr, this.doMethod(attr, runtimeAttributes[attr].start, runtimeAttributes[attr].end), runtimeAttributes[attr].unit); + } + + actualFrames += 1; + }; + + var onComplete = function() { + var actual_duration = (new Date() - startTime) / 1000 ; + + var data = { + duration: actual_duration, + frames: actualFrames, + fps: actualFrames / actual_duration + }; + + data.toString = function() { + return ( + 'duration: ' + data.duration + + ', frames: ' + data.frames + + ', fps: ' + data.fps + ); + }; + + isAnimated = false; + actualFrames = 0; + this.onComplete.fire(data); + }; + + /** + * Custom event that fires after onStart, useful in subclassing + * @private + */ + this._onStart = new YAHOO.util.CustomEvent('_start', this, true); + + /** + * Custom event that fires when animation begins + * Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction) + * @event onStart + */ + this.onStart = new YAHOO.util.CustomEvent('start', this); + + /** + * Custom event that fires between each frame + * Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction) + * @event onTween + */ + this.onTween = new YAHOO.util.CustomEvent('tween', this); + + /** + * Custom event that fires after onTween + * @private + */ + this._onTween = new YAHOO.util.CustomEvent('_tween', this, true); + + /** + * Custom event that fires when animation ends + * Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction) + * @event onComplete + */ + this.onComplete = new YAHOO.util.CustomEvent('complete', this); + /** + * Custom event that fires after onComplete + * @private + */ + this._onComplete = new YAHOO.util.CustomEvent('_complete', this, true); + + this._onStart.subscribe(onStart); + this._onTween.subscribe(onTween); + this._onComplete.subscribe(onComplete); + } +}; + +/** + * Handles animation queueing and threading. + * Used by Anim and subclasses. + * @class AnimMgr + * @namespace YAHOO.util + */ +YAHOO.util.AnimMgr = new function() { + /** + * Reference to the animation Interval. + * @property thread + * @private + * @type Int + */ + var thread = null; + + /** + * The current queue of registered animation objects. + * @property queue + * @private + * @type Array + */ + var queue = []; + + /** + * The number of active animations. + * @property tweenCount + * @private + * @type Int + */ + var tweenCount = 0; + + /** + * Base frame rate (frames per second). + * Arbitrarily high for better x-browser calibration (slower browsers drop more frames). + * @property fps + * @type Int + * + */ + this.fps = 1000; + + /** + * Interval delay in milliseconds, defaults to fastest possible. + * @property delay + * @type Int + * + */ + this.delay = 1; + + /** + * Adds an animation instance to the animation queue. + * All animation instances must be registered in order to animate. + * @method registerElement + * @param {object} tween The Anim instance to be be registered + */ + this.registerElement = function(tween) { + queue[queue.length] = tween; + tweenCount += 1; + tween._onStart.fire(); + this.start(); + }; + + /** + * removes an animation instance from the animation queue. + * All animation instances must be registered in order to animate. + * @method unRegister + * @param {object} tween The Anim instance to be be registered + * @param {Int} index The index of the Anim instance + * @private + */ + this.unRegister = function(tween, index) { + tween._onComplete.fire(); + index = index || getIndex(tween); + if (index != -1) { queue.splice(index, 1); } + + tweenCount -= 1; + if (tweenCount <= 0) { this.stop(); } + }; + + /** + * Starts the animation thread. + * Only one thread can run at a time. + * @method start + */ + this.start = function() { + if (thread === null) { thread = setInterval(this.run, this.delay); } + }; + + /** + * Stops the animation thread or a specific animation instance. + * @method stop + * @param {object} tween A specific Anim instance to stop (optional) + * If no instance given, Manager stops thread and all animations. + */ + this.stop = function(tween) { + if (!tween) { + clearInterval(thread); + for (var i = 0, len = queue.length; i < len; ++i) { + if (queue[i].isAnimated()) { + this.unRegister(tween, i); + } + } + queue = []; + thread = null; + tweenCount = 0; + } + else { + this.unRegister(tween); + } + }; + + /** + * Called per Interval to handle each animation frame. + * @method run + */ + this.run = function() { + for (var i = 0, len = queue.length; i < len; ++i) { + var tween = queue[i]; + if ( !tween || !tween.isAnimated() ) { continue; } + + if (tween.currentFrame < tween.totalFrames || tween.totalFrames === null) + { + tween.currentFrame += 1; + + if (tween.useSeconds) { + correctFrame(tween); + } + tween._onTween.fire(); + } + else { YAHOO.util.AnimMgr.stop(tween, i); } + } + }; + + var getIndex = function(anim) { + for (var i = 0, len = queue.length; i < len; ++i) { + if (queue[i] == anim) { + return i; // note return; + } + } + return -1; + }; + + /** + * On the fly frame correction to keep animation on time. + * @method correctFrame + * @private + * @param {Object} tween The Anim instance being corrected. + */ + var correctFrame = function(tween) { + var frames = tween.totalFrames; + var frame = tween.currentFrame; + var expected = (tween.currentFrame * tween.duration * 1000 / tween.totalFrames); + var elapsed = (new Date() - tween.getStartTime()); + var tweak = 0; + + if (elapsed < tween.duration * 1000) { // check if falling behind + tweak = Math.round((elapsed / expected - 1) * tween.currentFrame); + } else { // went over duration, so jump to end + tweak = frames - (frame + 1); + } + if (tweak > 0 && isFinite(tweak)) { // adjust if needed + if (tween.currentFrame + tweak >= frames) {// dont go past last frame + tweak = frames - (frame + 1); + } + + tween.currentFrame += tweak; + } + }; +}; +/** + * Used to calculate Bezier splines for any number of control points. + * @class Bezier + * @namespace YAHOO.util + * + */ +YAHOO.util.Bezier = new function() { + /** + * Get the current position of the animated element based on t. + * Each point is an array of "x" and "y" values (0 = x, 1 = y) + * At least 2 points are required (start and end). + * First point is start. Last point is end. + * Additional control points are optional. + * @method getPosition + * @param {Array} points An array containing Bezier points + * @param {Number} t A number between 0 and 1 which is the basis for determining current position + * @return {Array} An array containing int x and y member data + */ + this.getPosition = function(points, t) { + var n = points.length; + var tmp = []; + + for (var i = 0; i < n; ++i){ + tmp[i] = [points[i][0], points[i][1]]; // save input + } + + for (var j = 1; j < n; ++j) { + for (i = 0; i < n - j; ++i) { + tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; + tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; + } + } + + return [ tmp[0][0], tmp[0][1] ]; + + }; +}; +(function() { +/** + * Anim subclass for color transitions. + * <p>Usage: <code>var myAnim = new Y.ColorAnim(el, { backgroundColor: { from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut);</code> Color values can be specified with either 112233, #112233, + * [255,255,255], or rgb(255,255,255)</p> + * @class ColorAnim + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @constructor + * @extends YAHOO.util.Anim + * @param {HTMLElement | String} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + YAHOO.util.ColorAnim = function(el, attributes, duration, method) { + YAHOO.util.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + }; + + YAHOO.extend(YAHOO.util.ColorAnim, YAHOO.util.Anim); + + // shorthand + var Y = YAHOO.util; + var superclass = Y.ColorAnim.superclass; + var proto = Y.ColorAnim.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("ColorAnim " + id); + }; + + proto.patterns.color = /color$/i; + proto.patterns.rgb = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i; + proto.patterns.hex = /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i; + proto.patterns.hex3 = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i; + proto.patterns.transparent = /^transparent|rgba\(0, 0, 0, 0\)$/; // need rgba for safari + + /** + * Attempts to parse the given string and return a 3-tuple. + * @method parseColor + * @param {String} s The string to parse. + * @return {Array} The 3-tuple of rgb values. + */ + proto.parseColor = function(s) { + if (s.length == 3) { return s; } + + var c = this.patterns.hex.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 16), parseInt(c[2], 16), parseInt(c[3], 16) ]; + } + + c = this.patterns.rgb.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1], 10), parseInt(c[2], 10), parseInt(c[3], 10) ]; + } + + c = this.patterns.hex3.exec(s); + if (c && c.length == 4) { + return [ parseInt(c[1] + c[1], 16), parseInt(c[2] + c[2], 16), parseInt(c[3] + c[3], 16) ]; + } + + return null; + }; + + proto.getAttribute = function(attr) { + var el = this.getEl(); + if ( this.patterns.color.test(attr) ) { + var val = YAHOO.util.Dom.getStyle(el, attr); + + if (this.patterns.transparent.test(val)) { // bgcolor default + var parent = el.parentNode; // try and get from an ancestor + val = Y.Dom.getStyle(parent, attr); + + while (parent && this.patterns.transparent.test(val)) { + parent = parent.parentNode; + val = Y.Dom.getStyle(parent, attr); + if (parent.tagName.toUpperCase() == 'HTML') { + val = '#fff'; + } + } + } + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val; + + if ( this.patterns.color.test(attr) ) { + val = []; + for (var i = 0, len = start.length; i < len; ++i) { + val[i] = superclass.doMethod.call(this, attr, start[i], end[i]); + } + + val = 'rgb('+Math.floor(val[0])+','+Math.floor(val[1])+','+Math.floor(val[2])+')'; + } + else { + val = superclass.doMethod.call(this, attr, start, end); + } + + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + superclass.setRuntimeAttribute.call(this, attr); + + if ( this.patterns.color.test(attr) ) { + var attributes = this.attributes; + var start = this.parseColor(this.runtimeAttributes[attr].start); + var end = this.parseColor(this.runtimeAttributes[attr].end); + // fix colors if going "by" + if ( typeof attributes[attr]['to'] === 'undefined' && typeof attributes[attr]['by'] !== 'undefined' ) { + end = this.parseColor(attributes[attr].by); + + for (var i = 0, len = start.length; i < len; ++i) { + end[i] = start[i] + end[i]; + } + } + + this.runtimeAttributes[attr].start = start; + this.runtimeAttributes[attr].end = end; + } + }; +})();/* +TERMS OF USE - EASING EQUATIONS +Open source under the BSD License. +Copyright 2001 Robert Penner All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/** + * Singleton that determines how an animation proceeds from start to end. + * @class Easing + * @namespace YAHOO.util +*/ + +YAHOO.util.Easing = { + + /** + * Uniform speed between points. + * @method easeNone + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeNone: function (t, b, c, d) { + return c*t/d + b; + }, + + /** + * Begins slowly and accelerates towards end. (quadratic) + * @method easeIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeIn: function (t, b, c, d) { + return c*(t/=d)*t + b; + }, + + /** + * Begins quickly and decelerates towards end. (quadratic) + * @method easeOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeOut: function (t, b, c, d) { + return -c *(t/=d)*(t-2) + b; + }, + + /** + * Begins slowly and decelerates towards end. (quadratic) + * @method easeBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeBoth: function (t, b, c, d) { + if ((t/=d/2) < 1) { + return c/2*t*t + b; + } + + return -c/2 * ((--t)*(t-2) - 1) + b; + }, + + /** + * Begins slowly and accelerates towards end. (quartic) + * @method easeInStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeInStrong: function (t, b, c, d) { + return c*(t/=d)*t*t*t + b; + }, + + /** + * Begins quickly and decelerates towards end. (quartic) + * @method easeOutStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeOutStrong: function (t, b, c, d) { + return -c * ((t=t/d-1)*t*t*t - 1) + b; + }, + + /** + * Begins slowly and decelerates towards end. (quartic) + * @method easeBothStrong + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + easeBothStrong: function (t, b, c, d) { + if ((t/=d/2) < 1) { + return c/2*t*t*t*t + b; + } + + return -c/2 * ((t-=2)*t*t*t - 2) + b; + }, + + /** + * Snap in elastic effect. + * @method elasticIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + + elasticIn: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ( (t /= d) == 1 ) { + return b+c; + } + if (!p) { + p=d*.3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p/4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + }, + + /** + * Snap out elastic effect. + * @method elasticOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + elasticOut: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + if ( (t /= d) == 1 ) { + return b+c; + } + if (!p) { + p=d*.3; + } + + if (!a || a < Math.abs(c)) { + a = c; + var s = p / 4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; + }, + + /** + * Snap both elastic effect. + * @method elasticBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} a Amplitude (optional) + * @param {Number} p Period (optional) + * @return {Number} The computed value for the current animation frame + */ + elasticBoth: function (t, b, c, d, a, p) { + if (t == 0) { + return b; + } + + if ( (t /= d/2) == 2 ) { + return b+c; + } + + if (!p) { + p = d*(.3*1.5); + } + + if ( !a || a < Math.abs(c) ) { + a = c; + var s = p/4; + } + else { + var s = p/(2*Math.PI) * Math.asin (c/a); + } + + if (t < 1) { + return -.5*(a*Math.pow(2,10*(t-=1)) * + Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; + } + return a*Math.pow(2,-10*(t-=1)) * + Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; + }, + + + /** + * Backtracks slightly, then reverses direction and moves to end. + * @method backIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backIn: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c*(t/=d)*t*((s+1)*t - s) + b; + }, + + /** + * Overshoots end, then reverses and comes back to end. + * @method backOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backOut: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b; + }, + + /** + * Backtracks slightly, then reverses direction, overshoots end, + * then reverses and comes back to end. + * @method backBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @param {Number} s Overshoot (optional) + * @return {Number} The computed value for the current animation frame + */ + backBoth: function (t, b, c, d, s) { + if (typeof s == 'undefined') { + s = 1.70158; + } + + if ((t /= d/2 ) < 1) { + return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b; + } + return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b; + }, + + /** + * Bounce off of start. + * @method bounceIn + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceIn: function (t, b, c, d) { + return c - YAHOO.util.Easing.bounceOut(d-t, 0, c, d) + b; + }, + + /** + * Bounces off end. + * @method bounceOut + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceOut: function (t, b, c, d) { + if ((t/=d) < (1/2.75)) { + return c*(7.5625*t*t) + b; + } else if (t < (2/2.75)) { + return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; + } else if (t < (2.5/2.75)) { + return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; + } + return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; + }, + + /** + * Bounces off start and end. + * @method bounceBoth + * @param {Number} t Time value used to compute current value + * @param {Number} b Starting value + * @param {Number} c Delta between start and end values + * @param {Number} d Total length of animation + * @return {Number} The computed value for the current animation frame + */ + bounceBoth: function (t, b, c, d) { + if (t < d/2) { + return YAHOO.util.Easing.bounceIn(t*2, 0, c, d) * .5 + b; + } + return YAHOO.util.Easing.bounceOut(t*2-d, 0, c, d) * .5 + c*.5 + b; + } +}; + +(function() { +/** + * Anim subclass for moving elements along a path defined by the "points" + * member of "attributes". All "points" are arrays with x, y coordinates. + * <p>Usage: <code>var myAnim = new YAHOO.util.Motion(el, { points: { to: [800, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p> + * @class Motion + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @constructor + * @extends YAHOO.util.Anim + * @param {String | HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + YAHOO.util.Motion = function(el, attributes, duration, method) { + if (el) { // dont break existing subclasses not using YAHOO.extend + YAHOO.util.Motion.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + YAHOO.extend(YAHOO.util.Motion, YAHOO.util.ColorAnim); + + // shorthand + var Y = YAHOO.util; + var superclass = Y.Motion.superclass; + var proto = Y.Motion.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Motion " + id); + }; + + proto.patterns.points = /^points$/i; + + proto.setAttribute = function(attr, val, unit) { + if ( this.patterns.points.test(attr) ) { + unit = unit || 'px'; + superclass.setAttribute.call(this, 'left', val[0], unit); + superclass.setAttribute.call(this, 'top', val[1], unit); + } else { + superclass.setAttribute.call(this, attr, val, unit); + } + }; + + proto.getAttribute = function(attr) { + if ( this.patterns.points.test(attr) ) { + var val = [ + superclass.getAttribute.call(this, 'left'), + superclass.getAttribute.call(this, 'top') + ]; + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.doMethod = function(attr, start, end) { + var val = null; + + if ( this.patterns.points.test(attr) ) { + var t = this.method(this.currentFrame, 0, 100, this.totalFrames) / 100; + val = Y.Bezier.getPosition(this.runtimeAttributes[attr], t); + } else { + val = superclass.doMethod.call(this, attr, start, end); + } + return val; + }; + + proto.setRuntimeAttribute = function(attr) { + if ( this.patterns.points.test(attr) ) { + var el = this.getEl(); + var attributes = this.attributes; + var start; + var control = attributes['points']['control'] || []; + var end; + var i, len; + + if (control.length > 0 && !(control[0] instanceof Array) ) { // could be single point or array of points + control = [control]; + } else { // break reference to attributes.points.control + var tmp = []; + for (i = 0, len = control.length; i< len; ++i) { + tmp[i] = control[i]; + } + control = tmp; + } + + if (Y.Dom.getStyle(el, 'position') == 'static') { // default to relative + Y.Dom.setStyle(el, 'position', 'relative'); + } + + if ( isset(attributes['points']['from']) ) { + Y.Dom.setXY(el, attributes['points']['from']); // set position to from point + } + else { Y.Dom.setXY( el, Y.Dom.getXY(el) ); } // set it to current position + + start = this.getAttribute('points'); // get actual top & left + + // TO beats BY, per SMIL 2.1 spec + if ( isset(attributes['points']['to']) ) { + end = translateValues.call(this, attributes['points']['to'], start); + + var pageXY = Y.Dom.getXY(this.getEl()); + for (i = 0, len = control.length; i < len; ++i) { + control[i] = translateValues.call(this, control[i], start); + } + + + } else if ( isset(attributes['points']['by']) ) { + end = [ start[0] + attributes['points']['by'][0], start[1] + attributes['points']['by'][1] ]; + + for (i = 0, len = control.length; i < len; ++i) { + control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ]; + } + } + + this.runtimeAttributes[attr] = [start]; + + if (control.length > 0) { + this.runtimeAttributes[attr] = this.runtimeAttributes[attr].concat(control); + } + + this.runtimeAttributes[attr][this.runtimeAttributes[attr].length] = end; + } + else { + superclass.setRuntimeAttribute.call(this, attr); + } + }; + + var translateValues = function(val, start) { + var pageXY = Y.Dom.getXY(this.getEl()); + val = [ val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1] ]; + + return val; + }; + + var isset = function(prop) { + return (typeof prop !== 'undefined'); + }; +})(); +(function() { +/** + * Anim subclass for scrolling elements to a position defined by the "scroll" + * member of "attributes". All "scroll" members are arrays with x, y scroll positions. + * <p>Usage: <code>var myAnim = new YAHOO.util.Scroll(el, { scroll: { to: [0, 800] } }, 1, YAHOO.util.Easing.easeOut);</code></p> + * @class Scroll + * @namespace YAHOO.util + * @requires YAHOO.util.Anim + * @requires YAHOO.util.AnimMgr + * @requires YAHOO.util.Easing + * @requires YAHOO.util.Bezier + * @requires YAHOO.util.Dom + * @requires YAHOO.util.Event + * @requires YAHOO.util.CustomEvent + * @extends YAHOO.util.Anim + * @constructor + * @param {String or HTMLElement} el Reference to the element that will be animated + * @param {Object} attributes The attribute(s) to be animated. + * Each attribute is an object with at minimum a "to" or "by" member defined. + * Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). + * All attribute names use camelCase. + * @param {Number} duration (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based + * @param {Function} method (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method) + */ + YAHOO.util.Scroll = function(el, attributes, duration, method) { + if (el) { // dont break existing subclasses not using YAHOO.extend + YAHOO.util.Scroll.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + YAHOO.extend(YAHOO.util.Scroll, YAHOO.util.ColorAnim); + + // shorthand + var Y = YAHOO.util; + var superclass = Y.Scroll.superclass; + var proto = Y.Scroll.prototype; + + proto.toString = function() { + var el = this.getEl(); + var id = el.id || el.tagName; + return ("Scroll " + id); + }; + + proto.doMethod = function(attr, start, end) { + var val = null; + + if (attr == 'scroll') { + val = [ + this.method(this.currentFrame, start[0], end[0] - start[0], this.totalFrames), + this.method(this.currentFrame, start[1], end[1] - start[1], this.totalFrames) + ]; + + } else { + val = superclass.doMethod.call(this, attr, start, end); + } + return val; + }; + + proto.getAttribute = function(attr) { + var val = null; + var el = this.getEl(); + + if (attr == 'scroll') { + val = [ el.scrollLeft, el.scrollTop ]; + } else { + val = superclass.getAttribute.call(this, attr); + } + + return val; + }; + + proto.setAttribute = function(attr, val, unit) { + var el = this.getEl(); + + if (attr == 'scroll') { + el.scrollLeft = val[0]; + el.scrollTop = val[1]; + } else { + superclass.setAttribute.call(this, attr, val, unit); + } + }; +})(); Added: GatorMail/trunk/src/webapp/yui/animation/animation-min.js =================================================================== --- GatorMail/trunk/src/webapp/yui/animation/animation-min.js (rev 0) +++ GatorMail/trunk/src/webapp/yui/animation/animation-min.js 2007-02-06 18:15:32 UTC (rev 22) @@ -0,0 +1,75 @@ +/* +Copyright (c) 2006, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.net/yui/license.txt +version: 0.12.2 +*/ + +YAHOO.util.Anim=function(el,attributes,duration,method){if(el){this.init(el,attributes,duration,method);}};YAHOO.util.Anim.prototype={toString:function(){var el=this.getEl();var id=el.id||el.tagName;return("Anim "+id);},patterns:{noNegatives:/width|height|opacity|padding/i,offsetAttribute:/^((width|height)|(top|left))$/,defaultUnit:/width|height|top$|bottom$|left$|right$/i,offsetUnit:/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i},doMethod:function(attr,start,end){return this.method(this.currentFrame,start,end-start,this.totalFrames);},setAttribute:function(attr,val,unit){if(this.patterns.noNegatives.test(attr)){val=(val>0)?val:0;} +YAHOO.util.Dom.setStyle(this.getEl(),attr,val+unit);},getAttribute:function(attr){var el=this.getEl();var val=YAHOO.util.Dom.getStyle(el,attr);if(val!=='auto'&&!this.patterns.offsetUnit.test(val)){return parseFloat(val);} +var a=this.patterns.offsetAttribute.exec(attr)||[];var pos=!!(a[3]);var box=!!(a[2]);if(box||(YAHOO.util.Dom.getStyle(el,'position')=='absolute'&&pos)){val=el['offset'+a[0].charAt(0).toUpperCase()+a[0].substr(1)];}else{val=0;} +return val;},getDefaultUnit:function(attr){if(this.patterns.defaultUnit.test(attr)){return'px';} +return'';},setRuntimeAttribute:function(attr){var start;var end;var attributes=this.attributes;this.runtimeAttributes[attr]={};var isset=function(prop){return(typeof prop!=='undefined');};if(!isset(attributes[attr]['to'])&&!isset(attributes[attr]['by'])){return false;} +start=(isset(attributes[attr]['from']))?attributes[attr]['from']:this.getAttribute(attr);if(isset(attributes[attr]['to'])){end=attributes[attr]['to'];}else if(isset(attributes[attr]['by'])){if(start.constructor==Array){end=[];for(var i=0,len=start.length;i<len;++i){end[i]=start[i]+attributes[attr]['by'][i];}}else{end=start+attributes[attr]... [truncated message content] |
From: <san...@us...> - 2007-02-06 18:36:40
|
Revision: 23 http://svn.sourceforge.net/gatormail/?rev=23&view=rev Author: sandymac Date: 2007-02-06 10:16:58 -0800 (Tue, 06 Feb 2007) Log Message: ----------- Compose autocomplete and message body search Modified Paths: -------------- GatorMail/trunk/build.xml GatorMail/trunk/src/Messages.properties GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/FolderAction.java GatorMail/trunk/src/webapp/tiles/compose/message.jsp Modified: GatorMail/trunk/build.xml =================================================================== --- GatorMail/trunk/build.xml 2007-02-06 18:15:32 UTC (rev 22) +++ GatorMail/trunk/build.xml 2007-02-06 18:16:58 UTC (rev 23) @@ -274,6 +274,7 @@ <war destfile="${build.war.dir}/GatorMail.war" webxml="${build.webinf.dir}/web.xml" compress="true"> <!-- / --> <fileset dir="${build.jsp.dir}"/> + <fileset dir="${src.webapp.dir}" includes="yui/**"/> <fileset refid="fileset.gatormail.images"/> Modified: GatorMail/trunk/src/Messages.properties =================================================================== --- GatorMail/trunk/src/Messages.properties 2007-02-06 18:15:32 UTC (rev 22) +++ GatorMail/trunk/src/Messages.properties 2007-02-06 18:16:58 UTC (rev 23) @@ -174,6 +174,7 @@ folder.filter.filter.title=If the filter requires input, enter it here, otherwise this is ignored. folder.filter.filterType.title=Select the type of filter to apply to this folder. folder.filter.addressBook=From known addresses +folder.filter.body=Message Bodies: folder.filter.hasAttachment=Messages with attachments folder.filter.noAttachment=Messages without attachments folder.filter.notAddressBook=From unknown addresses Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/FolderAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/FolderAction.java 2007-02-06 18:15:32 UTC (rev 22) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/FolderAction.java 2007-02-06 18:16:58 UTC (rev 23) @@ -52,6 +52,7 @@ import javax.mail.search.RecipientStringTerm; import javax.mail.search.SearchTerm; import javax.mail.search.SubjectTerm; +import javax.mail.search.BodyTerm; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @@ -84,6 +85,7 @@ list.add("sender"); list.add("toRecipient"); list.add("allRecipients"); + list.add("body"); list.add("new"); list.add("seen"); list.add("replied"); @@ -377,6 +379,9 @@ orTerms[2] = new RecipientStringTerm(Message.RecipientType.BCC, filter); searchTerm = new OrTerm(orTerms); + } else if (type.equals("body")) { + searchTerm = new BodyTerm(filter); + } else if (type.equals("new")) { final Flags f = new Flags(); f.add(Flags.Flag.SEEN); Modified: GatorMail/trunk/src/webapp/tiles/compose/message.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-02-06 18:15:32 UTC (rev 22) +++ GatorMail/trunk/src/webapp/tiles/compose/message.jsp 2007-02-06 18:16:58 UTC (rev 23) @@ -6,9 +6,35 @@ <%@taglib uri="/tags/struts-bean" prefix="bean"%> <%@taglib uri="/tags/webmail" prefix="wm"%> +<%-- Dependencies --%> +<script type="text/javascript" src="yui/yahoo/yahoo-min.js"></script> +<script type="text/javascript" src="yui/dom/dom-min.js"></script> +<script type="text/javascript" src="yui/event/event-min.js"></script> + +<%-- OPTIONAL: Animation (required only if enabling animation) --%> +<script type="text/javascript" src="yui/animation/animation-min.js"></script> + +<%-- Source file --%> +<script type="text/javascript" src="yui/autocomplete/autocomplete-min.js"></script> + <html:form method="post" action="modifyCompose" enctype="multipart/form-data" focus="to"> <html:hidden property="composeKey"/> +<style type="text/css"> + #toAutoComplete, #ccAutoComplete, #bccAutoComplete {position:relative;width:100%;}/* set width of widget here*/ + #toAutoComplete {z-index:9000} /* for IE z-index of absolute divs inside relative divs issue */ + #ccAutoComplete {z-index:8000} /* for IE z-index of absolute divs inside relative divs issue */ + #bccAutoComplete {z-index:7000} /* for IE z-index of absolute divs inside relative divs issue */ + #toinput, #ccinput, #bccinput {_position:absolute;width:100%;Xheight:1.4em;z-index:0;} /* abs for ie quirks */ + #toCompleteContainer, #ccCompleteContainer, #bccCompleteContainer {position:absolute;top:1.7em;width:95%} + #toCompleteContainer .yui-ac-content, #ccCompleteContainer .yui-ac-content, #bccCompleteContainer .yui-ac-content {position:absolute;width:100%;border:1px solid #404040;background:#fff;overflow:hidden;z-index:9050;} + #toCompleteContainer .yui-ac-shadow, #ccCompleteContainer .yui-ac-shadow, #bccCompleteContainer .yui-ac-shadow {position:absolute;margin:.3em;width:100%;background:#a0a0a0;z-index:9049;} + #toCompleteContainer ul, #ccCompleteContainer ul, #bccCompleteContainer ul {padding:0 1px 0;width:100%; margin:0.3em;} + #toCompleteContainer li, #ccCompleteContainer li, #bccCompleteContainer li {padding:0 5px;cursor:default;white-space:nowrap;} + #toCompleteContainer li.yui-ac-highlight, #ccCompleteContainer li.yui-ac-highlight, #bccCompleteContainer li.yui-ac-highlight {background:#ff0;} + #toCompleteContainer li.yui-ac-prehighlight, #ccCompleteContainer li.yui-ac-prehighlight, #bccCompleteContainer li.yui-ac-prehighlight {background:#FFFFCC;} +</style> + <script language="JavaScript" type="text/javascript"> <!-- function populateAddress(field) { @@ -31,6 +57,69 @@ return false; } + + <c:choose> + <c:when test="${!empty addressList}"> +var addressList = [ + <c:forEach items="${addressList}" var="iAddress"> +{p:"<c:out value="${iAddress.personal}"/>", a:"<c:out value="${iAddress.address}"/>"}, + </c:forEach> +]; + </c:when> + <c:otherwise> +var addressList = []; + </c:otherwise> + </c:choose> +var addressListFunction = function (query) { + var results = []; + if (query && query.length > 0) { + var queryLower = query.toLowerCase(); + for (var i=0; i < addressList.length; i++) { + var addressItem = addressList[i]; + var personal = addressItem["p"]; + var address = addressItem["a"]; + var result = []; + var found = false; + if (address && address.toLowerCase().indexOf(queryLower) === 0) { + result[0] = address; + result[1] = personal; + results[results.length] = result; + found = true; + } + if (!found && personal && personal.toLowerCase().indexOf(queryLower) >= 0) { + var idx = personal.toLowerCase().indexOf(queryLower); + if (idx === 0 || personal.toLowerCase().indexOf(" " + queryLower) >= 0) { + result[0] = address; + result[1] = personal; + results[results.length] = result; + found = true; + } + } + } + } + return results; +} +var addressListDataSource = new YAHOO.widget.DS_JSFunction(addressListFunction); +var addressListFormatter = function (result, query) { + var markup = ""; + if (result[1]) { + markup = "\"" + result[1] + "\" "; + } + markup += "<" + result[0] + ">"; + return markup; +} +function initAutoComplete(elem, container) { + var ac = new YAHOO.widget.AutoComplete(elem, container, addressListDataSource); + ac.delimChar = ","; + ac.maxResultsDisplayed = 20; + ac.formatResult = addressListFormatter; + return ac; +} +var preventSubmit = function (e) { + if (YAHOO.util.Event.getCharCode(e) == 13) { + YAHOO.util.Event.preventDefault(e); + } +} //--> </script> <table width="100%" cellpadding="2" cellspacing="0"> @@ -55,7 +144,10 @@ <tr class="lightBlueRow"> <td width="15%" align="right" class="composeHeaderTitle"><bean:message key="message.to"/>:</td> <td colspan="3"> - <html:text property="to" size="63" style="width : 99%" tabindex="10"/> + <div id="toAutoComplete"> + <html:text property="to" styleId="toInput" size="63" style="width : 99%" tabindex="10"/> + <div id="toCompleteContainer"></div> + </div> </td> <td valign="top" rowspan="7" width="200"> <table align="center" width="100%"> @@ -102,13 +194,26 @@ <tr class="lightBlueRow"> <td width="15%" align="right" class="composeHeaderTitle"><bean:message key="message.cc"/>:</td> <td colspan="3"> - <html:text property="cc" size="63" style="width : 99%" tabindex="20"/> + <div id="ccAutoComplete"> + <html:text property="cc" styleId="ccInput" size="63" style="width : 99%" tabindex="20"/> + <div id="ccCompleteContainer"></div> + </div> </td> </tr> <tr class="lightBlueRow"> <td width="15%" align="right" class="composeHeaderTitle"><bean:message key="message.bcc"/>:</td> <td colspan="3"> - <html:text property="bcc" size="63" style="width : 99%" tabindex="30"/> + <div id="bccAutoComplete"> + <html:text property="bcc" styleId="bccInput" size="63" style="width : 99%" tabindex="30"/> + <div id="bccCompleteContainer"></div> + </div> + <script type="text/javascript"> + var toAutoComplete = initAutoComplete("toInput","toCompleteContainer"); + var ccAutoComplete = initAutoComplete("ccInput","ccCompleteContainer"); + var bccAutoComplete = initAutoComplete("bccInput","bccCompleteContainer"); + + YAHOO.util.Event.addListener(["toInput", "ccInput", "bccInput"], "keypress", preventSubmit); + </script> </td> </tr> <tr class="lightBlueRow"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2007-01-10 18:36:04
|
Revision: 21 http://svn.sourceforge.net/gatormail/?rev=21&view=rev Author: sandymac Date: 2007-01-10 10:12:33 -0800 (Wed, 10 Jan 2007) Log Message: ----------- Force color in nav links to prevent HTML emails from hiding them. Modified Paths: -------------- GatorMail/trunk/src/webapp/tiles/message/messageMenu.jsp GatorMail/trunk/src/webapp/tiles/message/messageMenuFoot.jsp GatorMail/trunk/src/webapp/tiles/message/messageMenuHead.jsp Modified: GatorMail/trunk/src/webapp/tiles/message/messageMenu.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/message/messageMenu.jsp 2006-11-09 18:56:18 UTC (rev 20) +++ GatorMail/trunk/src/webapp/tiles/message/messageMenu.jsp 2007-01-10 18:12:33 UTC (rev 21) @@ -13,15 +13,15 @@ <%-- Prev/Up/Next Links --%> <th width="15%"> <nobr> - <html:link forward="prevMessage" name="messageParams" scope="request" titleKey="link.previous.title"><bean:message key="link.previous"/></html:link> + <html:link forward="prevMessage" name="messageParams" scope="request" titleKey="link.previous.title" style="#ffffff"><bean:message key="link.previous"/></html:link> <% pageContext.setAttribute("folderName", messageFolder.getFullName()); pageContext.setAttribute("sort", (String)request.getAttribute("folderSort")); %> - <a href="folder.do?folder=<c:out value="${folderName}"/>&sort=<c:out value="${folderSort}"/>" title="Back to Folder" ><bean:message key="link.up"/></a> + <a href="folder.do?folder=<c:out value="${folderName}"/>&sort=<c:out value="${folderSort}"/>" title="Back to Folder" style="#ffffff"><bean:message key="link.up"/></a> - <html:link forward="nextMessage" name="messageParams" scope="request" titleKey="link.next.title"><bean:message key="link.next"/></html:link> + <html:link forward="nextMessage" name="messageParams" scope="request" titleKey="link.next.title" style="#ffffff"><bean:message key="link.next"/></html:link> </nobr> </th> @@ -29,13 +29,13 @@ <th width="20%"> <c:choose> <c:when test="${folder.fullName != 'INBOX.Trash' and folder.fullName != 'INBOX/Trash'}"> - <html:link forward="deleteMessage" name="messageParams" scope="request" titleKey="link.delete.title"><bean:message key="link.delete"/></html:link> + <html:link forward="deleteMessage" name="messageParams" scope="request" titleKey="link.delete.title" style="#ffffff"><bean:message key="link.delete"/></html:link> </c:when> <c:otherwise> <% messageParams.put(Constants.DELETE_FOREVER, "true"); %> - <html:link forward="deleteMessage" name="messageParams" scope="request" titleKey="link.deleteForever.title"><bean:message key="link.deleteForever"/></html:link> + <html:link forward="deleteMessage" name="messageParams" scope="request" titleKey="link.deleteForever.title" style="#ffffff"><bean:message key="link.deleteForever"/></html:link> <% messageParams.remove(Constants.DELETE_FOREVER); %> @@ -45,14 +45,14 @@ <%-- Reply Link --%> <th width="20%"> - <html:link forward="reply" name="messageParams" scope="request" titleKey="link.reply.title"> + <html:link forward="reply" name="messageParams" scope="request" titleKey="link.reply.title" style="#ffffff"> <bean:message key="link.reply"/> </html:link> <% messageParams.put("action", "reply-all"); %> - <html:link forward="reply" name="messageParams" scope="request" titleKey="link.reply-all.title"> + <html:link forward="reply" name="messageParams" scope="request" titleKey="link.reply-all.title" style="#ffffff"> <bean:message key="link.reply-all"/> </html:link> <% @@ -62,7 +62,7 @@ <%-- Forward Link --%> <th width="20%"> - <html:link forward="forward" name="messageParams" scope="request" titleKey="link.forward.title"> + <html:link forward="forward" name="messageParams" scope="request" titleKey="link.forward.title" style="#ffffff"> <bean:message key="link.forward"/> </html:link> </th> Modified: GatorMail/trunk/src/webapp/tiles/message/messageMenuFoot.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/message/messageMenuFoot.jsp 2006-11-09 18:56:18 UTC (rev 20) +++ GatorMail/trunk/src/webapp/tiles/message/messageMenuFoot.jsp 2007-01-10 18:12:33 UTC (rev 21) @@ -25,7 +25,7 @@ <th width="15%"> <nobr> <%-- Priner friendly Link --%> - <html:link forward="printerFriendly" name="messageParams" scope="request" titleKey="link.printerFriendly.title"> + <html:link forward="printerFriendly" name="messageParams" scope="request" titleKey="link.printerFriendly.title" style="#ffffff"> <bean:message key="link.printerFriendly"/> </html:link> </nobr> @@ -39,7 +39,7 @@ <tr> <th width="15%"> <nobr> - <html:link forward="rawMessage" name="messageParams" scope="request" titleKey="link.message.source.title"><bean:message key="link.message.source"/></html:link> + <html:link forward="rawMessage" name="messageParams" scope="request" titleKey="link.message.source.title" style="#ffffff"><bean:message key="link.message.source"/></html:link> </nobr> </th> </tr> Modified: GatorMail/trunk/src/webapp/tiles/message/messageMenuHead.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/message/messageMenuHead.jsp 2006-11-09 18:56:18 UTC (rev 20) +++ GatorMail/trunk/src/webapp/tiles/message/messageMenuHead.jsp 2007-01-10 18:12:33 UTC (rev 21) @@ -78,14 +78,14 @@ if (!isJunk) { %> <%-- Report Spam Link --%> - <html:link forward="reportSpam" name="messageParams" scope="request" titleKey="link.reportSpam.title"> + <html:link forward="reportSpam" name="messageParams" scope="request" titleKey="link.reportSpam.title" style="#ffffff"> <bean:message key="link.report.spam"/> </html:link> <% } else { %> <%-- Report Ham Link --%> - <html:link forward="reportHam" name="messageParams" scope="request" titleKey="link.reportHam.title"> + <html:link forward="reportHam" name="messageParams" scope="request" titleKey="link.reportHam.title" style="#ffffff"> <bean:message key="link.report.ham"/> </html:link> <% This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2006-11-09 21:18:49
|
Revision: 20 http://svn.sourceforge.net/gatormail/?rev=20&view=rev Author: sandymac Date: 2006-11-09 10:56:18 -0800 (Thu, 09 Nov 2006) Log Message: ----------- Catch exceptions during quota root search that would cause the quota view to fail. Modified Paths: -------------- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2006-11-02 18:46:05 UTC (rev 19) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2006-11-09 18:56:18 UTC (rev 20) @@ -380,7 +380,11 @@ final Iterator folderIter = folderList.iterator(); while (folderIter.hasNext()) { final Folder aFolder = (Folder)folderIter.next(); - addQuotas(aFolder, quotaSet); + try { + addQuotas(aFolder, quotaSet); + } catch (MessagingException me) { + logger.error("Problem fetching quota from folder: " + aFolder.getFullName(), me); + } } return quotaSet; } @@ -391,7 +395,11 @@ final Iterator folderIter = folderList.iterator(); while (folderIter.hasNext()) { final Folder aFolder = (Folder)folderIter.next(); - addQuotas(aFolder, quotaSet); + try { + addQuotas(aFolder, quotaSet); + } catch (MessagingException me) { + logger.error("Problem fetching quota from folder: " + aFolder.getFullName(), me); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2006-11-02 18:46:22
|
Revision: 19 http://svn.sourceforge.net/gatormail/?rev=19&view=rev Author: sandymac Date: 2006-11-02 10:46:05 -0800 (Thu, 02 Nov 2006) Log Message: ----------- Fixes to make sure all Folder objects get closed and close open imap sessions at logout. Modified Paths: -------------- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/EmptyFolderAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/LoginAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/LogoutAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/imap/UFIMAPSessionProvider.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java GatorMail/trunk/src/webapp/WEB-INF/struts-config.xml GatorMail/trunk/src/webapp/WEB-INF/web.xml GatorMail/trunk/src/webapp/tiles/folder/emptyTrash.jsp GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp Added Paths: ----------- GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/FolderCloserFilter.java Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2006-11-02 18:46:05 UTC (rev 19) @@ -772,6 +772,9 @@ // XXX: Less correct but faster. folder = store.getFolder("INBOX"); + if (Util.traceProtocol) { + Util.addProtocolMarkers(folder, (new Exception()).getStackTrace()); + } list = getFolders(folder); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/EmptyFolderAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/EmptyFolderAction.java 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/EmptyFolderAction.java 2006-11-02 18:46:05 UTC (rev 19) @@ -84,6 +84,7 @@ final HttpSession session = request.getSession(); final String folderName = emptyForm.getFolderName(); final Folder folder = Util.getFolder(session, folderName); + Util.releaseFolder(folder); request.setAttribute("folder", folder); request.setAttribute("folderName", folderName); request.setAttribute("perm", emptyForm.getPermanent()); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/LoginAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/LoginAction.java 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/LoginAction.java 2006-11-02 18:46:05 UTC (rev 19) @@ -29,6 +29,7 @@ import edu.ufl.osg.webmail.prefs.PreferencesProvider; import edu.ufl.osg.webmail.util.Util; import edu.ufl.osg.webmail.util.RequestTimerFilter; +import edu.ufl.osg.webmail.util.FolderCloserFilter; import org.apache.commons.beanutils.PropertyUtils; import org.apache.log4j.Logger; import org.apache.struts.action.Action; @@ -150,6 +151,10 @@ Folder inbox = null; try { inbox = mailStore.getFolder("INBOX"); + FolderCloserFilter.closeFolder(inbox); + if (Util.traceProtocol) { + Util.addProtocolMarkers(inbox, (new Exception()).getStackTrace()); + } if (inbox == null || !inbox.exists()) { return mapping.findForward("noInbox"); } else { @@ -160,6 +165,9 @@ if (!inbox.isOpen()) { inbox.open(Folder.READ_ONLY); inbox.setSubscribed(true); + if (Util.traceProtocol) { + Util.addProtocolMarkers(inbox, (new Exception()).getStackTrace()); + } inbox.close(false); logger.debug("INBOX opened and closed"); } Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/LogoutAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/LogoutAction.java 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/LogoutAction.java 2006-11-02 18:46:05 UTC (rev 19) @@ -20,6 +20,7 @@ package edu.ufl.osg.webmail.actions; +import com.opensymphony.oscache.web.ServletCache; import edu.ufl.osg.webmail.Constants; import edu.ufl.osg.webmail.User; import edu.ufl.osg.webmail.data.AttachDAO; @@ -34,10 +35,12 @@ import javax.mail.Folder; import javax.mail.Service; +import javax.mail.Store; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.lang.ref.Reference; +import java.util.Date; import java.util.Enumeration; @@ -103,10 +106,23 @@ } } else if (o instanceof Folder) { final Folder f = (Folder)o; + if (Util.traceProtocol) { + Util.addProtocolMarkers(f, (new Exception()).getStackTrace()); + } if (f.isOpen()) { f.close(false); } + } else if (o instanceof User) { + final User u = (User)o; + Store store = u.getMailStore(); + if (store.isConnected()) { + store.close(); + } + + } else if (o instanceof ServletCache) { + ServletCache cache = (ServletCache)o; + cache.flushAll(new Date()); } } catch (Exception e) { logger.error("Silently ignoring Exception during logout.", e); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2006-11-02 18:46:05 UTC (rev 19) @@ -27,6 +27,7 @@ import edu.ufl.osg.webmail.forms.PreferencesForm; import edu.ufl.osg.webmail.prefs.PreferencesProvider; import edu.ufl.osg.webmail.util.Util; +import edu.ufl.osg.webmail.util.FolderCloserFilter; import org.apache.log4j.Logger; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; @@ -143,7 +144,15 @@ store.connect(); } Folder folder = store.getFolder("INBOX"); + FolderCloserFilter.closeFolder(folder); + if (Util.traceProtocol) { + Util.addProtocolMarkers(folder, (new Exception()).getStackTrace()); + } folder = folder.getFolder("Junk"); + FolderCloserFilter.closeFolder(folder); + if (Util.traceProtocol) { + Util.addProtocolMarkers(folder, (new Exception()).getStackTrace()); + } try { if (!folder.exists()) { folder.create(Folder.HOLDS_MESSAGES | Folder.HOLDS_FOLDERS); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/imap/UFIMAPSessionProvider.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/imap/UFIMAPSessionProvider.java 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/imap/UFIMAPSessionProvider.java 2006-11-02 18:46:05 UTC (rev 19) @@ -3,6 +3,8 @@ import edu.ufl.osg.webmail.SessionProvider; import edu.ufl.osg.webmail.User; +import edu.ufl.osg.webmail.util.Util; +import edu.ufl.osg.webmail.util.FolderCloserFilter; import javax.mail.Authenticator; import javax.mail.Folder; @@ -82,6 +84,10 @@ store.connect(); Folder folder = store.getFolder("INBOX"); + FolderCloserFilter.closeFolder(folder); + if (Util.traceProtocol) { + Util.addProtocolMarkers(folder, (new Exception()).getStackTrace()); + } try { folder.open(Folder.READ_ONLY); } catch (MessagingException e) { Added: GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/FolderCloserFilter.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/FolderCloserFilter.java (rev 0) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/FolderCloserFilter.java 2006-11-02 18:46:05 UTC (rev 19) @@ -0,0 +1,60 @@ +package edu.ufl.osg.webmail.util; + +import javax.servlet.*; +import javax.mail.Folder; +import javax.mail.MessagingException; +import java.io.IOException; +import java.util.List; +import java.util.ArrayList; +import java.util.Iterator; + +/** + * Checks that any open folders were closed at the end of the request. + */ +public class FolderCloserFilter implements Filter { + private static ThreadLocal tl = new ThreadLocal() { + protected Object initialValue() { + return new ArrayList(); + } + }; + + public void init(FilterConfig filterConfig) throws ServletException { + } + + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { + final List l = (List)tl.get(); + + try { + chain.doFilter(request, response); + + } finally { + + final Iterator iter = l.iterator(); + while (iter.hasNext()) { + final Folder f = (Folder)iter.next(); + if (f.isOpen()) { + if (Util.traceProtocol) { + Util.addProtocolMarkers(f, (new Exception()).getStackTrace()); + System.err.println(f + " (" + System.identityHashCode(f) + ") was left open!"); + } + try { + f.close(false); + } catch (MessagingException e) { + // swallowed + } + } + iter.remove(); + + } + } + + } + + public static void closeFolder(Folder f) { + List l = (List)tl.get(); + l.add(f); + } + + public void destroy() { + } +} Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java 2006-11-02 18:46:05 UTC (rev 19) @@ -22,6 +22,9 @@ package edu.ufl.osg.webmail.util; import com.sun.mail.imap.IMAPFolder; +import com.sun.mail.imap.protocol.IMAPProtocol; +import com.sun.mail.iap.ProtocolException; +import com.sun.mail.iap.Argument; import edu.ufl.osg.webmail.Constants; import edu.ufl.osg.webmail.User; import edu.ufl.osg.webmail.data.AddressBkDAO; @@ -130,9 +133,75 @@ // XXX Ignore errors for now } } + FolderCloserFilter.closeFolder(folder); return folder; } + public static final boolean traceProtocol = false; + private static void addProtocolMarkers(final Folder folder, final String tag) { + if (folder instanceof IMAPFolder) { + IMAPFolder imapFolder = (IMAPFolder)folder; + try { + imapFolder.doCommandIgnoreFailure(new IMAPFolder.ProtocolCommand() { + public Object doCommand(IMAPProtocol imapProtocol) throws ProtocolException { + Argument argument = new Argument(); + argument.writeString(tag); + imapProtocol.simpleCommand("XGATORMAIL-MARKER", argument); + return null; + } + }); + } catch (MessagingException e) { + //e.printStackTrace(); + } + + } + } + + private static void addProtocolMarkers(final Folder folder, final String tag1, final String tag2) { + if (folder instanceof IMAPFolder) { + IMAPFolder imapFolder = (IMAPFolder)folder; + try { + imapFolder.doCommandIgnoreFailure(new IMAPFolder.ProtocolCommand() { + public Object doCommand(IMAPProtocol imapProtocol) throws ProtocolException { + Argument argument = new Argument(); + argument.writeString(tag1); + argument.writeString(tag2); + imapProtocol.simpleCommand("XGATORMAIL-MARKER", argument); + return null; + } + }); + } catch (MessagingException e) { + //e.printStackTrace(); + } + + } + } + + public static void addProtocolMarkers(final Folder folder, final StackTraceElement[] elements) { + if (folder instanceof IMAPFolder) { + IMAPFolder imapFolder = (IMAPFolder)folder; + try { + imapFolder.doCommandIgnoreFailure(new IMAPFolder.ProtocolCommand() { + public Object doCommand(IMAPProtocol imapProtocol) throws ProtocolException { + Argument argument = new Argument(); + argument.writeString(folder.toString() + " (" + System.identityHashCode(folder) + ")"); + int i; + for (i=0; i < elements.length && elements[i].getClassName().startsWith("edu.ufl.osg.webmail"); i++) { + argument.writeString(elements[i].toString()); + } + argument.writeString(elements[i].toString()); + argument.writeString(elements[++i].toString()); + imapProtocol.simpleCommand("X-GATORMAIL-STACK", argument); + return null; + } + }); + } catch (MessagingException e) { + //e.printStackTrace(); + } + + } + } + /** * Always returns a JavaMail {@link javax.mail.Folder} or an * MessagingException is thrown. This will first try to get the folder from @@ -154,13 +223,21 @@ store.connect(); } folder = store.getFolder(folderName); + FolderCloserFilter.closeFolder(folder); + if (Util.traceProtocol) { + Util.addProtocolMarkers(folder, (new Exception()).getStackTrace()); + } if (!folder.isOpen()) { folder.open(Folder.READ_WRITE); } + FolderCloserFilter.closeFolder(folder); return folder; } public static void releaseFolder(final Folder folder) throws MessagingException { + if (Util.traceProtocol) { + Util.addProtocolMarkers(folder, (new Exception()).getStackTrace()); + } if (folder != null && folder.isOpen()) { folder.close(false); } Modified: GatorMail/trunk/src/webapp/WEB-INF/struts-config.xml =================================================================== --- GatorMail/trunk/src/webapp/WEB-INF/struts-config.xml 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/webapp/WEB-INF/struts-config.xml 2006-11-02 18:46:05 UTC (rev 19) @@ -393,8 +393,8 @@ <set-property property="definitions-parser-validate" value="true"/> </plug-in> - <!--<plug-in className="edu.ufl.osg.webmail.imap.IMAPPlugin">--> - <plug-in className="edu.ufl.osg.webmail.imap.UFIMAPSPlugIn"> + <plug-in className="edu.ufl.osg.webmail.imap.IMAPPlugin"> + <!--<plug-in className="edu.ufl.osg.webmail.imap.UFIMAPSPlugIn">--> <!-- I don't know why 'domain' must be lowercase but 'SMTP' and 'IMAP' must be uppercase. @@ -404,7 +404,7 @@ <set-property property="IMAPHost" value="imap.ufl.edu"/> <!-- Socket connection pool size. --> - <set-property property="connectionPoolSize" value="1"/> + <set-property property="connectionPoolSize" value="2"/> <!-- Socket connection timeout value in milliseconds. 90 seconds --> <set-property property="connectionTimeout" value="90000"/> <!-- Socket I/O timeout value in milliseconds --> Modified: GatorMail/trunk/src/webapp/WEB-INF/web.xml =================================================================== --- GatorMail/trunk/src/webapp/WEB-INF/web.xml 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/webapp/WEB-INF/web.xml 2006-11-02 18:46:05 UTC (rev 19) @@ -40,6 +40,7 @@ <param-value></param-value> </context-param> + <!-- <filter> <filter-name>GatorLinkAuth</filter-name> <filter-class>edu.ufl.osg.gatorlink.auth.filter.GatorLinkAuthentication</filter-class> @@ -52,6 +53,7 @@ <filter-name>GatorLinkAuth</filter-name> <url-pattern>*.do</url-pattern> </filter-mapping> + --> <filter> <filter-name>RequestTimer</filter-name> @@ -62,6 +64,15 @@ <url-pattern>*.do</url-pattern> </filter-mapping> + <filter> + <filter-name>FolderCloser</filter-name> + <filter-class>edu.ufl.osg.webmail.util.FolderCloserFilter</filter-class> + </filter> + <filter-mapping> + <filter-name>FolderCloser</filter-name> + <url-pattern>*.do</url-pattern> + </filter-mapping> + <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> Modified: GatorMail/trunk/src/webapp/tiles/folder/emptyTrash.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/folder/emptyTrash.jsp 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/webapp/tiles/folder/emptyTrash.jsp 2006-11-02 18:46:05 UTC (rev 19) @@ -8,7 +8,9 @@ String trashFullName = "INBOX.Trash"; try { Folder f = Util.getFolder(session, "INBOX"); + Util.releaseFolder(f); f = f.getFolder("Trash"); + Util.releaseFolder(f); trashFullName = f.getFullName(); } catch (MessagingException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. Modified: GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp 2006-10-31 22:21:17 UTC (rev 18) +++ GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp 2006-11-02 18:46:05 UTC (rev 19) @@ -8,15 +8,15 @@ <%@taglib uri="/tags/struts-bean" prefix="bean"%> <%@taglib uri="http://www.opensymphony.com/oscache" prefix="oscache"%> <% + Folder currentRootFolder = null; try { - - Folder currentRootFolder = (Folder)request.getAttribute("currentRootFolder"); - if (currentRootFolder == null) { - currentRootFolder = Util.getFolder(session, "INBOX"); - } - currentRootFolder = Util.getFolder(currentRootFolder); - request.setAttribute("currentRootFolder", currentRootFolder); - final String fullName = currentRootFolder.getFullName(); + currentRootFolder = (Folder)request.getAttribute("currentRootFolder"); + if (currentRootFolder == null) { + currentRootFolder = Util.getFolder(session, "INBOX"); + } + currentRootFolder = Util.getFolder(currentRootFolder); + request.setAttribute("currentRootFolder", currentRootFolder); + final String fullName = currentRootFolder.getFullName(); %> <oscache:cache key="<%= "folderList.jsp#" + ((Folder)request.getAttribute("folder")).getFullName() + "::" + fullName %>" scope="session" time="300" groups="mailStore"> <% @@ -100,5 +100,9 @@ } catch (Throwable t) { t.printStackTrace(); throw t; + } finally { + if (currentRootFolder != null) { + Util.releaseFolder(currentRootFolder); + } } %> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2006-10-31 22:38:33
|
Revision: 18 http://svn.sourceforge.net/gatormail/?rev=18&view=rev Author: sandymac Date: 2006-10-31 14:21:17 -0800 (Tue, 31 Oct 2006) Log Message: ----------- Cache trash and sent folder names after they are looked up. Modified Paths: -------------- GatorMail/trunk/src/java/edu/ufl/osg/webmail/Constants.java Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/Constants.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/Constants.java 2006-10-25 18:56:53 UTC (rev 17) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/Constants.java 2006-10-31 22:21:17 UTC (rev 18) @@ -101,14 +101,32 @@ public static final String MAILBEAN_KEY = "mailBean"; public static String getTrashFolderFullname(final HttpSession session) throws MessagingException { - final Folder inbox = Util.getFolder(session, "INBOX"); - Util.releaseFolder(inbox); - return inbox.getFolder(TRASH_FOLDER).getFullName(); + String trashFolderFullName; + synchronized (session) { + trashFolderFullName = (String)session.getAttribute("trashFolderFullname"); + if (trashFolderFullName == null) { + final Folder inbox = Util.getFolder(session, "INBOX"); + Util.releaseFolder(inbox); + + trashFolderFullName = inbox.getFolder(TRASH_FOLDER).getFullName(); + session.setAttribute("trashFolderFullname", trashFolderFullName); + } + } + return trashFolderFullName; } public static String getSentFolderFullname(final HttpSession session) throws MessagingException { - final Folder inbox = Util.getFolder(session, "INBOX"); - Util.releaseFolder(inbox); - return inbox.getFolder(SENT_FOLDER).getFullName(); + String sentFolderFullname; + synchronized (session) { + sentFolderFullname = (String)session.getAttribute("sentFolderFullname"); + if (sentFolderFullname == null) { + final Folder inbox = Util.getFolder(session, "INBOX"); + Util.releaseFolder(inbox); + + sentFolderFullname = inbox.getFolder(SENT_FOLDER).getFullName(); + session.setAttribute("sentFolderFullname", sentFolderFullname); + } + } + return sentFolderFullname; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2006-10-25 18:56:56
|
Revision: 17 http://svn.sourceforge.net/gatormail/?rev=17&view=rev Author: sandymac Date: 2006-10-25 11:56:53 -0700 (Wed, 25 Oct 2006) Log Message: ----------- prevent malformed addresses from breaking the page layout. Modified Paths: -------------- GatorMail/trunk/src/java/edu/ufl/osg/webmail/formatters/EmailFormat.java Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/formatters/EmailFormat.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/formatters/EmailFormat.java 2006-10-23 19:49:33 UTC (rev 16) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/formatters/EmailFormat.java 2006-10-25 18:56:53 UTC (rev 17) @@ -114,7 +114,12 @@ address = new InternetAddress(string); } catch (AddressException e) { // There was a problem, just filter and return it - return toAppendTo.append(ResponseUtils.filter(string)); + // prevent the string from being too long. + String s = string; + if (s != null && s.length() > 35) { + s = s.substring(0, 35); + } + return toAppendTo.append(ResponseUtils.filter(s)); } name = address.getPersonal(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2006-10-23 20:38:56
|
Revision: 16 http://svn.sourceforge.net/gatormail/?rev=16&view=rev Author: sandymac Date: 2006-10-23 12:49:33 -0700 (Mon, 23 Oct 2006) Log Message: ----------- speeling corrections Modified Paths: -------------- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java GatorMail/trunk/src/webapp/tiles/preferences/preferences.jsp Property Changed: ---------------- GatorMail/trunk/src/ Property changes on: GatorMail/trunk/src ___________________________________________________________________ Name: svn:ignore + META-INF Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2006-10-16 21:09:18 UTC (rev 15) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2006-10-23 19:49:33 UTC (rev 16) @@ -248,7 +248,7 @@ prefsForm.setSignature(prefs.getProperty("compose.signature")); prefsForm.setImageUrl(prefs.getProperty("compose.X-Image-Url")); prefsForm.setJunkThreshold(prefs.getProperty("message.junk.threshold", "5")); - prefsForm.setVacationMessage(prefs.getProperty("vacation.message", "I am currently unavailable. Your message will be read when I return.\n\nPS: This is an automatic response.")); + prefsForm.setVacationMessage(prefs.getProperty("vacation.message", "I am currently unavailable. Your message will be read when I return.\n\nPS: This is an automated response.")); if (prefs.getProperty("folder.list.threading") != null) { prefsForm.setThreading(Boolean.valueOf(prefs.getProperty("folder.list.threading"))); } Modified: GatorMail/trunk/src/webapp/tiles/preferences/preferences.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/preferences/preferences.jsp 2006-10-16 21:09:18 UTC (rev 15) +++ GatorMail/trunk/src/webapp/tiles/preferences/preferences.jsp 2006-10-23 19:49:33 UTC (rev 16) @@ -159,11 +159,11 @@ </tr> <tr class="altrow"> - <th width="20%" align="right" valign="top">Enable VacationAuto-Reponder:</th> + <th width="20%" align="right" valign="top">Enable VacationAuto-Responder:</th> <td> <html:checkbox property="vacationSieveEnabled"/> <div class="tip"> - If checked, messages you recieve will trigger an automatic response with the message above. + If checked, messages you receive will trigger an automatic response with the message above. </div> </td> </tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <san...@us...> - 2006-10-16 21:09:37
|
Revision: 15 http://svn.sourceforge.net/gatormail/?rev=15&view=rev Author: sandymac Date: 2006-10-16 14:09:18 -0700 (Mon, 16 Oct 2006) Log Message: ----------- Finished IMAP Path seperator genericification. Modified Paths: -------------- GatorMail/trunk/src/java/edu/ufl/osg/webmail/Constants.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteFolderAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteMessageAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteMessagesAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/EmptyFolderAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PerformDeleteFolderAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/RenameFolderAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/SendAction.java GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp GatorMail/trunk/src/webapp/tiles/folderManage/folderManage.jsp GatorMail/trunk/src/webapp/tiles/folderManage/folderManageModify.jsp Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/Constants.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/Constants.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/Constants.java 2006-10-16 21:09:18 UTC (rev 15) @@ -20,6 +20,12 @@ package edu.ufl.osg.webmail; +import edu.ufl.osg.webmail.util.Util; + +import javax.servlet.http.HttpSession; +import javax.mail.Folder; +import javax.mail.MessagingException; + /** * Constants for the WebMail application. * @@ -69,11 +75,9 @@ /** name for the IMAP box to put trash within */ public static final String TRASH_FOLDER = "Trash"; - public static final String TRASH_FOLDER_FULLNAME = "INBOX." + TRASH_FOLDER; // TODO deal with heir sep /** name for the IMAP box to put sent messages within */ public static final String SENT_FOLDER = "Sent"; - public static final String SENT_FOLDER_FULLNAME = "INBOX." + SENT_FOLDER; // TODO deal with heir sep /** request scoped key for a list of messages */ public static final String MESSAGE_LIST = "messageList"; @@ -95,4 +99,16 @@ public static final String MESSAGE_FLAG_NO_ATTACHMENT = "NoAttachment"; public static final String MAILBEAN_KEY = "mailBean"; + + public static String getTrashFolderFullname(final HttpSession session) throws MessagingException { + final Folder inbox = Util.getFolder(session, "INBOX"); + Util.releaseFolder(inbox); + return inbox.getFolder(TRASH_FOLDER).getFullName(); + } + + public static String getSentFolderFullname(final HttpSession session) throws MessagingException { + final Folder inbox = Util.getFolder(session, "INBOX"); + Util.releaseFolder(inbox); + return inbox.getFolder(SENT_FOLDER).getFullName(); + } } Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/ActionsUtil.java 2006-10-16 21:09:18 UTC (rev 15) @@ -176,11 +176,6 @@ * * @param form the struts ActionForm * @param request the submitted HTTP request - * @see - * #fetchMessage(org.apache.struts.action.ActionForm, - * javax.mail.Folder, - * javax.servlet.http.HttpServletRequest, - * boolean) */ protected static Folder fetchFolder(final ActionForm form, final HttpServletRequest request) throws IllegalAccessException, MessagingException, InvocationTargetException, NoSuchMethodException, FolderNotFoundException { final String folderName = (String)PropertyUtils.getSimpleProperty(form, "folder"); @@ -201,11 +196,6 @@ * * @param form the struts ActionForm * @param folder the JavaMail Folder containting the message - * @see - * #fetchMessage(org.apache.struts.action.ActionForm, - * javax.mail.Folder, - * javax.servlet.http.HttpServletRequest, - * boolean) */ protected static Message fetchMessage(final ActionForm form, final Folder folder) throws IllegalAccessException, MessagingException, InvocationTargetException, NoSuchMethodException { final Integer messageNumber = (Integer)PropertyUtils.getSimpleProperty(form, "messageNumber"); @@ -470,7 +460,7 @@ Folder[] folders; try { // add root folder, if it is allowed - if (isFolderIncluded(rootFolder, includeReserved) && rootFolder.exists()) { + if (isFolderIncluded(rootFolder, includeReserved, session) && rootFolder.exists()) { //list.add(folderToFolderBean(rootFolder)); list.add(rootFolder); } @@ -491,8 +481,8 @@ } // is this folder to be restricted from the list? - private static boolean isFolderIncluded(final Folder folder, final boolean includeReserved) { - return (!(!includeReserved && Util.isReservedFolder(folder.getFullName()))); + private static boolean isFolderIncluded(final Folder folder, final boolean includeReserved, HttpSession session) throws MessagingException { + return (!(!includeReserved && Util.isReservedFolder(folder.getFullName(), session))); } // array of (lowercase) characters allowed in a new folder's name @@ -559,7 +549,7 @@ final int length = folderName.length(); for (int i = 0; i < length; i++) { if (Arrays.binarySearch(legalChars, tempName.charAt(i)) < 0) { - logger.error("checked folder name. illegal character found: " + Arrays.binarySearch(legalChars, tempName.charAt(i))); + logger.error("checked folder name. illegal character found: " + tempName.charAt(i)); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.createFolder.illegalChar", String.valueOf(tempName.charAt(i)))); return false; } @@ -575,7 +565,7 @@ * @return true if the folder can validly be deleted, * false if not. */ - protected static boolean isLegalDelete(final Folder folder, final ActionErrors errors) throws MessagingException { + protected static boolean isLegalDelete(final Folder folder, final ActionErrors errors, final HttpSession session) throws MessagingException { final String deleteFolderName = folder.getFullName(); // check if the folder to be deleted exists @@ -585,7 +575,7 @@ } // check if the folder to be deleted is required for this application - if (Util.isReservedFolder(deleteFolderName)) { + if (Util.isReservedFolder(deleteFolderName, session)) { logger.debug("folder is required for this application"); errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.deleteFolder.notallowed", deleteFolderName)); return false; Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteFolderAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteFolderAction.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteFolderAction.java 2006-10-16 21:09:18 UTC (rev 15) @@ -33,6 +33,7 @@ import javax.mail.Folder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import java.util.List; /** @@ -71,11 +72,12 @@ Folder folder = null; try { - folder = Util.getFolder(request.getSession(), deleteFolder); + final HttpSession session = request.getSession(); + folder = Util.getFolder(session, deleteFolder); logger.debug("deleteFolder: " + folder); // check that this folder qualifies for deletion - if (!ActionsUtil.isLegalDelete(folder, errors)) { + if (!ActionsUtil.isLegalDelete(folder, errors, session)) { logger.error("illegal delete: " + folder.getFullName()); saveErrors(request, errors); return mapping.findForward("fail"); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteMessageAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteMessageAction.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteMessageAction.java 2006-10-16 21:09:18 UTC (rev 15) @@ -162,9 +162,9 @@ final Folder folder = message.getFolder(); Folder trashFolder = null; try { - trashFolder = Util.getFolder(session, Constants.TRASH_FOLDER_FULLNAME); + trashFolder = Util.getFolder(session, Constants.getTrashFolderFullname(session)); if (!deleteForever && (trashFolder != null // if we are in the trash folder, don't bother - && !Constants.TRASH_FOLDER_FULLNAME.equals(folder.getFullName()))) { + && !Constants.getTrashFolderFullname(session).equals(folder.getFullName()))) { // throw it in the trash logger.debug("copying message #" + message.getMessageNumber() + " to Trash"); final List unfinishedList = ActionsUtil.copyMessages(new Message[]{message}, folder, trashFolder, errors); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteMessagesAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteMessagesAction.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/DeleteMessagesAction.java 2006-10-16 21:09:18 UTC (rev 15) @@ -37,6 +37,7 @@ import javax.mail.MessagingException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import java.util.Collections; import java.util.Comparator; import java.util.List; @@ -95,11 +96,12 @@ final int numMessages = messageList.size(); Folder trashFolder = null; + final HttpSession session = request.getSession(); try { - trashFolder = Util.getFolder(request.getSession(), Constants.TRASH_FOLDER_FULLNAME); + trashFolder = Util.getFolder(session, Constants.getTrashFolderFullname(session)); if (!deleteForever && // if deleteForever is true, don't copy messages into trash trashFolder != null && // if we are in the trash folder, don't bother - !Constants.TRASH_FOLDER_FULLNAME.equals(folder.getFullName())) { + !Constants.getTrashFolderFullname(session).equals(folder.getFullName())) { // sort messages from largest to smallest Collections.sort(messageList, deleteMessageSort); @@ -107,7 +109,7 @@ // throw it in the trash logger.debug("copying " + numMessages + " messages to Trash"); final List unfinishedList = ActionsUtil.copyMessages(messageList, folder, trashFolder, errors); - ActionsUtil.flushMailStoreGroupCache(request.getSession()); + ActionsUtil.flushMailStoreGroupCache(session); if (unfinishedList.size() > 0) { request.setAttribute(Constants.MESSAGE_LIST, unfinishedList); request.setAttribute(Constants.DELETE_ACTION, "deleteMessages"); @@ -122,7 +124,7 @@ // delete messages markMessagesForDelete(messageList); folder.expunge(); - ActionsUtil.flushMailStoreGroupCache(request.getSession()); + ActionsUtil.flushMailStoreGroupCache(session); // success message for next page final ResultBean result = new ResultBean(); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/EmptyFolderAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/EmptyFolderAction.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/EmptyFolderAction.java 2006-10-16 21:09:18 UTC (rev 15) @@ -107,7 +107,7 @@ final HttpSession session = request.getSession(); final ActionErrors errors = new ActionErrors(); final Folder folder = Util.getFolder(session, emptyForm.getFolderName()); - final Folder toFolder = Util.getFolder(session, Constants.TRASH_FOLDER_FULLNAME); + final Folder toFolder = Util.getFolder(session, Constants.getTrashFolderFullname(session)); final Message[] messages = folder.getMessages(); final List messageList = ActionsUtil.buildMessageList(messages); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PerformDeleteFolderAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PerformDeleteFolderAction.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PerformDeleteFolderAction.java 2006-10-16 21:09:18 UTC (rev 15) @@ -34,6 +34,7 @@ import javax.mail.Folder; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import javax.servlet.http.HttpSession; import java.util.HashMap; import java.util.Map; @@ -114,13 +115,14 @@ final FolderForm folderForm = (FolderForm)form; final String folderFullName = folderForm.getFolder(); - final Folder folder = Util.getFolder(request.getSession(), folderFullName); + final HttpSession session = request.getSession(); + final Folder folder = Util.getFolder(session, folderFullName); // Check that this folder qualifies for deletion. // This check was already done, but we want to guard against // people sending faked parameters to this action from the // confirm delete form. - if (!ActionsUtil.isLegalDelete(folder, errors)) { + if (!ActionsUtil.isLegalDelete(folder, errors, session)) { saveErrors(request, errors); Util.releaseFolder(folder); // clean up return mapping.findForward("fail"); @@ -132,7 +134,7 @@ // recursive delete is OK - if the user didn't check "deleteChildren" and there // were children, the form validation would have caught that. folder.delete(true); - ActionsUtil.flushMailStoreGroupCache(request.getSession()); + ActionsUtil.flushMailStoreGroupCache(session); // success message for next page final ResultBean result = new ResultBean(Util.getFromBundle("performDeleteFolder.result.success")); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/PreferencesAction.java 2006-10-16 21:09:18 UTC (rev 15) @@ -224,6 +224,12 @@ } populateFormBeanFromPreferences(prefsForm, prefs, user); + // Make sure the vacation alert banner is cleared. + if (prefsForm.getVacationSieveEnabled() != null && prefsForm.getVacationSieveEnabled().booleanValue()) { + session.setAttribute("vacationEnabled", Boolean.TRUE); + } else { + session.setAttribute("vacationEnabled", null); + } if (imageUrl != null) { request.setAttribute("X-Image-Url", imageUrl); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/RenameFolderAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/RenameFolderAction.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/RenameFolderAction.java 2006-10-16 21:09:18 UTC (rev 15) @@ -74,7 +74,7 @@ final Folder oldFolder = Util.getFolder(session, oldFolderName); // check if folder is reserved, i.e. not allowed to be renamed - if (Util.isReservedFolder(oldFolderName)) { + if (Util.isReservedFolder(oldFolderName, session)) { errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.renameFolder.reserved")); saveErrors(request, errors); return mapping.findForward("fail"); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/SendAction.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/SendAction.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/actions/SendAction.java 2006-10-16 21:09:18 UTC (rev 15) @@ -168,9 +168,9 @@ logger.debug("copyToSent value: " + compForm.isCopyToSent()); if (compForm.isCopyToSent()) { logger.debug("copy message to Sent folder - start"); - final Folder sentFolder = Util.getFolder(httpSession, Constants.SENT_FOLDER_FULLNAME); + final Folder sentFolder = Util.getFolder(httpSession, Constants.getSentFolderFullname(httpSession)); message.setFlag(Flags.Flag.SEEN, true); - ActionsUtil.flushMailStoreGroupCache(request.getSession()); + ActionsUtil.flushMailStoreGroupCache(httpSession); if (!ActionsUtil.appendMessage(message, sentFolder, errors)) { // error - go to special error page saveErrors(request, errors); Modified: GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java =================================================================== --- GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/java/edu/ufl/osg/webmail/util/Util.java 2006-10-16 21:09:18 UTC (rev 15) @@ -1035,8 +1035,8 @@ /** * Is this a special, undeletable folder such as INBOX or Trash? */ - public static boolean isReservedFolder(final String folderName) { - return ("INBOX".equals(folderName) || Constants.TRASH_FOLDER_FULLNAME.equals(folderName) || Constants.SENT_FOLDER_FULLNAME.equals(folderName)); + public static boolean isReservedFolder(final String folderName, final HttpSession session) throws MessagingException { + return ("INBOX".equals(folderName) || Constants.getTrashFolderFullname(session).equals(folderName) || Constants.getSentFolderFullname(session).equals(folderName)); } // Two methods to help track usage stats. TODO: remove them Modified: GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/webapp/tiles/folder/folderList.jsp 2006-10-16 21:09:18 UTC (rev 15) @@ -23,9 +23,9 @@ String imageName = "/"; if (currentRootFolder.getFullName().equals("INBOX")) { imageName += "inbox"; - } else if (currentRootFolder.getFullName().equals(Constants.SENT_FOLDER_FULLNAME)) { + } else if (currentRootFolder.getFullName().equals(Constants.getSentFolderFullname(session))) { imageName += "sent"; - } else if (currentRootFolder.getFullName().equals(Constants.TRASH_FOLDER_FULLNAME)) { + } else if (currentRootFolder.getFullName().equals(Constants.getTrashFolderFullname(session))) { imageName += "trash"; // TODO When we support the concept of a Draft folder. // } else if (currentRootFolder.getFullName().equals(Constants.DRAFT_FOLDER_FULLNAME)) { Modified: GatorMail/trunk/src/webapp/tiles/folderManage/folderManage.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/folderManage/folderManage.jsp 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/webapp/tiles/folderManage/folderManage.jsp 2006-10-16 21:09:18 UTC (rev 15) @@ -85,7 +85,7 @@ </td> <td> <% - if (!Util.isReservedFolder(folder.getFullName())) { + if (!Util.isReservedFolder(folder.getFullName(), session)) { %> <html:link forward="deleteFolder" name="folderParams" scope="page"> <bean:message key="folderManage.table.delete"/></html:link> Modified: GatorMail/trunk/src/webapp/tiles/folderManage/folderManageModify.jsp =================================================================== --- GatorMail/trunk/src/webapp/tiles/folderManage/folderManageModify.jsp 2006-10-10 15:15:52 UTC (rev 14) +++ GatorMail/trunk/src/webapp/tiles/folderManage/folderManageModify.jsp 2006-10-16 21:09:18 UTC (rev 15) @@ -46,7 +46,7 @@ <%-- Rename Folder --%> <% - if (!Util.isReservedFolder(folder.getFullName())) { + if (!Util.isReservedFolder(folder.getFullName(), session)) { %> <tr> <td> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |