X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..c930e9176a5a85509c5b0230e2bff5c22a591432:/air/samples/tasks/js/ListSelector.js diff --git a/air/samples/tasks/js/ListSelector.js b/air/samples/tasks/js/ListSelector.js deleted file mode 100644 index d18074bf..00000000 --- a/air/samples/tasks/js/ListSelector.js +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Ext JS Library 0.30 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -// Implementation class for created the tree powered form field -ListSelector = Ext.extend(Ext.ux.TreeSelector, { - maxHeight:200, - listenForLoad: false, - initComponent : function(){ - - this.tree = new Ext.tree.TreePanel({ - animate:false, - border:false, - width: this.treeWidth || 180, - autoScroll:true, - useArrows:true, - selModel: new Ext.tree.ActivationModel(), - loader : new ListLoader({store: this.store}) - }); - - var root = new Ext.tree.AsyncTreeNode({ - text: 'All Lists', - id: 'root', - leaf: false, - iconCls: 'icon-folder', - expanded: true, - isFolder: true - }); - this.tree.setRootNode(root); - - this.tree.on('render', function(){ - this.store.bindTree(this.tree); - }, this); - - ListSelector.superclass.initComponent.call(this); - - // selecting folders is not allowed, so filter them - this.tree.getSelectionModel().on('beforeselect', this.beforeSelection, this); - - // if being rendered before the store is loaded, reload when it is loaded - if(this.listenForLoad) { - this.store.on('load', function(){ - root.reload(); - }, this, { - single: true - }); - } - }, - - beforeSelection : function(tree, node){ - if(node && node.attributes.isFolder){ - node.toggle(); - return false; - } - } -}); \ No newline at end of file