WebMail Pro ASP.NET documentation

Adding, removing and modifying columns in message list

Modifying Subject, From (To), Date and Size columns in message list with preview pane displayed to the right from it

These data are prepared for output in message-line.js file, CMessageLine class, _getFromToContent method. In case if message list is displayed for Drafts or Sent Items folders, To field is displayed, From otherwise.

To switch over Size and Date, the lines which form those fields should be swapped:

content += '<span class="wm_inbox_message_date" title="' + this.MsgFullDate + '">' + this.MsgDate + '</span>';
content += '<span class="wm_inbox_message_size">' + GetFriendlySize(this.MsgSize) + '</span>';

And this is what we should do to display Subject below From (To):

content +=  (useFrom)
? '<div>' + this.MsgFromAddr + '</div>'
: '<div>' + this.MsgToAddr + '</div>';
content += '<div class="wm_inbox_subject">' + this._getSubjectContent() + '</div>';

Modifying columns holding checkboxes, attachments, flag

In mail/message-list-prototype.js file, BuildInboxTable function builds a set of columns used in a message list. It’s possible to swap attachments and flag columns:

inboxTable.addColumn(IH_FLAGGED, InboxHeaders[IH_FLAGGED]);
inboxTable.addColumn(IH_ATTACHMENTS, InboxHeaders[IH_ATTACHMENTS]);

or remove a column, this is done by removing a line:

inboxTable.addColumn(IH_FLAGGED, InboxHeaders[IH_FLAGGED]);

To have priority column always displayed, the following code:

if (window.AddPriorityHeader) {
  inboxTable.addColumn(IH_PRIORITY, InboxHeaders[IH_PRIORITY]);
}

should be replaced with:

inboxTable.addColumn(IH_PRIORITY, InboxHeaders[IH_PRIORITY]);

Modifying Subject, From (To), Date and Size columns in message list with preview pane displayed below it

In mail/message-list-prototype.js file, BuildInboxTable function builds a set of columns used in a message list. The lines:

this._fromColumn = inboxTable.addColumn(IH_FROM, InboxHeaders[IH_FROM]);
this._dateColumn = inboxTable.addColumn(IH_DATE, InboxHeaders[IH_DATE]);
this._sizeColumn = inboxTable.addColumn(IH_SIZE, InboxHeaders[IH_SIZE]);
this._subjectColumn = inboxTable.addColumn(IH_SUBJECT, InboxHeaders[IH_SUBJECT]);

can be supplied in any order, that would define order of the columns. Any of the lines except From can be removed.