From c97c5756710f651873e4e7c600d46fba917d43c7 Mon Sep 17 00:00:00 2001
From: thomascube <thomas@roundcube.net>
Date: Wed, 11 Apr 2012 11:30:19 -0400
Subject: [PATCH] Force page reload if list columns changed in IE8 (#1487822)
---
CHANGELOG | 1 +
program/steps/mail/list.inc | 8 +++++++-
program/include/rcube_json_output.php | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 17375a4..d1c52f1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Force page reload if list columns changed in IE8 (#1487822)
- Allow mass-removal of addresses from a group (#1487748)
- Fix removing all contacts on import to LDAP addressbook
- Fix so "Back" from compose/show doesn't reset search request (#1488238)
diff --git a/program/include/rcube_json_output.php b/program/include/rcube_json_output.php
index 99f08f5..f062d4b 100644
--- a/program/include/rcube_json_output.php
+++ b/program/include/rcube_json_output.php
@@ -212,7 +212,7 @@
public function redirect($p = array(), $delay = 1)
{
$location = rcmail::get_instance()->url($p);
- $this->remote_response("window.setTimeout(\"location.href='{$location}'\", $delay);");
+ $this->remote_response(sprintf("window.setTimeout(function(){ %s.redirect('%s',true); }, %d);", JS_OBJECT_NAME, $location, $delay));
exit;
}
diff --git a/program/steps/mail/list.inc b/program/steps/mail/list.inc
index dad8666..9307583 100644
--- a/program/steps/mail/list.inc
+++ b/program/steps/mail/list.inc
@@ -51,9 +51,15 @@
$save_arr['list_cols'] = explode(',', $cols);
}
-if ($save_arr)
+if ($save_arr) {
$RCMAIL->user->save_prefs($save_arr);
+ // force page reload if list columns changed in IE8 (#1487822)
+ if ($save_arr['list_cols'] && $OUTPUT->browser->ie && $OUTPUT->browser->ver == 8) {
+ $OUTPUT->redirect(array('_mbox' => $RCMAIL->storage->get_folder()), 0);
+ }
+}
+
$mbox_name = $RCMAIL->storage->get_folder();
$threading = (bool) $RCMAIL->storage->get_threading();
--
Gitblit v1.9.1