Unravel the thread

A thread is a collection of e-mail messages, and the thread view makes up the left-hand pane of our application. It looks something like this:

// app/view/threads/Threads.js Ext.define('Postcard.view.threads.Threads', { extend: 'Ext.DataView', xtype: 'threads', cls: 'thread-view', viewModel: 'threads', controller: 'threads', border: true, deferEmptyText: false, emptyText: 'No messages', autoScroll: true, itemSelector: '.thread', bind: '{threads}' tpl: new Ext.XTemplate('<tpl for=".">', '<div class="thread">', '<div class="date">{lastMessageOn:date("H:m")}</div>', '<div class="details">', '<div class="header">{people} - {subject}</div>', '<div class="body">{[this.stripHtml(values.lastMessageSnippet)]}</div>', '</div>', '</div>', ...

Get Ext JS Application Development Blueprints now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.