Opened 4 years ago

Closed 4 years ago

#1485806 closed Feature Requests (duplicate)

Reorderable columns

Reported by: Technetux Owned by:
Priority: 5 Milestone: 0.3-stable
Component: User Interface Version: devel-vnext
Severity: normal Keywords: reorder columns order status
Cc: darklight.xdarklight@…, technetux@…

Description

This patch gives more control over the columns displayed in the message list via main.inc.php such as allowing the removal and reordering of each column.

Additionally, hooks are placed in func.php for the messagelist header and body so additional columns may be added with a plugin. Similarly, a javascript hook is added in app.js to add body columns.

I'm not satisfied with how I'm passing column data to javascript through the use of env:

this.set_env('col_colName', c);
this.set_env('col_uid', uid);

Instead it would be ideal if something like this could be used:

this.triggerEvent('column', { colName:c, id:uid });

Attachments (1)

tmp.diff (6.7 KB) - added by Technetux 4 years ago.

Download all attachments as: .zip

Change History (7)

Changed 4 years ago by Technetux

comment:1 Changed 4 years ago by alec

  • Milestone changed from later to 0.3-beta

comment:2 follow-up: Changed 4 years ago by darklight

  • Cc darklight.xdarklight@… added

Hi,

looks nice so far, but am I missing something or is there no (easy :)) way to re-order (or even removing) columns?
it would be nice if you could share such code (or at least explain how it would work in theory - because it I'm not able to understand how you would remove a column or re-order columns)

PS: I've already tried porting this to latest svn - I only have to solve one conflict - but to solve it I must understand your code

Regards,
Martin

comment:3 in reply to: ↑ 2 ; follow-up: Changed 4 years ago by Technetux

Replying to darklight:

Hi,

looks nice so far, but am I missing something or is there no (easy :)) way to re-order (or even removing) columns?
it would be nice if you could share such code (or at least explain how it would work in theory - because it I'm not able to understand how you would remove a column or re-order columns)

PS: I've already tried porting this to latest svn - I only have to solve one conflict - but to solve it I must understand your code

Regards,
Martin

The easy way would be editing $rcmail_configlist_cols? in main.inc.php. As for understanding the code, what part do you need clarification?

comment:4 in reply to: ↑ 3 Changed 4 years ago by darklight

Hi,

Replying to Technetux:

The easy way would be editing $rcmail_configlist_cols? in main.inc.php. As for understanding the code, what part do you need clarification?

damn, now I got it :)
I thought you also implemented some javascript code to move them "on the fly" (already wondered why there was no saving logics)

Think I got it now - thanks

Regards,
Martin

comment:5 Changed 4 years ago by Technetux

  • Cc technetux@… added
  • Keywords order status added; column plugin hook removed
  • Summary changed from Reorderable columns + column plugin hooks to Reorderable columns

The hooks have become irrelevant so now I think it has come down to simply allowing the status column to be set by $rcmail_config['list_cols'] so plugins may easily use the first message list column.

For example: $rcmail_config['list_cols'] = array('plugin_col', 'status', 'subject', 'from', 'date', 'size', 'flag', 'attachment');

As Martin pointed out, the title is quite misleading. Dynamic reordering of columns would be cool but I think simply letting the list_cols config option represent the complete ordered message list structure would be enough, for my intentions anyway.

comment:6 Changed 4 years ago by alec

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #1485795

Note: See TracTickets for help on using tickets.