summaryrefslogtreecommitdiff
path: root/program/steps/mail/func.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-05-02 15:09:36 +0000
committeralecpl <alec@alec.pl>2010-05-02 15:09:36 +0000
commitb62c4869f7c43804601b7786809e7e7a2508566d (patch)
treea2912d83818b22b0f64ed9cb8e466e386a8e7d26 /program/steps/mail/func.inc
parentd44571bde1db578e69d82ad0121e9b44a89991a0 (diff)
- Allow columns order change per user - drag&drop (#1485795)
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r--program/steps/mail/func.inc23
1 files changed, 13 insertions, 10 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index bd7fa9c43..6a56d2a75 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -154,13 +154,16 @@ function rcmail_message_list($attrib)
$attrib['id'] = 'rcubemessagelist';
// define list of cols to be displayed based on parameter or config
- if (empty($attrib['columns']))
- $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject');
- else
- $a_show_cols = preg_split('/[\s,;]+/', strip_quotes($attrib['columns']));
+ if (empty($attrib['columns'])) {
+ $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject');
+ $OUTPUT->set_env('col_movable', !in_array('list_cols', (array)$CONFIG['dont_override']));
+ }
+ else {
+ $a_show_cols = preg_split('/[\s,;]+/', strip_quotes($attrib['columns']));
+ $attrib['columns'] = $a_show_cols;
+ }
// save some variables for use in ajax list
- $_SESSION['list_columns'] = $a_show_cols;
$_SESSION['list_attrib'] = $attrib;
$mbox = $IMAP->get_mailbox_name();
@@ -220,7 +223,7 @@ function rcmail_message_list($attrib)
$attrib,
html::tag('thead', null, html::tag('tr', null, $thead)) .
html::tag('tbody', null, ''),
- array('style', 'class', 'id', 'cellpadding', 'cellspacing', 'border', 'summary'));
+ array('style', 'class', 'id', 'cellpadding', 'cellspacing', 'border', 'summary'));
}
@@ -232,10 +235,10 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $replace=TRUE, $h
{
global $CONFIG, $IMAP, $OUTPUT;
- if (empty($_SESSION['list_columns']))
- $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject');
+ if (!empty($_SESSION['list_attrib']['columns']))
+ $a_show_cols = $_SESSION['list_attrib']['columns'];
else
- $a_show_cols = $_SESSION['list_columns'];
+ $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject');
$mbox = $IMAP->get_mailbox_name();
$delim = $IMAP->get_hierarchy_delimiter();
@@ -324,7 +327,7 @@ function rcmail_js_message_list($a_headers, $insert_top=FALSE, $replace=TRUE, $h
if ($browser->ie && $replace)
$OUTPUT->command('offline_message_list', false);
- }
+}
/*