X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/25ef3491bd9ae007ff1fc2b0d7943e6eaaccf775..10a866c12701c0a0afd0ac85dcdcf32a421514ac:/docs/source/TreeEventModel.html diff --git a/docs/source/TreeEventModel.html b/docs/source/TreeEventModel.html index d1262a6d..a754fdc9 100644 --- a/docs/source/TreeEventModel.html +++ b/docs/source/TreeEventModel.html @@ -1,17 +1,12 @@ - -
-/*! - * Ext JS Library 3.0.3 - * Copyright(c) 2006-2009 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license - */ -Ext.tree.TreeEventModel = function(tree){ + + + ++ \ No newline at end of fileThe source code + + + + +Ext.tree.TreeEventModel = function(tree){ this.tree = tree; this.tree.on('render', this.initEvents, this); } @@ -101,32 +96,42 @@ Ext.tree.TreeEventModel.prototype = { }, delegateClick : function(e, t){ - if(!this.beforeEvent(e)){ - return; - } - - if(e.getTarget('input[type=checkbox]', 1)){ - this.onCheckboxClick(e, this.getNode(e)); - } - else if(e.getTarget('.x-tree-ec-icon', 1)){ - this.onIconClick(e, this.getNode(e)); - } - else if(this.getNodeTarget(e)){ - this.onNodeClick(e, this.getNode(e)); + if(this.beforeEvent(e)){ + if(e.getTarget('input[type=checkbox]', 1)){ + this.onCheckboxClick(e, this.getNode(e)); + }else if(e.getTarget('.x-tree-ec-icon', 1)){ + this.onIconClick(e, this.getNode(e)); + }else if(this.getNodeTarget(e)){ + this.onNodeClick(e, this.getNode(e)); + }else{ + this.onContainerEvent(e, 'click'); + } } }, delegateDblClick : function(e, t){ - if(this.beforeEvent(e) && this.getNodeTarget(e)){ - this.onNodeDblClick(e, this.getNode(e)); + if(this.beforeEvent(e)){ + if(this.getNodeTarget(e)){ + this.onNodeDblClick(e, this.getNode(e)); + }else{ + this.onContainerEvent(e, 'dblclick'); + } } }, delegateContextMenu : function(e, t){ - if(this.beforeEvent(e) && this.getNodeTarget(e)){ - this.onNodeContextMenu(e, this.getNode(e)); + if(this.beforeEvent(e)){ + if(this.getNodeTarget(e)){ + this.onNodeContextMenu(e, this.getNode(e)); + }else{ + this.onContainerEvent(e, 'contextmenu'); + } } }, + + onContainerEvent: function(e, type){ + this.tree.fireEvent('container' + type, this.tree, e); + }, onNodeClick : function(e, node){ node.ui.onClick(e); @@ -180,6 +185,6 @@ Ext.tree.TreeEventModel.prototype = { enable: function(){ this.disabled = false; } -};- +};