From 2f3e9f960c286eab7c94af1ab72400466f8d2dcb Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 2 Feb 2016 18:53:40 +0100 Subject: [PATCH] Fix moving sessions list columns and proper closing of loading message on request errors --- plugins/kolab_files/kolab_files.js | 6 +++--- plugins/kolab_files/lib/kolab_files_engine.php | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/plugins/kolab_files/kolab_files.js b/plugins/kolab_files/kolab_files.js index 17370f05..48a7281a 100644 --- a/plugins/kolab_files/kolab_files.js +++ b/plugins/kolab_files/kolab_files.js @@ -1708,7 +1708,7 @@ rcube_webmail.prototype.sessions_list_update = function(head) var list = this.sessionslist; $('thead', list.fixed_header ? list.fixed_header : list.list).html(head); - kolab_files_list_coltypes(); + kolab_files_list_coltypes('sessions'); file_api.sessions_list(); }; @@ -1912,9 +1912,9 @@ function kolab_files_ui() return rcmail.display_message(this.t(label), type); }; - this.http_error = function(request, status, err) + this.http_error = function(request, status, err, data) { - rcmail.http_error(request, status, err); + rcmail.http_error(request, status, err, data ? data.req_id : null); }; // check if specified/current folder/view is writable diff --git a/plugins/kolab_files/lib/kolab_files_engine.php b/plugins/kolab_files/lib/kolab_files_engine.php index 6216b2f9..da5aae88 100644 --- a/plugins/kolab_files/lib/kolab_files_engine.php +++ b/plugins/kolab_files/lib/kolab_files_engine.php @@ -679,11 +679,12 @@ class kolab_files_engine */ protected function list_update($prefs, $type = 'files') { - $prefix = 'kolab_' . $type . '_list_'; - $attrib = $_SESSION[$prefix . 'attrib']; + $prefix = 'kolab_' . $type . '_list_'; + $c_prefix = 'kolab_files' . ($type != 'files' ? '_' . $type : '') . '_list_'; + $attrib = $_SESSION[$prefix . 'attrib']; - if (!empty($prefs[$prefix . 'cols'])) { - $attrib['columns'] = $prefs[$prefix . 'cols']; + if (!empty($prefs[$c_prefix . 'cols'])) { + $attrib['columns'] = $prefs[$c_prefix . 'cols']; $_SESSION[$prefix . 'attrib'] = $attrib; }