thomascube
2009-08-27 141c9e732df32afb0ff6892b165bd72f1aac2287
Reload settings page if language was changed

2 files modified
13 ■■■■■ changed files
program/js/app.js 10 ●●●●● patch | view | raw | blame | history
program/steps/settings/save_prefs.inc 3 ●●●● patch | view | raw | blame | history
program/js/app.js
@@ -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;
  };
  /*********************************************************/
program/steps/settings/save_prefs.inc
@@ -102,8 +102,9 @@
  case 'general':
    // switch UI language
    if (isset($_POST['_language'])) {
    if (isset($_POST['_language']) && $a_user_prefs['language'] != $_SESSION['language']) {
      $RCMAIL->load_language($a_user_prefs['language']);
      $OUTPUT->command('reload', 500);
    }
    // switch skin