From 141c9e732df32afb0ff6892b165bd72f1aac2287 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Thu, 27 Aug 2009 02:18:54 -0400
Subject: [PATCH] Reload settings page if language was changed

---
 program/js/app.js |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/program/js/app.js b/program/js/app.js
index 4ad62b4..88e1339 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -697,9 +697,9 @@
         else if (this.task=='settings' && props)
           this.load_identity(props, 'edit-identity');
         else if (this.task=='mail' && (cid = this.get_single_uid())) {
-	  var url = (this.env.mailbox == this.env.drafts_mailbox) ? '_draft_uid=' : '_uid=';
+          var url = (this.env.mailbox == this.env.drafts_mailbox) ? '_draft_uid=' : '_uid=';
           this.goto_url('compose', url+cid+'&_mbox='+urlencode(this.env.mailbox), true);
-	}
+        }
         break;
 
       case 'save-identity':
@@ -837,7 +837,7 @@
       case 'select-all':
         if (props == 'invert')
           this.message_list.invert_selection();
-	else
+        else
           this.message_list.select_all(props);
         break;
 
@@ -1214,6 +1214,16 @@
     this.set_busy(false);
     this.display_message('Request timed out!', 'error');
     };
+  
+  this.reload = function(delay)
+  {
+    if (this.env.framed && parent.rcmail)
+      parent.rcmail.reload(delay);
+    else if (delay)
+      window.setTimeout(function(){ rcmail.reload(); }, delay);
+    else if (window.location)
+      location.href = this.env.comm_path;
+  };
 
 
   /*********************************************************/

--
Gitblit v1.9.1