Permalink
Browse files

Enable HTML styling of lists.

I noticed that the templates used <strong> tags:

    itemTpl: '<div class="contact"><strong>{firstName}</strong> {lastName}</div>'

but the HTML didn't show firstName in bold. I thought I'd try and fix
this by adding the styleHtmlContent property to true. Unfortunately,
this breaks the appearance of the list.
  • Loading branch information...
nelstrom committed Dec 23, 2010
1 parent 3acb64f commit ba181e0684370be5afce03470d6ac8ea0310ac58
Showing with 3 additions and 0 deletions.
  1. +3 −0 public/javascripts/index.js
@@ -87,6 +87,7 @@ Ext.setup({
width: Ext.is.Phone ? undefined : 300,
height: 500,
xtype: 'list',
+ styleHtmlContent: true,
store: demos.ListStore,
itemTpl: '<div class="contact"><strong>{firstName}</strong> {lastName}</div>'
}]
@@ -102,6 +103,7 @@ Ext.setup({
width: Ext.is.Phone ? undefined : 300,
height: 500,
xtype: 'list',
+ styleHtmlContent: true,
store: demos.ListStore,
itemTpl: '<div class="contact"><strong>{firstName}</strong> {lastName}</div>',
grouped: true,
@@ -119,6 +121,7 @@ Ext.setup({
width: Ext.is.Phone ? undefined : 300,
height: Ext.is.Phone ? undefined : 500,
xtype: 'list',
+ styleHtmlContent: true,
onItemDisclosure: function(record, btn, index) {
Ext.Msg.alert('Tap', 'Disclose more info for ' + record.get('firstName'), Ext.emptyFn);
},

0 comments on commit ba181e0

Please sign in to comment.