From 4b9efbb9f49911b17bde2d46b86df825e987101e Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Thu, 09 Aug 2007 17:55:14 -0400
Subject: [PATCH] Fixes interface lock-up issues and minor bugs (richs)

---
 CHANGELOG                            |   12 ++++++++++++
 INSTALL                              |    3 +++
 skins/default/mail.css               |    2 +-
 skins/default/templates/compose.html |    2 +-
 .htaccess                            |    2 +-
 program/js/app.js                    |   33 +++++++++++++++++++--------------
 6 files changed, 37 insertions(+), 17 deletions(-)

diff --git a/.htaccess b/.htaccess
index b69de0c..2244a05 100644
--- a/.htaccess
+++ b/.htaccess
@@ -2,7 +2,7 @@
 php_flag	display_errors	Off
 php_flag	log_errors	On
 php_value	error_log	logs/errors
-php_value	upload_max_filesize	2M
+php_value	upload_max_filesize	5M
 
 <FilesMatch "(\.inc|\~)$">
   Order allow,deny
diff --git a/CHANGELOG b/CHANGELOG
index e0a4c3f..786be4e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,18 @@
 CHANGELOG RoundCube Webmail
 ---------------------------
 
+2007/07/09 (richs)
+----------
+- Fixed bug with buttons not dimming/enabling properly after switching folders
+- Fixed compose window becoming unresponsive after saving a draft (#1484487)
+- Re-enabled "Back" button in compose window now that bug #1484487 is fixed
+- Fixed unresponsive interface issue when downloading attachments (#1484496)
+- Lowered status message time from 5 to 3 seconds to improve responsiveness
+- Added note to INSTALL about .htaccess limiting upload_max_filesize
+- Raised .htaccess upload_max_filesize from 2M to 5M to differ from default php.ini
+- Increased "mailboxcontrols" mail.css width from 160 to 170px to fix non-english languages 
+- Fixed empty-message sending with TinyMCE plain-text mode, or if it's not installed
+
 2007/07/03 (thomasb)
 ----------
 - Added Macedonian (Slavic FYROM) localization
diff --git a/INSTALL b/INSTALL
index d3518ed..a28dea1 100644
--- a/INSTALL
+++ b/INSTALL
@@ -103,6 +103,9 @@
 Change the files in config/* according your to environment and your needs.
 Details about the config paramaters can be found in the config files.
 
+You can also modify the default .htaccess file. This is necessary to
+increase the allowed size of file attachments, for example:
+	php_value       upload_max_filesize     2M
 
 UPGRADING
 =========
diff --git a/program/js/app.js b/program/js/app.js
index 943b144..bda6700 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -35,7 +35,7 @@
  
   // webmail client settings
   this.dblclick_time = 500;
-  this.message_time = 5000;
+  this.message_time = 3000;
   
   this.identifier_expr = new RegExp('[^0-9a-z\-_]', 'gi');
   
@@ -694,7 +694,7 @@
             }
           }
 
-        this.goto_url('get', qstring+'&_download=1');
+        this.goto_url('get', qstring+'&_download=1', false);
         break;
         
       case 'select-all':
@@ -1063,7 +1063,9 @@
       this.unfocus_folder(id);
       this.command('moveto', id);
       }
-  
+
+    // Hide message command buttons until a message is selected 
+    this.enable_command('reply', 'reply-all', 'forward', 'delete', 'print', false); 
     return false;
     };
 
@@ -1088,15 +1090,16 @@
       clearTimeout(this.preview_timer);
 
     var selected = list.selection.length==1;
+
+    // Hide certain command buttons when Drafts folder is selected
     if (this.env.mailbox == this.env.drafts_mailbox)
       {
-      this.enable_command('show', selected);
-      this.enable_command('delete', 'moveto', list.selection.length>0 ? true : false);
+      this.enable_command('reply', 'reply-all', 'forward', false);
+      this.enable_command('show', 'delete', 'moveto', selected);
       }
     else
       {
-      this.enable_command('show', 'reply', 'reply-all', 'forward', 'print', selected);
-      this.enable_command('delete', 'moveto', list.selection.length>0 ? true : false);
+      this.enable_command('show', 'reply', 'reply-all', 'forward', 'print', 'delete', 'moveto', selected);
       }
 
     // start timer for message preview (wait for double click)
@@ -1680,7 +1683,7 @@
       }
 
     // check for empty body
-    if ((input_message.value=='')&&(tinyMCE.getContent()==''))
+    if ((input_message.value=='')&&(tinyMCE == null ? true : (tinyMCE.getContent()=='' || tinyMCE.getContent() == null)))
       {
       if (!confirm(this.get_label('nobodywarning')))
         {
@@ -1711,6 +1714,9 @@
     {
     if (this.env.draft_autosave)
       this.save_timer = self.setTimeout(function(){ ref.command("savedraft"); }, this.env.draft_autosave * 1000);
+
+    // Unlock interface now that saving is complete
+    this.busy = false;
     };
 
 
@@ -3187,9 +3193,11 @@
   /*********        remote request methods        *********/
   /********************************************************/
 
-  this.redirect = function(url)
+  this.redirect = function(url, lock)
     {
-    this.set_busy(true);
+    if (lock || lock == NULL)
+      this.set_busy(true);
+
     if (this.env.framed && window.parent)
       parent.location.href = url;
     else  
@@ -3198,11 +3206,8 @@
 
   this.goto_url = function(action, query, lock)
     {
-    if (lock)
-    this.set_busy(true);
-
     var querystring = query ? '&'+query : '';
-    this.redirect(this.env.comm_path+'&_action='+action+querystring);
+    this.redirect(this.env.comm_path+'&_action='+action+querystring, lock);
     };
 
 
diff --git a/skins/default/mail.css b/skins/default/mail.css
index 0e2466c..ed3b1fc 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -338,7 +338,7 @@
 {
   position: absolute;
   left: 20px;
-  width: 160px;
+  width: 170px;
   bottom: 20px;
   height: 16px;
   overflow: hidden;
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index 8fbb298..99049f8 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -31,7 +31,7 @@
 <form name="form" action="./" method="post">
 
 <div id="messagetoolbar">
-<!--<roundcube:button command="list" image="/images/buttons/back_act.png" imageSel="/images/buttons/back_sel.png" imageAct="/images/buttons/back_act.png" width="32" height="32" title="backtolist" />-->
+<roundcube:button command="list" image="/images/buttons/back_act.png" imageSel="/images/buttons/back_sel.png" imageAct="/images/buttons/back_act.png" width="32" height="32" title="backtolist" />
 <roundcube:button command="send" imageSel="/images/buttons/send_sel.png" imageAct="/images/buttons/send_act.png" imagePas="/images/buttons/send_pas.png" width="32" height="32" title="sendmessage" />
 <roundcube:button command="spellcheck" imageSel="/images/buttons/spellcheck_sel.png" imageAct="/images/buttons/spellcheck_act.png" imagePas="/images/buttons/spellcheck_pas.png" width="32" height="32" title="checkspelling" />
 <roundcube:button command="add-attachment" imageSel="/images/buttons/attach_sel.png" imageAct="/images/buttons/attach_act.png" imagePas="/images/buttons/attach_pas.png" width="32" height="32" title="addattachment" />

--
Gitblit v1.9.1