3 * Copyright(c) 2006-2009 Ext JS, LLC
5 * http://www.extjs.com/license
7 Ext.onReady(function() {
10 var tree = new Ext.ux.tree.TreeGrid({
11 title: 'Core Team Projects',
14 renderTo: Ext.getBody(),
24 dataIndex: 'duration',
27 tpl: new Ext.XTemplate('{duration:this.formatHours}', {
28 formatHours: function(v) {
30 return Math.round(v * 60) + ' mins';
31 } else if (Math.floor(v) !== v) {
32 var min = v - Math.floor(v);
33 return Math.floor(v) + 'h ' + Math.round(min * 60) + 'm';
35 return v + ' hour' + (v === 1 ? '' : 's');
40 header: 'Assigned To',
45 dataUrl: 'treegrid-data.json'