X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/examples/forum/classes/ForumList.js diff --git a/examples/forum/classes/ForumList.js b/examples/forum/classes/ForumList.js deleted file mode 100644 index 789f6ddb..00000000 --- a/examples/forum/classes/ForumList.js +++ /dev/null @@ -1,59 +0,0 @@ -Ext.define('ForumBrowser.ForumList', { - - extend: 'Ext.tree.Panel', - - alias: 'widget.forumlist', - - rootVisible: false, - lines: false, - defaultForum: 40, - - minWidth: 200, - - initComponent: function(){ - Ext.apply(this, { - viewConfig: { - getRowClass: function(record) { - if (!record.get('leaf')) { - return 'forum-parent'; - } - } - }, - store: Ext.create('Ext.data.TreeStore', { - model: 'ForumBrowser.Forum', - root: { - expanded: true - }, - proxy: { - type: 'jsonp', - url: 'http://sencha.com/forum/forums-remote.php', - reader: { - type: 'json', - root: 'children' - } - }, - listeners: { - single: true, - scope: this, - load: this.onFirstLoad - } - }) - }); - this.callParent(); - this.getSelectionModel().on({ - scope: this, - select: this.onSelect - }); - }, - - onFirstLoad: function(){ - var rec = this.store.getNodeById(this.defaultForum); - this.getSelectionModel().select(rec); - }, - - onSelect: function(selModel, rec){ - if (rec.get('leaf')) { - this.ownerCt.loadForum(rec); - } - } -});