From 1ed7d89063311ee3bca1afc76aa502b39d95d196 Mon Sep 17 00:00:00 2001 From: thomasb Date: Tue, 1 Jun 2010 06:32:52 +0000 Subject: Fix subject column after re-arranging cols git-svn-id: https://svn.roundcube.net/trunk@3691 208e9e7b-5314-0410-a742-e7e81cd9613c --- roundcubemail/program/js/app.js | 3 +++ roundcubemail/program/js/list.js | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index b3097b7cf..bbaa79df5 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -1501,6 +1501,9 @@ function rcube_webmail() if ((found = $.inArray('flag', this.env.coltypes)) >= 0) this.set_env('flagged_col', found); + if ((found = $.inArray('subject', this.env.coltypes)) >= 0) + this.set_env('subject_col', found); + this.http_post('save-pref', { '_name':'list_cols', '_value':this.env.coltypes }); }; diff --git a/roundcubemail/program/js/list.js b/roundcubemail/program/js/list.js index a38890e74..33095868e 100644 --- a/roundcubemail/program/js/list.js +++ b/roundcubemail/program/js/list.js @@ -1393,6 +1393,10 @@ column_replace: function(from, to) // update subject column position if (this.subject_col == from) this.subject_col = to > from ? to - 1 : to; + else if (this.subject_col < from && to <= this.subject_col) + this.subject_col++; + else if (this.subject_col > from && to >= this.subject_col) + this.subject_col--; this.triggerEvent('column_replace'); } -- cgit v1.2.3