Author Topic: Expand/Collapse Folders on the 'Email' page  (Read 19649 times)

Offline flosoft

  • Sr. Member
  • ****
  • Posts: 349
    • http://flosoft.biz
Re: Expand/Collapse Folders on the 'Email' page
« Reply #15 on: June 16, 2007, 12:03:28 PM »
Maybe submit this to the Roundcube team. They could implement it into the SVN

Offline Slug

  • Jr. Member
  • **
  • Posts: 76
Re: Expand/Collapse Folders on the 'Email' page
« Reply #16 on: June 17, 2007, 08:14:08 AM »
Quote from: flosoft
Maybe submit this to the Roundcube team. They could implement it into the SVN

Very good idea

Michael
Roundcube SVN 1335|PHP 5.2.4|hMailServer 5|Win 2003 SP2|IIS 6

Offline davo

  • Jr. Member
  • **
  • Posts: 10
Re: Expand/Collapse Folders on the 'Email' page
« Reply #17 on: July 11, 2007, 03:52:05 AM »
Quote from: Slug
Quote from: flosoft
Maybe submit this to the Roundcube team. They could implement it into the SVN

Very good idea

Michael
Thanks guys, i updated the expand/collapse trac ticket with this a while ago ( http://trac.roundcube.net/trac.cgi/ticket/1267231 ) - is there a better way to submit code? How does one normally go about doing it?

edit: updated to revision 648 :
http://download.recurser.com/roundcube/roundcubemail_r648_session_only.tar.gz

Offline memoryhole

  • Newbie
  • *
  • Posts: 1
Re: Expand/Collapse Folders on the 'Email' page
« Reply #18 on: September 17, 2007, 06:13:33 PM »
I love the work you did on collapsible folders! 8) What's the format of the database table that needs to be created? I think it has three columns (folder_name, user_id, is_open), but what are the types. Are they all varchars? ints?

I was thinking about a better solution to the problem of orphaned table entries when folders get renamed or such. It seems to me that just fixing the problem will require a bit more than just changing the delete/rename commands within roundcube, as most folks allow non-roundcube access to their email. Perhaps, at login (or logout (or both)), we can do a DB query to delete all entries for this user_id that don't have folder_names we recognize? How hard would such a thing be to hack into roundcube?

BTW, the problem that was reported about the display looking a little wonky is, I think, just a matter of not having applied the changes to the mail.css file.

Offline davo

  • Jr. Member
  • **
  • Posts: 10
Re: Expand/Collapse Folders on the 'Email' page
« Reply #19 on: September 20, 2007, 01:49:28 AM »
thanks memoryhole :) the schema should be in the SQL/mysql.update.sql file if you have the new-db-table version. Here's the diff if you don't have it :

Code: [Select]
--- SQL/mysql.update.sql    (revision 507)
+++ SQL/mysql.update.sql    (working copy)
@@ -9,3 +9,12 @@


 ALTER TABLE `identities`
  ADD `html_signature` tinyint(1) default 0 NOT NULL;
+
+CREATE TABLE IF NOT EXISTS `folders` (
+ `folder_id` int(10) unsigned NOT NULL auto_increment,
+ `folder_name` varchar(256) NOT NULL,
+ `user_id` int(10) unsigned NOT NULL default '0',
+ `is_open` tinyint(1) NOT NULL default '0',
+ PRIMARY KEY (`folder_id`),
+ KEY `User_ID_FK_folderss` (`user_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;

You're spot on about people having 'non-roundcube access to their email', thats a problem for the folder-db-table stuff. Another way i was thinking of doing it is just to store a serialized array of folders that are open in the user preferences or something, so you don't need a folder table at all. I'm only using the session-based one at the moment so i probably won't do much with the folder-table stuff - if you come up with anything good let me know :)

cheers